From 73f8fb6ab448b9dee79c4cc82110cd419790247d Mon Sep 17 00:00:00 2001 From: Sankha Narayan Guria Date: Sat, 12 Oct 2013 03:17:59 +0530 Subject: [PATCH] Bug 693838 - Convert capitalization of Probes::functionName to probes::FunctionName. r=sfink --- js/src/builtin/Profilers.cpp | 6 +++--- js/src/jit/IonFrames.cpp | 4 ++-- js/src/jit/IonMacroAssembler.h | 2 +- js/src/jit/VMFunctions.cpp | 2 +- js/src/jsarray.cpp | 2 +- js/src/jsobj.cpp | 2 +- js/src/jsobjinlines.h | 2 +- js/src/vm/Interpreter.cpp | 12 ++++++------ js/src/vm/Probes-inl.h | 16 ++++++++-------- js/src/vm/Probes.cpp | 30 +++++++++++++++--------------- js/src/vm/Probes.h | 32 ++++++++++++++++---------------- js/src/vm/Runtime-inl.h | 2 +- js/src/vm/Stack.cpp | 8 ++++---- 13 files changed, 60 insertions(+), 60 deletions(-) diff --git a/js/src/builtin/Profilers.cpp b/js/src/builtin/Profilers.cpp index 1cd835cae87f..c8438acfb991 100644 --- a/js/src/builtin/Profilers.cpp +++ b/js/src/builtin/Profilers.cpp @@ -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; } diff --git a/js/src/jit/IonFrames.cpp b/js/src/jit/IonFrames.cpp index a60d95de0ca9..89adae1e05bb 100644 --- a/js/src/jit/IonFrames.cpp +++ b/js/src/jit/IonFrames.cpp @@ -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. diff --git a/js/src/jit/IonMacroAssembler.h b/js/src/jit/IonMacroAssembler.h index 7289061c81ba..3aa91335e1b3 100644 --- a/js/src/jit/IonMacroAssembler.h +++ b/js/src/jit/IonMacroAssembler.h @@ -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())); diff --git a/js/src/jit/VMFunctions.cpp b/js/src/jit/VMFunctions.cpp index 8257ef9a8a07..2c5c772f6cd8 100644 --- a/js/src/jit/VMFunctions.cpp +++ b/js/src/jit/VMFunctions.cpp @@ -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(); } diff --git a/js/src/jsarray.cpp b/js/src/jsarray.cpp index 7c7b151e5c22..7bde9c52a855 100644 --- a/js/src/jsarray.cpp +++ b/js/src/jsarray.cpp @@ -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; } diff --git a/js/src/jsobj.cpp b/js/src/jsobj.cpp index 69855d8a4a5e..c768e4aeb4c4 100644 --- a/js/src/jsobj.cpp +++ b/js/src/jsobj.cpp @@ -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; } diff --git a/js/src/jsobjinlines.h b/js/src/jsobjinlines.h index 7e4eeab5bc0d..40d1042c67ee 100644 --- a/js/src/jsobjinlines.h +++ b/js/src/jsobjinlines.h @@ -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()); diff --git a/js/src/vm/Interpreter.cpp b/js/src/vm/Interpreter.cpp index a0b1d9fdc3cb..103409192809 100644 --- a/js/src/vm/Interpreter.cpp +++ b/js/src/vm/Interpreter.cpp @@ -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); diff --git a/js/src/vm/Probes-inl.h b/js/src/vm/Probes-inl.h index 988603463c9d..a252ea7ab497 100644 --- a/js/src/vm/Probes-inl.h +++ b/js/src/vm/Probes-inl.h @@ -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; diff --git a/js/src/vm/Probes.cpp b/js/src/vm/Probes.cpp index 660abe0206bc..f65b450dfb96 100644 --- a/js/src/vm/Probes.cpp +++ b/js/src/vm/Probes.cpp @@ -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 diff --git a/js/src/vm/Probes.h b/js/src/vm/Probes.h index 43e3495aa747..d8c60adf34d4 100644 --- a/js/src/vm/Probes.h +++ b/js/src/vm/Probes.h @@ -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; diff --git a/js/src/vm/Runtime-inl.h b/js/src/vm/Runtime-inl.h index 72bbda5b77f3..534dd0d62c1f 100644 --- a/js/src/vm/Runtime-inl.h +++ b/js/src/vm/Runtime-inl.h @@ -53,7 +53,7 @@ NewObjectCache::newObjectFromHit(JSContext *cx, EntryIndex entry_, js::gc::Initi JSObject *obj = js_NewGCObject(cx, entry->kind, heap); if (obj) { copyCachedToObject(obj, templateObj, entry->kind); - Probes::createObject(cx, obj); + probes::CreateObject(cx, obj); return obj; } diff --git a/js/src/vm/Stack.cpp b/js/src/vm/Stack.cpp index 6e5171cf3075..0bdc7f62df30 100644 --- a/js/src/vm/Stack.cpp +++ b/js/src/vm/Stack.cpp @@ -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()) {