summaryrefslogtreecommitdiff
path: root/tools/perf/ui
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2023-11-03 22:19:03 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2023-11-09 19:49:33 +0300
commitde2c7eb59c342d1a61124caaf2993e325a9becb7 (patch)
treeae3b1874763837b79acd40a8fccf1ae03c3474dc /tools/perf/ui
parent89d5c48c34c8a552acd9a2e3ee504b2f06879fea (diff)
downloadlinux-de2c7eb59c342d1a61124caaf2993e325a9becb7.tar.xz
perf annotate: Split branch stack cycles information out of 'struct annotation_line'
The cycles info is used only when branch stack is provided. Separate them from 'struct annotation_line' into a separate struct and lazy allocate them to save some memory. Committer notes: Make annotation__compute_ipc() check if the lazy allocation works, bailing out if so, its callers already do error checking and propagation. 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-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui')
-rw-r--r--tools/perf/ui/browsers/annotate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index ccdb2cd11fbf..d2470f87344d 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -337,7 +337,7 @@ static void annotate_browser__calc_percent(struct annotate_browser *browser,
max_percent = percent;
}
- if (max_percent < 0.01 && pos->al.ipc == 0) {
+ if (max_percent < 0.01 && (!pos->al.cycles || pos->al.cycles->ipc == 0)) {
RB_CLEAR_NODE(&pos->al.rb_node);
continue;
}