Home
last modified time | relevance | path

Searched hist:"2 b8dbf69ec60faf6c7db49e57d7f316409ccec92" (Results 1 – 2 of 2) sorted by relevance

/linux/tools/perf/ui/browsers/
H A Dannotate.cdiff 2b8dbf69ec60faf6c7db49e57d7f316409ccec92 Fri Apr 05 23:17:57 CEST 2024 Namhyung Kim <namhyung@kernel.org> 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: 81e57deec325 ("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
/linux/tools/perf/util/
H A Dannotate.cdiff 2b8dbf69ec60faf6c7db49e57d7f316409ccec92 Fri Apr 05 23:17:57 CEST 2024 Namhyung Kim <namhyung@kernel.org> 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: 81e57deec325 ("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