diff --git a/gdb-port/top-level-parse.py b/gdb-port/top-level-parse.py index aa20216a35444e84dd7b99ad11e3265f849e51e8..da6a1e0aa79408157d68cfdba461bf4b77730724 100644 --- a/gdb-port/top-level-parse.py +++ b/gdb-port/top-level-parse.py @@ -268,15 +268,14 @@ class TopLevelParse: # TODO: get_avg_mem_use_all_arenas, get_total_mem_use def gather_allocations_in_parser_stacks(self): - pending_allocs_by_arena = {} - for ps in self.parser_stacks: new_allocs_by_arena = ps.get_pending_allocations() new_allocs = new_allocs_by_arena.get(ps.arena_int, {}) pending_allocs = self.pending_allocs.get(ps.arena_int, {}) for addr, alloc in new_allocs: pending_allocs[addr] = pending_allocs.get(addr, 0) + alloc - pending_allocs_by_arena[ps.arena_int] = pending_allocs + self.pending_allocs[ps.arena_int] = pending_allocs + # TODO: allocations are grouped by arena, then parser address. we get the arena address from the parser stack, which may be shared between parser stacks # Therefore, it can't just be blindly assigned to a key with the arena's address. the two dicts need to be merged, with the values of duplicate entries added together