diff --git a/gdb-port/top-level-parse.py b/gdb-port/top-level-parse.py index d2f97b9a19d8fd90a52ef4f25f6d54d4f65fca3d..1a4623a6256486687e4d2b276977dbd95278ef73 100644 --- a/gdb-port/top-level-parse.py +++ b/gdb-port/top-level-parse.py @@ -91,7 +91,7 @@ class TopLevelParse: self.cumulative_byte_differences.insert(0, newbytes - self.bytes_at_enter[-(len(self.cumulative_byte_differences)+1)]) # TODO: consistency. this is the third way of answering the question, "how deep are we in the stack" allocated_bytes = self.cumulative_byte_differences[-len(self.cumulative_byte_differences)] - self.cumulative_byte_differences[-(len(self.cumulative_byte_differences)-1)] # NB: len(self.cumulative_byte_differences) changed since the last line self.total_byte_differences.insert(-len(self.cumulative_byte_differences), allocated_bytes) - parser_obj.add_mem_use(allocated_bytes) + parser_obj.add_mem_use(int(parser_stack.arena), allocated_bytes) # TODO: allocations can be attributed to individual h_do_parse(parser) calls, thus the same per-parser per-arena stats tracking can be done # Called from h_do_parse()'s handler, at which point we know the addresses of the state and arena