From 1bf84a63d83179d2676ef50eedf6bdd81e031b43 Mon Sep 17 00:00:00 2001 From: John Porto Date: Wed, 2 Feb 2022 10:51:17 -0800 Subject: [PATCH] Make automatic SampleProfiling registration optional. Summary: This change makes automatic sample profiling registration opt in. This is in preparation for an upcoming change where hermes will enforce that the sampling profiler must be destroyed on the same thread it was created. Changelog: [internal] Reviewed By: sammy-SC Differential Revision: D33826992 fbshipit-source-id: 89843b5fc5b936f674a8d0a470e92af0cd8f6125 --- .../src/main/java/com/facebook/hermes/reactexecutor/OnLoad.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/OnLoad.cpp b/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/OnLoad.cpp index 55c151958ad..304603fd12e 100644 --- a/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/OnLoad.cpp +++ b/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/OnLoad.cpp @@ -47,6 +47,7 @@ static ::hermes::vm::RuntimeConfig makeRuntimeConfig(jlong heapSizeMB) { return vm::RuntimeConfig::Builder() .withGCConfig(gcConfigBuilder.build()) + .withEnableSampleProfiling(true) .build(); }