Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 205359
b: refs/heads/master
c: 1b0ff06
h: refs/heads/master
i:
  205357: 0936ce9
  205355: 8d41ec5
  205351: 89bf8de
  205343: f5d5512
v: v3
  • Loading branch information
Frederic Weisbecker committed Aug 1, 2010
1 parent f986641 commit 03aae3d
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: df92b40848616596c50b3b9e6d6ce8252af606ee
refs/heads/master: 1b0ff06e68155de606f86e7e69eb238f14e05ba0
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,33 @@ def trace_flag_str(value):
value &= ~idx

return string


def taskState(state):
states = {
0 : "R",
1 : "S",
2 : "D",
64: "DEAD"
}

if state not in states:
return "Unknown"

return states[state]


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))
30 changes: 0 additions & 30 deletions trunk/tools/perf/scripts/python/sched-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,36 +31,6 @@
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():
Expand Down

0 comments on commit 03aae3d

Please sign in to comment.