Lines Matching refs:self
25 def __init__(self, args): argument
26 self.args = args
28 self.definitions = {}
30 self.weights = {}
32 self.allocation_count = {}
34 def definition(self, index): argument
38 return self.definitions[index]
40 def set_definition(self, index, definition): argument
44 self.definitions[index] = definition
46 def weight(self, index): argument
50 return self.weights[index]
52 def set_weight(self, index, weight): argument
56 self.weights[index] = weight
58 def read_file(self, filename): argument
100 thread_type_size = self.definition(int(tokens[0]))
102 if self.args.type_only:
104 elif self.args.thread_only:
112 self.set_weight(index, weight)
118 if self.args.depth_limit > 0 and i >= self.args.depth_limit:
122 method = self.definition(int(token)).replace(";", ":")
126 if not self.args.ignore_type:
131 if self.args.reverse_stack:
153 self.set_definition(index, definition)
160 trace = self.definition(index)
161 if self.args.use_size:
162 weight = self.weight(index)
165 if trace in self.allocation_count:
166 self.allocation_count[trace] = self.allocation_count[trace] + weight
168 self.allocation_count[trace] = weight
182 def dump_flame_graph(self): argument
186 for definition, weight in self.allocation_count.items():