Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2018-12-15 00:55:03 +0300
committerAnna Henningsen <anna@addaleax.net>2018-12-17 04:29:10 +0300
commit8dfd7573372ba49f87f0838191b83ea4c8bd509a (patch)
treeea14ad03b6fb40c1c260a895879fc49f62d97604 /src/node_perf_common.h
parentcc0e1770d950fbdfb73d8640ba5468cdc06534bd (diff)
perf_hooks: make GC tracking state per-Environment
Otherwise this is global state that may be subject to race conditions e.g. when running `perf_hooks` inside of Worker threads. Tracking the GC type is removed entirely since the variable was unused. PR-URL: https://github.com/nodejs/node/pull/25053 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_perf_common.h')
-rw-r--r--src/node_perf_common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/node_perf_common.h b/src/node_perf_common.h
index 3c7e51361e6..0053ebf6119 100644
--- a/src/node_perf_common.h
+++ b/src/node_perf_common.h
@@ -75,6 +75,8 @@ class performance_state {
AliasedBuffer<double, v8::Float64Array> milestones;
AliasedBuffer<uint32_t, v8::Uint32Array> observers;
+ uint64_t performance_last_gc_start_mark = 0;
+
void Mark(enum PerformanceMilestone milestone,
uint64_t ts = PERFORMANCE_NOW());