Repository navigation
Commit c544f0d
Make host target tracing implementation headers private
Summary:
Mark the following headers as private instead of for-frameworks. All of them are implementation details of the host target and how it records and serializes a trace, and no for-frameworks header includes them:
- `HostTracingProfileSerializer` transforms a `HostTracingProfile` into serialized trace events. It is only used by its own source and `HostTargetTracing.h`.
- `HostTargetTracing.h` provides `emitNotificationsForTracingProfile`, which uses the serializer to send a captured profile to frontend channels as `Tracing.dataCollected` events followed by `Tracing.tracingComplete`. It is only used by `HostTarget.cpp` and `TracingAgent.cpp`, and was already not exported in Buck.
- `HostTargetTraceRecording` holds the state of an in-progress host trace recording. `HostTarget.h` only forward-declares it, and it is only used by `HostTarget.cpp`, `HostTargetTraceRecording.cpp` and `HostTargetTracing.cpp`.
- `TimeWindowedBuffer` is a generic buffer that keeps only elements inside a time window. It is only used by `HostTargetTraceRecording` and its own unit test.
- `TracingAgent` handles the CDP `Tracing.start` and `Tracing.stop` requests for the host agent. It is only used by `HostAgent.cpp` and `TracingAgent.cpp`, and was already not exported in Buck.
- `HostAgent` handles CDP requests for a host target. `HostTarget.h` only forward-declares it, and it is only used by `HostAgent.cpp`, `HostTarget.cpp` and `HostTargetTraceRecording.h`.
- `InstanceAgent` handles CDP requests for an instance target. `InstanceTarget.h` only forward-declares it, and it is only used by `HostAgent.h`, `HostAgent.cpp`, `InstanceAgent.cpp` and `InstanceTarget.cpp`.
- `InspectorUtilities.h` provides connection adapters for `InspectorInterfaces`: `CallbackLocalConnection`, `CallbackRemoteConnection`, `RAIIRemoteConnection` and `NullRemoteConnection`. It is only used by `HostTarget.cpp` and `InspectorUtilities.cpp`, and was already not exported in Buck.
Headers that include one another change together: `HostTargetTracing.h` includes `HostTracingProfileSerializer.h`, `HostTargetTraceRecording.h` stores a `TimeWindowedBuffer` by value and includes `HostAgent.h`, and `HostAgent.h` includes `InstanceAgent.h`, so keeping any of these includers for-frameworks would expose a private header. `HostTracingProfile.h`, `FrameTimingSequence.h`, `TraceRecordingState.h` and `TracingCategory.h` stay for-frameworks because other for-frameworks headers include them.
React Native's own targets define `RN_BUILDING`, so the private guard does not affect them.
Changelog: [Internal]
Differential Revision: D1227916071 parent 5ce5418 commit c544f0d
11 files changed
Lines changed: 86 additions & 353 deletions
File tree
- packages/react-native/ReactCommon/jsinspector-modern
- tracing
- scripts/cxx-api/api-snapshots
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
Large diffs are not rendered by default.
Large diffs are not rendered by default.
0 commit comments