Commit d56f01ba authored by alph@chromium.org's avatar alph@chromium.org

Make sure CPU profiler collects a sample on start.

BUG=369035
LOG=N
R=bmeurer@chromium.org, yurys@chromium.org

Review URL: https://codereview.chromium.org/263883008

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21157 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 77d6bca4
......@@ -418,7 +418,10 @@ void CpuProfiler::StartProfiling(String* title, bool record_samples) {
void CpuProfiler::StartProcessorIfNotStarted() {
if (processor_ == NULL) {
if (processor_ != NULL) {
processor_->AddCurrentStack(isolate_);
return;
}
Logger* logger = isolate_->logger();
// Disable logging when using the new implementation.
saved_is_logging_ = logger->is_logging_;
......@@ -441,7 +444,6 @@ void CpuProfiler::StartProcessorIfNotStarted() {
sampler->IncreaseProfilingDepth();
processor_->AddCurrentStack(isolate_);
processor_->StartSynchronously();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment