Skip to content

Make select jsinspector tracing implementation headers private - #58796

Open
coado wants to merge 1 commit into
react:mainfrom
coado:export-D122780825
Open

coado wants to merge 1 commit into
react:mainfrom
coado:export-D122780825

Conversation

@coado

@coado coado commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary:
Mark the following tracing headers as private instead of for-frameworks. All of them are implementation details of React Native's tracing infrastructure, and no for-frameworks header includes them:

  • EventLoopReporter is an RAII helper the runtime scheduler uses to report event loop task and microtask phases to the performance tracer. It is only used by EventLoopReporter.cpp and RuntimeScheduler_Modern.cpp.
  • RuntimeSamplingProfileTraceEventSerializer turns a runtime sampling profile into trace events. It is only used by tracing sources, TracingAgent.cpp and its own unit test.
  • TraceEventSerializer serializes trace events to folly::dynamic. It is only used by tracing sources and TracingAgent.cpp.
  • TraceEventGenerator builds trace events for the performance tracer and the host profile serializer. It is only used by tracing sources and was already not exported in Buck.
  • ProfileTreeNode is an auxiliary tree used to build the profile and deduplicate identical frames. It is only used by RuntimeSamplingProfileTraceEventSerializer.cpp and its own unit test.
  • Timing.h defines the tracing clock origin and the conversions from HighResTimeStamp and HighResDuration to trace event microseconds. It is only used by tracing sources and a tracing unit test.

TracingAgent.h included Timing.h without using it; that include is removed.

React Native's own targets define RN_BUILDING, so the private guard does not affect them.

Changelog: [Internal]

Differential Revision: D122780825

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 1, 2026
@facebook-github-tools facebook-github-tools Bot added p: Software Mansion Partner: Software Mansion Partner labels Oct 1, 2026
@meta-codesync

meta-codesync Bot commented Oct 1, 2026

Copy link
Copy Markdown

@coado has exported this pull request. If you are a Meta employee, you can view the originating Diff in D122780825.

@facebook-github-tools facebook-github-tools Bot added the p: Facebook Partner: Facebook label Oct 1, 2026
Summary:
Mark the following tracing headers as private instead of for-frameworks. All of them are implementation details of React Native's tracing infrastructure, and no for-frameworks header includes them:

- `EventLoopReporter` is an RAII helper the runtime scheduler uses to report event loop task and microtask phases to the performance tracer. It is only used by `EventLoopReporter.cpp` and `RuntimeScheduler_Modern.cpp`.
- `RuntimeSamplingProfileTraceEventSerializer` turns a runtime sampling profile into trace events. It is only used by tracing sources, `TracingAgent.cpp` and its own unit test.
- `TraceEventSerializer` serializes trace events to `folly::dynamic`. It is only used by tracing sources and `TracingAgent.cpp`.
- `TraceEventGenerator` builds trace events for the performance tracer and the host profile serializer. It is only used by tracing sources and was already not exported in Buck.
- `ProfileTreeNode` is an auxiliary tree used to build the profile and deduplicate identical frames. It is only used by `RuntimeSamplingProfileTraceEventSerializer.cpp` and its own unit test.
- `Timing.h` defines the tracing clock origin and the conversions from `HighResTimeStamp` and `HighResDuration` to trace event microseconds. It is only used by tracing sources and a tracing unit test.

`TracingAgent.h` included `Timing.h` without using it; that include is removed.

React Native's own targets define `RN_BUILDING`, so the private guard does not affect them.

Changelog: [Internal]

Differential Revision: D122780825
@coado
coado force-pushed the export-D122780825 branch from 3e200ff to 62f2277 Compare October 2, 2026 11:13

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported p: Facebook Partner: Facebook p: Software Mansion Partner: Software Mansion Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant