linux/tools/perf/ui
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
..
browsers perf annotate: Make sure to call symbol__annotate2() in TUI 2024-04-11 10:14:58 -07:00
gtk perf annotate: Calculate instruction overhead using hashmap 2024-03-06 20:25:20 -08:00
stdio perf thread: Add accessor functions for thread 2023-06-12 15:57:53 -03:00
tui perf TUI: Don't ignore job control 2024-01-04 18:29:17 -03:00
browser.c perf tui slang: Tidy casts 2023-08-25 10:24:55 -03:00
browser.h perf annotate: Fix fused instr logic for assembly functions 2021-09-18 17:43:05 -03:00
Build perf tui slang: Tidy casts 2023-08-25 10:24:55 -03:00
helpline.c perf tools: Remove util.h from where it is not needed 2019-09-20 09:19:20 -03:00
helpline.h perf tools: Remove needless evlist.h include directives 2019-08-31 22:24:10 -03:00
hist.c perf thread: Add reference count checking 2023-06-12 15:57:53 -03:00
keysyms.h perf report: Support a new key to reload the browser 2020-03-24 09:37:27 -03:00
libslang.h perf tui slang: Tidy casts 2023-08-25 10:24:55 -03:00
progress.c perf tools: Remove needless evlist.h include directives 2019-08-31 22:24:10 -03:00
progress.h Merge branch 'linus' into perf/core, to fix conflicts 2017-11-07 10:30:18 +01:00
setup.c perf ui: Move window resize signal functions 2023-04-10 19:20:38 -03:00
ui.h perf ui: Move window resize signal functions 2023-04-10 19:20:38 -03:00
util.c perf tools: Fix "kernel lock contention analysis" test by not printing warnings in quiet mode 2022-10-27 16:37:26 -03:00
util.h tools ui popup: Allow returning hotkeys 2020-01-06 11:46:10 -03:00