summaryrefslogtreecommitdiff
path: root/src/env.cc
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2018-03-06 10:42:37 -0800
committerJames M Snell <jasnell@gmail.com>2018-03-16 10:54:05 -0700
commit96cb4fb795808aa2774e842974aeb411c5d3dd94 (patch)
treeda8a3965240c402f857e6267e0a278f486852c3a /src/env.cc
parent879f521c654fffd34360be432a6280936ba94071 (diff)
downloadandroid-node-v8-96cb4fb795808aa2774e842974aeb411c5d3dd94.tar.gz
android-node-v8-96cb4fb795808aa2774e842974aeb411c5d3dd94.tar.bz2
android-node-v8-96cb4fb795808aa2774e842974aeb411c5d3dd94.zip
perf_hooks,trace_events: emit perf milestone trace events
Emit the perf_hooks node timing milestones as trace events. PR-URL: https://github.com/nodejs/node/pull/19175 Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'src/env.cc')
-rw-r--r--src/env.cc17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/env.cc b/src/env.cc
index 3d1e5d3ac1..c876103972 100644
--- a/src/env.cc
+++ b/src/env.cc
@@ -115,15 +115,14 @@ Environment::Environment(IsolateData* isolate_data,
destroy_async_id_list_.reserve(512);
performance_state_.reset(new performance::performance_state(isolate()));
- performance_state_->milestones[
- performance::NODE_PERFORMANCE_MILESTONE_ENVIRONMENT] =
- PERFORMANCE_NOW();
- performance_state_->milestones[
- performance::NODE_PERFORMANCE_MILESTONE_NODE_START] =
- performance::performance_node_start;
- performance_state_->milestones[
- performance::NODE_PERFORMANCE_MILESTONE_V8_START] =
- performance::performance_v8_start;
+ performance_state_->Mark(
+ performance::NODE_PERFORMANCE_MILESTONE_ENVIRONMENT);
+ performance_state_->Mark(
+ performance::NODE_PERFORMANCE_MILESTONE_NODE_START,
+ performance::performance_node_start);
+ performance_state_->Mark(
+ performance::NODE_PERFORMANCE_MILESTONE_V8_START,
+ performance::performance_v8_start);
// By default, always abort when --abort-on-uncaught-exception was passed.
should_abort_on_uncaught_toggle_[0] = 1;