]>
Commit | Line | Data |
---|---|---|
c3bc8fd6 | 1 | #ifdef CONFIG_PREEMPTIRQ_TRACEPOINTS |
d5915816 JF |
2 | |
3 | #undef TRACE_SYSTEM | |
4 | #define TRACE_SYSTEM preemptirq | |
5 | ||
6 | #if !defined(_TRACE_PREEMPTIRQ_H) || defined(TRACE_HEADER_MULTI_READ) | |
7 | #define _TRACE_PREEMPTIRQ_H | |
8 | ||
9 | #include <linux/ktime.h> | |
10 | #include <linux/tracepoint.h> | |
11 | #include <linux/string.h> | |
12 | #include <asm/sections.h> | |
13 | ||
14 | DECLARE_EVENT_CLASS(preemptirq_template, | |
15 | ||
16 | TP_PROTO(unsigned long ip, unsigned long parent_ip), | |
17 | ||
18 | TP_ARGS(ip, parent_ip), | |
19 | ||
20 | TP_STRUCT__entry( | |
bf44f488 JFG |
21 | __field(s32, caller_offs) |
22 | __field(s32, parent_offs) | |
d5915816 JF |
23 | ), |
24 | ||
25 | TP_fast_assign( | |
bf44f488 JFG |
26 | __entry->caller_offs = (s32)(ip - (unsigned long)_stext); |
27 | __entry->parent_offs = (s32)(parent_ip - (unsigned long)_stext); | |
d5915816 JF |
28 | ), |
29 | ||
d75f773c | 30 | TP_printk("caller=%pS parent=%pS", |
d5915816 JF |
31 | (void *)((unsigned long)(_stext) + __entry->caller_offs), |
32 | (void *)((unsigned long)(_stext) + __entry->parent_offs)) | |
33 | ); | |
34 | ||
c3bc8fd6 | 35 | #ifdef CONFIG_TRACE_IRQFLAGS |
d5915816 JF |
36 | DEFINE_EVENT(preemptirq_template, irq_disable, |
37 | TP_PROTO(unsigned long ip, unsigned long parent_ip), | |
38 | TP_ARGS(ip, parent_ip)); | |
39 | ||
40 | DEFINE_EVENT(preemptirq_template, irq_enable, | |
41 | TP_PROTO(unsigned long ip, unsigned long parent_ip), | |
42 | TP_ARGS(ip, parent_ip)); | |
c3bc8fd6 JFG |
43 | #else |
44 | #define trace_irq_enable(...) | |
45 | #define trace_irq_disable(...) | |
46 | #define trace_irq_enable_rcuidle(...) | |
47 | #define trace_irq_disable_rcuidle(...) | |
d5915816 JF |
48 | #endif |
49 | ||
c3bc8fd6 | 50 | #ifdef CONFIG_TRACE_PREEMPT_TOGGLE |
d5915816 JF |
51 | DEFINE_EVENT(preemptirq_template, preempt_disable, |
52 | TP_PROTO(unsigned long ip, unsigned long parent_ip), | |
53 | TP_ARGS(ip, parent_ip)); | |
54 | ||
55 | DEFINE_EVENT(preemptirq_template, preempt_enable, | |
56 | TP_PROTO(unsigned long ip, unsigned long parent_ip), | |
57 | TP_ARGS(ip, parent_ip)); | |
c3bc8fd6 JFG |
58 | #else |
59 | #define trace_preempt_enable(...) | |
60 | #define trace_preempt_disable(...) | |
61 | #define trace_preempt_enable_rcuidle(...) | |
62 | #define trace_preempt_disable_rcuidle(...) | |
d5915816 JF |
63 | #endif |
64 | ||
65 | #endif /* _TRACE_PREEMPTIRQ_H */ | |
66 | ||
67 | #include <trace/define_trace.h> | |
68 | ||
c3bc8fd6 | 69 | #else /* !CONFIG_PREEMPTIRQ_TRACEPOINTS */ |
d5915816 JF |
70 | #define trace_irq_enable(...) |
71 | #define trace_irq_disable(...) | |
d5915816 JF |
72 | #define trace_irq_enable_rcuidle(...) |
73 | #define trace_irq_disable_rcuidle(...) | |
250d0c77 AB |
74 | #define trace_preempt_enable(...) |
75 | #define trace_preempt_disable(...) | |
d5915816 JF |
76 | #define trace_preempt_enable_rcuidle(...) |
77 | #define trace_preempt_disable_rcuidle(...) | |
d5915816 | 78 | #endif |