perf annotate: Fix source code annotate with objdump
authorNamhyung Kim <namhyung@kernel.org>
Wed, 25 Jun 2025 23:03:39 +0000 (16:03 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Thu, 26 Jun 2025 22:15:48 +0000 (15:15 -0700)
commite201757f7a0a901e313d638c545ed6cd0dc6870e
tree501454cc707e4cb7e6e1cd8fd5f0e3fb6c3336e6
parent8e63fd1e00f59eab01ab43eb094abc380f8d0c28
perf annotate: Fix source code annotate with objdump

Recently it uses llvm and capstone to speed up annotation or disassembly
of instructions.  But they don't support source code view yet.  Until it
fixed, we can force to use objdump for source code annotation.

To prevent performance loss, it's disabled by default and turned it on
when user requests it in TUI by pressing 's' key.

Acked-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20250625230339.702610-1-namhyung@kernel.org
Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/ui/browsers/annotate.c
tools/perf/util/annotate.c
tools/perf/util/annotate.h
tools/perf/util/disasm.c