diff options
author | Arnaldo Carvalho de Melo <[email protected]> | 2019-08-07 10:45:30 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2019-08-12 16:26:02 -0300 |
commit | 7d1a5efa20dbfea97cb93b99c67ce5cd5c4a4dbc (patch) | |
tree | b2ce28a282c3d33ad918638302b8fb308683275e | |
parent | 1205a2719e52b6b52e0f9c0011554419da0377a0 (diff) |
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 <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Link: https://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r-- | tools/perf/util/hist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index 4297f56b1e05..d923a5bb7b48 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c @@ -2453,7 +2453,7 @@ void hists__match(struct hists *leader, struct hists *other) pos = rb_entry(nd, struct hist_entry, rb_node_in); pair = hists__find_entry(other, pos); - if (pair) + if (pair && list_empty(&pair->pairs.node)) hist_entry__add_pair(pair, pos); } } |