summaryrefslogtreecommitdiff
path: root/deps/v8/src/codegen/tick-counter.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/codegen/tick-counter.h')
-rw-r--r--deps/v8/src/codegen/tick-counter.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/deps/v8/src/codegen/tick-counter.h b/deps/v8/src/codegen/tick-counter.h
index 8d6c966bb0..3dbb404cde 100644
--- a/deps/v8/src/codegen/tick-counter.h
+++ b/deps/v8/src/codegen/tick-counter.h
@@ -10,16 +10,23 @@
namespace v8 {
namespace internal {
-// A deterministic correlate of time, used to detect performance or
-// divergence bugs in Turbofan. DoTick() should be called frequently
-// thoughout the compilation.
+class LocalHeap;
+
+// This method generates a tick. Also makes the current thread to enter a
+// safepoint iff it was required to do so. The tick is used as a deterministic
+// correlate of time to detect performance or divergence bugs in Turbofan.
+// TickAndMaybeEnterSafepoint() should be called frequently thoughout the
+// compilation.
class TickCounter {
public:
- void DoTick();
+ void TickAndMaybeEnterSafepoint();
+ void AttachLocalHeap(LocalHeap* local_heap);
+ void DetachLocalHeap();
size_t CurrentTicks() const { return ticks_; }
private:
size_t ticks_ = 0;
+ LocalHeap* local_heap_ = nullptr;
};
} // namespace internal