diff --git a/API/hermes/hermes.cpp b/API/hermes/hermes.cpp index d03728d5091..bd0974d4eb4 100644 --- a/API/hermes/hermes.cpp +++ b/API/hermes/hermes.cpp @@ -1211,15 +1211,6 @@ sampling_profiler::Profile HermesRuntimeImpl::dumpSampledTraceToProfile() { #endif // HERMESVM_SAMPLING_PROFILER_AVAILABLE } -std::vector -HermesRuntime::dumpSampledTraceToProfilesGlobal() { -#if HERMESVM_SAMPLING_PROFILER_AVAILABLE - return ::hermes::vm::SamplingProfiler::dumpAsProfilesGlobal(); -#else - throwHermesNotCompiledWithSamplingProfilerSupport(); -#endif // HERMESVM_SAMPLING_PROFILER_AVAILABLE -} - /*static*/ std::unordered_map> HermesRuntime::getExecutedFunctions() { std::unordered_map< diff --git a/API/hermes/hermes.h b/API/hermes/hermes.h index a21b5f59083..e34009ecdb0 100644 --- a/API/hermes/hermes.h +++ b/API/hermes/hermes.h @@ -88,11 +88,6 @@ class HERMES_EXPORT HermesRuntime : public jsi::Runtime { /// Dump sampled stack trace to the given stream. static void dumpSampledTraceToStream(std::ostream &stream); - /// Dump sampled stack trace for all registered local sampling profiler - /// instances to a data structure that can be used by third parties. - static std::vector - dumpSampledTraceToProfilesGlobal(); - /// Return the executed JavaScript function info. /// This information holds the segmentID, Virtualoffset and sourceURL. /// This information is needed specifically to be able to symbolicate non-CJS diff --git a/include/hermes/VM/Profiler/SamplingProfiler.h b/include/hermes/VM/Profiler/SamplingProfiler.h index 5ecc567ae2f..225bf83b663 100644 --- a/include/hermes/VM/Profiler/SamplingProfiler.h +++ b/include/hermes/VM/Profiler/SamplingProfiler.h @@ -286,11 +286,6 @@ class SamplingProfiler { /// Static wrapper for dumpChromeTrace. static void dumpChromeTraceGlobal(llvh::raw_ostream &OS); - /// Static wrapper for dumpAsProfile. Will dump in separate Profile for each - /// local sampling profiler instance. - static std::vector - dumpAsProfilesGlobal(); - /// Enable and start profiling. static bool enable(double meanHzFreq = 100); diff --git a/lib/VM/Profiler/SamplingProfiler.cpp b/lib/VM/Profiler/SamplingProfiler.cpp index 39246e08a73..7b7d13439ca 100644 --- a/lib/VM/Profiler/SamplingProfiler.cpp +++ b/lib/VM/Profiler/SamplingProfiler.cpp @@ -208,20 +208,6 @@ void SamplingProfiler::serializeInDevToolsFormat(llvh::raw_ostream &OS) { clear(); } -std::vector -SamplingProfiler::dumpAsProfilesGlobal() { - auto globalProfiler = sampling_profiler::Sampler::get(); - std::lock_guard lk(globalProfiler->profilerLock_); - - std::vector profiles; - for (auto *currentProfilerInstance : globalProfiler->profilers_) { - auto profileForCurrentInstance = currentProfilerInstance->dumpAsProfile(); - profiles.push_back(std::move(profileForCurrentInstance)); - } - - return profiles; -} - facebook::hermes::sampling_profiler::Profile SamplingProfiler::dumpAsProfile() { std::lock_guard lk(runtimeDataLock_);