[PATCH 1/3] perf callchain: Fix loss of symbol in merge_chain_branch()
From: Ian Rogers
Date: Sat Oct 31 2026 - 02:36:10 EST
Commit bffb5b0c0976 ("perf map/maps/thread: Changes to reference
counting") replaced passing &list->ms to callchain_cursor_append() in
merge_chain_branch() with a temporary struct map_symbol initialized with
.thread and .map, but omitted .sym = list->ms.sym.
As a result, callchains merged during histogram collapse lose their
resolved struct symbol pointer, causing 'perf report --children' to
print raw hexadecimal addresses instead of function names and inlined
frames on merged callchain branches.
Initialize .sym = list->ms.sym in the temporary struct map_symbol in
merge_chain_branch().
Fixes: bffb5b0c0976 ("perf map/maps/thread: Changes to reference counting")
Suggested-by: Alireza Haghdoost <haghdoost@xxxxxxxx>
Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
---
tools/perf/util/callchain.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c
index 31c675cbab63..6d5212be466d 100644
--- a/tools/perf/util/callchain.c
+++ b/tools/perf/util/callchain.c
@@ -1092,6 +1092,7 @@ merge_chain_branch(struct callchain_cursor *cursor,
struct map_symbol ms = {
.thread = thread__get(list->ms.thread),
.map = map__get(list->ms.map),
+ .sym = list->ms.sym,
};
callchain_cursor_append(cursor, list->ip, &ms, false, NULL, 0, 0, 0, list->srcline);
list_del_init(&list->list);
--
2.56.0.317.g454f8302e1-goog