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

Unified Diff: src/v8.cc

Issue 1582004: C++ profiles processor: wire up to VM. (Closed)
Patch Set: Created 10 years, 9 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
Index: src/v8.cc
diff --git a/src/v8.cc b/src/v8.cc
index 5af200348b4058e4c65075dc4d58102393f63fd9..2fe672d86fbd4f6565166f287289e8fdab8332b6 100644
--- a/src/v8.cc
+++ b/src/v8.cc
@@ -60,6 +60,14 @@ bool V8::Initialize(Deserializer* des) {
// Enable logging before setting up the heap
Logger::Setup();
+ CpuProfiler::Setup();
+
+#ifdef ENABLE_CPP_PROFILES_PROCESSOR
+ if (FLAG_prof && FLAG_prof_auto) {
+ CpuProfiler::StartProfiling("internal.auto");
+ }
+#endif
+
// Setup the platform OS support.
OS::Setup();
@@ -135,6 +143,12 @@ void V8::SetFatalError() {
void V8::TearDown() {
if (!has_been_setup_ || has_been_disposed_) return;
+#ifdef ENABLE_CPP_PROFILES_PROCESSOR
+ if (FLAG_prof && FLAG_prof_auto) {
+ CpuProfiler::StopProfiling("internal.auto");
+ }
+#endif
+
OProfileAgent::TearDown();
if (FLAG_preemption) {
@@ -148,6 +162,9 @@ void V8::TearDown() {
Top::TearDown();
Heap::TearDown();
+
+ CpuProfiler::TearDown();
+
Logger::TearDown();
is_running_ = false;
« src/platform-linux.cc ('K') | « src/v8.h ('k') | src/x64/assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698