Lines Matching refs:self
29 def __init__(self, re): argument
30 self.re = re
32 def filter(self, pid, comm): argument
33 m = self.re.search(comm)
37 def __init__(self, low, high): argument
38 self.low = (0 if low == "" else int(low))
39 self.high = (0 if high == "" else int(high))
41 def filter(self, pid, comm): argument
42 return not (pid >= self.low and (self.high == 0 or pid <= self.high))
55 def __init__(self, aval, bval, alabel = None, blabel = None): argument
56 self.alabel = alabel
57 self.blabel = blabel
58 self.aval = aval
59 self.bval = bval
61 def __add__(self, rhs): argument
62 self.aval += rhs.aval
63 self.bval += rhs.bval
64 return self
66 def __str__(self): argument
67 return "%s=%d %s=%d" % (self.alabel, self.aval, self.blabel, self.bval)
70 def __init__(self, ns): argument
71 self.ns = ns
72 self.migrated = pair(0, 0, "moved", "failed")
73 self.fscan = pair(0,0, "scanned", "isolated")
74 self.mscan = pair(0,0, "scanned", "isolated")
76 def __add__(self, rhs): argument
77 self.ns += rhs.ns
78 self.migrated += rhs.migrated
79 self.fscan += rhs.fscan
80 self.mscan += rhs.mscan
81 return self
83 def __str__(self): argument
85 s = "%s " % time(self.ns)
87 s += "migration: %s" % self.migrated
90 s += "%sfree_scanner: %s" % (" " if prev else "", self.fscan)
93 s += "%smigration_scanner: %s" % (" " if prev else "", self.mscan)
96 def complete(self, secs, nsecs): argument
97 self.ns = ns(secs, nsecs) - self.ns
99 def increment(self, migrated, fscan, mscan): argument
101 self.migrated += migrated
103 self.fscan += fscan
105 self.mscan += mscan
159 def __init__(self, comm, pid, filtered): argument
160 self.comm = comm
161 self.pid = pid
162 self.val = cnode(0)
163 self.pending = None
164 self.filtered = filtered
165 self.list = []
167 def __add__(self, rhs): argument
168 self.ns += rhs.ns
169 self.val += rhs.val
170 return self
172 def mark_pending(self, secs, nsecs): argument
173 self.pending = cnode(ns(secs, nsecs))
175 def do_increment(self, migrated, fscan, mscan): argument
176 self.pending.increment(migrated, fscan, mscan)
178 def make_complete(self, secs, nsecs): argument
179 self.pending.complete(secs, nsecs)
180 chead.val += self.pending
183 self.val += self.pending
186 self.list.append(self.pending)
187 self.pending = None
189 def enumerate(self): argument
190 if opt_proc == popt.DISP_PROC_VERBOSE and not self.is_filtered():
191 for i, pelem in enumerate(self.list):
192 sys.stdout.write("%d[%s].%d: %s\n" % (self.pid, self.comm, i+1, pelem))
194 def is_pending(self): argument
195 return self.pending != None
197 def is_filtered(self): argument
198 return self.filtered
200 def display(self): argument
201 if not self.is_filtered():
202 sys.stdout.write("%d[%s]: %s\n" % (self.pid, self.comm, self.val))