diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index f028f113c4fd4..a18fe9061d1dc 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c @@ -637,6 +637,11 @@ static struct hist_entry *hists__findnew_entry(struct hists *hists, * the history counter to increment. */ if (he->ms.map != entry->ms.map) { + if (he->ms.sym) { + u64 addr = he->ms.sym->start; + he->ms.sym = map__find_symbol(entry->ms.map, addr); + } + map__put(he->ms.map); he->ms.map = map__get(entry->ms.map); }