diff options
author | Stephane Eranian <eranian@google.com> | 2013-01-31 07:54:37 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-02-06 16:09:25 -0500 |
commit | 74b2133d19e776924b2773e27dd9d6940f1cc594 (patch) | |
tree | 827b6774488bbdb80a754d2fec9ff572d55153fb /tools/perf | |
parent | ad0de0971b7f7097bd9be1ab4ad2a64db500adbf (diff) |
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 <eranian@google.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Tested-by: Jiri Olsa <jolsa@redhat.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20130131125437.GA3656@quad
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/util/evlist.c | 3 |
1 files changed, 1 insertions, 2 deletions
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) | |||
122 | leader->nr_members = evsel->idx - leader->idx + 1; | 122 | leader->nr_members = evsel->idx - leader->idx + 1; |
123 | 123 | ||
124 | list_for_each_entry(evsel, list, node) { | 124 | list_for_each_entry(evsel, list, node) { |
125 | if (evsel != leader) | 125 | evsel->leader = leader; |
126 | evsel->leader = leader; | ||
127 | } | 126 | } |
128 | } | 127 | } |
129 | 128 | ||