diff options
Diffstat (limited to 'tools/perf/builtin-script.c')
-rw-r--r-- | tools/perf/builtin-script.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index ffd02faee87b..07cb083ac89c 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c | |||
@@ -809,12 +809,12 @@ static int perf_sample__fprintf_brstackoff(struct perf_sample *sample, | |||
809 | from = br->entries[i].from; | 809 | from = br->entries[i].from; |
810 | to = br->entries[i].to; | 810 | to = br->entries[i].to; |
811 | 811 | ||
812 | thread__find_map(thread, sample->cpumode, from, &alf); | 812 | if (thread__find_map(thread, sample->cpumode, from, &alf) && |
813 | if (alf.map && !alf.map->dso->adjust_symbols) | 813 | !alf.map->dso->adjust_symbols) |
814 | from = map__map_ip(alf.map, from); | 814 | from = map__map_ip(alf.map, from); |
815 | 815 | ||
816 | thread__find_map(thread, sample->cpumode, to, &alt); | 816 | if (thread__find_map(thread, sample->cpumode, to, &alt) && |
817 | if (alt.map && !alt.map->dso->adjust_symbols) | 817 | !alt.map->dso->adjust_symbols) |
818 | to = map__map_ip(alt.map, to); | 818 | to = map__map_ip(alt.map, to); |
819 | 819 | ||
820 | printed += fprintf(fp, " 0x%"PRIx64, from); | 820 | printed += fprintf(fp, " 0x%"PRIx64, from); |
@@ -877,8 +877,7 @@ static int grab_bb(u8 *buffer, u64 start, u64 end, | |||
877 | return 0; | 877 | return 0; |
878 | } | 878 | } |
879 | 879 | ||
880 | thread__find_map(thread, *cpumode, start, &al); | 880 | if (!thread__find_map(thread, *cpumode, start, &al) || !al.map->dso) { |
881 | if (!al.map || !al.map->dso) { | ||
882 | pr_debug("\tcannot resolve %" PRIx64 "-%" PRIx64 "\n", start, end); | 881 | pr_debug("\tcannot resolve %" PRIx64 "-%" PRIx64 "\n", start, end); |
883 | return 0; | 882 | return 0; |
884 | } | 883 | } |
@@ -928,8 +927,7 @@ static int ip__fprintf_sym(uint64_t addr, struct thread *thread, | |||
928 | 927 | ||
929 | memset(&al, 0, sizeof(al)); | 928 | memset(&al, 0, sizeof(al)); |
930 | 929 | ||
931 | thread__find_map(thread, cpumode, addr, &al); | 930 | if (!thread__find_map(thread, cpumode, addr, &al)) |
932 | if (!al.map) | ||
933 | __thread__find_map(thread, cpumode, MAP__VARIABLE, addr, &al); | 931 | __thread__find_map(thread, cpumode, MAP__VARIABLE, addr, &al); |
934 | if ((*lastsym) && al.addr >= (*lastsym)->start && al.addr < (*lastsym)->end) | 932 | if ((*lastsym) && al.addr >= (*lastsym)->start && al.addr < (*lastsym)->end) |
935 | return 0; | 933 | return 0; |