diff options
author | Michaël Zasso <targos@protonmail.com> | 2020-10-15 20:17:08 +0200 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2020-10-18 20:16:47 +0200 |
commit | a1d639ba5de4ff34e34fb575fbb6cc1d41ec3cce (patch) | |
tree | abc7d41c12f1495b1208fa4449cb2508c92c5e85 /deps/v8/src/codegen/tick-counter.cc | |
parent | 089d654dd85f8e548597329f60a41d6029260caa (diff) | |
download | node-new-a1d639ba5de4ff34e34fb575fbb6cc1d41ec3cce.tar.gz |
deps: update V8 to 8.6.395
PR-URL: https://github.com/nodejs/node/pull/35415
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'deps/v8/src/codegen/tick-counter.cc')
-rw-r--r-- | deps/v8/src/codegen/tick-counter.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/deps/v8/src/codegen/tick-counter.cc b/deps/v8/src/codegen/tick-counter.cc index 2e72ae0e86..5172201f7e 100644 --- a/deps/v8/src/codegen/tick-counter.cc +++ b/deps/v8/src/codegen/tick-counter.cc @@ -6,18 +6,29 @@ #include "src/base/logging.h" #include "src/base/macros.h" +#include "src/heap/local-heap.h" namespace v8 { namespace internal { -void TickCounter::DoTick() { +void TickCounter::TickAndMaybeEnterSafepoint() { ++ticks_; // Magical number to detect performance bugs or compiler divergence. // Selected as being roughly 10x of what's needed frequently. constexpr size_t kMaxTicks = 100000000; USE(kMaxTicks); DCHECK_LT(ticks_, kMaxTicks); + + if (local_heap_) local_heap_->Safepoint(); +} + +void TickCounter::AttachLocalHeap(LocalHeap* local_heap) { + DCHECK_NULL(local_heap_); + local_heap_ = local_heap; + DCHECK_NOT_NULL(local_heap_); } +void TickCounter::DetachLocalHeap() { local_heap_ = nullptr; } + } // namespace internal } // namespace v8 |