diff --git a/src/env-inl.h b/src/env-inl.h index 237ab8e438597b..71660a035c8ea7 100644 --- a/src/env-inl.h +++ b/src/env-inl.h @@ -944,7 +944,7 @@ inline const Mutex& Environment::extra_linked_bindings_mutex() const { return extra_linked_bindings_mutex_; } -inline performance::performance_state* Environment::performance_state() { +inline performance::PerformanceState* Environment::performance_state() { return performance_state_.get(); } diff --git a/src/env.cc b/src/env.cc index 7fb5116b3828c3..ec2661e68be581 100644 --- a/src/env.cc +++ b/src/env.cc @@ -348,7 +348,7 @@ Environment::Environment(IsolateData* isolate_data, this); performance_state_ = - std::make_unique(isolate()); + std::make_unique(isolate()); performance_state_->Mark( performance::NODE_PERFORMANCE_MILESTONE_ENVIRONMENT); performance_state_->Mark(performance::NODE_PERFORMANCE_MILESTONE_NODE_START, diff --git a/src/env.h b/src/env.h index 6a459f00edb9e2..309bb494a746bd 100644 --- a/src/env.h +++ b/src/env.h @@ -64,7 +64,7 @@ class FileHandleReadWrap; } namespace performance { -class performance_state; +class PerformanceState; } namespace tracing { @@ -1016,7 +1016,7 @@ class Environment : public MemoryRetainer { inline std::vector>& file_handle_read_wrap_freelist(); - inline performance::performance_state* performance_state(); + inline performance::PerformanceState* performance_state(); inline std::unordered_map* performance_marks(); void CollectUVExceptionInfo(v8::Local context, @@ -1323,7 +1323,7 @@ class Environment : public MemoryRetainer { AliasedInt32Array stream_base_state_; - std::unique_ptr performance_state_; + std::unique_ptr performance_state_; std::unordered_map performance_marks_; bool has_run_bootstrapping_code_ = false; diff --git a/src/node_perf.cc b/src/node_perf.cc index 21766d3b89aa3b..e54edb5fe6d6e9 100644 --- a/src/node_perf.cc +++ b/src/node_perf.cc @@ -44,7 +44,7 @@ const uint64_t timeOrigin = PERFORMANCE_NOW(); const double timeOriginTimestamp = GetCurrentTimeInMicroseconds(); uint64_t performance_v8_start; -void performance_state::Mark(enum PerformanceMilestone milestone, +void PerformanceState::Mark(enum PerformanceMilestone milestone, uint64_t ts) { this->milestones[milestone] = ts; TRACE_EVENT_INSTANT_WITH_TIMESTAMP0( @@ -267,7 +267,7 @@ void MarkGarbageCollectionEnd(Isolate* isolate, GCCallbackFlags flags, void* data) { Environment* env = static_cast(data); - performance_state* state = env->performance_state(); + PerformanceState* state = env->performance_state(); // If no one is listening to gc performance entries, do not create them. if (!state->observers[NODE_PERFORMANCE_ENTRY_TYPE_GC]) return; @@ -553,7 +553,7 @@ void Initialize(Local target, void* priv) { Environment* env = Environment::GetCurrent(context); Isolate* isolate = env->isolate(); - performance_state* state = env->performance_state(); + PerformanceState* state = env->performance_state(); target->Set(context, FIXED_ONE_BYTE_STRING(isolate, "observerCounts"), diff --git a/src/node_perf_common.h b/src/node_perf_common.h index 8e602a766367bd..75d266afc257e9 100644 --- a/src/node_perf_common.h +++ b/src/node_perf_common.h @@ -52,9 +52,9 @@ enum PerformanceEntryType { NODE_PERFORMANCE_ENTRY_TYPE_INVALID }; -class performance_state { +class PerformanceState { public: - explicit performance_state(v8::Isolate* isolate) : + explicit PerformanceState(v8::Isolate* isolate) : root( isolate, sizeof(performance_state_internal)),