From 97cfe88002686884f4544c603e104b351c41c79f Mon Sep 17 00:00:00 2001 From: pompolic <pompolic@special-circumstanc.es> Date: Sat, 13 May 2023 22:10:53 +0200 Subject: [PATCH] (WIP) Fix typos --- gdb-port/parser.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gdb-port/parser.py b/gdb-port/parser.py index bc5d24b..cc12a01 100644 --- a/gdb-port/parser.py +++ b/gdb-port/parser.py @@ -263,6 +263,7 @@ class ParserStack: # - in this case we just need to add the difference in allocated bytes since that last "pop", to the parser we're about to pop off p_stack def commit_at_pop(self): + #profiler.enable() # DEBUG current_event = self.stack_events[-1] previous_event = self.stack_events[-2] ev_start = self.committed + 1 @@ -296,7 +297,7 @@ class ParserStack: pop_allocs[current_event[2].address] = pop_allocs.get(current_event[2].address, 0) + current_frame_alloc parser_cache[current_event[2].address] = current_event[2] current_event[2].add_mem_use(self.arena_int, current_frame_alloc) - profiler.disable() # DEBUG + #profiler.disable() # DEBUG return pop_allocs # return { current_event[2].address: current_frame_alloc } elif ev_list_length > 1: @@ -322,6 +323,7 @@ class ParserStack: ##top_level_parse.parser_by_address(parser_addr).add_mem_use(int(self.arena), alloc) #parser_cache[parser_addr].add_mem_use(self.arena_int, alloc) self.committed = len(self.stack_events)-1 + #profiler.disable() # DEBUG return pop_allocs @@ -359,8 +361,8 @@ class ParserStack: # checking self.committed will show if all the relevant allocations before revisiting the current stack frame have been committed. # - self.stack_events[self.committed] == current_event - def get_pending_allocations() + def get_pending_allocations(): return self.pending_allocs - def clear_pending_allocations() + def clear_pending_allocations(): self.pending_allocs = { self.arena_int : {} } -- GitLab