v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
heap-state.cc
Go to the documentation of this file.
1// Copyright 2021 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
6
8
9namespace cppgc {
10namespace subtle {
11
12// static
13bool HeapState::IsMarking(const HeapHandle& heap_handle) {
14 const internal::MarkerBase* marker =
15 internal::HeapBase::From(heap_handle).marker();
16 return marker && marker->IsMarking();
17}
18
19// static
20bool HeapState::IsSweeping(const HeapHandle& heap_handle) {
22}
23
24// static
26 return internal::HeapBase::From(heap_handle)
27 .sweeper()
29}
30
31// static
32bool HeapState::IsInAtomicPause(const HeapHandle& heap_handle) {
33 return internal::HeapBase::From(heap_handle).in_atomic_pause();
34}
35
36// static
41
42} // namespace subtle
43} // namespace cppgc
EmbedderStackState stack_state_of_prev_gc() const
Definition heap-base.h:192
bool in_atomic_pause() const
Definition heap-base.h:188
static HeapBase & From(cppgc::HeapHandle &heap_handle)
Definition heap-base.h:88
MarkerBase * marker() const
Definition heap-base.h:130
bool IsSweepingOnMutatorThread() const
Definition sweeper.cc:1676
bool IsSweepingInProgress() const
Definition sweeper.cc:1680
static bool IsInAtomicPause(const HeapHandle &heap_handle)
Definition heap-state.cc:32
static bool IsSweeping(const HeapHandle &heap_handle)
Definition heap-state.cc:20
static bool IsMarking(const HeapHandle &heap_handle)
Definition heap-state.cc:13
static bool IsSweepingOnOwningThread(const HeapHandle &heap_handle)
Definition heap-state.cc:25
static bool PreviousGCWasConservative(const HeapHandle &heap_handle)
Definition heap-state.cc:37