aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/annotate.c
diff options
context:
space:
mode:
authorNamhyung Kim <[email protected]>2025-06-25 23:03:39 +0000
committerNamhyung Kim <[email protected]>2025-06-26 22:15:48 +0000
commite201757f7a0a901e313d638c545ed6cd0dc6870e (patch)
tree501454cc707e4cb7e6e1cd8fd5f0e3fb6c3336e6 /tools/perf/util/annotate.c
parenttools: Remove libcrypto dependency (diff)
downloadkernel-e201757f7a0a901e313d638c545ed6cd0dc6870e.tar.gz
kernel-e201757f7a0a901e313d638c545ed6cd0dc6870e.zip
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reported-by: Ingo Molnar <[email protected]> Signed-off-by: Namhyung Kim <[email protected]>
Diffstat (limited to 'tools/perf/util/annotate.c')
-rw-r--r--tools/perf/util/annotate.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 264a212b47df..0dd475a744b6 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -1451,6 +1451,7 @@ void annotated_source__purge(struct annotated_source *as)
list_del_init(&al->node);
disasm_line__free(disasm_line(al));
}
+ as->tried_source = false;
}
static size_t disasm_line__fprintf(struct disasm_line *dl, FILE *fp)
@@ -2280,6 +2281,7 @@ void annotation_options__init(void)
opt->annotate_src = true;
opt->offset_level = ANNOTATION__OFFSET_JUMP_TARGETS;
opt->percent_type = PERCENT_PERIOD_LOCAL;
+ opt->hide_src_code = true;
opt->hide_src_code_on_title = true;
}