Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
ScriptContext.cpp File Reference
Include dependency graph for ScriptContext.cpp:

Macros

#define GC_DEBUG_PRINT   0
 

Functions

void GCSliceCallbackHook (JSContext *cx, JS::GCProgress progress, const JS::GCDescription &desc)
 

Macro Definition Documentation

◆ GC_DEBUG_PRINT

#define GC_DEBUG_PRINT   0

Function Documentation

◆ GCSliceCallbackHook()

void GCSliceCallbackHook ( JSContext *  cx,
JS::GCProgress  progress,
const JS::GCDescription &  desc 
)

From the GCAPI.h file:

‍During GC, the GC is bracketed by GC_CYCLE_BEGIN/END callbacks. Each slice between those (whether an incremental or the sole non-incremental slice) is bracketed by GC_SLICE_BEGIN/GC_SLICE_END.

Thus, to safely monitor GCs, we need to profile SLICE_X calls.