[cpu-profiler] De-duplicate CodeEntry objects for inline stacks
Within an inline stack we would have multiple copies of the exact same CodeEntry object to represent an inline frame. We had one copy for every time that the frame appeared in an inline stack. One CodeEntry can have multiple inline stacks and each stack can have multiple inline frames. In the common case, the stacks overlap and repeat frames. This CL creates a single CodeEntry object to represent each inlined function as an inline frame (for a given CodeEntry with inlinings). This removes most of the duplication of inline CodeEntry objects. We still have some duplication, e.g. if we inline bar() into foo() and foo2() but they are not themselves inlined into anything, then we will have two inline CodeEntry objects for bar(). Removing all duplication is harder to achieve because the lifetime of the inlined frame CodeEntry is now no longer tied to the inliner. Get rid of the InlineEntry struct as it is now indentical to CodeEntryAndLineNumber. We store the list of canonical inline CodeEntry objects on the CodeObject of the inlining function so that it can own the lifetimes of inlined frames. Also rename inline_locations_ to inline_stacks_ to be clearer. Bug: v8:7719 Change-Id: Ied765b4cce7fd33f3290798331f1e6767cc42e8c Reviewed-on: https://chromium-review.googlesource.com/c/1396086 Commit-Queue: Peter Marshall <petermarshall@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Alexei Filippov <alph@chromium.org> Cr-Commit-Position: refs/heads/master@{#58639}
Showing
Please
register
or
sign in
to comment