-
Notifications
You must be signed in to change notification settings - Fork 599
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix assert from syncWithRuntimeStack stopping too early
Summary: The function `StackTracesTree::syncWithRuntimeStack` is called whenever allocation profiling is started, in order to ensure the current stack's contents are set up for future call stack pushes and pops. However, it used to stop the sync as soon as it found a null code block. This happens whenever there's a native call in the stack frame. If multiple native calls are layered, it'll miss the JS frames in the middle. Eventually, when those frames are popped, they won't have their parent set up. Instead of stopping completely at the first null code block, go further to find all JS code blocks and push them onto the stack. Also, change all tests in StackTraceTreeTest to be doubled for tracking from the start, to tracking only right before the allocation, to further test `syncWithRuntimeStack` Reviewed By: neildhar Differential Revision: D23889042 fbshipit-source-id: bc094127ed6c3bc57d533799a2c4e50bb0f0e589
- Loading branch information
1 parent
67e644d
commit b7177cb
Showing
3 changed files
with
251 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.