Skip to content

Initialize Perfetto with the in-process backend on iOS - #59415

Closed
potomak wants to merge 1 commit into
react:mainfrom
potomak:export-D126071088
Closed

potomak wants to merge 1 commit into
react:mainfrom
potomak:export-D126071088

Conversation

@potomak

@potomak potomak commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Summary:
initializePerfetto() registers Perfetto's system backend on every platform. iOS and the other Apple device platforms have no system tracing service, so the system producer never connects and keeps retrying in the background for the app's lifetime, and a tracer in the app that starts a session without naming a backend gets the system one and records nothing.

On those platforms, register the in-process backend instead. Other platforms, including macOS, are unchanged. React Native's own ReactCxxPlatform/react/profiling/perfetto.cpp already registers the in-process backend on every platform but Android; this change is narrower and keeps the system backend on macOS and other desktop platforms, where traced can run.

Changelog: [Internal]

Reviewed By: christophpurrer, javache

Differential Revision: D126071088

Summary:
`initializePerfetto()` registers Perfetto's system backend on every platform. iOS and the other Apple device platforms have no system tracing service, so the system producer never connects and keeps retrying in the background for the app's lifetime, and a tracer in the app that starts a session without naming a backend gets the system one and records nothing.

On those platforms, register the in-process backend instead. Other platforms, including macOS, are unchanged. React Native's own `ReactCxxPlatform/react/profiling/perfetto.cpp` already registers the in-process backend on every platform but Android; this change is narrower and keeps the system backend on macOS and other desktop platforms, where `traced` can run.

Changelog: [Internal]

Reviewed By: christophpurrer, javache

Differential Revision: D126071088
@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 23, 2026
@meta-codesync

meta-codesync Bot commented Oct 23, 2026

Copy link
Copy Markdown

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

@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @potomak in b217ecd

When will my fix make it into a release? | How to file a pick request?

@react-native-bot react-native-bot added the Merged This PR has been merged. label Oct 23, 2026
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. Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants