Index: src/cpu-profiler.cc |
diff --git a/src/cpu-profiler.cc b/src/cpu-profiler.cc |
index 41f3e986444b9d2371ef4a2a707ae35778084f6e..6128c2c8639b8e290f06dde135a65ee81a040030 100644 |
--- a/src/cpu-profiler.cc |
+++ b/src/cpu-profiler.cc |
@@ -432,7 +432,6 @@ void CpuProfiler::StartProfiling(const char* title, bool record_samples) { |
if (profiles_->StartProfiling(title, record_samples)) { |
StartProcessorIfNotStarted(); |
} |
- processor_->AddCurrentStack(isolate_); |
} |
@@ -463,6 +462,7 @@ void CpuProfiler::StartProcessorIfNotStarted() { |
// Enable stack sampling. |
sampler->SetHasProcessingThread(true); |
sampler->IncreaseProfilingDepth(); |
+ processor_->AddCurrentStack(isolate_); |
processor_->StartSynchronously(); |
} |
} |