diff options
Diffstat (limited to 'src/node.cc')
-rw-r--r-- | src/node.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/node.cc b/src/node.cc index 5313063578..27fccca6ee 100644 --- a/src/node.cc +++ b/src/node.cc @@ -289,11 +289,11 @@ static struct { #if NODE_USE_V8_PLATFORM void Initialize(int thread_pool_size) { tracing_agent_.reset(new tracing::Agent(trace_file_pattern)); - platform_ = new NodePlatform(thread_pool_size, - tracing_agent_->GetTracingController()); + auto controller = tracing_agent_->GetTracingController(); + tracing::TraceEventHelper::SetTracingController(controller); + StartTracingAgent(); + platform_ = new NodePlatform(thread_pool_size, controller); V8::InitializePlatform(platform_); - tracing::TraceEventHelper::SetTracingController( - tracing_agent_->GetTracingController()); } void Dispose() { @@ -4406,8 +4406,6 @@ int Start(int argc, char** argv) { #endif // HAVE_OPENSSL v8_platform.Initialize(v8_thread_pool_size); - // Enable tracing when argv has --trace-events-enabled. - v8_platform.StartTracingAgent(); V8::Initialize(); performance::performance_v8_start = PERFORMANCE_NOW(); v8_initialized = true; |