aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2010-07-21 16:45:51 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2010-08-01 19:31:53 -0400
commit749e507411b17ad686783b6d1183befd846fb81b (patch)
tree8e29df1ab2e61b21bd932f9d3dc4f8285bc7dfab /tools
parent880d22f2470af6037715b7f6eb083b6ec5561d92 (diff)
perf, sched migration: Handle ignored migrate out events
Migrate out events may happen on tasks that are not in the runqueue, for example this is the case for tasks that are sleeping. In this case, we don't want to log the migrate out event in the source runqueue because the task is not eventually in the runqueue and we have already logged its sleep event. This fixes timeslices that spuriously propagate a sleep event from the previous timeslice. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Nikhil Rao <ncrao@google.com> Cc: Tom Zanussi <tzanussi@gmail.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/scripts/python/sched-migration.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/scripts/python/sched-migration.py b/tools/perf/scripts/python/sched-migration.py
index f73e1c736a34..7304d86c76c0 100644
--- a/tools/perf/scripts/python/sched-migration.py
+++ b/tools/perf/scripts/python/sched-migration.py
@@ -435,7 +435,10 @@ class TimeSlice:
435 self.__update_total_load(new_rq, in_rq) 435 self.__update_total_load(new_rq, in_rq)
436 436
437 ts_list.append(self) 437 ts_list.append(self)
438 self.event_cpus = [old_cpu, new_cpu] 438
439 if old_rq is not out_rq:
440 self.event_cpus.append(old_cpu)
441 self.event_cpus.append(new_cpu)
439 442
440 def wake_up(self, ts_list, pid, cpu, fork): 443 def wake_up(self, ts_list, pid, cpu, fork):
441 old_rq = self.prev.rqs[cpu] 444 old_rq = self.prev.rqs[cpu]