aboutsummaryrefslogtreecommitdiff
path: root/include/trace
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-03-09 23:23:30 -0400
committerSteven Rostedt <srostedt@redhat.com>2009-03-10 00:35:11 -0400
commitd6e2ca4c05be6a5ab16030a9f227301bd6acc9f0 (patch)
treeee5521921ab200ccba02d8e603cda4a9afc43776 /include/trace
parent12b5fdb8bbb2d2fc31746d7b672c12fd8897aa08 (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.h38
1 files changed, 24 insertions, 14 deletions
diff --git a/include/trace/irq_event_types.h b/include/trace/irq_event_types.h
index 0147d9eef5f..43bcb74dd49 100644
--- a/include/trace/irq_event_types.h
+++ b/include/trace/irq_event_types.h
@@ -8,26 +8,36 @@
#undef TRACE_SYSTEM
#define TRACE_SYSTEM irq
-TRACE_EVENT_FORMAT(irq_handler_entry,
+/*
+ * Tracepoint for entry of interrupt handler:
+ */
+TRACE_FORMAT(irq_handler_entry,
TP_PROTO(int irq, struct irqaction *action),
TP_ARGS(irq, action),
- TP_FMT("irq=%d handler=%s", irq, action->name),
- TRACE_STRUCT(
- TRACE_FIELD(int, irq, irq)
- ),
- TP_RAW_FMT("irq %d")
+ TP_FMT("irq=%d handler=%s", irq, action->name)
);
-TRACE_EVENT_FORMAT(irq_handler_exit,
+/*
+ * Tracepoint for return of an interrupt handler:
+ */
+TRACE_EVENT(irq_handler_exit,
+
TP_PROTO(int irq, struct irqaction *action, int ret),
+
TP_ARGS(irq, action, ret),
- TP_FMT("irq=%d handler=%s return=%s",
- irq, action->name, ret ? "handled" : "unhandled"),
- TRACE_STRUCT(
- TRACE_FIELD(int, irq, irq)
- TRACE_FIELD(int, ret, ret)
+
+ TP_STRUCT__entry(
+ __field( int, irq )
+ __field( int, ret )
),
- TP_RAW_FMT("irq %d ret %d")
- );
+
+ TP_printk("irq=%d return=%s",
+ __entry->irq, __entry->ret ? "handled" : "unhandled"),
+
+ TP_fast_assign(
+ __entry->irq = irq;
+ __entry->ret = ret;
+ )
+);
#undef TRACE_SYSTEM