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

Unified Diff: src/d8.cc

Issue 1708573003: [WIP]Create a V8 sampler library and tracing controller. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 | « include/v8-tracing-controller.h ('k') | src/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index ae345dd2c7bd428c99cce760b71ce35f3fcc5638..e9a010461b1e7643f0ad28813c3a163a24351456 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -37,6 +37,8 @@
#include "src/d8.h"
#include "src/ostreams.h"
+#include "include/v8-sampler.h"
+#include "include/v8-tracing-controller.h"
#include "include/libplatform/libplatform.h"
#ifndef V8_SHARED
#include "src/api.h"
@@ -2448,6 +2450,8 @@ int Shell::Main(int argc, char* argv[]) {
v8::V8::InitializePlatform(g_platform);
v8::V8::Initialize();
+ // Initialize tracing controller support
+ TracingController::SetUp();
if (options.natives_blob || options.snapshot_blob) {
v8::V8::InitializeExternalStartupData(options.natives_blob,
options.snapshot_blob);
@@ -2499,6 +2503,7 @@ int Shell::Main(int argc, char* argv[]) {
return 0;
}
#endif
+ TracingController::StartTracing(isolate);
if (options.stress_opt || options.stress_deopt) {
Testing::SetStressRunType(options.stress_opt
@@ -2554,7 +2559,9 @@ int Shell::Main(int argc, char* argv[]) {
os << *profiler;
}
#endif // !V8_SHARED
+ TracingController::StopTracing();
isolate->Dispose();
+ TracingController::TearDown();
V8::Dispose();
V8::ShutdownPlatform();
delete g_platform;
« no previous file with comments | « include/v8-tracing-controller.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698