-
Notifications
You must be signed in to change notification settings - Fork 24.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add HeapProfiler.lastSeenObjectId and HeapProfiler.heapStatsUpdate to…
… inspector Summary: When taking a heap timeline, Hermes wasn't showing any data until the timeline was written to disk and then reloaded. Turns out we were missing support for two events: * `HeapProfiler.lastSeenObjectId`: This event reports the most recently allocated object ID. Used to know when objects were allocated in the timeline. * `HeapProfiler.heapStatsUpdate`: Report how many objects and bytes exist for a "time fragment", represented by a fragment index. Later updates to the same index can decrease the amount of live memory, which show up as grey spikes instead of blue spikes Previously, we only supported these by writing out to a file, and they didn't work with a "live" profiling view. To fix this, I changed the periodic sampling thread to instead be a periodic flush of a sample every few allocations. The performance impact is tucked away only when profiling is turned on, and it's very non-invasive to the rest of the GC. The flush calls a callback with the relevant information if the inspector is on, and the inspector sends a message back to the browser. Changelog: [Internal] Fix for Hermes heap timeline profiling Reviewed By: neildhar Differential Revision: D23993363 fbshipit-source-id: 8e0b571130cbb7e839dfb009b04f584f5179085d
- Loading branch information
1 parent
9a7f2b5
commit d8b0e9d
Showing
7 changed files
with
143 additions
and
12 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
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
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
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