diff --git a/src/isolate.cc b/src/isolate.cc index 1ef622edfd..fd70002cce 100644 --- a/src/isolate.cc +++ b/src/isolate.cc @@ -1808,7 +1808,8 @@ void Isolate::Deinit() { if (FLAG_hydrogen_stats) GetHStatistics()->Print(); // We must stop the logger before we tear down other components. - logger_->EnsureTickerStopped(); + Sampler* sampler = logger_->sampler(); + if (sampler && sampler->IsActive()) sampler->Stop(); delete deoptimizer_data_; deoptimizer_data_ = NULL; diff --git a/src/log.cc b/src/log.cc index 94385373c2..81fe19f046 100644 --- a/src/log.cc +++ b/src/log.cc @@ -1560,11 +1560,6 @@ void Logger::LogFailure() { } -bool Logger::IsProfilerSamplerActive() { - return ticker_->IsActive(); -} - - class EnumerateOptimizedFunctionsVisitor: public OptimizedFunctionVisitor { public: EnumerateOptimizedFunctionsVisitor(Handle* sfis, @@ -1937,17 +1932,6 @@ Sampler* Logger::sampler() { } -void Logger::EnsureTickerStarted() { - ASSERT(ticker_ != NULL); - if (!ticker_->IsActive()) ticker_->Start(); -} - - -void Logger::EnsureTickerStopped() { - if (ticker_ != NULL && ticker_->IsActive()) ticker_->Stop(); -} - - FILE* Logger::TearDown() { if (!is_initialized_) return NULL; is_initialized_ = false; diff --git a/src/log.h b/src/log.h index a5eddc7a34..03fd5bd1c3 100644 --- a/src/log.h +++ b/src/log.h @@ -168,9 +168,6 @@ class Logger { void SetCodeEventHandler(uint32_t options, JitCodeEventHandler event_handler); - void EnsureTickerStarted(); - void EnsureTickerStopped(); - Sampler* sampler(); // Frees resources acquired in SetUp. @@ -448,9 +445,6 @@ class Logger { void UncheckedIntEvent(const char* name, int value); void UncheckedIntPtrTEvent(const char* name, intptr_t value); - // Returns whether profiler's sampler is active. - bool IsProfilerSamplerActive(); - Isolate* isolate_; // The sampler used by the profiler and the sliding state window. diff --git a/src/runtime-profiler.cc b/src/runtime-profiler.cc index 2606f8ab37..e8062ad0b7 100644 --- a/src/runtime-profiler.cc +++ b/src/runtime-profiler.cc @@ -389,9 +389,6 @@ void RuntimeProfiler::SetUp() { if (!FLAG_watch_ic_patching) { ClearSampleBuffer(); } - // If the ticker hasn't already started, make sure to do so to get - // the ticks for the runtime profiler. - if (IsEnabled()) isolate_->logger()->EnsureTickerStarted(); }