diff options
Diffstat (limited to 'tools/perf/ui/browsers/annotate.c')
-rw-r--r-- | tools/perf/ui/browsers/annotate.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c index a9338c071f56..ab776b1ed2d5 100644 --- a/tools/perf/ui/browsers/annotate.c +++ b/tools/perf/ui/browsers/annotate.c @@ -406,6 +406,9 @@ static bool annotate_browser__toggle_source(struct annotate_browser *browser) browser->b.index = al->idx_asm; } + if (annotate_opts.hide_src_code_on_title) + annotate_opts.hide_src_code_on_title = false; + return true; } @@ -708,8 +711,12 @@ static int annotate__scnprintf_title(struct hists *hists, char *bf, size_t size) { int printed = hists__scnprintf_title(hists, bf, size); - return printed + scnprintf(bf + printed, size - printed, " [source: %s]", - annotate_opts.hide_src_code ? "OFF" : "On"); + if (!annotate_opts.hide_src_code_on_title) { + printed += scnprintf(bf + printed, size - printed, " [source: %s]", + annotate_opts.hide_src_code ? "OFF" : "On"); + } + + return printed; } static int annotate_browser__run(struct annotate_browser *browser, |