Skip to content

Commit 7d1a5ef

Browse files
committed
perf hists: Do not link a pair if already linked
When we have multiple events in a group we link hist_entries in the non-leader evsel hists to the one in the leader that points to the same sorting criteria, in hists__match(). For 'perf report' we do this just once and then print the results, but for 'perf top' we need to look if this was already done in the previous refresh of the screen, so check for that and don't try to link again. This is part of having 'perf top' using the hists browser for showing multiple events in multiple columns. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lkml.kernel.org/n/tip-iwvb37rgb7upswhruwpcdnhw@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 1205a27 commit 7d1a5ef

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎tools/perf/util/hist.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2453,7 +2453,7 @@ void hists__match(struct hists *leader, struct hists *other)
24532453
pos = rb_entry(nd, struct hist_entry, rb_node_in);
24542454
pair = hists__find_entry(other, pos);
24552455

2456-
if (pair)
2456+
if (pair && list_empty(&pair->pairs.node))
24572457
hist_entry__add_pair(pair, pos);
24582458
}
24592459
}

0 commit comments

Comments
 (0)