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
This commit is contained in:
John Porto
2022-02-02 10:52:56 -08:00
committed by Facebook GitHub Bot
parent 3568a72987
commit 1bf84a63d8
@@ -47,6 +47,7 @@ static ::hermes::vm::RuntimeConfig makeRuntimeConfig(jlong heapSizeMB) {
return vm::RuntimeConfig::Builder()
.withGCConfig(gcConfigBuilder.build())
.withEnableSampleProfiling(true)
.build();
}