aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/events/irq.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2010-10-19 09:00:13 -0400
committerThomas Gleixner <tglx@linutronix.de>2010-10-21 10:50:29 -0400
commitf4bc6bb2d562703eafc895c37e7be20906de139d (patch)
treee80d4ed1bc925a2236773eff7d68163c534efea3 /include/trace/events/irq.h
parent750ed158bf6c782d2813da1bca2c824365a0b777 (diff)
tracing: Cleanup the convoluted softirq tracepoints
With the addition of trace_softirq_raise() the softirq tracepoint got even more convoluted. Why the tracepoints take two pointers to assign an integer is beyond my comprehension. But adding an extra case which treats the first pointer as an unsigned long when the second pointer is NULL including the back and forth type casting is just horrible. Convert the softirq tracepoints to take a single unsigned int argument for the softirq vector number and fix the call sites. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> LKML-Reference: <alpine.LFD.2.00.1010191428560.6815@localhost6.localdomain6> Acked-by: Peter Zijlstra <peterz@infradead.org> Acked-by: mathieu.desnoyers@efficios.com Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/trace/events/irq.h')
-rw-r--r--include/trace/events/irq.h54
1 files changed, 20 insertions, 34 deletions
diff --git a/include/trace/events/irq.h b/include/trace/events/irq.h
index 6fa7cbab7d93..1c09820df585 100644
--- a/include/trace/events/irq.h
+++ b/include/trace/events/irq.h
@@ -86,76 +86,62 @@ TRACE_EVENT(irq_handler_exit,
86 86
87DECLARE_EVENT_CLASS(softirq, 87DECLARE_EVENT_CLASS(softirq,
88 88
89 TP_PROTO(struct softirq_action *h, struct softirq_action *vec), 89 TP_PROTO(unsigned int vec_nr),
90 90
91 TP_ARGS(h, vec), 91 TP_ARGS(vec_nr),
92 92
93 TP_STRUCT__entry( 93 TP_STRUCT__entry(
94 __field( int, vec ) 94 __field( unsigned int, vec )
95 ), 95 ),
96 96
97 TP_fast_assign( 97 TP_fast_assign(
98 if (vec) 98 __entry->vec = vec_nr;
99 __entry->vec = (int)(h - vec);
100 else
101 __entry->vec = (int)(long)h;
102 ), 99 ),
103 100
104 TP_printk("vec=%d [action=%s]", __entry->vec, 101 TP_printk("vec=%u [action=%s]", __entry->vec,
105 show_softirq_name(__entry->vec)) 102 show_softirq_name(__entry->vec))
106); 103);
107 104
108/** 105/**
109 * softirq_entry - called immediately before the softirq handler 106 * softirq_entry - called immediately before the softirq handler
110 * @h: pointer to struct softirq_action 107 * @vec_nr: softirq vector number
111 * @vec: pointer to first struct softirq_action in softirq_vec array
112 * 108 *
113 * The @h parameter, contains a pointer to the struct softirq_action 109 * When used in combination with the softirq_exit tracepoint
114 * which has a pointer to the action handler that is called. By subtracting 110 * we can determine the softirq handler runtine.
115 * the @vec pointer from the @h pointer, we can determine the softirq
116 * number. Also, when used in combination with the softirq_exit tracepoint
117 * we can determine the softirq latency.
118 */ 111 */
119DEFINE_EVENT(softirq, softirq_entry, 112DEFINE_EVENT(softirq, softirq_entry,
120 113
121 TP_PROTO(struct softirq_action *h, struct softirq_action *vec), 114 TP_PROTO(unsigned int vec_nr),
122 115
123 TP_ARGS(h, vec) 116 TP_ARGS(vec_nr)
124); 117);
125 118
126/** 119/**
127 * softirq_exit - called immediately after the softirq handler returns 120 * softirq_exit - called immediately after the softirq handler returns
128 * @h: pointer to struct softirq_action 121 * @vec_nr: softirq vector number
129 * @vec: pointer to first struct softirq_action in softirq_vec array
130 * 122 *
131 * The @h parameter contains a pointer to the struct softirq_action 123 * When used in combination with the softirq_entry tracepoint
132 * that has handled the softirq. By subtracting the @vec pointer from 124 * we can determine the softirq handler runtine.
133 * the @h pointer, we can determine the softirq number. Also, when used in
134 * combination with the softirq_entry tracepoint we can determine the softirq
135 * latency.
136 */ 125 */
137DEFINE_EVENT(softirq, softirq_exit, 126DEFINE_EVENT(softirq, softirq_exit,
138 127
139 TP_PROTO(struct softirq_action *h, struct softirq_action *vec), 128 TP_PROTO(unsigned int vec_nr),
140 129
141 TP_ARGS(h, vec) 130 TP_ARGS(vec_nr)
142); 131);
143 132
144/** 133/**
145 * softirq_raise - called immediately when a softirq is raised 134 * softirq_raise - called immediately when a softirq is raised
146 * @h: pointer to struct softirq_action 135 * @vec_nr: softirq vector number
147 * @vec: pointer to first struct softirq_action in softirq_vec array
148 * 136 *
149 * The @h parameter contains a pointer to the softirq vector number which is 137 * When used in combination with the softirq_entry tracepoint
150 * raised. @vec is NULL and it means @h includes vector number not 138 * we can determine the softirq raise to run latency.
151 * softirq_action. When used in combination with the softirq_entry tracepoint
152 * we can determine the softirq raise latency.
153 */ 139 */
154DEFINE_EVENT(softirq, softirq_raise, 140DEFINE_EVENT(softirq, softirq_raise,
155 141
156 TP_PROTO(struct softirq_action *h, struct softirq_action *vec), 142 TP_PROTO(unsigned int vec_nr),
157 143
158 TP_ARGS(h, vec) 144 TP_ARGS(vec_nr)
159); 145);
160 146
161#endif /* _TRACE_IRQ_H */ 147#endif /* _TRACE_IRQ_H */