[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-78bfcc8556838bad563b781c49e5f20ec5831611@git.kernel.org>
Date: Tue, 26 May 2009 18:21:32 GMT
From: tip-bot for Ingo Molnar <mingo@...e.hu>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, acme@...hat.com, paulus@...ba.org,
hpa@...or.com, mingo@...hat.com, jkacur@...hat.com,
a.p.zijlstra@...llo.nl, efault@....de, mtosatti@...hat.com,
tglx@...utronix.de, cjashfor@...ux.vnet.ibm.com, mingo@...e.hu
Subject: [tip:perfcounters/core] perf report: add more debugging
Commit-ID: 78bfcc8556838bad563b781c49e5f20ec5831611
Gitweb: http://git.kernel.org/tip/78bfcc8556838bad563b781c49e5f20ec5831611
Author: Ingo Molnar <mingo@...e.hu>
AuthorDate: Tue, 26 May 2009 19:03:36 +0200
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Tue, 26 May 2009 19:15:59 +0200
perf report: add more debugging
Add the offset of the file we are analyzing, and the size of the record.
In case of problems it's easier to see where the parser lost track.
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Mike Galbraith <efault@....de>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Corey Ashford <cjashfor@...ux.vnet.ibm.com>
Cc: Marcelo Tosatti <mtosatti@...hat.com>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: John Kacur <jkacur@...hat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@...e.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++;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists