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

Unified Diff: src/cpu-profiler.cc

Issue 1756003: Fix issue 683: change the order of CPU profiler setup actions. (Closed)
Patch Set: URL Created 10 years, 8 months 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 | no next file » | 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 234114908cedb3cdb7698365e7fcac070fa3b64e..ed3f6925e083cee4c39d262b4ef4fa3a3352d780 100644
--- a/src/cpu-profiler.cc
+++ b/src/cpu-profiler.cc
@@ -420,6 +420,10 @@ void CpuProfiler::StartProcessorIfNotStarted() {
generator_ = new ProfileGenerator(profiles_);
processor_ = new ProfilerEventsProcessor(generator_);
processor_->Start();
+ // Enable stack sampling.
+ // It is important to have it started prior to logging, see issue 683:
+ // http://code.google.com/p/v8/issues/detail?id=683
+ reinterpret_cast<Sampler*>(Logger::ticker_)->Start();
// Enumerate stuff we already have in the heap.
if (Heap::HasBeenSetup()) {
Logger::LogCodeObjects();
@@ -427,8 +431,6 @@ void CpuProfiler::StartProcessorIfNotStarted() {
Logger::LogFunctionObjects();
Logger::LogAccessorCallbacks();
}
- // Enable stack sampling.
- reinterpret_cast<Sampler*>(Logger::ticker_)->Start();
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698