Move TracingState interfaces to inspector package#54632
Closed
hoxyq wants to merge 6 commits intofacebook:mainfrom
Closed
Move TracingState interfaces to inspector package#54632hoxyq wants to merge 6 commits intofacebook:mainfrom
hoxyq wants to merge 6 commits intofacebook:mainfrom
Conversation
83fd524 to
5e4c3f4
Compare
5e4c3f4 to
4763182
Compare
cortinico
approved these changes
Nov 21, 2025
Contributor
cortinico
left a comment
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
4763182 to
6e52723
Compare
Summary: # Changelog: [Internal] There is no implementation for this method and it is unused. This is actually part of `HostAgent`. Differential Revision: D87220192
Summary: # Changelog: [Internal] Introduces a TracingDelegate that will receive tracing-related events on the Host side. We can't give synchronous access to tracing state to Host directly, since there is no guarantee that this call will happen on the inspector thread. Example: - `HostTarget::tracingState()` call may happen on UI thread, or whatever thread the Host is using, which reads `traceRecoding_` value. - At the same time, the `stopTracing()` call that will invalidate `traceRecording_` could happen on inspector thread. This is a pre-requisite for a better threading model, since we are going to be doing much frequent write operations from the Host side to record frame timings or screenshots. Differential Revision: D86205686
Summary: # Changelog: [Internal] An implemementation of HostTargetTracingDelegate on the android side. Notes: - `getTracingState_next()` function will replace `getTracingState()` in the diff on top. - `TracingStateListener `is temporarily added to `devsupport/interfaces`, will be moved to `devsupport/inspector` in one of the diffs on top. Differential Revision: D87123723
Summary: # Changelog: [Internal] Before this change, every `getTracingState()` call would go through jni to C++ to get the current state synchronously. This has a risk of data races, since we can't guarantee from which thread the Host will call this method. At the same time, the Tracing could be started from inspector thread, if this was initiated with CDP request. Instead, the state will be propagated asynchronously via `HostTargetTracingDelegate`, and then it will be encapsulated on the Host side. In android case, this will be part of the `ReactHostInspectorTarget`. Also removing no longer used code in `jsinspector-modern`. Differential Revision: D87123722
Summary: # Changelog: [Internal] This should not have been public in a first place. There are just no reasons for it, since Performance Monitor is still an internal concept of React Native Framework. Differential Revision: D87638584
Summary: Pull Request resolved: facebook#54632 # Changelog: [Internal] Tracing is a concept of Inspector. It should be part of the Inspector package, not general interfaces. The Inspector stack is the only mechanism that controls the tracing state of a Host. Reviewed By: cortinico Differential Revision: D87638583
6e52723 to
edaab2e
Compare
|
This pull request has been merged in 10d0d99. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary:
Changelog: [Internal]
Tracing is a concept of Inspector. It should be part of the Inspector package, not general interfaces.
The Inspector stack is the only mechanism that controls the tracing state of a Host.
Differential Revision: D87638583