diff --git a/gdb-port/top-level-parse.py b/gdb-port/top-level-parse.py index e981142ff8cc929b03afde7308cac55c1ea273c4..db7922528acd6eb19e653c18064e9495ebeccadd 100644 --- a/gdb-port/top-level-parse.py +++ b/gdb-port/top-level-parse.py @@ -63,8 +63,8 @@ class TopLevelParse: def enter_h_do_parse(self, parse_state, arena, parser): parser_stack = self.peek_parserstack() - #if self.memory_stat_method == HammerMemoryStatisticsMethod.DETAILED_ARENA_STATS - if self.extended_arena_stats_available(): # DEBUG + if self.memory_stat_method == HammerMemoryStatisticsMethod.DETAILED_ARENA_STATS: + #if self.extended_arena_stats_available(): # DEBUG self.bytes_at_enter.append(int(arena['arena_malloc_bytes'])) self.cumulative_byte_differences = [] # TODO: direction @@ -85,8 +85,8 @@ class TopLevelParse: # If other backends are supported, this might change to pushing/popping the stack in h_do_parse() self.h_do_parse_parser = parser_obj # Restore the "current" parser, otherwise it'll show the parser h_do_parse() was last called with on the GUI and backtrace - #if self.memory_stat_method == HammerMemoryStatisticsMethod.DETAILED_ARENA_STATS - if self.extended_arena_stats_available(): # DEBUG + if self.memory_stat_method == HammerMemoryStatisticsMethod.DETAILED_ARENA_STATS: + #if self.extended_arena_stats_available(): # DEBUG newbytes = int(parse_state['arena']['arena_malloc_bytes']) 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