diff options
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r-- | tools/perf/builtin-report.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index efa8147b8991..3487224670a8 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
@@ -414,6 +414,7 @@ static int call__match(struct symbol *sym) | |||
414 | } | 414 | } |
415 | 415 | ||
416 | static struct symbol **resolve_callchain(struct thread *thread, | 416 | static struct symbol **resolve_callchain(struct thread *thread, |
417 | struct perf_session *session, | ||
417 | struct ip_callchain *chain, | 418 | struct ip_callchain *chain, |
418 | struct symbol **parent) | 419 | struct symbol **parent) |
419 | { | 420 | { |
@@ -447,8 +448,8 @@ static struct symbol **resolve_callchain(struct thread *thread, | |||
447 | continue; | 448 | continue; |
448 | } | 449 | } |
449 | 450 | ||
450 | thread__find_addr_location(thread, cpumode, MAP__FUNCTION, | 451 | thread__find_addr_location(thread, session, cpumode, |
451 | ip, &al, NULL); | 452 | MAP__FUNCTION, ip, &al, NULL); |
452 | if (al.sym != NULL) { | 453 | if (al.sym != NULL) { |
453 | if (sort__has_parent && !*parent && | 454 | if (sort__has_parent && !*parent && |
454 | call__match(al.sym)) | 455 | call__match(al.sym)) |
@@ -467,6 +468,7 @@ static struct symbol **resolve_callchain(struct thread *thread, | |||
467 | */ | 468 | */ |
468 | 469 | ||
469 | static int hist_entry__add(struct addr_location *al, | 470 | static int hist_entry__add(struct addr_location *al, |
471 | struct perf_session *session, | ||
470 | struct ip_callchain *chain, u64 count) | 472 | struct ip_callchain *chain, u64 count) |
471 | { | 473 | { |
472 | struct symbol **syms = NULL, *parent = NULL; | 474 | struct symbol **syms = NULL, *parent = NULL; |
@@ -474,7 +476,7 @@ static int hist_entry__add(struct addr_location *al, | |||
474 | struct hist_entry *he; | 476 | struct hist_entry *he; |
475 | 477 | ||
476 | if ((sort__has_parent || callchain) && chain) | 478 | if ((sort__has_parent || callchain) && chain) |
477 | syms = resolve_callchain(al->thread, chain, &parent); | 479 | syms = resolve_callchain(al->thread, session, chain, &parent); |
478 | 480 | ||
479 | he = __hist_entry__add(al, parent, count, &hit); | 481 | he = __hist_entry__add(al, parent, count, &hit); |
480 | if (he == NULL) | 482 | if (he == NULL) |
@@ -650,7 +652,7 @@ static int process_sample_event(event_t *event, struct perf_session *session) | |||
650 | 652 | ||
651 | cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK; | 653 | cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK; |
652 | 654 | ||
653 | thread__find_addr_location(thread, cpumode, | 655 | thread__find_addr_location(thread, session, cpumode, |
654 | MAP__FUNCTION, data.ip, &al, NULL); | 656 | MAP__FUNCTION, data.ip, &al, NULL); |
655 | /* | 657 | /* |
656 | * We have to do this here as we may have a dso with no symbol hit that | 658 | * We have to do this here as we may have a dso with no symbol hit that |
@@ -669,7 +671,7 @@ static int process_sample_event(event_t *event, struct perf_session *session) | |||
669 | if (sym_list && al.sym && !strlist__has_entry(sym_list, al.sym->name)) | 671 | if (sym_list && al.sym && !strlist__has_entry(sym_list, al.sym->name)) |
670 | return 0; | 672 | return 0; |
671 | 673 | ||
672 | if (hist_entry__add(&al, data.callchain, data.period)) { | 674 | if (hist_entry__add(&al, session, data.callchain, data.period)) { |
673 | pr_debug("problem incrementing symbol count, skipping event\n"); | 675 | pr_debug("problem incrementing symbol count, skipping event\n"); |
674 | return -1; | 676 | return -1; |
675 | } | 677 | } |
@@ -763,7 +765,7 @@ static int __cmd_report(void) | |||
763 | int ret; | 765 | int ret; |
764 | struct perf_session *session; | 766 | struct perf_session *session; |
765 | 767 | ||
766 | session = perf_session__new(input_name, O_RDONLY, force); | 768 | session = perf_session__new(input_name, O_RDONLY, force, &symbol_conf); |
767 | if (session == NULL) | 769 | if (session == NULL) |
768 | return -ENOMEM; | 770 | return -ENOMEM; |
769 | 771 | ||