public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf tools: fix set event list leader
@ 2013-01-31 12:54 Stephane Eranian
  2013-01-31 13:12 ` Jiri Olsa
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stephane Eranian @ 2013-01-31 12:54 UTC (permalink / raw)
  To: linux-kernel; +Cc: acme, mingo, peterz, jolsa, namhyung.kim


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>
---

diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index dc8aee9..050d5bc 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -119,8 +119,7 @@ void __perf_evlist__set_leader(struct list_head *list)
 	leader = list_entry(list->next, struct perf_evsel, node);
 
 	list_for_each_entry(evsel, list, node) {
-		if (evsel != leader)
-			evsel->leader = leader;
+		evsel->leader = leader;
 	}
 }
 

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-02-06 22:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-31 12:54 [PATCH] perf tools: fix set event list leader Stephane Eranian
2013-01-31 13:12 ` Jiri Olsa
2013-02-01  1:50 ` Namhyung Kim
2013-02-06 22:01 ` [tip:perf/core] perf evlist: Fix " tip-bot for Stephane Eranian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox