Skip to content

Commit 4f486c7

Browse files
mattbfbfacebook-github-bot
authored andcommitted
Enable sampling profiler in Chrome Debug Server
Summary: Configure the runtime to allow use of the sampling profiler in the Chrome Debug Server. Note: this does not actually start and stop the profiler; this change just makes the sampling profiler available to the runtime. Changelog: [Internal] Reviewed By: neildhar Differential Revision: D39100833 fbshipit-source-id: 60d1f4e5ea2191fdf88b7f2e733557fa6128e205
1 parent 9e169da commit 4f486c7

File tree

1 file changed

+3
-1
lines changed
  • ReactCommon/hermes/inspector/chrome/cli

1 file changed

+3
-1
lines changed

ReactCommon/hermes/inspector/chrome/cli/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,9 @@ static void runDebuggerLoop(
213213

214214
static void runScript(const std::string &scriptSource, const std::string &url) {
215215
std::shared_ptr<fbhermes::HermesRuntime> runtime(
216-
fbhermes::makeHermesRuntime());
216+
fbhermes::makeHermesRuntime(::hermes::vm::RuntimeConfig::Builder()
217+
.withEnableSampleProfiling(true)
218+
.build()));
217219
auto adapter =
218220
std::make_unique<fbhermes::inspector::SharedRuntimeAdapter>(runtime);
219221
fbhermes::inspector::chrome::Connection conn(

0 commit comments

Comments
 (0)