From 74b2133d19e776924b2773e27dd9d6940f1cc594 Mon Sep 17 00:00:00 2001 From: Stephane Eranian Date: Thu, 31 Jan 2013 13:54:37 +0100 Subject: perf evlist: Fix set event list leader The __perf_evlist__set_leader() was setting the leader for all events in the list except the first. Which means it assumed the first event already had event->leader = event. Seems like this should be the role of the function to also do this. This is a requirement for an upcoming patch set. Signed-off-by: Stephane Eranian Acked-by: Jiri Olsa Tested-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20130131125437.GA3656@quad Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/evlist.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tools/perf') diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index eddd5ebcd690..ecf123e080bb 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -122,8 +122,7 @@ void __perf_evlist__set_leader(struct list_head *list) leader->nr_members = evsel->idx - leader->idx + 1; list_for_each_entry(evsel, list, node) { - if (evsel != leader) - evsel->leader = leader; + evsel->leader = leader; } } -- cgit v1.2.3