aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/events/irq.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/trace/events/irq.h')
-rw-r--r--include/trace/events/irq.h52
1 files changed, 24 insertions, 28 deletions
diff --git a/include/trace/events/irq.h b/include/trace/events/irq.h
index b89f9db4a404..0e4cfb694fe7 100644
--- a/include/trace/events/irq.h
+++ b/include/trace/events/irq.h
@@ -48,7 +48,7 @@ TRACE_EVENT(irq_handler_entry,
48 __assign_str(name, action->name); 48 __assign_str(name, action->name);
49 ), 49 ),
50 50
51 TP_printk("irq=%d handler=%s", __entry->irq, __get_str(name)) 51 TP_printk("irq=%d name=%s", __entry->irq, __get_str(name))
52); 52);
53 53
54/** 54/**
@@ -78,22 +78,11 @@ TRACE_EVENT(irq_handler_exit,
78 __entry->ret = ret; 78 __entry->ret = ret;
79 ), 79 ),
80 80
81 TP_printk("irq=%d return=%s", 81 TP_printk("irq=%d ret=%s",
82 __entry->irq, __entry->ret ? "handled" : "unhandled") 82 __entry->irq, __entry->ret ? "handled" : "unhandled")
83); 83);
84 84
85/** 85DECLARE_EVENT_CLASS(softirq,
86 * softirq_entry - called immediately before the softirq handler
87 * @h: pointer to struct softirq_action
88 * @vec: pointer to first struct softirq_action in softirq_vec array
89 *
90 * The @h parameter, contains a pointer to the struct softirq_action
91 * which has a pointer to the action handler that is called. By subtracting
92 * the @vec pointer from the @h pointer, we can determine the softirq
93 * number. Also, when used in combination with the softirq_exit tracepoint
94 * we can determine the softirq latency.
95 */
96TRACE_EVENT(softirq_entry,
97 86
98 TP_PROTO(struct softirq_action *h, struct softirq_action *vec), 87 TP_PROTO(struct softirq_action *h, struct softirq_action *vec),
99 88
@@ -107,11 +96,29 @@ TRACE_EVENT(softirq_entry,
107 __entry->vec = (int)(h - vec); 96 __entry->vec = (int)(h - vec);
108 ), 97 ),
109 98
110 TP_printk("softirq=%d action=%s", __entry->vec, 99 TP_printk("vec=%d [action=%s]", __entry->vec,
111 show_softirq_name(__entry->vec)) 100 show_softirq_name(__entry->vec))
112); 101);
113 102
114/** 103/**
104 * softirq_entry - called immediately before the softirq handler
105 * @h: pointer to struct softirq_action
106 * @vec: pointer to first struct softirq_action in softirq_vec array
107 *
108 * The @h parameter, contains a pointer to the struct softirq_action
109 * which has a pointer to the action handler that is called. By subtracting
110 * the @vec pointer from the @h pointer, we can determine the softirq
111 * number. Also, when used in combination with the softirq_exit tracepoint
112 * we can determine the softirq latency.
113 */
114DEFINE_EVENT(softirq, softirq_entry,
115
116 TP_PROTO(struct softirq_action *h, struct softirq_action *vec),
117
118 TP_ARGS(h, vec)
119);
120
121/**
115 * softirq_exit - called immediately after the softirq handler returns 122 * softirq_exit - called immediately after the softirq handler returns
116 * @h: pointer to struct softirq_action 123 * @h: pointer to struct softirq_action
117 * @vec: pointer to first struct softirq_action in softirq_vec array 124 * @vec: pointer to first struct softirq_action in softirq_vec array
@@ -122,22 +129,11 @@ TRACE_EVENT(softirq_entry,
122 * combination with the softirq_entry tracepoint we can determine the softirq 129 * combination with the softirq_entry tracepoint we can determine the softirq
123 * latency. 130 * latency.
124 */ 131 */
125TRACE_EVENT(softirq_exit, 132DEFINE_EVENT(softirq, softirq_exit,
126 133
127 TP_PROTO(struct softirq_action *h, struct softirq_action *vec), 134 TP_PROTO(struct softirq_action *h, struct softirq_action *vec),
128 135
129 TP_ARGS(h, vec), 136 TP_ARGS(h, vec)
130
131 TP_STRUCT__entry(
132 __field( int, vec )
133 ),
134
135 TP_fast_assign(
136 __entry->vec = (int)(h - vec);
137 ),
138
139 TP_printk("softirq=%d action=%s", __entry->vec,
140 show_softirq_name(__entry->vec))
141); 137);
142 138
143#endif /* _TRACE_IRQ_H */ 139#endif /* _TRACE_IRQ_H */