]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
perf annotate: Use a hashmap to save type data
authorNamhyung Kim <namhyung@kernel.org>
Sat, 16 Aug 2025 03:16:35 +0000 (20:16 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 2 Sep 2025 20:14:00 +0000 (17:14 -0300)
commit1086237f0a91c7e70eede1bc83ce54f521db64b0
tree8333fe95570f9a70424808cb2a8836991034bfb8
parent53a61a6ca279165dd51f4e3bb5f8b11544915138
perf annotate: Use a hashmap to save type data

It can slowdown annotation browser if objdump is processing large DWARF
data.  Let's add a hashmap to save the data type info for each line.

Note that this is needed for TUI only because stdio only processes each
line once.  TUI will display the same line whenever it refreshes the
screen.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250816031635.25318-13-namhyung@kernel.org
[ Add lines around an if block and use zfree() in one case, acked by Namhyung ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/ui/browsers/annotate.c
tools/perf/util/annotate.c
tools/perf/util/annotate.h