diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-10-15 05:50:39 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-10-15 06:42:03 -0400 |
commit | 434a83c3fbb951908a3a52040f7f0e0b8ba00dd0 (patch) | |
tree | 2b0d75112d6f132e749024c2a61a806426a2ac06 /include/trace/events/irq.h | |
parent | a66abe7fbf7805a1a02f241bd5283265ff6706ec (diff) |
events: Harmonize event field names and print output names
Now that we can filter based on fields via perf record, people
will start using filter expressions and will expect them to
be obvious.
The primary way to see which fields are available is by looking
at the trace output, such as:
gcc-18676 [000] 343.011728: irq_handler_entry: irq=0 handler=timer
cc1-18677 [000] 343.012727: irq_handler_entry: irq=0 handler=timer
cc1-18677 [000] 343.032692: irq_handler_entry: irq=0 handler=timer
cc1-18677 [000] 343.033690: irq_handler_entry: irq=0 handler=timer
cc1-18677 [000] 343.034687: irq_handler_entry: irq=0 handler=timer
cc1-18677 [000] 343.035686: irq_handler_entry: irq=0 handler=timer
cc1-18677 [000] 343.036684: irq_handler_entry: irq=0 handler=timer
While 'irq==0' filters work, the 'handler==<x>' filter expression
does not work:
$ perf record -R -f -a -e irq:irq_handler_entry --filter handler=timer sleep 1
Error: failed to set filter with 22 (Invalid argument)
The problem is that while an 'irq' field exists and is recognized
as a filter field - 'handler' does not exist - its name is 'name'
in the output.
To solve this, we need to synchronize the printout and the field
names, wherever possible.
In cases where the printout prints a non-field, we enclose
that information in square brackets, such as:
perf-1380 [013] 724.903505: softirq_exit: vec=9 [action=RCU]
perf-1380 [013] 724.904482: softirq_exit: vec=1 [action=TIMER]
This way users can use filter expressions more intuitively: all
fields that show up as 'primary' (non-bracketed) information is
filterable.
This patch harmonizes the field names for all irq, bkl, power,
sched and timer events.
We might in fact think about dropping the print format bit of
generic tracepoints altogether, and just print the fields that
are being recorded.
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/trace/events/irq.h')
-rw-r--r-- | include/trace/events/irq.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/trace/events/irq.h b/include/trace/events/irq.h index b89f9db4a404..dcfcd4407623 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,7 +78,7 @@ 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 | ||
@@ -107,7 +107,7 @@ TRACE_EVENT(softirq_entry, | |||
107 | __entry->vec = (int)(h - vec); | 107 | __entry->vec = (int)(h - vec); |
108 | ), | 108 | ), |
109 | 109 | ||
110 | TP_printk("softirq=%d action=%s", __entry->vec, | 110 | TP_printk("vec=%d [action=%s]", __entry->vec, |
111 | show_softirq_name(__entry->vec)) | 111 | show_softirq_name(__entry->vec)) |
112 | ); | 112 | ); |
113 | 113 | ||
@@ -136,7 +136,7 @@ TRACE_EVENT(softirq_exit, | |||
136 | __entry->vec = (int)(h - vec); | 136 | __entry->vec = (int)(h - vec); |
137 | ), | 137 | ), |
138 | 138 | ||
139 | TP_printk("softirq=%d action=%s", __entry->vec, | 139 | TP_printk("vec=%d [action=%s]", __entry->vec, |
140 | show_softirq_name(__entry->vec)) | 140 | show_softirq_name(__entry->vec)) |
141 | ); | 141 | ); |
142 | 142 | ||