diff --git a/gdb-port/parser.py b/gdb-port/parser.py index 5c10d080415d47575c053fea6c738c5a255f76cd..00b79cab35b462d492b886014088c360989de7f4 100644 --- a/gdb-port/parser.py +++ b/gdb-port/parser.py @@ -359,6 +359,7 @@ class ParserStack: #print("commit_at_push: push_allocs:", push_allocs) # DEBUG # Most recent event is a push event, and we have no information on its allocations yet. So we only increment self.committed up to the index of the previous event + self.unclaimed_mem_use += push_allocs.pop(0,0) self.committed = len(self.stack_events)-2 #print("commit_at_push: self.committed after update:", self.committed) # DEBUG # TODO: do we want to increment mem use in commit_at_*, or do we want to return the dict and have it taken care of by push()/pop()? diff --git a/gdb-port/top-level-parse.py b/gdb-port/top-level-parse.py index 77e553f1982d80c145f73fc30d08896dcb175db7..d9e62fb596e53b6794cea857065e5c05b49d6e78 100644 --- a/gdb-port/top-level-parse.py +++ b/gdb-port/top-level-parse.py @@ -276,6 +276,8 @@ class TopLevelParse: for ps in self.parser_stacks: new_allocs_by_parser = ps.get_pending_allocations() for parser, alloc in new_allocs_by_parser.items(): + if not parser: # DEBUG + continue # DEBUG pending_allocs = self.pending_allocs.get(parser, {}) pending_allocs[ps.arena_int] = pending_allocs.get(ps.arena_int, 0) + alloc.get(ps.arena_int, 0) self.pending_allocs[parser] = pending_allocs