From 8253a34883e4dbce2a2364d5ebf74f3834bc6206 Mon Sep 17 00:00:00 2001 From: Ruslan Lesiutin Date: Mon, 27 Oct 2025 08:32:46 -0700 Subject: [PATCH] Remove unused methods from RuntimeAgent (#54261) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54261 # Changelog: [Internal] These are actually unused and we've changed the approach - CDP agents do not control tracing status. Reviewed By: huntie Differential Revision: D85436029 fbshipit-source-id: faa79bbda92c0e0c55f26389bfe0c6efcf9e76c8 --- .../jsinspector-modern/RuntimeAgent.cpp | 12 ------------ .../ReactCommon/jsinspector-modern/RuntimeAgent.h | 15 --------------- 2 files changed, 27 deletions(-) diff --git a/packages/react-native/ReactCommon/jsinspector-modern/RuntimeAgent.cpp b/packages/react-native/ReactCommon/jsinspector-modern/RuntimeAgent.cpp index fe4adabf8fd..7631e2fea75 100644 --- a/packages/react-native/ReactCommon/jsinspector-modern/RuntimeAgent.cpp +++ b/packages/react-native/ReactCommon/jsinspector-modern/RuntimeAgent.cpp @@ -146,18 +146,6 @@ RuntimeAgent::~RuntimeAgent() { sessionState_.lastRuntimeAgentExportedState = getExportedState(); } -void RuntimeAgent::enableSamplingProfiler() { - targetController_.enableSamplingProfiler(); -} - -void RuntimeAgent::disableSamplingProfiler() { - targetController_.disableSamplingProfiler(); -} - -tracing::RuntimeSamplingProfile RuntimeAgent::collectSamplingProfile() { - return targetController_.collectSamplingProfile(); -} - #pragma mark - Tracing RuntimeTracingAgent::RuntimeTracingAgent( diff --git a/packages/react-native/ReactCommon/jsinspector-modern/RuntimeAgent.h b/packages/react-native/ReactCommon/jsinspector-modern/RuntimeAgent.h index 5ebd2f9ffe0..7e0b62b442e 100644 --- a/packages/react-native/ReactCommon/jsinspector-modern/RuntimeAgent.h +++ b/packages/react-native/ReactCommon/jsinspector-modern/RuntimeAgent.h @@ -83,21 +83,6 @@ class RuntimeAgent final { */ ExportedState getExportedState(); - /** - * Start sampling profiler for the corresponding RuntimeTarget. - */ - void enableSamplingProfiler(); - - /** - * Stop sampling profiler for the corresponding RuntimeTarget. - */ - void disableSamplingProfiler(); - - /** - * Return recorded sampling profile for the previous sampling session. - */ - tracing::RuntimeSamplingProfile collectSamplingProfile(); - private: FrontendChannel frontendChannel_; RuntimeTargetController &targetController_;