lkml.org 
[lkml]   [2009]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[tip:perfcounters/core] perf report: add more debugging
Commit-ID:  f95f33e6d0e6ee55f8ed62f70e4febe23e4830dc
Gitweb: http://git.kernel.org/tip/f95f33e6d0e6ee55f8ed62f70e4febe23e4830dc
Author: Ingo Molnar <mingo@elte.hu>
AuthorDate: Tue, 26 May 2009 19:03:36 +0200
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Tue, 26 May 2009 19:03:36 +0200

perf report: add more debugging

Add the offset of the file we are analyzing.

In case of problems it's easier to see where the parser lost track.

Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: John Kacur <jkacur@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
Documentation/perf_counter/builtin-report.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/Documentation/perf_counter/builtin-report.c b/Documentation/perf_counter/builtin-report.c
index 4b5ccc5..1b16f81 100644
--- a/Documentation/perf_counter/builtin-report.c
+++ b/Documentation/perf_counter/builtin-report.c
@@ -709,7 +709,8 @@ more:
uint64_t ip = event->ip.ip;

if (dump_trace) {
- fprintf(stderr, "PERF_EVENT (IP, %d): %d: %p\n",
+ fprintf(stderr, "%p: PERF_EVENT (IP, %d): %d: %p\n",
+ (void *)(offset + head),
event->header.misc,
event->ip.pid,
(void *)event->ip.ip);
@@ -753,7 +754,8 @@ more:
struct map *map = map__new(&event->mmap);

if (dump_trace) {
- fprintf(stderr, "PERF_EVENT_MMAP: [%p(%p) @ %p]: %s\n",
+ fprintf(stderr, "%p: PERF_EVENT_MMAP: [%p(%p) @ %p]: %s\n",
+ (void *)(offset + head),
(void *)event->mmap.start,
(void *)event->mmap.len,
(void *)event->mmap.pgoff,
@@ -771,7 +773,8 @@ more:
struct thread *thread = threads__findnew(event->comm.pid);

if (dump_trace) {
- fprintf(stderr, "PERF_EVENT_COMM: %s:%d\n",
+ fprintf(stderr, "%p: PERF_EVENT_COMM: %s:%d\n",
+ (void *)(offset + head),
event->comm.comm, event->comm.pid);
}
if (thread == NULL ||
@@ -783,7 +786,8 @@ more:
break;
}
default: {
- fprintf(stderr, "skipping unknown header type: %d\n",
+ fprintf(stderr, "%p: skipping unknown header type: %d\n",
+ (void *)(offset + head),
event->header.type);
total_unknown++;
}

\
 
 \ /
  Last update: 2009-05-26 20:13    [W:0.030 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site