2 #define TRACE_SYSTEM irq_vectors
4 #if !defined(_TRACE_IRQ_VECTORS_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_IRQ_VECTORS_H
7 #include <linux/tracepoint.h>
9 extern int trace_irq_vector_regfunc(void);
10 extern void trace_irq_vector_unregfunc(void);
12 DECLARE_EVENT_CLASS(x86_irq_vector
,
19 __field( int, vector
)
23 __entry
->vector
= vector
;
26 TP_printk("vector=%d", __entry
->vector
) );
28 #define DEFINE_IRQ_VECTOR_EVENT(name) \
29 DEFINE_EVENT_FN(x86_irq_vector, name##_entry, \
30 TP_PROTO(int vector), \
32 trace_irq_vector_regfunc, \
33 trace_irq_vector_unregfunc); \
34 DEFINE_EVENT_FN(x86_irq_vector, name##_exit, \
35 TP_PROTO(int vector), \
37 trace_irq_vector_regfunc, \
38 trace_irq_vector_unregfunc);
42 * local_timer - called when entering/exiting a local timer interrupt
45 DEFINE_IRQ_VECTOR_EVENT(local_timer
);
48 * reschedule - called when entering/exiting a reschedule vector handler
50 DEFINE_IRQ_VECTOR_EVENT(reschedule
);
53 * spurious_apic - called when entering/exiting a spurious apic vector handler
55 DEFINE_IRQ_VECTOR_EVENT(spurious_apic
);
58 * error_apic - called when entering/exiting an error apic vector handler
60 DEFINE_IRQ_VECTOR_EVENT(error_apic
);
63 * x86_platform_ipi - called when entering/exiting a x86 platform ipi interrupt
66 DEFINE_IRQ_VECTOR_EVENT(x86_platform_ipi
);
69 * irq_work - called when entering/exiting a irq work interrupt
72 DEFINE_IRQ_VECTOR_EVENT(irq_work
);
75 * We must dis-allow sampling irq_work_exit() because perf event sampling
76 * itself can cause irq_work, which would lead to an infinite loop;
78 * 1) irq_work_exit happens
79 * 2) generates perf sample
80 * 3) generates irq_work
83 TRACE_EVENT_PERF_PERM(irq_work_exit
, is_sampling_event(p_event
) ? -EPERM
: 0);
86 * call_function - called when entering/exiting a call function interrupt
89 DEFINE_IRQ_VECTOR_EVENT(call_function
);
92 * call_function_single - called when entering/exiting a call function
93 * single interrupt vector handler
95 DEFINE_IRQ_VECTOR_EVENT(call_function_single
);
98 * threshold_apic - called when entering/exiting a threshold apic interrupt
101 DEFINE_IRQ_VECTOR_EVENT(threshold_apic
);
104 * deferred_error_apic - called when entering/exiting a deferred apic interrupt
107 DEFINE_IRQ_VECTOR_EVENT(deferred_error_apic
);
110 * thermal_apic - called when entering/exiting a thermal apic interrupt
113 DEFINE_IRQ_VECTOR_EVENT(thermal_apic
);
115 #undef TRACE_INCLUDE_PATH
116 #define TRACE_INCLUDE_PATH .
117 #define TRACE_INCLUDE_FILE irq_vectors
118 #endif /* _TRACE_IRQ_VECTORS_H */
120 /* This part must be outside protection */
121 #include <trace/define_trace.h>