[PATCH v1 1/3] perf ui hists: In report UI ensure thread is set
From: Ian Rogers
Date: Wed Jul 08 2026 - 19:47:10 EST
A map_symbol contains a thread that provides access to the wider perf
session. Recent changes used the thread to get the e_machine to better
support cross-platform disassembly. Unfortunately the UI code wasn't
populating the thread and so the e_machine lookup failed early
breaking the 'a' for annotate TUI action. Populate the map_symbol
thread to fix this.
Reported-by: Josh Stone <jistone@xxxxxxxxxx>
Fixes: 0e26ba5a8774 ("perf disasm: Refactor arch__find and initialization of arch structs")
Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
---
tools/perf/ui/browsers/hists.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index da7cc195b9f4..f8ffd9b73582 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -3155,10 +3155,12 @@ static int evsel__hists_browse(struct evsel *evsel, int nr_events, const char *h
continue;
actions->ms.sym = symbol__new_unresolved(bi->to.al_addr, bi->to.ms.map);
+ actions->ms.thread = bi->to.ms.thread;
actions->ms.map = bi->to.ms.map;
} else {
actions->ms.sym = symbol__new_unresolved(browser->he_selection->ip,
browser->selection->map);
+ actions->ms.thread = browser->selection->thread;
actions->ms.map = browser->selection->map;
}
@@ -3173,6 +3175,7 @@ static int evsel__hists_browse(struct evsel *evsel, int nr_events, const char *h
continue;
}
+ actions->ms.thread = browser->selection->thread;
actions->ms.map = browser->selection->map;
actions->ms.sym = browser->selection->sym;
}
--
2.55.0.795.g602f6c329a-goog