]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
perf annotate: Split branch stack cycles info from 'struct annotation'
authorNamhyung Kim <namhyung@kernel.org>
Fri, 3 Nov 2023 19:19:04 +0000 (12:19 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:29:23 +0000 (16:29 +0200)
commit4ef032d89995365efd87420e172d8777358f4869
treec9598668056e6f63ea234ad3e5a4a8d782996d05
parentba18185bea37d4ce8d160ac824bc2890588775e2
perf annotate: Split branch stack cycles info from 'struct annotation'

[ Upstream commit b7f87e32590bf48eca84f729d3422be7b8dc22d3 ]

The cycles info is only meaningful when sample has branch stacks.  To
save the memory for normal cases, move those fields to a new 'struct
annotated_branch' and dynamically allocate it when needed.  Also move
cycles_hist from annotated_source as it's related here.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20231103191907.54531-3-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Stable-dep-of: 3ef44458071a ("perf report: Fix --total-cycles --stdio output error")
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/perf/util/annotate.c
tools/perf/util/annotate.h
tools/perf/util/block-info.c
tools/perf/util/sort.c