Commit-ID: 5fa9041bbaa7a79a67d568b9c9f947db2f23d091 Gitweb: http://git.kernel.org/tip/5fa9041bbaa7a79a67d568b9c9f947db2f23d091 Author: Namhyung Kim <namhyung.kim@xxxxxxx> AuthorDate: Thu, 29 Nov 2012 15:38:34 +0900 Committer: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> CommitDate: Sun, 9 Dec 2012 08:46:06 -0300 perf hists: Link hist entry pairs to leader Current hists__match/link() link a leader to its pair, so if multiple pairs were linked, the leader will lose pointer to previous pairs since it was overwritten. Fix it by making leader the list head. Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx> Cc: Andi Kleen <andi@xxxxxxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Cc: Jiri Olsa <jolsa@xxxxxxxxxx> Cc: Paul Mackerras <paulus@xxxxxxxxx> Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> Cc: Stephane Eranian <eranian@xxxxxxxxxx> Link: http://lkml.kernel.org/r/1354171126-14387-8-git-send-email-namhyung@xxxxxxxxxx Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> --- tools/perf/util/hist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index d2bc05c..82df1b2 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c @@ -785,7 +785,7 @@ void hists__match(struct hists *leader, struct hists *other) pair = hists__find_entry(other, pos); if (pair) - hist_entry__add_pair(pos, pair); + hist_entry__add_pair(pair, pos); } } @@ -806,7 +806,7 @@ int hists__link(struct hists *leader, struct hists *other) pair = hists__add_dummy_entry(leader, pos); if (pair == NULL) return -1; - hist_entry__add_pair(pair, pos); + hist_entry__add_pair(pos, pair); } } -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html