diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2009-08-27 22:46:07 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-08-28 01:58:11 -0400 |
commit | d498bc1f6261dd6f655440eb2f1c7fa25694d3ba (patch) | |
tree | 38498b61cefb1e3dcbbbcf5dc72c41fe7566a03e | |
parent | 1ef2ed1066ae9f8080cd96cba11c2d41118b8792 (diff) |
perf tools: Fix missing string field printing in perf trace
Some string fields are not printed because of a missing printf
in the post-processing.
Before:
perf-10070 [000] 0.000000: sched_switch: task :10070 [120] (R) ==> :5720 [120]
geany-5720 [000] 0.000000: sched_switch: task :5720 [120] (S) ==> :10070 [120]
perf-10070 [000] 0.000000: sched_switch: task :10070 [120] (R) ==> :5720 [120]
geany-5720 [000] 0.000000: sched_switch: task :5720 [120] (S) ==> :10070 [120]
<idle>-0 [000] 0.000000: sched_switch: task :0 [140] (R) ==> :361 [115]
After:
perf-10070 [000] 0.000000: sched_switch: task perf:10070 [120] (R) ==> geany:5720 [120]
geany-5720 [000] 0.000000: sched_switch: task geany:5720 [120] (S) ==> perf:10070 [120]
perf-10070 [000] 0.000000: sched_switch: task perf:10070 [120] (R) ==> geany:5720 [120]
geany-5720 [000] 0.000000: sched_switch: task geany:5720 [120] (S) ==> perf:10070 [120]
<idle>-0 [000] 0.000000: sched_switch: task swapper:0 [140] (R) ==> kondemand/1:361 [115]
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <1251427567-10551-2-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | tools/perf/util/trace-event-parse.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c index a6577cdd9afd..96c5e97ffe7b 100644 --- a/tools/perf/util/trace-event-parse.c +++ b/tools/perf/util/trace-event-parse.c | |||
@@ -1997,6 +1997,7 @@ static void print_str_arg(void *data, int size, | |||
1997 | memcpy(str, data + arg->field.field->offset, | 1997 | memcpy(str, data + arg->field.field->offset, |
1998 | arg->field.field->size); | 1998 | arg->field.field->size); |
1999 | str[arg->field.field->size] = 0; | 1999 | str[arg->field.field->size] = 0; |
2000 | printf("%s", str); | ||
2000 | free(str); | 2001 | free(str); |
2001 | break; | 2002 | break; |
2002 | case PRINT_FLAGS: | 2003 | case PRINT_FLAGS: |