Pyrogenesis trunk
|
#include "precompiled.h"
#include "ScriptContext.h"
#include "lib/alignment.h"
#include "ps/GameSetup/Config.h"
#include "ps/Profile.h"
#include "scriptinterface/Promises.h"
#include "scriptinterface/ScriptExtraHeaders.h"
#include "scriptinterface/ScriptEngine.h"
#include "scriptinterface/ScriptInterface.h"
Macros | |
#define | GC_DEBUG_PRINT 0 |
Functions | |
void | GCSliceCallbackHook (JSContext *cx, JS::GCProgress progress, const JS::GCDescription &desc) |
#define GC_DEBUG_PRINT 0 |
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.