v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
heap::base::Stack Class Referencefinal

#include <stack.h>

Collaboration diagram for heap::base::Stack:

Classes

struct  Segment
 

Public Types

using ThreadId = int
 
using IterateStackCallback = void (*)(Stack*, void*, const void*)
 

Public Member Functions

void SetStackStart ()
 
void IteratePointers (StackVisitor *visitor) const
 
void IteratePointersUntilMarker (StackVisitor *visitor) const
 
void IterateBackgroundStacks (StackVisitor *visitor) const
 
template<typename Callback >
V8_INLINE void SetMarkerAndCallback (Callback callback)
 
template<typename Callback >
V8_INLINE void SetMarkerIfNeededAndCallback (Callback callback)
 
template<typename Callback >
V8_INLINE void SetMarkerForBackgroundThreadAndCallback (ThreadId thread, Callback callback)
 
void IteratePointersForTesting (StackVisitor *visitor)
 
bool IsMarkerSet () const
 
bool IsMarkerSetForBackgroundThread (ThreadId thread) const
 
bool HasBackgroundStacks () const
 
void SetScanSimulatorCallback (StackVisitorCallback callback)
 

Static Public Member Functions

static bool IsOnStack (const void *slot)
 

Private Member Functions

V8_NOINLINE void TrampolineCallbackHelper (void *argument, IterateStackCallback callback)
 

Static Private Member Functions

template<typename Callback >
static void SetMarkerAndCallbackImpl (Stack *stack, void *argument, const void *stack_end)
 
template<typename Callback >
static void SetMarkerForBackgroundThreadAndCallbackImpl (Stack *stack, void *argument, const void *stack_end)
 

Private Attributes

Segment current_segment_
 
v8::base::Mutex lock_
 
std::map< ThreadId, Segmentbackground_stacks_
 
StackVisitorCallback scan_simulator_callback_ = nullptr
 

Detailed Description

Definition at line 35 of file stack.h.

Member Typedef Documentation

◆ IterateStackCallback

using heap::base::Stack::IterateStackCallback = void (*)(Stack*, void*, const void*)

Definition at line 95 of file stack.h.

◆ ThreadId

Definition at line 84 of file stack.h.

Member Function Documentation

◆ HasBackgroundStacks()

bool heap::base::Stack::HasBackgroundStacks ( ) const
inline

Definition at line 114 of file stack.h.

◆ IsMarkerSet()

bool heap::base::Stack::IsMarkerSet ( ) const
inline

Definition at line 103 of file stack.h.

◆ IsMarkerSetForBackgroundThread()

bool heap::base::Stack::IsMarkerSetForBackgroundThread ( ThreadId thread) const
inline

Definition at line 104 of file stack.h.

◆ IsOnStack()

bool heap::base::Stack::IsOnStack ( const void * slot)
static

Definition at line 24 of file stack.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IterateBackgroundStacks()

void heap::base::Stack::IterateBackgroundStacks ( StackVisitor * visitor) const

Definition at line 173 of file stack.cc.

◆ IteratePointers()

void heap::base::Stack::IteratePointers ( StackVisitor * visitor) const
inline

Definition at line 53 of file stack.h.

Here is the caller graph for this function:

◆ IteratePointersForTesting()

void heap::base::Stack::IteratePointersForTesting ( StackVisitor * visitor)

Definition at line 157 of file stack.cc.

Here is the call graph for this function:

◆ IteratePointersUntilMarker()

void heap::base::Stack::IteratePointersUntilMarker ( StackVisitor * visitor) const

Definition at line 161 of file stack.cc.

Here is the caller graph for this function:

◆ SetMarkerAndCallback()

template<typename Callback >
V8_INLINE void heap::base::Stack::SetMarkerAndCallback ( Callback callback)
inline

Definition at line 68 of file stack.h.

Here is the caller graph for this function:

◆ SetMarkerAndCallbackImpl()

template<typename Callback >
static void heap::base::Stack::SetMarkerAndCallbackImpl ( Stack * stack,
void * argument,
const void * stack_end )
inlinestaticprivate

Definition at line 165 of file stack.h.

◆ SetMarkerForBackgroundThreadAndCallback()

template<typename Callback >
V8_INLINE void heap::base::Stack::SetMarkerForBackgroundThreadAndCallback ( ThreadId thread,
Callback callback )
inline

Definition at line 87 of file stack.h.

◆ SetMarkerForBackgroundThreadAndCallbackImpl()

template<typename Callback >
static void heap::base::Stack::SetMarkerForBackgroundThreadAndCallbackImpl ( Stack * stack,
void * argument,
const void * stack_end )
inlinestaticprivate

Definition at line 179 of file stack.h.

Here is the call graph for this function:

◆ SetMarkerIfNeededAndCallback()

template<typename Callback >
V8_INLINE void heap::base::Stack::SetMarkerIfNeededAndCallback ( Callback callback)
inline

Definition at line 74 of file stack.h.

Here is the caller graph for this function:

◆ SetScanSimulatorCallback()

void heap::base::Stack::SetScanSimulatorCallback ( StackVisitorCallback callback)
inline

Definition at line 116 of file stack.h.

Here is the caller graph for this function:

◆ SetStackStart()

void heap::base::Stack::SetStackStart ( )
inline

Definition at line 38 of file stack.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TrampolineCallbackHelper()

void heap::base::Stack::TrampolineCallbackHelper ( void * argument,
IterateStackCallback callback )
private

Definition at line 200 of file stack.cc.

Here is the call graph for this function:

Member Data Documentation

◆ background_stacks_

std::map<ThreadId, Segment> heap::base::Stack::background_stacks_
private

Definition at line 215 of file stack.h.

◆ current_segment_

Segment heap::base::Stack::current_segment_
private

Definition at line 212 of file stack.h.

◆ lock_

v8::base::Mutex heap::base::Stack::lock_
mutableprivate

Definition at line 214 of file stack.h.

◆ scan_simulator_callback_

StackVisitorCallback heap::base::Stack::scan_simulator_callback_ = nullptr
private

Definition at line 217 of file stack.h.


The documentation for this class was generated from the following files: