diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-03-09 23:23:30 -0400 |
---|---|---|
committer | Steven Rostedt <srostedt@redhat.com> | 2009-03-10 00:35:11 -0400 |
commit | d6e2ca4c05be6a5ab16030a9f227301bd6acc9f0 (patch) | |
tree | ee5521921ab200ccba02d8e603cda4a9afc43776 /include/trace | |
parent | 12b5fdb8bbb2d2fc31746d7b672c12fd8897aa08 (diff) |
tracing: convert irq trace points to new macros
Impact: enhancement
Converted the two irq trace point macros. The entry macro copies
the name of the irq handler, thus it is better to simply use the
TRACE_FORMAT macro which uses the trace_printk.
The return of the handler does not need to record the name, thus
the faster C style handler is more approriate.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/irq_event_types.h | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/include/trace/irq_event_types.h b/include/trace/irq_event_types.h index 0147d9eef5f4..43bcb74dd49f 100644 --- a/include/trace/irq_event_types.h +++ b/include/trace/irq_event_types.h | |||
@@ -8,26 +8,36 @@ | |||
8 | #undef TRACE_SYSTEM | 8 | #undef TRACE_SYSTEM |
9 | #define TRACE_SYSTEM irq | 9 | #define TRACE_SYSTEM irq |
10 | 10 | ||
11 | TRACE_EVENT_FORMAT(irq_handler_entry, | 11 | /* |
12 | * Tracepoint for entry of interrupt handler: | ||
13 | */ | ||
14 | TRACE_FORMAT(irq_handler_entry, | ||
12 | TP_PROTO(int irq, struct irqaction *action), | 15 | TP_PROTO(int irq, struct irqaction *action), |
13 | TP_ARGS(irq, action), | 16 | TP_ARGS(irq, action), |
14 | TP_FMT("irq=%d handler=%s", irq, action->name), | 17 | TP_FMT("irq=%d handler=%s", irq, action->name) |
15 | TRACE_STRUCT( | ||
16 | TRACE_FIELD(int, irq, irq) | ||
17 | ), | ||
18 | TP_RAW_FMT("irq %d") | ||
19 | ); | 18 | ); |
20 | 19 | ||
21 | TRACE_EVENT_FORMAT(irq_handler_exit, | 20 | /* |
21 | * Tracepoint for return of an interrupt handler: | ||
22 | */ | ||
23 | TRACE_EVENT(irq_handler_exit, | ||
24 | |||
22 | TP_PROTO(int irq, struct irqaction *action, int ret), | 25 | TP_PROTO(int irq, struct irqaction *action, int ret), |
26 | |||
23 | TP_ARGS(irq, action, ret), | 27 | TP_ARGS(irq, action, ret), |
24 | TP_FMT("irq=%d handler=%s return=%s", | 28 | |
25 | irq, action->name, ret ? "handled" : "unhandled"), | 29 | TP_STRUCT__entry( |
26 | TRACE_STRUCT( | 30 | __field( int, irq ) |
27 | TRACE_FIELD(int, irq, irq) | 31 | __field( int, ret ) |
28 | TRACE_FIELD(int, ret, ret) | ||
29 | ), | 32 | ), |
30 | TP_RAW_FMT("irq %d ret %d") | 33 | |
31 | ); | 34 | TP_printk("irq=%d return=%s", |
35 | __entry->irq, __entry->ret ? "handled" : "unhandled"), | ||
36 | |||
37 | TP_fast_assign( | ||
38 | __entry->irq = irq; | ||
39 | __entry->ret = ret; | ||
40 | ) | ||
41 | ); | ||
32 | 42 | ||
33 | #undef TRACE_SYSTEM | 43 | #undef TRACE_SYSTEM |