diff --git a/gdb-port/parser.py b/gdb-port/parser.py index d35d84ee6baf8ce1d865ae1aa664f8404b319ddd..a01669eeefe1d510368ef007e7fb7b8ccf38d97e 100644 --- a/gdb-port/parser.py +++ b/gdb-port/parser.py @@ -310,11 +310,11 @@ class ParserStack: # Key observations # - There is either a run of "push" events at the end of the list, or there is a "pop" event # - While a "pop" will always have a corresponding "push" event, there may be runs of "push" events - # - - # In terms of parentheses, assuming an intact execution flow, there will never be a stray right parenthesis, but there may be an arbitrary amount of open parentheses + # - "pop"s will always increment self.committed, and any "push" MAY increment self.committed + # - In terms of parentheses, assuming an intact execution flow, there will never be a stray right parenthesis, but there may be an arbitrary amount of open parentheses # "pop" events trigger committing their allocations to the memory stats - # For UX purposes, the left parens should also be committed as soon as possible, without double-counting the allocations made before calling h_do_parse() again, or returning - # This problem is pretty similar to drawing flame graphs: https://brendangregg.com/FlameGraphs/memoryflamegraphs.html + # - For UX purposes, the left parens should also be committed as soon as possible, without double-counting the allocations made before calling h_do_parse() again, or returning + # - Working with these stack events is pretty similar to drawing flame graphs: https://brendangregg.com/FlameGraphs/memoryflamegraphs.html # Avoiding double-counting allocations: # Handling the list as above will often add allocations pertaining to stack frames/parser contexts that have not finished applying yet. (All the '(' symbols at the end of the list for example)