Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d2580c7a authored by Namhyung Kim's avatar Namhyung Kim Committed by Arnaldo Carvalho de Melo
Browse files

perf hist: Initialize hierarchy tree explicitly



The hroot_in and hroot_out are roots of hierarchy trees of hist entries.

But when a hist entry is initialized by copying existing template entry,
it sometimes has non-empty tree and copies it incorrectly.  This is a
problem especially when an event group is used since it creates dummy
entries from already-processed entries in other event members.

Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20160913074552.13284-4-namhyung@kernel.org


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 9d97b8f5
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -417,6 +417,8 @@ static int hist_entry__init(struct hist_entry *he,
	}
	}
	INIT_LIST_HEAD(&he->pairs.node);
	INIT_LIST_HEAD(&he->pairs.node);
	thread__get(he->thread);
	thread__get(he->thread);
	he->hroot_in  = RB_ROOT;
	he->hroot_out = RB_ROOT;


	if (!symbol_conf.report_hierarchy)
	if (!symbol_conf.report_hierarchy)
		he->leaf = true;
		he->leaf = true;