From: Frederic Weisbecker Date: Wed, 21 Jul 2010 20:45:51 +0000 (+0200) Subject: perf, sched migration: Handle ignored migrate out events X-Git-Tag: upstream/snapshot3+hdmi~12756^2~148^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=749e507411b17ad686783b6d1183befd846fb81b;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Paul Mackerras Cc: Nikhil Rao Cc: Tom Zanussi --- diff --git a/tools/perf/scripts/python/sched-migration.py b/tools/perf/scripts/python/sched-migration.py index f73e1c7..7304d86 100644 --- a/tools/perf/scripts/python/sched-migration.py +++ b/tools/perf/scripts/python/sched-migration.py @@ -435,7 +435,10 @@ class TimeSlice: self.__update_total_load(new_rq, in_rq) ts_list.append(self) - self.event_cpus = [old_cpu, new_cpu] + + if old_rq is not out_rq: + self.event_cpus.append(old_cpu) + self.event_cpus.append(new_cpu) def wake_up(self, ts_list, pid, cpu, fork): old_rq = self.prev.rqs[cpu]