diff options
| author | Frederic Weisbecker <fweisbec@gmail.com> | 2010-08-01 14:55:45 +0200 | 
|---|---|---|
| committer | Frederic Weisbecker <fweisbec@gmail.com> | 2010-08-02 01:32:00 +0200 | 
| commit | 1b0ff06e68155de606f86e7e69eb238f14e05ba0 (patch) | |
| tree | ada6010932fc96014822e95b702b40912e0f7ef7 /tools/perf/scripts/python/sched-migration.py | |
| parent | df92b40848616596c50b3b9e6d6ce8252af606ee (diff) | |
perf, sched migration: Librarize task states and event headers helpers
Librarize the task state and event headers helpers as they can
be generally useful.
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/perf/scripts/python/sched-migration.py')
| -rw-r--r-- | tools/perf/scripts/python/sched-migration.py | 30 | 
1 files changed, 0 insertions, 30 deletions
diff --git a/tools/perf/scripts/python/sched-migration.py b/tools/perf/scripts/python/sched-migration.py index 983463050f0..b934383c336 100644 --- a/tools/perf/scripts/python/sched-migration.py +++ b/tools/perf/scripts/python/sched-migration.py @@ -31,36 +31,6 @@ threads = { 0 : "idle"}  def thread_name(pid):  	return "%s:%d" % (threads[pid], pid) -class EventHeaders: -	def __init__(self, common_cpu, common_secs, common_nsecs, -		     common_pid, common_comm): -		self.cpu = common_cpu -		self.secs = common_secs -		self.nsecs = common_nsecs -		self.pid = common_pid -		self.comm = common_comm - -	def ts(self): -		return (self.secs * (10 ** 9)) + self.nsecs - -	def ts_format(self): -		return "%d.%d" % (self.secs, int(self.nsecs / 1000)) - - -def taskState(state): -	states = { -		0 : "R", -		1 : "S", -		2 : "D", -		64: "DEAD" -	} - -	if state not in states: -		return "Unknown" - -	return states[state] - -  class RunqueueEventUnknown:  	@staticmethod  	def color():  | 
