mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 693838 - Convert capitalization of Probes::functionName to probes::FunctionName. r=sfink
This commit is contained in:
parent
c647082ccb
commit
b2200d1885
@ -122,7 +122,7 @@ ControlProfilers(bool toState)
|
||||
{
|
||||
bool ok = true;
|
||||
|
||||
if (! Probes::ProfilingActive && toState) {
|
||||
if (! probes::ProfilingActive && toState) {
|
||||
#ifdef __APPLE__
|
||||
#if defined(MOZ_SHARK) || defined(MOZ_INSTRUMENTS)
|
||||
const char* profiler;
|
||||
@ -145,7 +145,7 @@ ControlProfilers(bool toState)
|
||||
ok = false;
|
||||
}
|
||||
#endif
|
||||
} else if (Probes::ProfilingActive && ! toState) {
|
||||
} else if (probes::ProfilingActive && ! toState) {
|
||||
#ifdef __APPLE__
|
||||
#ifdef MOZ_SHARK
|
||||
Shark::Stop();
|
||||
@ -162,7 +162,7 @@ ControlProfilers(bool toState)
|
||||
#endif
|
||||
}
|
||||
|
||||
Probes::ProfilingActive = toState;
|
||||
probes::ProfilingActive = toState;
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
@ -554,7 +554,7 @@ HandleException(ResumeFromException *rfe)
|
||||
// the function has exited, so invoke the probe that a function
|
||||
// is exiting.
|
||||
JSScript *script = frames.script();
|
||||
Probes::exitScript(cx, script, script->function(), nullptr);
|
||||
probes::ExitScript(cx, script, script->function(), nullptr);
|
||||
if (!frames.more())
|
||||
break;
|
||||
++frames;
|
||||
@ -574,7 +574,7 @@ HandleException(ResumeFromException *rfe)
|
||||
|
||||
// Unwind profiler pseudo-stack
|
||||
JSScript *script = iter.script();
|
||||
Probes::exitScript(cx, script, script->function(), iter.baselineFrame());
|
||||
probes::ExitScript(cx, script, script->function(), iter.baselineFrame());
|
||||
// After this point, any pushed SPS frame would have been popped if it needed
|
||||
// to be. Unset the flag here so that if we call DebugEpilogue below,
|
||||
// it doesn't try to pop the SPS frame again.
|
||||
|
@ -1064,7 +1064,7 @@ class MacroAssembler : public MacroAssemblerSpecific
|
||||
storePtr(ImmPtr(nullptr), Address(temp, ProfileEntry::offsetOfStackAddress()));
|
||||
|
||||
// Store 0 for PCIdx because that's what interpreter does.
|
||||
// (See Probes::enterScript, which calls spsProfiler.enter, which pushes an entry
|
||||
// (See probes::EnterScript, which calls spsProfiler.enter, which pushes an entry
|
||||
// with 0 pcIdx).
|
||||
store32(Imm32(0), Address(temp, ProfileEntry::offsetOfPCIdx()));
|
||||
|
||||
|
@ -716,7 +716,7 @@ DebugEpilogue(JSContext *cx, BaselineFrame *frame, bool ok)
|
||||
if (frame->hasPushedSPSFrame()) {
|
||||
cx->runtime()->spsProfiler.exit(cx, frame->script(), frame->maybeFun());
|
||||
// Unset the pushedSPSFrame flag because DebugEpilogue may get called before
|
||||
// Probes::exitScript in baseline during exception handling, and we don't
|
||||
// probes::ExitScript in baseline during exception handling, and we don't
|
||||
// want to double-pop SPS frames.
|
||||
frame->unsetPushedSPSFrame();
|
||||
}
|
||||
|
@ -3192,7 +3192,7 @@ NewArray(ExclusiveContext *cxArg, uint32_t length,
|
||||
if (allocateCapacity && !EnsureNewArrayElements(cxArg, arr, length))
|
||||
return nullptr;
|
||||
|
||||
Probes::createObject(cxArg, arr);
|
||||
probes::CreateObject(cxArg, arr);
|
||||
return arr;
|
||||
}
|
||||
|
||||
|
@ -1309,7 +1309,7 @@ NewObject(ExclusiveContext *cx, const Class *clasp, types::TypeObject *type_, JS
|
||||
#endif
|
||||
}
|
||||
|
||||
Probes::createObject(cx, obj);
|
||||
probes::CreateObject(cx, obj);
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,7 @@ JSObject::deleteSpecial(JSContext *cx, js::HandleObject obj, js::HandleSpecialId
|
||||
inline void
|
||||
JSObject::finalize(js::FreeOp *fop)
|
||||
{
|
||||
js::Probes::finalizeObject(this);
|
||||
js::probes::FinalizeObject(this);
|
||||
|
||||
#ifdef DEBUG
|
||||
JS_ASSERT(isTenured());
|
||||
|
@ -606,10 +606,10 @@ js::ExecuteKernel(JSContext *cx, HandleScript script, JSObject &scopeChainArg, c
|
||||
|
||||
TypeScript::SetThis(cx, script, thisv);
|
||||
|
||||
Probes::startExecution(script);
|
||||
probes::StartExecution(script);
|
||||
ExecuteState state(cx, script, thisv, scopeChainArg, type, evalInFrame, result);
|
||||
bool ok = RunScript(cx, state);
|
||||
Probes::stopExecution(script);
|
||||
probes::StopExecution(script);
|
||||
|
||||
return ok;
|
||||
}
|
||||
@ -1335,7 +1335,7 @@ Interpret(JSContext *cx, RunState &state)
|
||||
* fail if cx->isExceptionPending() is true.
|
||||
*/
|
||||
if (cx->isExceptionPending()) {
|
||||
Probes::enterScript(cx, script, script->function(), regs.fp());
|
||||
probes::EnterScript(cx, script, script->function(), regs.fp());
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
@ -1347,7 +1347,7 @@ Interpret(JSContext *cx, RunState &state)
|
||||
if (!entryFrame->prologue(cx))
|
||||
goto error;
|
||||
} else {
|
||||
Probes::enterScript(cx, script, script->function(), entryFrame);
|
||||
probes::EnterScript(cx, script, script->function(), entryFrame);
|
||||
}
|
||||
if (cx->compartment()->debugMode()) {
|
||||
JSTrapStatus status = ScriptDebugPrologue(cx, entryFrame);
|
||||
@ -1623,7 +1623,7 @@ BEGIN_CASE(JSOP_STOP)
|
||||
if (!regs.fp()->isYielding())
|
||||
regs.fp()->epilogue(cx);
|
||||
else
|
||||
Probes::exitScript(cx, script, script->function(), regs.fp());
|
||||
probes::ExitScript(cx, script, script->function(), regs.fp());
|
||||
|
||||
#if defined(JS_ION)
|
||||
jit_return_pop_frame:
|
||||
@ -3401,7 +3401,7 @@ default:
|
||||
if (!regs.fp()->isYielding())
|
||||
regs.fp()->epilogue(cx);
|
||||
else
|
||||
Probes::exitScript(cx, script, script->function(), regs.fp());
|
||||
probes::ExitScript(cx, script, script->function(), regs.fp());
|
||||
|
||||
gc::MaybeVerifyBarriers(cx, true);
|
||||
|
||||
|
@ -19,7 +19,7 @@ namespace js {
|
||||
*/
|
||||
|
||||
inline bool
|
||||
Probes::callTrackingActive(JSContext *cx)
|
||||
probes::CallTrackingActive(JSContext *cx)
|
||||
{
|
||||
#ifdef INCLUDE_MOZILLA_DTRACE
|
||||
if (JAVASCRIPT_FUNCTION_ENTRY_ENABLED() || JAVASCRIPT_FUNCTION_RETURN_ENABLED())
|
||||
@ -33,14 +33,14 @@ Probes::callTrackingActive(JSContext *cx)
|
||||
}
|
||||
|
||||
inline bool
|
||||
Probes::wantNativeAddressInfo(JSContext *cx)
|
||||
probes::WantNativeAddressInfo(JSContext *cx)
|
||||
{
|
||||
return (cx->reportGranularity >= JITREPORT_GRANULARITY_FUNCTION &&
|
||||
JITGranularityRequested(cx) >= JITREPORT_GRANULARITY_FUNCTION);
|
||||
}
|
||||
|
||||
inline bool
|
||||
Probes::enterScript(JSContext *cx, JSScript *script, JSFunction *maybeFun,
|
||||
probes::EnterScript(JSContext *cx, JSScript *script, JSFunction *maybeFun,
|
||||
StackFrame *fp)
|
||||
{
|
||||
bool ok = true;
|
||||
@ -63,7 +63,7 @@ Probes::enterScript(JSContext *cx, JSScript *script, JSFunction *maybeFun,
|
||||
}
|
||||
|
||||
inline bool
|
||||
Probes::exitScript(JSContext *cx, JSScript *script, JSFunction *maybeFun,
|
||||
probes::ExitScript(JSContext *cx, JSScript *script, JSFunction *maybeFun,
|
||||
AbstractFramePtr fp)
|
||||
{
|
||||
bool ok = true;
|
||||
@ -88,14 +88,14 @@ Probes::exitScript(JSContext *cx, JSScript *script, JSFunction *maybeFun,
|
||||
}
|
||||
|
||||
inline bool
|
||||
Probes::exitScript(JSContext *cx, JSScript *script, JSFunction *maybeFun,
|
||||
probes::ExitScript(JSContext *cx, JSScript *script, JSFunction *maybeFun,
|
||||
StackFrame *fp)
|
||||
{
|
||||
return Probes::exitScript(cx, script, maybeFun, fp ? AbstractFramePtr(fp) : AbstractFramePtr());
|
||||
return probes::ExitScript(cx, script, maybeFun, fp ? AbstractFramePtr(fp) : AbstractFramePtr());
|
||||
}
|
||||
|
||||
inline bool
|
||||
Probes::startExecution(JSScript *script)
|
||||
probes::StartExecution(JSScript *script)
|
||||
{
|
||||
bool ok = true;
|
||||
|
||||
@ -109,7 +109,7 @@ Probes::startExecution(JSScript *script)
|
||||
}
|
||||
|
||||
inline bool
|
||||
Probes::stopExecution(JSScript *script)
|
||||
probes::StopExecution(JSScript *script)
|
||||
{
|
||||
bool ok = true;
|
||||
|
||||
|
@ -16,13 +16,13 @@
|
||||
|
||||
using namespace js;
|
||||
|
||||
const char Probes::nullName[] = "(null)";
|
||||
const char Probes::anonymousName[] = "(anonymous)";
|
||||
const char probes::nullName[] = "(null)";
|
||||
const char probes::anonymousName[] = "(anonymous)";
|
||||
|
||||
bool Probes::ProfilingActive = true;
|
||||
bool probes::ProfilingActive = true;
|
||||
|
||||
Probes::JITReportGranularity
|
||||
Probes::JITGranularityRequested(JSContext *cx)
|
||||
probes::JITReportGranularity
|
||||
probes::JITGranularityRequested(JSContext *cx)
|
||||
{
|
||||
if (cx->runtime()->spsProfiler.enabled())
|
||||
return JITREPORT_GRANULARITY_LINE;
|
||||
@ -31,7 +31,7 @@ Probes::JITGranularityRequested(JSContext *cx)
|
||||
|
||||
/* ICs are unregistered in a batch */
|
||||
void
|
||||
Probes::discardExecutableRegion(void *start, size_t size)
|
||||
probes::DiscardExecutableRegion(void *start, size_t size)
|
||||
{
|
||||
/*
|
||||
* Not needed for SPS because ICs are disposed of when the normal JITChunk
|
||||
@ -44,9 +44,9 @@ static const char *
|
||||
ScriptFilename(const JSScript *script)
|
||||
{
|
||||
if (!script)
|
||||
return Probes::nullName;
|
||||
return probes::nullName;
|
||||
if (!script->filename())
|
||||
return Probes::anonymousName;
|
||||
return probes::anonymousName;
|
||||
return script->filename();
|
||||
}
|
||||
|
||||
@ -54,10 +54,10 @@ static const char *
|
||||
FunctionName(JSContext *cx, JSFunction *fun, JSAutoByteString* bytes)
|
||||
{
|
||||
if (!fun)
|
||||
return Probes::nullName;
|
||||
return probes::nullName;
|
||||
if (!fun->displayAtom())
|
||||
return Probes::anonymousName;
|
||||
return bytes->encodeLatin1(cx, fun->displayAtom()) ? bytes->ptr() : Probes::nullName;
|
||||
return probes::anonymousName;
|
||||
return bytes->encodeLatin1(cx, fun->displayAtom()) ? bytes->ptr() : probes::nullName;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -68,18 +68,18 @@ FunctionName(JSContext *cx, JSFunction *fun, JSAutoByteString* bytes)
|
||||
* a number of usually unused lines of code would cause.
|
||||
*/
|
||||
void
|
||||
Probes::DTraceEnterJSFun(JSContext *cx, JSFunction *fun, JSScript *script)
|
||||
probes::DTraceEnterJSFun(JSContext *cx, JSFunction *fun, JSScript *script)
|
||||
{
|
||||
JSAutoByteString funNameBytes;
|
||||
JAVASCRIPT_FUNCTION_ENTRY(ScriptFilename(script), Probes::nullName,
|
||||
JAVASCRIPT_FUNCTION_ENTRY(ScriptFilename(script), probes::nullName,
|
||||
FunctionName(cx, fun, &funNameBytes));
|
||||
}
|
||||
|
||||
void
|
||||
Probes::DTraceExitJSFun(JSContext *cx, JSFunction *fun, JSScript *script)
|
||||
probes::DTraceExitJSFun(JSContext *cx, JSFunction *fun, JSScript *script)
|
||||
{
|
||||
JSAutoByteString funNameBytes;
|
||||
JAVASCRIPT_FUNCTION_RETURN(ScriptFilename(script), Probes::nullName,
|
||||
JAVASCRIPT_FUNCTION_RETURN(ScriptFilename(script), probes::nullName,
|
||||
FunctionName(cx, fun, &funNameBytes));
|
||||
}
|
||||
#endif
|
||||
|
@ -15,13 +15,13 @@
|
||||
|
||||
namespace js {
|
||||
|
||||
namespace Probes {
|
||||
namespace probes {
|
||||
|
||||
/*
|
||||
* Static probes
|
||||
*
|
||||
* The probe points defined in this file are scattered around the SpiderMonkey
|
||||
* source tree. The presence of Probes::someEvent() means that someEvent is
|
||||
* source tree. The presence of probes::SomeEvent() means that someEvent is
|
||||
* about to happen or has happened. To the extent possible, probes should be
|
||||
* inserted in all paths associated with a given event, regardless of the
|
||||
* active runmode (interpreter/traceJIT/methodJIT/ionJIT).
|
||||
@ -57,37 +57,37 @@ extern const char anonymousName[];
|
||||
* to decide whether they can optimize in a way that would prevent probes from
|
||||
* firing.
|
||||
*/
|
||||
bool callTrackingActive(JSContext *);
|
||||
bool CallTrackingActive(JSContext *);
|
||||
|
||||
/*
|
||||
* Test whether anything is looking for JIT native code registration events.
|
||||
* This information will not be collected otherwise.
|
||||
*/
|
||||
bool wantNativeAddressInfo(JSContext *);
|
||||
bool WantNativeAddressInfo(JSContext *);
|
||||
|
||||
/* Entering a JS function */
|
||||
bool enterScript(JSContext *, JSScript *, JSFunction *, StackFrame *);
|
||||
bool EnterScript(JSContext *, JSScript *, JSFunction *, StackFrame *);
|
||||
|
||||
/* About to leave a JS function */
|
||||
bool exitScript(JSContext *, JSScript *, JSFunction *, AbstractFramePtr);
|
||||
bool exitScript(JSContext *, JSScript *, JSFunction *, StackFrame *);
|
||||
bool ExitScript(JSContext *, JSScript *, JSFunction *, AbstractFramePtr);
|
||||
bool ExitScript(JSContext *, JSScript *, JSFunction *, StackFrame *);
|
||||
|
||||
/* Executing a script */
|
||||
bool startExecution(JSScript *script);
|
||||
bool StartExecution(JSScript *script);
|
||||
|
||||
/* Script has completed execution */
|
||||
bool stopExecution(JSScript *script);
|
||||
bool StopExecution(JSScript *script);
|
||||
|
||||
/*
|
||||
* Object has been created. |obj| must exist (its class and size are read)
|
||||
*/
|
||||
bool createObject(ExclusiveContext *cx, JSObject *obj);
|
||||
bool CreateObject(ExclusiveContext *cx, JSObject *obj);
|
||||
|
||||
/*
|
||||
* Object is about to be finalized. |obj| must still exist (its class is
|
||||
* read)
|
||||
*/
|
||||
bool finalizeObject(JSObject *obj);
|
||||
bool FinalizeObject(JSObject *obj);
|
||||
|
||||
/* JIT code observation */
|
||||
|
||||
@ -109,11 +109,11 @@ JITGranularityRequested(JSContext *cx);
|
||||
* (ICs are unregistered in a batch, so individual ICs are not registered.)
|
||||
*/
|
||||
void
|
||||
discardExecutableRegion(void *start, size_t size);
|
||||
DiscardExecutableRegion(void *start, size_t size);
|
||||
|
||||
/*
|
||||
* Internal: DTrace-specific functions to be called during Probes::enterScript
|
||||
* and Probes::exitScript. These will not be inlined, but the argument
|
||||
* Internal: DTrace-specific functions to be called during probes::EnterScript
|
||||
* and probes::ExitScript. These will not be inlined, but the argument
|
||||
* marshalling required for these probe points is expensive enough that it
|
||||
* shouldn't really matter.
|
||||
*/
|
||||
@ -137,7 +137,7 @@ static const char *ObjectClassname(JSObject *obj) {
|
||||
#endif
|
||||
|
||||
inline bool
|
||||
Probes::createObject(ExclusiveContext *cx, JSObject *obj)
|
||||
probes::CreateObject(ExclusiveContext *cx, JSObject *obj)
|
||||
{
|
||||
bool ok = true;
|
||||
|
||||
@ -150,7 +150,7 @@ Probes::createObject(ExclusiveContext *cx, JSObject *obj)
|
||||
}
|
||||
|
||||
inline bool
|
||||
Probes::finalizeObject(JSObject *obj)
|
||||
probes::FinalizeObject(JSObject *obj)
|
||||
{
|
||||
bool ok = true;
|
||||
|
||||
|
@ -53,7 +53,7 @@ NewObjectCache::newObjectFromHit(JSContext *cx, EntryIndex entry_, js::gc::Initi
|
||||
JSObject *obj = js_NewGCObject<NoGC>(cx, entry->kind, heap);
|
||||
if (obj) {
|
||||
copyCachedToObject(obj, templateObj, entry->kind);
|
||||
Probes::createObject(cx, obj);
|
||||
probes::CreateObject(cx, obj);
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
@ -264,12 +264,12 @@ StackFrame::prologue(JSContext *cx)
|
||||
pushOnScopeChain(*callobj);
|
||||
flags_ |= HAS_CALL_OBJ;
|
||||
}
|
||||
Probes::enterScript(cx, script, nullptr, this);
|
||||
probes::EnterScript(cx, script, nullptr, this);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (isGlobalFrame()) {
|
||||
Probes::enterScript(cx, script, nullptr, this);
|
||||
probes::EnterScript(cx, script, nullptr, this);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -287,7 +287,7 @@ StackFrame::prologue(JSContext *cx)
|
||||
functionThis() = ObjectValue(*obj);
|
||||
}
|
||||
|
||||
Probes::enterScript(cx, script, script->function(), this);
|
||||
probes::EnterScript(cx, script, script->function(), this);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -298,7 +298,7 @@ StackFrame::epilogue(JSContext *cx)
|
||||
JS_ASSERT(!hasBlockChain());
|
||||
|
||||
RootedScript script(cx, this->script());
|
||||
Probes::exitScript(cx, script, script->function(), this);
|
||||
probes::ExitScript(cx, script, script->function(), this);
|
||||
|
||||
if (isEvalFrame()) {
|
||||
if (isStrictEvalFrame()) {
|
||||
|
Loading…
Reference in New Issue
Block a user