diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-03-24 15:40:18 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-03-26 03:52:57 -0400 |
commit | b3c9ac0846c654dea4df095999ee202e8b4cb253 (patch) | |
tree | 4845ae36123beba5bc9959be7c67cc0ce4bc5a11 /tools/perf/util/hist.c | |
parent | 59fd53062f71011a68d03f4cd0ba93d822ac3249 (diff) |
perf callchains: Store the map together with the symbol
We need this to know where a symbol in a callchain came from,
for various reasons, among them precise annotation from a
TUI/GUI tool.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1269459619-982-5-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/hist.c')
-rw-r--r-- | tools/perf/util/hist.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index 4eefb52a8661..09e09e78cb62 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c | |||
@@ -260,8 +260,8 @@ static size_t ipchain__fprintf_graph(FILE *fp, struct callchain_list *chain, | |||
260 | } else | 260 | } else |
261 | ret += fprintf(fp, "%s", " "); | 261 | ret += fprintf(fp, "%s", " "); |
262 | } | 262 | } |
263 | if (chain->sym) | 263 | if (chain->ms.sym) |
264 | ret += fprintf(fp, "%s\n", chain->sym->name); | 264 | ret += fprintf(fp, "%s\n", chain->ms.sym->name); |
265 | else | 265 | else |
266 | ret += fprintf(fp, "%p\n", (void *)(long)chain->ip); | 266 | ret += fprintf(fp, "%p\n", (void *)(long)chain->ip); |
267 | 267 | ||
@@ -280,7 +280,7 @@ static void init_rem_hits(void) | |||
280 | } | 280 | } |
281 | 281 | ||
282 | strcpy(rem_sq_bracket->name, "[...]"); | 282 | strcpy(rem_sq_bracket->name, "[...]"); |
283 | rem_hits.sym = rem_sq_bracket; | 283 | rem_hits.ms.sym = rem_sq_bracket; |
284 | } | 284 | } |
285 | 285 | ||
286 | static size_t __callchain__fprintf_graph(FILE *fp, struct callchain_node *self, | 286 | static size_t __callchain__fprintf_graph(FILE *fp, struct callchain_node *self, |
@@ -382,8 +382,8 @@ static size_t callchain__fprintf_graph(FILE *fp, struct callchain_node *self, | |||
382 | } else | 382 | } else |
383 | ret += callchain__fprintf_left_margin(fp, left_margin); | 383 | ret += callchain__fprintf_left_margin(fp, left_margin); |
384 | 384 | ||
385 | if (chain->sym) | 385 | if (chain->ms.sym) |
386 | ret += fprintf(fp, " %s\n", chain->sym->name); | 386 | ret += fprintf(fp, " %s\n", chain->ms.sym->name); |
387 | else | 387 | else |
388 | ret += fprintf(fp, " %p\n", (void *)(long)chain->ip); | 388 | ret += fprintf(fp, " %p\n", (void *)(long)chain->ip); |
389 | } | 389 | } |
@@ -408,8 +408,8 @@ static size_t callchain__fprintf_flat(FILE *fp, struct callchain_node *self, | |||
408 | list_for_each_entry(chain, &self->val, list) { | 408 | list_for_each_entry(chain, &self->val, list) { |
409 | if (chain->ip >= PERF_CONTEXT_MAX) | 409 | if (chain->ip >= PERF_CONTEXT_MAX) |
410 | continue; | 410 | continue; |
411 | if (chain->sym) | 411 | if (chain->ms.sym) |
412 | ret += fprintf(fp, " %s\n", chain->sym->name); | 412 | ret += fprintf(fp, " %s\n", chain->ms.sym->name); |
413 | else | 413 | else |
414 | ret += fprintf(fp, " %p\n", | 414 | ret += fprintf(fp, " %p\n", |
415 | (void *)(long)chain->ip); | 415 | (void *)(long)chain->ip); |