mirror_ubuntu-kernels/tools/perf/ui/browsers
Namhyung Kim 2b8dbf69ec perf annotate: Make sure to call symbol__annotate2() in TUI
The symbol__annotate2() initializes some data structures needed by TUI.
It has a logic to prevent calling it multiple times by checking if it
has the annotated source.  But data type profiling uses a different
code (symbol__annotate) to allocate the annotated lines in advance.
So TUI missed to call symbol__annotate2() when it shows the annotation
browser.

Make symbol__annotate() reentrant and handle that situation properly.
This fixes a crash in the annotation browser started by perf report in
TUI like below.

  $ perf report -s type,sym --tui
  # and press 'a' key and then move down

Fixes: 81e57deec3 ("perf report: Support data type profiling")
Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240405211800.1412920-2-namhyung@kernel.org
2024-04-11 10:14:58 -07:00
..
annotate.c perf annotate: Make sure to call symbol__annotate2() in TUI 2024-04-11 10:14:58 -07:00
Build perf tui slang: Tidy casts 2023-08-25 10:24:55 -03:00
header.c perf tools: Remove debug.h from places where it is not needed 2019-09-20 09:19:20 -03:00
hists.c perf TUI: Don't ignore job control 2024-01-04 18:29:17 -03:00
hists.h perf ui/browser/annotate: Use global annotation_options 2023-12-07 17:18:06 -03:00
map.c perf map: Add accessor for dso 2023-04-04 16:41:57 -03:00
map.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
res_sample.c perf: script: prefer capstone to XED 2024-02-20 18:07:34 -08:00
scripts.c perf: script: prefer capstone to XED 2024-02-20 18:07:34 -08:00