-
Notifications
You must be signed in to change notification settings - Fork 655
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: While I was triaging why Hermes returns different thread id from the one where React Native runs JavaScript, I found this: 1. `threadNames_` map will be populated at the time when Runtime is created. On React Native side, we create Runtime on a Main thread, so Hermes will capture only it in this map: it will never capture JavaScript thread: {F1975078780} 2. The actual thread id of where Runtime was running is stored here: https://www.internalfb.com/code/fbsource/[6bd4646ee6d2]/xplat/hermes/lib/VM/Profiler/SamplingProfiler.cpp?lines=125 Later, every `StackTrace` object will have `tid` field with correct thread id. In D58787655, bgirard added a logic that registers RN's JavaScript thread with Hermes' sampling profielr. Given this, I propose simplifying an API and use just a `threadId` field on every recorded sample. Reviewed By: bgirard Differential Revision: D69525657 fbshipit-source-id: 699e8edc1b60211a3438cd6ac3071c7cdd61579a
- Loading branch information
1 parent
bde8cb6
commit 06bf7a8
Showing
4 changed files
with
16 additions
and
73 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