diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2009-12-01 01:04:49 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-12-01 02:14:08 -0500 |
commit | bab81b624e970f1138535a465ad2b26b6bb0dd6c (patch) | |
tree | 4e62c0dd293b18c7bc1593437e2a6fd18e811b5b /tools/perf/util/event.c | |
parent | 1ed091c45ae33b2179d387573c3fe3f3b4adf60a (diff) |
perf annotate: Fix perf data parsing
perf-annotate doesn't parse perf.data correctly in that it
doesn't read perf header. Fix this by using
mmap_dispatch_perf_file().
Before:
TOTAL events: 17565
MMAP events: 3221
LOST events: 10
COMM events: 235
EXIT events: 2
THROTTLE events: 1
UNTHROTTLE events: 2
FORK events: 10
READ events: 1
SAMPLE events: 14083
After:
TOTAL events: 17290
MMAP events: 3203
LOST events: 0
COMM events: 234
EXIT events: 1
THROTTLE events: 0
UNTHROTTLE events: 0
FORK events: 0
READ events: 0
SAMPLE events: 13852
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arjan van de Ven <arjan@infradead.org>
LKML-Reference: <4B14B201.9030708@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/event.c')
-rw-r--r-- | tools/perf/util/event.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index 233d7ad9bd7f..414b89d1bde9 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c | |||
@@ -186,8 +186,7 @@ int event__process_comm(event_t *self) | |||
186 | { | 186 | { |
187 | struct thread *thread = threads__findnew(self->comm.pid); | 187 | struct thread *thread = threads__findnew(self->comm.pid); |
188 | 188 | ||
189 | dump_printf("PERF_RECORD_COMM: %s:%d\n", | 189 | dump_printf(": %s:%d\n", self->comm.comm, self->comm.pid); |
190 | self->comm.comm, self->comm.pid); | ||
191 | 190 | ||
192 | if (thread == NULL || thread__set_comm(thread, self->comm.comm)) { | 191 | if (thread == NULL || thread__set_comm(thread, self->comm.comm)) { |
193 | dump_printf("problem processing PERF_RECORD_COMM, skipping event.\n"); | 192 | dump_printf("problem processing PERF_RECORD_COMM, skipping event.\n"); |