diff options
author | KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> | 2009-03-07 23:12:43 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-08 11:57:22 -0400 |
commit | 888b55dc314d26239d84c3b187dae555a81c1605 (patch) | |
tree | bdf22d17648cf01f89009d37b9bbcdb1521fc636 /kernel/trace/trace.c | |
parent | dba58e39ced7af63f2748d12bbb2b4ac83c72391 (diff) |
ftrace: tracing header should put '#' at the beginning of a line
In a recent discussion, Andrew Morton pointed out that tracing header
should put '#' at the beginning of a line.
Then, we can easily filtered the header by following grep usage:
cat trace | grep -v '^#'
Wakeup trace also has the same header problem.
Comparison of headers displayed:
before this patch:
# tracer: wakeup
#
wakeup latency trace v1.1.5 on 2.6.29-rc7-tip-tip
--------------------------------------------------------------------
latency: 19059 us, #21277/21277, CPU#1 | (M:desktop VP:0, KP:0, SP:0 HP:0 #P:4)
-----------------
| task: kondemand/1-1644 (uid:0 nice:-5 policy:0 rt_prio:0)
-----------------
# _------=> CPU#
# / _-----=> irqs-off
# | / _----=> need-resched
# || / _---=> hardirq/softirq
# ||| / _--=> preempt-depth
# |||| /
# ||||| delay
# cmd pid ||||| time | caller
# \ / ||||| \ | /
irqbalan-1887 1d.s. 0us : 1887:120:R + [001] 1644:115:S kondemand/1
irqbalan-1887 1d.s. 1us : default_wake_function <-autoremove_wake_function
irqbalan-1887 1d.s. 2us : check_preempt_wakeup <-try_to_wake_up
after this patch:
# tracer: wakeup
#
# wakeup latency trace v1.1.5 on 2.6.29-rc7-tip-tip
# --------------------------------------------------------------------
# latency: 529 us, #530/530, CPU#0 | (M:desktop VP:0, KP:0, SP:0 HP:0 #P:4)
# -----------------
# | task: kondemand/0-1641 (uid:0 nice:-5 policy:0 rt_prio:0)
# -----------------
#
# _------=> CPU#
# / _-----=> irqs-off
# | / _----=> need-resched
# || / _---=> hardirq/softirq
# ||| / _--=> preempt-depth
# |||| /
# ||||| delay
# cmd pid ||||| time | caller
# \ / ||||| \ | /
sshd-2496 0d.s. 0us : 2496:120:R + [000] 1641:115:S kondemand/0
sshd-2496 0d.s. 1us : default_wake_function <-autoremove_wake_function
sshd-2496 0d.s. 1us : check_preempt_wakeup <-try_to_wake_up
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <20090308124421.23C3.A69D9226@jp.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r-- | kernel/trace/trace.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index cc94f8642485..e5b56199e5e0 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -1466,11 +1466,11 @@ print_trace_header(struct seq_file *m, struct trace_iterator *iter) | |||
1466 | total = entries + | 1466 | total = entries + |
1467 | ring_buffer_overruns(iter->tr->buffer); | 1467 | ring_buffer_overruns(iter->tr->buffer); |
1468 | 1468 | ||
1469 | seq_printf(m, "%s latency trace v1.1.5 on %s\n", | 1469 | seq_printf(m, "# %s latency trace v1.1.5 on %s\n", |
1470 | name, UTS_RELEASE); | 1470 | name, UTS_RELEASE); |
1471 | seq_puts(m, "-----------------------------------" | 1471 | seq_puts(m, "# -----------------------------------" |
1472 | "---------------------------------\n"); | 1472 | "---------------------------------\n"); |
1473 | seq_printf(m, " latency: %lu us, #%lu/%lu, CPU#%d |" | 1473 | seq_printf(m, "# latency: %lu us, #%lu/%lu, CPU#%d |" |
1474 | " (M:%s VP:%d, KP:%d, SP:%d HP:%d", | 1474 | " (M:%s VP:%d, KP:%d, SP:%d HP:%d", |
1475 | nsecs_to_usecs(data->saved_latency), | 1475 | nsecs_to_usecs(data->saved_latency), |
1476 | entries, | 1476 | entries, |
@@ -1492,24 +1492,24 @@ print_trace_header(struct seq_file *m, struct trace_iterator *iter) | |||
1492 | #else | 1492 | #else |
1493 | seq_puts(m, ")\n"); | 1493 | seq_puts(m, ")\n"); |
1494 | #endif | 1494 | #endif |
1495 | seq_puts(m, " -----------------\n"); | 1495 | seq_puts(m, "# -----------------\n"); |
1496 | seq_printf(m, " | task: %.16s-%d " | 1496 | seq_printf(m, "# | task: %.16s-%d " |
1497 | "(uid:%d nice:%ld policy:%ld rt_prio:%ld)\n", | 1497 | "(uid:%d nice:%ld policy:%ld rt_prio:%ld)\n", |
1498 | data->comm, data->pid, data->uid, data->nice, | 1498 | data->comm, data->pid, data->uid, data->nice, |
1499 | data->policy, data->rt_priority); | 1499 | data->policy, data->rt_priority); |
1500 | seq_puts(m, " -----------------\n"); | 1500 | seq_puts(m, "# -----------------\n"); |
1501 | 1501 | ||
1502 | if (data->critical_start) { | 1502 | if (data->critical_start) { |
1503 | seq_puts(m, " => started at: "); | 1503 | seq_puts(m, "# => started at: "); |
1504 | seq_print_ip_sym(&iter->seq, data->critical_start, sym_flags); | 1504 | seq_print_ip_sym(&iter->seq, data->critical_start, sym_flags); |
1505 | trace_print_seq(m, &iter->seq); | 1505 | trace_print_seq(m, &iter->seq); |
1506 | seq_puts(m, "\n => ended at: "); | 1506 | seq_puts(m, "\n# => ended at: "); |
1507 | seq_print_ip_sym(&iter->seq, data->critical_end, sym_flags); | 1507 | seq_print_ip_sym(&iter->seq, data->critical_end, sym_flags); |
1508 | trace_print_seq(m, &iter->seq); | 1508 | trace_print_seq(m, &iter->seq); |
1509 | seq_puts(m, "\n"); | 1509 | seq_puts(m, "#\n"); |
1510 | } | 1510 | } |
1511 | 1511 | ||
1512 | seq_puts(m, "\n"); | 1512 | seq_puts(m, "#\n"); |
1513 | } | 1513 | } |
1514 | 1514 | ||
1515 | static void test_cpu_buff_start(struct trace_iterator *iter) | 1515 | static void test_cpu_buff_start(struct trace_iterator *iter) |