diff options
author | OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> | 2009-12-06 06:07:29 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-12-06 12:15:01 -0500 |
commit | 028c515253761084c6594bf9ac9b194b51d87065 (patch) | |
tree | 20d42f7c28c7e4bb23dd0bfde4338e270b38e476 /tools/perf/builtin-timechart.c | |
parent | be2bf0a2dfbba785860284968fa055006eb1610e (diff) |
perf timechart: Fix header handling
Update "struct trace_entry" to match with current one. And
remove "size" field from it.
If it has "size", it become cause of alignment mismatch of
structure with kernel.
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Acked-by: Arjan van de Ven <arjan@infradead.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <87ljhg8ioe.fsf@devron.myhome.or.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-timechart.c')
-rw-r--r-- | tools/perf/builtin-timechart.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c index cb58b6605fcc..c0f29ed09966 100644 --- a/tools/perf/builtin-timechart.c +++ b/tools/perf/builtin-timechart.c | |||
@@ -302,12 +302,11 @@ process_exit_event(event_t *event) | |||
302 | } | 302 | } |
303 | 303 | ||
304 | struct trace_entry { | 304 | struct trace_entry { |
305 | u32 size; | ||
306 | unsigned short type; | 305 | unsigned short type; |
307 | unsigned char flags; | 306 | unsigned char flags; |
308 | unsigned char preempt_count; | 307 | unsigned char preempt_count; |
309 | int pid; | 308 | int pid; |
310 | int tgid; | 309 | int lock_depth; |
311 | }; | 310 | }; |
312 | 311 | ||
313 | struct power_entry { | 312 | struct power_entry { |
@@ -489,6 +488,7 @@ process_sample_event(event_t *event) | |||
489 | u64 stamp = 0; | 488 | u64 stamp = 0; |
490 | u32 cpu = 0; | 489 | u32 cpu = 0; |
491 | u32 pid = 0; | 490 | u32 pid = 0; |
491 | u32 size, *size_ptr; | ||
492 | struct trace_entry *te; | 492 | struct trace_entry *te; |
493 | 493 | ||
494 | if (sample_type & PERF_SAMPLE_IP) | 494 | if (sample_type & PERF_SAMPLE_IP) |
@@ -518,9 +518,13 @@ process_sample_event(event_t *event) | |||
518 | if (sample_type & PERF_SAMPLE_PERIOD) | 518 | if (sample_type & PERF_SAMPLE_PERIOD) |
519 | cursor++; | 519 | cursor++; |
520 | 520 | ||
521 | te = (void *)&event->sample.array[cursor]; | 521 | size_ptr = (void *)&event->sample.array[cursor]; |
522 | 522 | ||
523 | if (sample_type & PERF_SAMPLE_RAW && te->size > 0) { | 523 | size = *size_ptr; |
524 | size_ptr++; | ||
525 | |||
526 | te = (void *)size_ptr; | ||
527 | if (sample_type & PERF_SAMPLE_RAW && size > 0) { | ||
524 | char *event_str; | 528 | char *event_str; |
525 | struct power_entry *pe; | 529 | struct power_entry *pe; |
526 | 530 | ||