mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 22:21:42 +00:00
2b8dbf69ec
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:
|
||
---|---|---|
.. | ||
browsers | ||
gtk | ||
stdio | ||
tui | ||
browser.c | ||
browser.h | ||
Build | ||
helpline.c | ||
helpline.h | ||
hist.c | ||
keysyms.h | ||
libslang.h | ||
progress.c | ||
progress.h | ||
setup.c | ||
ui.h | ||
util.c | ||
util.h |