diff options
author | David Ahern <dsahern@gmail.com> | 2011-05-30 15:08:23 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-06-02 12:31:01 -0400 |
commit | 7cec0922389e080d11ec43dd23aa778e136bd1e1 (patch) | |
tree | 0d772b32f38b4ef16e4256711e947b38baa2c2f9 /tools/perf/util | |
parent | 610723f24eeb842025178a6722fa9108c4e157b6 (diff) |
perf script: Add printing of sample address
Resolve to a function or variable if possible and if the sym option is
enabled.
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1306782503-22002-1-git-send-email-dsahern@gmail.com
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util')
-rw-r--r-- | tools/perf/util/evsel.c | 1 | ||||
-rw-r--r-- | tools/perf/util/session.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 0239eb87b232..a03a36b7908a 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c | |||
@@ -377,6 +377,7 @@ int perf_event__parse_sample(const union perf_event *event, u64 type, | |||
377 | array++; | 377 | array++; |
378 | } | 378 | } |
379 | 379 | ||
380 | data->addr = 0; | ||
380 | if (type & PERF_SAMPLE_ADDR) { | 381 | if (type & PERF_SAMPLE_ADDR) { |
381 | data->addr = *array; | 382 | data->addr = *array; |
382 | array++; | 383 | array++; |
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 0dd418299261..b723f211881c 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c | |||
@@ -708,9 +708,9 @@ static void dump_sample(struct perf_session *session, union perf_event *event, | |||
708 | if (!dump_trace) | 708 | if (!dump_trace) |
709 | return; | 709 | return; |
710 | 710 | ||
711 | printf("(IP, %d): %d/%d: %#" PRIx64 " period: %" PRIu64 "\n", | 711 | printf("(IP, %d): %d/%d: %#" PRIx64 " period: %" PRIu64 " addr: %#" PRIx64 "\n", |
712 | event->header.misc, sample->pid, sample->tid, sample->ip, | 712 | event->header.misc, sample->pid, sample->tid, sample->ip, |
713 | sample->period); | 713 | sample->period, sample->addr); |
714 | 714 | ||
715 | if (session->sample_type & PERF_SAMPLE_CALLCHAIN) | 715 | if (session->sample_type & PERF_SAMPLE_CALLCHAIN) |
716 | callchain__printf(sample); | 716 | callchain__printf(sample); |