Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Unified Diff: src/cpu-profiler.cc

Issue 11231002: Perform CPU sampling by CPU sampling thread only iff processing thread is not running. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: fixed crash in tests due to absent sampler Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/platform.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cpu-profiler.cc
diff --git a/src/cpu-profiler.cc b/src/cpu-profiler.cc
index 8f72c1755cb898264e4d2a5ba029ebc77b019f09..08c82db2397b963cc72bc7f5190c44c97bc48292 100644
--- a/src/cpu-profiler.cc
+++ b/src/cpu-profiler.cc
@@ -519,6 +519,7 @@ void CpuProfiler::StartProcessorIfNotStarted() {
sampler->Start();
need_to_stop_sampler_ = true;
}
+ sampler->SetHasProcessingThread(true);
sampler->IncreaseProfilingDepth();
processor_->Start();
}
@@ -561,6 +562,7 @@ void CpuProfiler::StopProcessor() {
Logger* logger = Isolate::Current()->logger();
Sampler* sampler = logger->sampler();
sampler->DecreaseProfilingDepth();
+ sampler->SetHasProcessingThread(false);
if (need_to_stop_sampler_) {
sampler->Stop();
need_to_stop_sampler_ = false;
« no previous file with comments | « no previous file | src/platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698