aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/events/sched.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-10-15 05:50:39 -0400
committerIngo Molnar <mingo@elte.hu>2009-10-15 06:42:03 -0400
commit434a83c3fbb951908a3a52040f7f0e0b8ba00dd0 (patch)
tree2b0d75112d6f132e749024c2a61a806426a2ac06 /include/trace/events/sched.h
parenta66abe7fbf7805a1a02f241bd5283265ff6706ec (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/sched.h')
-rw-r--r--include/trace/events/sched.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
index 4069c43f4187..b50b9856c59f 100644
--- a/include/trace/events/sched.h
+++ b/include/trace/events/sched.h
@@ -26,7 +26,7 @@ TRACE_EVENT(sched_kthread_stop,
26 __entry->pid = t->pid; 26 __entry->pid = t->pid;
27 ), 27 ),
28 28
29 TP_printk("task %s:%d", __entry->comm, __entry->pid) 29 TP_printk("comm=%s pid=%d", __entry->comm, __entry->pid)
30); 30);
31 31
32/* 32/*
@@ -46,7 +46,7 @@ TRACE_EVENT(sched_kthread_stop_ret,
46 __entry->ret = ret; 46 __entry->ret = ret;
47 ), 47 ),
48 48
49 TP_printk("ret %d", __entry->ret) 49 TP_printk("ret=%d", __entry->ret)
50); 50);
51 51
52/* 52/*
@@ -73,7 +73,7 @@ TRACE_EVENT(sched_wait_task,
73 __entry->prio = p->prio; 73 __entry->prio = p->prio;
74 ), 74 ),
75 75
76 TP_printk("task %s:%d [%d]", 76 TP_printk("comm=%s pid=%d prio=%d",
77 __entry->comm, __entry->pid, __entry->prio) 77 __entry->comm, __entry->pid, __entry->prio)
78); 78);
79 79
@@ -94,7 +94,7 @@ TRACE_EVENT(sched_wakeup,
94 __field( pid_t, pid ) 94 __field( pid_t, pid )
95 __field( int, prio ) 95 __field( int, prio )
96 __field( int, success ) 96 __field( int, success )
97 __field( int, cpu ) 97 __field( int, target_cpu )
98 ), 98 ),
99 99
100 TP_fast_assign( 100 TP_fast_assign(
@@ -102,12 +102,12 @@ TRACE_EVENT(sched_wakeup,
102 __entry->pid = p->pid; 102 __entry->pid = p->pid;
103 __entry->prio = p->prio; 103 __entry->prio = p->prio;
104 __entry->success = success; 104 __entry->success = success;
105 __entry->cpu = task_cpu(p); 105 __entry->target_cpu = task_cpu(p);
106 ), 106 ),
107 107
108 TP_printk("task %s:%d [%d] success=%d [%03d]", 108 TP_printk("comm=%s pid=%d prio=%d success=%d target_cpu=%03d",
109 __entry->comm, __entry->pid, __entry->prio, 109 __entry->comm, __entry->pid, __entry->prio,
110 __entry->success, __entry->cpu) 110 __entry->success, __entry->target_cpu)
111); 111);
112 112
113/* 113/*
@@ -127,7 +127,7 @@ TRACE_EVENT(sched_wakeup_new,
127 __field( pid_t, pid ) 127 __field( pid_t, pid )
128 __field( int, prio ) 128 __field( int, prio )
129 __field( int, success ) 129 __field( int, success )
130 __field( int, cpu ) 130 __field( int, target_cpu )
131 ), 131 ),
132 132
133 TP_fast_assign( 133 TP_fast_assign(
@@ -135,12 +135,12 @@ TRACE_EVENT(sched_wakeup_new,
135 __entry->pid = p->pid; 135 __entry->pid = p->pid;
136 __entry->prio = p->prio; 136 __entry->prio = p->prio;
137 __entry->success = success; 137 __entry->success = success;
138 __entry->cpu = task_cpu(p); 138 __entry->target_cpu = task_cpu(p);
139 ), 139 ),
140 140
141 TP_printk("task %s:%d [%d] success=%d [%03d]", 141 TP_printk("comm=%s pid=%d prio=%d success=%d target_cpu=%03d",
142 __entry->comm, __entry->pid, __entry->prio, 142 __entry->comm, __entry->pid, __entry->prio,
143 __entry->success, __entry->cpu) 143 __entry->success, __entry->target_cpu)
144); 144);
145 145
146/* 146/*
@@ -176,7 +176,7 @@ TRACE_EVENT(sched_switch,
176 __entry->next_prio = next->prio; 176 __entry->next_prio = next->prio;
177 ), 177 ),
178 178
179 TP_printk("task %s:%d [%d] (%s) ==> %s:%d [%d]", 179 TP_printk("prev_comm=%s prev_pid=%d prev_prio=%d prev_state=%s ==> next_comm=%s next_pid=%d next_prio=%d",
180 __entry->prev_comm, __entry->prev_pid, __entry->prev_prio, 180 __entry->prev_comm, __entry->prev_pid, __entry->prev_prio,
181 __entry->prev_state ? 181 __entry->prev_state ?
182 __print_flags(__entry->prev_state, "|", 182 __print_flags(__entry->prev_state, "|",
@@ -211,7 +211,7 @@ TRACE_EVENT(sched_migrate_task,
211 __entry->dest_cpu = dest_cpu; 211 __entry->dest_cpu = dest_cpu;
212 ), 212 ),
213 213
214 TP_printk("task %s:%d [%d] from: %d to: %d", 214 TP_printk("comm=%s pid=%d prio=%d orig_cpu=%d dest_cpu=%d",
215 __entry->comm, __entry->pid, __entry->prio, 215 __entry->comm, __entry->pid, __entry->prio,
216 __entry->orig_cpu, __entry->dest_cpu) 216 __entry->orig_cpu, __entry->dest_cpu)
217); 217);
@@ -237,7 +237,7 @@ TRACE_EVENT(sched_process_free,
237 __entry->prio = p->prio; 237 __entry->prio = p->prio;
238 ), 238 ),
239 239
240 TP_printk("task %s:%d [%d]", 240 TP_printk("comm=%s pid=%d prio=%d",
241 __entry->comm, __entry->pid, __entry->prio) 241 __entry->comm, __entry->pid, __entry->prio)
242); 242);
243 243
@@ -262,7 +262,7 @@ TRACE_EVENT(sched_process_exit,
262 __entry->prio = p->prio; 262 __entry->prio = p->prio;
263 ), 263 ),
264 264
265 TP_printk("task %s:%d [%d]", 265 TP_printk("comm=%s pid=%d prio=%d",
266 __entry->comm, __entry->pid, __entry->prio) 266 __entry->comm, __entry->pid, __entry->prio)
267); 267);
268 268
@@ -287,7 +287,7 @@ TRACE_EVENT(sched_process_wait,
287 __entry->prio = current->prio; 287 __entry->prio = current->prio;
288 ), 288 ),
289 289
290 TP_printk("task %s:%d [%d]", 290 TP_printk("comm=%s pid=%d prio=%d",
291 __entry->comm, __entry->pid, __entry->prio) 291 __entry->comm, __entry->pid, __entry->prio)
292); 292);
293 293
@@ -314,7 +314,7 @@ TRACE_EVENT(sched_process_fork,
314 __entry->child_pid = child->pid; 314 __entry->child_pid = child->pid;
315 ), 315 ),
316 316
317 TP_printk("parent %s:%d child %s:%d", 317 TP_printk("comm=%s pid=%d child_comm=%s child_pid=%d",
318 __entry->parent_comm, __entry->parent_pid, 318 __entry->parent_comm, __entry->parent_pid,
319 __entry->child_comm, __entry->child_pid) 319 __entry->child_comm, __entry->child_pid)
320); 320);
@@ -340,7 +340,7 @@ TRACE_EVENT(sched_signal_send,
340 __entry->sig = sig; 340 __entry->sig = sig;
341 ), 341 ),
342 342
343 TP_printk("sig: %d task %s:%d", 343 TP_printk("sig=%d comm=%s pid=%d",
344 __entry->sig, __entry->comm, __entry->pid) 344 __entry->sig, __entry->comm, __entry->pid)
345); 345);
346 346
@@ -374,7 +374,7 @@ TRACE_EVENT(sched_stat_wait,
374 __perf_count(delay); 374 __perf_count(delay);
375 ), 375 ),
376 376
377 TP_printk("task: %s:%d wait: %Lu [ns]", 377 TP_printk("comm=%s pid=%d delay=%Lu [ns]",
378 __entry->comm, __entry->pid, 378 __entry->comm, __entry->pid,
379 (unsigned long long)__entry->delay) 379 (unsigned long long)__entry->delay)
380); 380);
@@ -406,7 +406,7 @@ TRACE_EVENT(sched_stat_runtime,
406 __perf_count(runtime); 406 __perf_count(runtime);
407 ), 407 ),
408 408
409 TP_printk("task: %s:%d runtime: %Lu [ns], vruntime: %Lu [ns]", 409 TP_printk("comm=%s pid=%d runtime=%Lu [ns] vruntime=%Lu [ns]",
410 __entry->comm, __entry->pid, 410 __entry->comm, __entry->pid,
411 (unsigned long long)__entry->runtime, 411 (unsigned long long)__entry->runtime,
412 (unsigned long long)__entry->vruntime) 412 (unsigned long long)__entry->vruntime)
@@ -437,7 +437,7 @@ TRACE_EVENT(sched_stat_sleep,
437 __perf_count(delay); 437 __perf_count(delay);
438 ), 438 ),
439 439
440 TP_printk("task: %s:%d sleep: %Lu [ns]", 440 TP_printk("comm=%s pid=%d delay=%Lu [ns]",
441 __entry->comm, __entry->pid, 441 __entry->comm, __entry->pid,
442 (unsigned long long)__entry->delay) 442 (unsigned long long)__entry->delay)
443); 443);
@@ -467,7 +467,7 @@ TRACE_EVENT(sched_stat_iowait,
467 __perf_count(delay); 467 __perf_count(delay);
468 ), 468 ),
469 469
470 TP_printk("task: %s:%d iowait: %Lu [ns]", 470 TP_printk("comm=%s pid=%d delay=%Lu [ns]",
471 __entry->comm, __entry->pid, 471 __entry->comm, __entry->pid,
472 (unsigned long long)__entry->delay) 472 (unsigned long long)__entry->delay)
473); 473);