-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix Hermes sampling profiler #11033
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Fix Hermes sampling profiler #11033
Conversation
This file contains hidden or 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
ba7272a to
e966b51
Compare
e966b51 to
228c190
Compare
acoates-ms
approved these changes
Feb 9, 2023
vmoroz
added a commit
to vmoroz/microsoft-react-native-windows
that referenced
this pull request
Feb 10, 2023
vmoroz
added a commit
to vmoroz/microsoft-react-native-windows
that referenced
this pull request
Feb 13, 2023
vmoroz
added a commit
that referenced
this pull request
Feb 13, 2023
* Fix Hermes sampling profiler (#11033) * Change files * Fix Desktop compilation issues * Fix Hermes version * Restore telemetry tests * Fix AccessibilityInfoExample --------- Co-authored-by: Vladimir Morozov <[email protected]> Co-authored-by: Andrew Coates <[email protected]>
vmoroz
added a commit
to vmoroz/microsoft-react-native-windows
that referenced
this pull request
Jun 14, 2023
vmoroz
added a commit
to vmoroz/microsoft-react-native-windows
that referenced
this pull request
Jun 15, 2023
13 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
AutoMerge
Causes a PR to be automatically merged once all requirements are passed (label drives bot activity)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Enable Hermes sampling profiler for RNW project.
Type of Change
Why
Currently the Hermes sampling profiler does not work.
It prevents any related perf investigations.
What
The change has the following parts:
HermesShimis changed to use the new API.HermesRuntimeHolderin the context properties. It allows us to add current Hermes runtime for the sampling profiling when it starts and then remove it when it is done.ReactDispatcher.HermesRuntimeHoldermethodsloadFromandstoreToare defined to keep the holder in the context properties.HermesRuntimeHolderinstance is stored on RN instance creation and then removed on RN instance destruction.Testing
The new sampling profiler is tested manually.
I used the Playground application with Hermes engine.
The menu has commands to start and stop the sampling profiler.
IMPORTANT: the resulting CPU sampling file in the application local storage cannot be opened directly in Chrome or Edge browsers. It must be first post-processed by hermes-profile-transformer tool.
Microsoft Reviewers: Open in CodeFlow