diff options
Diffstat (limited to 'include/trace/events/irq.h')
-rw-r--r-- | include/trace/events/irq.h | 56 |
1 files changed, 32 insertions, 24 deletions
diff --git a/include/trace/events/irq.h b/include/trace/events/irq.h index 0e4cfb694fe7..1c09820df585 100644 --- a/include/trace/events/irq.h +++ b/include/trace/events/irq.h | |||
@@ -5,7 +5,9 @@ | |||
5 | #define _TRACE_IRQ_H | 5 | #define _TRACE_IRQ_H |
6 | 6 | ||
7 | #include <linux/tracepoint.h> | 7 | #include <linux/tracepoint.h> |
8 | #include <linux/interrupt.h> | 8 | |
9 | struct irqaction; | ||
10 | struct softirq_action; | ||
9 | 11 | ||
10 | #define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq } | 12 | #define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq } |
11 | #define show_softirq_name(val) \ | 13 | #define show_softirq_name(val) \ |
@@ -84,56 +86,62 @@ TRACE_EVENT(irq_handler_exit, | |||
84 | 86 | ||
85 | DECLARE_EVENT_CLASS(softirq, | 87 | DECLARE_EVENT_CLASS(softirq, |
86 | 88 | ||
87 | TP_PROTO(struct softirq_action *h, struct softirq_action *vec), | 89 | TP_PROTO(unsigned int vec_nr), |
88 | 90 | ||
89 | TP_ARGS(h, vec), | 91 | TP_ARGS(vec_nr), |
90 | 92 | ||
91 | TP_STRUCT__entry( | 93 | TP_STRUCT__entry( |
92 | __field( int, vec ) | 94 | __field( unsigned int, vec ) |
93 | ), | 95 | ), |
94 | 96 | ||
95 | TP_fast_assign( | 97 | TP_fast_assign( |
96 | __entry->vec = (int)(h - vec); | 98 | __entry->vec = vec_nr; |
97 | ), | 99 | ), |
98 | 100 | ||
99 | TP_printk("vec=%d [action=%s]", __entry->vec, | 101 | TP_printk("vec=%u [action=%s]", __entry->vec, |
100 | show_softirq_name(__entry->vec)) | 102 | show_softirq_name(__entry->vec)) |
101 | ); | 103 | ); |
102 | 104 | ||
103 | /** | 105 | /** |
104 | * softirq_entry - called immediately before the softirq handler | 106 | * softirq_entry - called immediately before the softirq handler |
105 | * @h: pointer to struct softirq_action | 107 | * @vec_nr: softirq vector number |
106 | * @vec: pointer to first struct softirq_action in softirq_vec array | ||
107 | * | 108 | * |
108 | * The @h parameter, contains a pointer to the struct softirq_action | 109 | * When used in combination with the softirq_exit tracepoint |
109 | * which has a pointer to the action handler that is called. By subtracting | 110 | * we can determine the softirq handler runtine. |
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 | */ | 111 | */ |
114 | DEFINE_EVENT(softirq, softirq_entry, | 112 | DEFINE_EVENT(softirq, softirq_entry, |
115 | 113 | ||
116 | TP_PROTO(struct softirq_action *h, struct softirq_action *vec), | 114 | TP_PROTO(unsigned int vec_nr), |
117 | 115 | ||
118 | TP_ARGS(h, vec) | 116 | TP_ARGS(vec_nr) |
119 | ); | 117 | ); |
120 | 118 | ||
121 | /** | 119 | /** |
122 | * softirq_exit - called immediately after the softirq handler returns | 120 | * softirq_exit - called immediately after the softirq handler returns |
123 | * @h: pointer to struct softirq_action | 121 | * @vec_nr: softirq vector number |
124 | * @vec: pointer to first struct softirq_action in softirq_vec array | ||
125 | * | 122 | * |
126 | * The @h parameter contains a pointer to the struct softirq_action | 123 | * When used in combination with the softirq_entry tracepoint |
127 | * that has handled the softirq. By subtracting the @vec pointer from | 124 | * we can determine the softirq handler runtine. |
128 | * the @h pointer, we can determine the softirq number. Also, when used in | ||
129 | * combination with the softirq_entry tracepoint we can determine the softirq | ||
130 | * latency. | ||
131 | */ | 125 | */ |
132 | DEFINE_EVENT(softirq, softirq_exit, | 126 | DEFINE_EVENT(softirq, softirq_exit, |
133 | 127 | ||
134 | TP_PROTO(struct softirq_action *h, struct softirq_action *vec), | 128 | TP_PROTO(unsigned int vec_nr), |
129 | |||
130 | TP_ARGS(vec_nr) | ||
131 | ); | ||
132 | |||
133 | /** | ||
134 | * softirq_raise - called immediately when a softirq is raised | ||
135 | * @vec_nr: softirq vector number | ||
136 | * | ||
137 | * When used in combination with the softirq_entry tracepoint | ||
138 | * we can determine the softirq raise to run latency. | ||
139 | */ | ||
140 | DEFINE_EVENT(softirq, softirq_raise, | ||
141 | |||
142 | TP_PROTO(unsigned int vec_nr), | ||
135 | 143 | ||
136 | TP_ARGS(h, vec) | 144 | TP_ARGS(vec_nr) |
137 | ); | 145 | ); |
138 | 146 | ||
139 | #endif /* _TRACE_IRQ_H */ | 147 | #endif /* _TRACE_IRQ_H */ |