mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-11-22 00:59:26 +00:00
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:
|
||
|---|---|---|
| .. | ||
| annotate.c | ||
| Build | ||
| header.c | ||
| hists.c | ||
| hists.h | ||
| map.c | ||
| map.h | ||
| res_sample.c | ||
| scripts.c | ||