HomePhabricator
Diffusion Comm 125b29a6d73e

[iOS] Add `withEnableSampleProfiling(true)` to `makeRuntimeConfig`

Tags
None
Referenced Files
F766344: 0bee45.png
Sep 20 2023, 10:31 AM
File Not Attached
Subscribers
None

Description

[iOS] Add withEnableSampleProfiling(true) to makeRuntimeConfig

Summary:
This enables us to use Hermes sampling profiler. Without this change we were getting facebook::jsi::JSINativeException: Runtime not registered for profiling when trying to do a Hermes sample profiling session.

Conveniently this isn't really documented (anywhere I could find), but was able to figure it out searching through hermes and react-native sources on GitHub.

Test Plan:
Here's an example:

0bee45.png (772×2 px, 377 KB)

Reviewers: ashoat, ginsu, tomek, bartek, rohan

Reviewed By: ashoat

Differential Revision: https://phab.comm.dev/D9233

Details