x86/tracing: Introduce a static key for exception tracing

Switching the IDT just for avoiding tracepoints creates a completely
impenetrable macro/inline/ifdef mess.

There is no point in avoiding tracepoints for most of the traps/exceptions.
For the more expensive tracepoints, like pagefaults, this can be handled with
an explicit static key.

Preparatory patch to remove the tracing IDT.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/20170828064956.593094539@linutronix.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Bu işleme şunda yer alıyor:
Thomas Gleixner
2017-08-28 08:47:21 +02:00
işlemeyi yapan: Ingo Molnar
ebeveyn f7eaf6e00f
işleme 2feb1b316d
4 değiştirilmiş dosya ile 25 ekleme ve 7 silme

Dosyayı Görüntüle

@@ -0,0 +1,15 @@
#ifndef _ASM_TRACE_COMMON_H
#define _ASM_TRACE_COMMON_H
extern int trace_irq_vector_regfunc(void);
extern void trace_irq_vector_unregfunc(void);
#ifdef CONFIG_TRACING
DECLARE_STATIC_KEY_FALSE(trace_irqvectors_key);
#define trace_irqvectors_enabled() \
static_branch_unlikely(&trace_irqvectors_key)
#else
static inline bool trace_irqvectors_enabled(void) { return false; }
#endif
#endif

Dosyayı Görüntüle

@@ -5,9 +5,7 @@
#define _TRACE_PAGE_FAULT_H
#include <linux/tracepoint.h>
extern int trace_irq_vector_regfunc(void);
extern void trace_irq_vector_unregfunc(void);
#include <asm/trace/common.h>
DECLARE_EVENT_CLASS(x86_exceptions,

Dosyayı Görüntüle

@@ -5,9 +5,7 @@
#define _TRACE_IRQ_VECTORS_H
#include <linux/tracepoint.h>
extern int trace_irq_vector_regfunc(void);
extern void trace_irq_vector_unregfunc(void);
#include <asm/trace/common.h>
DECLARE_EVENT_CLASS(x86_irq_vector,