Oolite 1.91.0.7645-241119-222d325
|
#include <jsdbgapi.h>
import "OOJSEngineTimeManagement.h"
import "OOProfilingStopwatch.h"
import "OOJSScript.h"
import "OOCollectionExtractors.h"
import "OOLoggingExtended.h"
#include <unistd.h>
Go to the source code of this file.
Classes | |
category | OOTimeProfile(Private) |
category | OOTimeProfileEntry(Private) |
Macros | |
#define | OOJS_DEBUG_LIMITER 0 |
#define | OOJS_TIME_LIMIT (1) |
Functions | |
void | OOJSStartTimeLimiterWithTimeLimit_ (OOTimeDelta limit, const char *file, unsigned line) |
void | OOJSStopTimeLimiter_ (const char *file, unsigned line) |
void | OOJSPauseTimeLimiter (void) |
void | OOJSResumeTimeLimiter (void) |
OOHighResTimeValue | OOJSCopyTimeLimiterNominalStartTime (void) |
void | OOJSResetTimeLimiter (void) |
OOTimeDelta | OOJSGetTimeLimiterLimit (void) |
void | OOJSSetTimeLimiterLimit (OOTimeDelta limit) |
static JSBool | OperationCallback (JSContext *context) |
static JSBool | ContextCallback (JSContext *context, uintN contextOp) |
void | OOJSTimeManagementInit (OOJavaScriptEngine *engine, JSRuntime *runtime) |
void | OOJSBeginProfiling (BOOL trace) |
OOTimeProfile * | OOJSEndProfiling (void) |
BOOL | OOJSIsProfiling (void) |
void | OOJSBeginTracing (void) |
void | OOJSEndTracing (void) |
BOOL | OOJSIsTracing (void) |
static void | UpdateProfileForFrame (OOHighResTimeValue now, OOJSProfileStackFrame *frame) |
void | OOJSProfileEnter (OOJSProfileStackFrame *frame, const char *function) |
void | OOJSProfileExit (OOJSProfileStackFrame *frame) |
Variables | |
static unsigned | sLimiterStartDepth |
static int | sLimiterPauseDepth |
static OOHighResTimeValue | sLimiterStart |
static OOHighResTimeValue | sLimiterPauseStart |
static double | sLimiterTimeLimit |
static BOOL | sStop |
static const char * | sLastStartedFile |
static unsigned | sLastStartedLine |
static const char * | sLastStoppedFile |
static unsigned | sLastStoppedLine |
static BOOL | sProfiling = NO |
static BOOL | sTracing = NO |
static OOJSProfileStackFrame * | sProfileStack = NULL |
static NSMapTable * | sProfileInfo |
static double | sProfilerOverhead |
static double | sProfilerTotalNativeTime |
static double | sProfilerTotalJavaScriptTime |
static double | sProfilerEntryTimeLimit |
static OOHighResTimeValue | sProfilerStartTime |
#define OOJS_DEBUG_LIMITER 0 |
Definition at line 49 of file OOJSEngineTimeManagement.m.
#define OOJS_TIME_LIMIT (1) |
Definition at line 63 of file OOJSEngineTimeManagement.m.
Referenced by OOJSStartTimeLimiterWithTimeLimit_().
|
static |
Definition at line 240 of file OOJSEngineTimeManagement.m.
References OperationCallback().
Referenced by OOJSTimeManagementInit().
void OOJSBeginProfiling | ( | BOOL | trace | ) |
Definition at line 311 of file OOJSEngineTimeManagement.m.
References OOGetHighResTime, OOJSGetTimeLimiterLimit(), OOLog, OOLogIndent(), sProfileInfo, sProfilerEntryTimeLimit, sProfilerOverhead, sProfilerStartTime, sProfilerTotalJavaScriptTime, sProfilerTotalNativeTime, sProfiling, and sTracing.
Referenced by Entity(OODebugInspector)::inspect.
void OOJSBeginTracing | ( | void | ) |
OOHighResTimeValue OOJSCopyTimeLimiterNominalStartTime | ( | void | ) |
OOTimeProfile * OOJSEndProfiling | ( | void | ) |
Definition at line 333 of file OOJSEngineTimeManagement.m.
References OODisposeHighResTime, OOGetHighResTime, OOJSGetTimeLimiterLimit(), OOJSPauseTimeLimiter(), OOJSResumeTimeLimiter(), OOLog, OOLogOutdent(), OOTimeProfile::setExtensionTime:, OOTimeProfile::setNativeTime:, OOTimeProfile::setProfileEntries:, OOTimeProfile::setProfilerOverhead:, OOTimeProfile::setTotalTime:, sProfileInfo, sProfilerStartTime, sProfileStack, sProfiling, and sTracing.
Referenced by Entity(OODebugInspector)::inspect.
void OOJSEndTracing | ( | void | ) |
OOTimeDelta OOJSGetTimeLimiterLimit | ( | void | ) |
Definition at line 173 of file OOJSEngineTimeManagement.m.
References sLimiterTimeLimit.
Referenced by Entity(OODebugInspector)::inspect, OOJSBeginProfiling(), and OOJSEndProfiling().
BOOL OOJSIsProfiling | ( | void | ) |
Definition at line 376 of file OOJSEngineTimeManagement.m.
References sProfiling.
Referenced by ConsoleGetProfile(), ConsoleProfile(), and ConsoleTrace().
BOOL OOJSIsTracing | ( | void | ) |
void OOJSPauseTimeLimiter | ( | void | ) |
Definition at line 133 of file OOJSEngineTimeManagement.m.
References OODisposeHighResTime, OOGetHighResTime, sLimiterPauseDepth, and sLimiterPauseStart.
Referenced by NSString(OOJavaScriptExtensions)::concatenationOfStringsFromJavaScriptValues:count:separator:inContext:, ConsoleConsoleMessage(), ConsoleIsExecutableJavaScript(), ConsoleSettingsSetProperty(), OOPlanetEntity(OOJavaScriptExtensions)::getJSClass:andPrototype:, JSFunctionPredicate(), MissionRunScreen(), OOJSEndProfiling(), ReportJSError(), SoundFromJSValue(), SystemFilteredEntities(), and SystemInfoStaticFilteredSystems().
void OOJSProfileEnter | ( | OOJSProfileStackFrame * | frame, |
const char * | function ) |
Definition at line 527 of file OOJSEngineTimeManagement.m.
References EXPECT, EXPECT_NOT, OOGetHighResTime, OOLog, OOLogIndent(), sProfilerTotalNativeTime, sProfileStack, sProfiling, and sTracing.
void OOJSProfileExit | ( | OOJSProfileStackFrame * | frame | ) |
Definition at line 549 of file OOJSEngineTimeManagement.m.
References EXPECT, OODisposeHighResTime, OOGetHighResTime, OOHighResTimeDeltaInSeconds(), sLimiterPauseDepth, sLimiterTimeLimit, sProfilerOverhead, sProfileStack, sProfiling, and UpdateProfileForFrame().
void OOJSResetTimeLimiter | ( | void | ) |
Definition at line 164 of file OOJSEngineTimeManagement.m.
References OODisposeHighResTime, OOGetHighResTime, sLimiterStart, and sStop.
Referenced by Entity(OODebugInspector)::inspect.
void OOJSResumeTimeLimiter | ( | void | ) |
Definition at line 143 of file OOJSEngineTimeManagement.m.
References OODisposeHighResTime, OOGetHighResTime, OOHighResTimeDeltaInSeconds(), sLimiterPauseDepth, sLimiterPauseStart, and sLimiterTimeLimit.
Referenced by NSString(OOJavaScriptExtensions)::concatenationOfStringsFromJavaScriptValues:count:separator:inContext:, ConsoleConsoleMessage(), ConsoleIsExecutableJavaScript(), ConsoleSettingsSetProperty(), OOPlanetEntity(OOJavaScriptExtensions)::getJSClass:andPrototype:, JSFunctionPredicate(), MissionRunScreen(), OOJSEndProfiling(), ReportJSError(), SoundFromJSValue(), SystemFilteredEntities(), and SystemInfoStaticFilteredSystems().
void OOJSSetTimeLimiterLimit | ( | OOTimeDelta | limit | ) |
Definition at line 179 of file OOJSEngineTimeManagement.m.
References sLimiterTimeLimit.
Referenced by Entity(OODebugInspector)::inspect.
void OOJSStartTimeLimiterWithTimeLimit_ | ( | OOTimeDelta | limit, |
const char * | file, | ||
unsigned | line ) |
Definition at line 82 of file OOJSEngineTimeManagement.m.
References OODisposeHighResTime, OOGetHighResTime, OOJS_TIME_LIMIT, OOLog, sLastStartedFile, sLastStartedLine, sLimiterPauseDepth, sLimiterStart, sLimiterStartDepth, and sLimiterTimeLimit.
void OOJSStopTimeLimiter_ | ( | const char * | file, |
unsigned | line ) |
Definition at line 108 of file OOJSEngineTimeManagement.m.
References OOLog, OOLogAbbreviatedFileName(), sLastStartedFile, sLastStartedLine, sLastStoppedFile, sLastStoppedLine, sLimiterStartDepth, and sLimiterTimeLimit.
void OOJSTimeManagementInit | ( | OOJavaScriptEngine * | engine, |
JSRuntime * | runtime ) |
Definition at line 254 of file OOJSEngineTimeManagement.m.
References ContextCallback().
|
static |
Definition at line 217 of file OOJSEngineTimeManagement.m.
References OODisposeHighResTime, OOGetHighResTime, OOHighResTimeDeltaInSeconds(), OOJSDumpStack(), OOLogERR, sLimiterStart, sLimiterTimeLimit, and sStop.
Referenced by ContextCallback().
|
static |
Definition at line 591 of file OOJSEngineTimeManagement.m.
Referenced by OOJSProfileExit().
|
static |
Definition at line 69 of file OOJSEngineTimeManagement.m.
Referenced by OOJSStartTimeLimiterWithTimeLimit_(), and OOJSStopTimeLimiter_().
|
static |
Definition at line 70 of file OOJSEngineTimeManagement.m.
Referenced by OOJSStartTimeLimiterWithTimeLimit_(), and OOJSStopTimeLimiter_().
|
static |
Definition at line 71 of file OOJSEngineTimeManagement.m.
Referenced by OOJSStopTimeLimiter_().
|
static |
Definition at line 72 of file OOJSEngineTimeManagement.m.
Referenced by OOJSStopTimeLimiter_().
|
static |
Definition at line 54 of file OOJSEngineTimeManagement.m.
Referenced by OOJSPauseTimeLimiter(), OOJSProfileExit(), OOJSResumeTimeLimiter(), and OOJSStartTimeLimiterWithTimeLimit_().
|
static |
Definition at line 56 of file OOJSEngineTimeManagement.m.
Referenced by OOJSPauseTimeLimiter(), and OOJSResumeTimeLimiter().
|
static |
Definition at line 55 of file OOJSEngineTimeManagement.m.
Referenced by OOJSCopyTimeLimiterNominalStartTime(), OOJSResetTimeLimiter(), OOJSStartTimeLimiterWithTimeLimit_(), and OperationCallback().
|
static |
Definition at line 53 of file OOJSEngineTimeManagement.m.
Referenced by OOJSStartTimeLimiterWithTimeLimit_(), and OOJSStopTimeLimiter_().
|
static |
Definition at line 57 of file OOJSEngineTimeManagement.m.
Referenced by OOJSGetTimeLimiterLimit(), OOJSProfileExit(), OOJSResumeTimeLimiter(), OOJSSetTimeLimiterLimit(), OOJSStartTimeLimiterWithTimeLimit_(), OOJSStopTimeLimiter_(), and OperationCallback().
|
static |
Definition at line 273 of file OOJSEngineTimeManagement.m.
Referenced by OOTimeProfileEntry(Private)::addSampleWithTotalTime:selfTime:, OOJSBeginProfiling(), and OOJSEndProfiling().
|
static |
Definition at line 277 of file OOJSEngineTimeManagement.m.
Referenced by OOJSBeginProfiling().
|
static |
Definition at line 274 of file OOJSEngineTimeManagement.m.
Referenced by OOJSBeginProfiling(), and OOJSProfileExit().
|
static |
Definition at line 278 of file OOJSEngineTimeManagement.m.
Referenced by OOJSBeginProfiling(), and OOJSEndProfiling().
|
static |
Definition at line 276 of file OOJSEngineTimeManagement.m.
Referenced by OOJSBeginProfiling().
|
static |
Definition at line 275 of file OOJSEngineTimeManagement.m.
Referenced by OOJSBeginProfiling(), and OOJSProfileEnter().
|
static |
Definition at line 272 of file OOJSEngineTimeManagement.m.
Referenced by OOTimeProfileEntry(Private)::addSampleWithTotalTime:selfTime:, OOJSEndProfiling(), OOJSProfileEnter(), and OOJSProfileExit().
|
static |
Definition at line 270 of file OOJSEngineTimeManagement.m.
Referenced by OOJSBeginProfiling(), OOJSEndProfiling(), OOJSIsProfiling(), OOJSProfileEnter(), and OOJSProfileExit().
|
static |
Definition at line 66 of file OOJSEngineTimeManagement.m.
Referenced by OOJSResetTimeLimiter(), and OperationCallback().
|
static |
Definition at line 271 of file OOJSEngineTimeManagement.m.
Referenced by OOTimeProfileEntry(Private)::addSampleWithTotalTime:selfTime:, OOJSBeginProfiling(), OOJSEndProfiling(), and OOJSProfileEnter().