Bug 1333296 (part 6) - Remove SPS references in js/. r=shu.

The most significant thing about this is that it changes some built-in function
names:
- enableSPSProfiling() -> enableGeckoProfiling()
- enableSPSProfilingWithSlowAssertions() -> enableGeckoProfiling(WithSlowAssertions)
- disableSPSProfiling() -> disableGeckoProfiling()
- {en,dis}ableSPSProfiling*() -> {en,dis}ableGeckoProfiling*()
- readSPSProfilingStack() -> readGeckoProfilingStack()

It also requires two filename changes:
- SPSProfiler.{h,cpp} -> GeckoProfiler.{h,cpp}

And some type name changes, e.g.:
- AutoSPSEntry -> AutoGeckoProfilerEntry
- SPSProfiler -> GeckoProfiler
- SPSInstrumentation -> GeckoProfilerInstrumentation
- SPSEntryMarker -> GeckoProfilerEntryMarker
- SPSBaselineOSRMarker -> GeckoProfilerBaselineOSRMarker

And various method/function/variable name changes, and some comment changes.

--HG--
rename : js/src/vm/SPSProfiler.cpp => js/src/vm/GeckoProfiler.cpp
rename : js/src/vm/SPSProfiler.h => js/src/vm/GeckoProfiler.h
extra : rebase_source : f681e2c3c269aec483bba9d60c7afc39776e14bf
This commit is contained in:
Nicholas Nethercote 2017-01-25 09:08:15 +11:00
parent 960aa50e1b
commit f4ea404f5e
103 changed files with 386 additions and 380 deletions

View File

@ -21,7 +21,7 @@ namespace js {
// A call stack can be specified to the JS engine such that all JS entry/exits
// to functions push/pop an entry to/from the specified stack.
//
// For more detailed information, see vm/SPSProfiler.h.
// For more detailed information, see vm/GeckoProfiler.h.
//
class ProfileEntry
{
@ -95,10 +95,10 @@ class ProfileEntry
static_assert((static_cast<int>(Category::FIRST) & Flags::ALL) == 0,
"The category bitflags should not intersect with the other flags!");
// All of these methods are marked with the 'volatile' keyword because SPS's
// representation of the stack is stored such that all ProfileEntry
// instances are volatile. These methods would not be available unless they
// were marked as volatile as well.
// All of these methods are marked with the 'volatile' keyword because the
// Gecko Profiler's representation of the stack is stored such that all
// ProfileEntry instances are volatile. These methods would not be
// available unless they were marked as volatile as well.
bool isCpp() const volatile { return hasFlag(IS_CPP_ENTRY); }
bool isJs() const volatile { return !isCpp(); }
@ -173,7 +173,7 @@ class ProfileEntry
return (JSScript*)spOrScript;
}
// We can't know the layout of JSScript, so look in vm/SPSProfiler.cpp.
// We can't know the layout of JSScript, so look in vm/GeckoProfiler.cpp.
JS_FRIEND_API(jsbytecode*) pc() const volatile;
JS_FRIEND_API(void) setPC(jsbytecode* pc) volatile;

View File

@ -1745,13 +1745,13 @@ Terminate(JSContext* cx, unsigned arg, Value* vp)
}
static bool
ReadSPSProfilingStack(JSContext* cx, unsigned argc, Value* vp)
ReadGeckoProfilingStack(JSContext* cx, unsigned argc, Value* vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
args.rval().setUndefined();
// Return boolean 'false' if profiler is not enabled.
if (!cx->runtime()->spsProfiler.enabled()) {
if (!cx->runtime()->geckoProfiler.enabled()) {
args.rval().setBoolean(false);
return true;
}
@ -4378,8 +4378,8 @@ gc::ZealModeHelpText),
" Terminate JavaScript execution, as if we had run out of\n"
" memory or been terminated by the slow script dialog."),
JS_FN_HELP("readSPSProfilingStack", ReadSPSProfilingStack, 0, 0,
"readSPSProfilingStack()",
JS_FN_HELP("readGeckoProfilingStack", ReadGeckoProfilingStack, 0, 0,
"readGeckoProfilingStack()",
" Reads the jit stack using ProfilingFrameIterator."),
JS_FN_HELP("enableOsiPointRegisterChecks", EnableOsiPointRegisterChecks, 0, 0,

View File

@ -46,7 +46,7 @@ class MOZ_RAII AutoTraceSession
void operator=(const AutoTraceSession&) = delete;
JS::HeapState prevState;
AutoSPSEntry pseudoFrame;
AutoGeckoProfilerEntry pseudoFrame;
};
class MOZ_RAII AutoPrepareForTracing

View File

@ -361,8 +361,8 @@ js::gc::GCRuntime::traceRuntimeCommon(JSTracer* trc, TraceOrMarkRuntime traceOrM
for (CompartmentsIter c(rt, SkipAtoms); !c.done(); c.next())
c->traceRoots(trc, traceOrMark);
// Trace SPS.
rt->spsProfiler.trace(trc);
// Trace the Gecko Profiler.
rt->geckoProfiler.trace(trc);
// Trace helper thread roots.
HelperThreadState().trace(trc);

View File

@ -1,7 +1,7 @@
if (!this.hasOwnProperty("TypedObject"))
quit();
enableSPSProfiling();
enableGeckoProfiling();
var T = TypedObject;
function check(results, ctor) {
for (var i = 0; i < results.length; i++)

View File

@ -2,5 +2,5 @@ load(libdir + "asm.js");
var f = asmLink(asmCompile(USE_ASM + "function a234567() { return 42 } return a234567"));
assertEq(f(), 42);
enableSPSProfiling();
enableGeckoProfiling();
assertEq(f(), 42);

View File

@ -1,4 +1,4 @@
enableSPSProfiling();
enableGeckoProfiling();
for (var j = 0; j < 1000; ++j) {
(function(stdlib) {
"use asm";

View File

@ -4,7 +4,7 @@ load(libdir + "asm.js");
if (!getBuildConfiguration()["arm-simulator"])
quit();
enableSPSProfiling();
enableGeckoProfiling();
enableSingleStepProfiling();
var m = asmCompile(USE_ASM + 'function f() {} return f');
asmLink(m)();

View File

@ -1,4 +1,4 @@
enableSPSProfiling();
enableGeckoProfiling();
function mod() {
"use asm";

View File

@ -38,9 +38,9 @@ for (let threshold of [0, 50, 100, 5000, -1]) {
`)(this, null, buf)(0), 52);
}
enableSPSProfiling();
enableGeckoProfiling();
asmLink(asmCompile(USE_ASM + 'function f() {} function g() { f() } function h() { g() } return h'))();
disableSPSProfiling();
disableGeckoProfiling();
assertEq(asmCompile(fatFunc)()(), 142);
}

View File

@ -59,11 +59,11 @@ function assertStackContainsSeq(got, expect)
var stacks;
var ffi = function(enable) {
if (enable == +1)
enableSPSProfiling();
enableGeckoProfiling();
enableSingleStepProfiling();
stacks = disableSingleStepProfiling();
if (enable == -1)
disableSPSProfiling();
disableGeckoProfiling();
}
var f = asmLink(asmCompile('global','ffis',USE_ASM + "var ffi=ffis.ffi; function g(i) { i=i|0; ffi(i|0) } function f(i) { i=i|0; g(i|0) } return f"), null, {ffi});
f(0);
@ -78,7 +78,7 @@ f(0);
assertStackContainsSeq(stacks, "");
// Enable profiling for the rest of the tests.
enableSPSProfiling();
enableGeckoProfiling();
var f = asmLink(asmCompile(USE_ASM + "function f() { return 42 } return f"));
enableSingleStepProfiling();

View File

@ -2,7 +2,7 @@
load(libdir + "asm.js");
enableSPSProfiling();
enableGeckoProfiling();
var f = asmLink(asmCompile('glob', 'ffis', 'buf', USE_ASM + "function f() { var i=0; while (1) { i=(i+1)|0 } } return f"));
timeout(1);

View File

@ -2,7 +2,7 @@
load(libdir + "asm.js");
enableSPSProfiling();
enableGeckoProfiling();
var f = asmLink(asmCompile('glob', 'ffis', 'buf', USE_ASM + "function g() { var i=0; while (1) { i=(i+1)|0 } } function f() { g() } return f"));
timeout(1);

View File

@ -1,5 +1,5 @@
// |jit-test| error: InternalError
enableSPSProfiling();
enableGeckoProfiling();
var g = newGlobal();
g.parent = this;
g.eval("new Debugger(parent).onExceptionUnwind = function () { hits++; };");

View File

@ -9,7 +9,7 @@ if (!wasmIsSupported())
if (!getBuildConfiguration()["arm-simulator"])
throw "TestComplete";
enableSPSProfiling();
enableGeckoProfiling();
enableSingleStepProfiling();
var g = newGlobal();
@ -40,5 +40,5 @@ try {
assertEq(e, "test");
}
disableSPSProfiling();
disableGeckoProfiling();
throw "TestComplete";

View File

@ -1,7 +1,7 @@
if (!('oomTest' in this) || helperThreadCount() === 0)
quit();
enableSPSProfiling();
enableGeckoProfiling();
var s = newGlobal();
s.offThreadCompileScript('oomTest(() => {});');
s.runOffThreadScript();

View File

@ -1,7 +1,7 @@
if (!('oomTest' in this))
quit();
enableSPSProfilingWithSlowAssertions();
enableGeckoProfilingWithSlowAssertions();
try {
(function() {
while (n--) {

View File

@ -1,7 +1,7 @@
if (!('oomTest' in this))
quit();
enableSPSProfiling();
enableGeckoProfiling();
oomTest(() => {
try {
for (var quit of oomTest.gcparam("//").ArrayBuffer(1)) {}

View File

@ -1,10 +1,10 @@
var lfLogBuffer = `
gczeal(14);
enableSPSProfiling();
enableGeckoProfiling();
gczeal(15,3);
var s = "";
for (let i = 0; i != 30; i+=2) {}
readSPSProfilingStack(s, "c0d1c0d1c0d1c0d1c0d1c0d1c0d1c0");
readGeckoProfilingStack(s, "c0d1c0d1c0d1c0d1c0d1c0d1c0d1c0");
`;
loadFile(lfLogBuffer);
function loadFile(lfVarx) {

View File

@ -3,6 +3,6 @@ function f() {
gc()
})()
}
enableSPSProfiling()
enableGeckoProfiling()
f()
f()

View File

@ -3,5 +3,5 @@ function f(x) {
eval(x);
} catch (e) {}
};
f("enableSPSProfilingWithSlowAssertions();");
f("enableGeckoProfilingWithSlowAssertions();");
f("enableTrackAllocations(); throw Error();");

View File

@ -1,5 +1,5 @@
setJitCompilerOption('ion.forceinlineCaches', 1);
enableSPSProfiling();
enableGeckoProfiling();
(function() {
-[];
})();

View File

@ -1,2 +1,2 @@
enableSPSProfiling();
enableGeckoProfiling();
Object.getOwnPropertyNames(this);

View File

@ -1,4 +1,4 @@
enableSPSProfiling();
enableGeckoProfiling();
function foo(obj,x,y,z) {
if (!y)
assertEq(0, 1);

View File

@ -2,7 +2,7 @@
var lfcode = new Array();
lfcode.push("3");
lfcode.push("enableSPSProfiling();foo();");
lfcode.push("enableGeckoProfiling();foo();");
while (true) {
var file = lfcode.shift(); if (file == undefined) { break; }
loadFile(file)

View File

@ -3,7 +3,7 @@ if (!('oomTest' in this))
// Adapted from randomly chosen test: js/src/jit-test/tests/profiler/bug1231925.js
"use strict";
enableSPSProfiling();
enableGeckoProfiling();
oomTest(function() {
eval("(function() {})()");
});

View File

@ -1,6 +1,6 @@
for (var idx = 0; idx < 20; ++idx) {
newFunc("enableSPSProfilingWithSlowAssertions(); disableSPSProfiling();");
newFunc("enableGeckoProfilingWithSlowAssertions(); disableGeckoProfiling();");
}
newFunc("enableSPSProfiling();");
newFunc("enableGeckoProfiling();");
function newFunc(x) { new Function(x)(); };

View File

@ -1,5 +1,5 @@
// |jit-test| allow-oom
enableSPSProfiling();
enableGeckoProfiling();
loadFile('\
for (var i = 0; i < 2; i++) {\
obj = { m: function () {} };\

View File

@ -5,7 +5,7 @@ function f() {
var g = newGlobal();
g.parent = this;
g.eval("new Debugger(parent).onExceptionUnwind = function () {};");
enableSPSProfiling();
enableGeckoProfiling();
try {
enableSingleStepProfiling();
} catch (e) {

View File

@ -15,7 +15,7 @@ TestCase();
var g = newGlobal();
g.parent = this;
g.eval("new Debugger(parent).onExceptionUnwind = function () {};");
enableSPSProfiling();
enableGeckoProfiling();
if (getBuildConfiguration()["arm-simulator"])
enableSingleStepProfiling(1);
loadFile("jsTestDriverEnd();");

View File

@ -2,7 +2,7 @@
if (!('oomTest' in this))
quit();
enableSPSProfiling();
enableGeckoProfiling();
var lfGlobal = newGlobal();
for (lfLocal in this) {
lfGlobal[lfLocal] = this[lfLocal];

View File

@ -1,7 +1,7 @@
if (!('oomTest' in this))
quit();
enableSPSProfiling();
enableGeckoProfiling();
oomTest(function() {
eval("(function() {})()")
});

View File

@ -1,7 +1,7 @@
g = newGlobal();
g.parent = this;
g.eval("new Debugger(parent).onExceptionUnwind = function () {}");
enableSPSProfiling();
enableGeckoProfiling();
try {
enableSingleStepProfiling();
} catch(e) {

View File

@ -1,7 +1,7 @@
if (!('oomTest' in this))
quit();
enableSPSProfiling();
enableGeckoProfiling();
oomTest(() => {
try {
for (quit of ArrayBuffer);

View File

@ -1,7 +1,7 @@
g = newGlobal()
g.parent = this
g.eval("new Debugger(parent).onExceptionUnwind = function () {}")
enableSPSProfiling()
enableGeckoProfiling()
try {
// Only the ARM simulator supports single step profiling.

View File

@ -1,2 +1,2 @@
for(var i = 0; i < 100; enableSPSProfiling(), i++) {}
for(var i = 0; i < 100; enableGeckoProfiling(), i++) {}

View File

@ -3,7 +3,7 @@
var g = newGlobal();
g.parent = this;
g.eval("new Debugger(parent).onExceptionUnwind = function () { };");
enableSPSProfiling();
enableGeckoProfiling();
try {
// Only the ARM simulator supports single step profiling.

View File

@ -1,4 +1,4 @@
enableSPSProfiling();
enableGeckoProfiling();
try {
// Only the ARM simulator supports single step profiling.
enableSingleStepProfiling();

View File

@ -1,13 +1,13 @@
setJitCompilerOption("baseline.warmup.trigger", 10);
setJitCompilerOption("ion.warmup.trigger", 20);
enableSPSProfilingWithSlowAssertions();
enableGeckoProfilingWithSlowAssertions();
(function() {
var n = 50;
while (n--) {
disableSPSProfiling();
disableGeckoProfiling();
if (!n)
return;
enableSPSProfilingWithSlowAssertions();
enableGeckoProfilingWithSlowAssertions();
}
})();

View File

@ -1,9 +1,9 @@
setJitCompilerOption("baseline.warmup.trigger", 10);
setJitCompilerOption("ion.warmup.trigger", 20);
enableSPSProfilingWithSlowAssertions();
enableGeckoProfilingWithSlowAssertions();
(function() {
disableSPSProfiling();
disableGeckoProfiling();
var n = 50;
while (n--);
})();

View File

@ -4,9 +4,9 @@ setJitCompilerOption("ion.warmup.trigger", 20);
(function() {
var n = 50;
while (n--) {
enableSPSProfilingWithSlowAssertions();
enableGeckoProfilingWithSlowAssertions();
if (!n)
return;
disableSPSProfiling();
disableGeckoProfiling();
}
})();

View File

@ -2,7 +2,7 @@ setJitCompilerOption("baseline.warmup.trigger", 10);
setJitCompilerOption("ion.warmup.trigger", 20);
(function() {
enableSPSProfilingWithSlowAssertions();
enableGeckoProfilingWithSlowAssertions();
var n = 50;
while (n--);
})();

View File

@ -1,7 +1,7 @@
setJitCompilerOption("baseline.warmup.trigger", 10);
setJitCompilerOption("ion.warmup.trigger", 20);
enableSPSProfilingWithSlowAssertions();
enableGeckoProfilingWithSlowAssertions();
(function() {
var n = 50;
while (n--);

View File

@ -1,19 +1,19 @@
// Ensure readSPSProfilingStack() doesn't crash with Ion
// Ensure readGeckoProfilingStack() doesn't crash with Ion
// getter/setter ICs on the stack.
function getObjects() {
var objs = [];
objs.push({x: 0, get prop() {
readSPSProfilingStack();
readGeckoProfilingStack();
return ++this.x;
}, set prop(v) {
readSPSProfilingStack();
readGeckoProfilingStack();
this.x = v + 2;
}});
objs.push({x: 0, y: 0, get prop() {
readSPSProfilingStack();
readGeckoProfilingStack();
return this.y;
}, set prop(v) {
readSPSProfilingStack();
readGeckoProfilingStack();
this.y = v;
}});
return objs;
@ -28,5 +28,5 @@ function f() {
}
assertEq(res, 4901);
}
enableSPSProfiling();
enableGeckoProfiling();
f();

View File

@ -3,9 +3,9 @@ setJitCompilerOption("baseline.warmup.trigger", 10);
function main() {
for (var i = 0; i < 50; i++)
eval("for (var j = 0; j < 50; j++) readSPSProfilingStack();");
eval("for (var j = 0; j < 50; j++) readGeckoProfilingStack();");
}
gczeal(2, 10000);
enableSPSProfilingWithSlowAssertions();
enableGeckoProfilingWithSlowAssertions();
main();

View File

@ -2,7 +2,7 @@
function TestCase(n, d, e, a) {
return TestCase.prototype.dump = function () {};
}
enableSPSProfiling();
enableGeckoProfiling();
new TestCase(typeof Number(new Number()));
new TestCase(typeof Number(new Number(Number.NaN)));
test();

View File

@ -420,7 +420,7 @@ assertErrorMessage(() => i2v(4), Error, signatureMismatch);
assertErrorMessage(() => i2v(5), Error, signatureMismatch);
{
enableSPSProfiling();
enableGeckoProfiling();
var stack;
wasmFullPass(
@ -437,7 +437,7 @@ assertErrorMessage(() => i2v(5), Error, signatureMismatch);
{"":{f:() => { stack = new Error().stack }}}
);
disableSPSProfiling();
disableGeckoProfiling();
var inner = stack.indexOf("wasm-function[1]");
var outer = stack.indexOf("wasm-function[3]");

View File

@ -64,14 +64,14 @@ function assertEqStacks(got, expect)
function test(code, importObj, expect)
{
enableSPSProfiling();
enableGeckoProfiling();
var f = wasmEvalText(code, importObj).exports[""];
enableSingleStepProfiling();
f();
assertEqStacks(disableSingleStepProfiling(), expect);
disableSPSProfiling();
disableGeckoProfiling();
}
test(
@ -113,12 +113,12 @@ test(
function testError(code, error, expect)
{
enableSPSProfiling();
enableGeckoProfiling();
var f = wasmEvalText(code).exports[""];
enableSingleStepProfiling();
assertThrowsInstanceOf(f, error);
assertEqStacks(disableSingleStepProfiling(), expect);
disableSPSProfiling();
disableGeckoProfiling();
}
testError(
@ -158,32 +158,32 @@ WebAssembly.RuntimeError,
assertEq(e.tbl.get(0)(), 42);
assertEq(e.tbl.get(1)(), 13);
enableSPSProfiling();
enableGeckoProfiling();
enableSingleStepProfiling();
assertEq(e.tbl.get(0)(), 42);
assertEqStacks(disableSingleStepProfiling(), ["", ">", "0,>", ">", ""]);
disableSPSProfiling();
disableGeckoProfiling();
assertEq(e.foo(), 42);
assertEq(e.tbl.get(0)(), 42);
assertEq(e.tbl.get(1)(), 13);
enableSPSProfiling();
enableGeckoProfiling();
enableSingleStepProfiling();
assertEq(e.tbl.get(1)(), 13);
assertEqStacks(disableSingleStepProfiling(), ["", ">", "1,>", ">", ""]);
disableSPSProfiling();
disableGeckoProfiling();
assertEq(e.tbl.get(0)(), 42);
assertEq(e.tbl.get(1)(), 13);
assertEq(e.foo(), 42);
enableSPSProfiling();
enableGeckoProfiling();
enableSingleStepProfiling();
assertEq(e.foo(), 42);
assertEq(e.tbl.get(1)(), 13);
assertEqStacks(disableSingleStepProfiling(), ["", ">", "0,>", ">", "", ">", "1,>", ">", ""]);
disableSPSProfiling();
disableGeckoProfiling();
var e2 = wasmEvalText(`
(module
@ -195,23 +195,23 @@ WebAssembly.RuntimeError,
(export "baz" $baz)
)`, {a:{b:e.tbl}}).exports;
enableSPSProfiling();
enableGeckoProfiling();
enableSingleStepProfiling();
assertEq(e2.baz(0), 42);
assertEqStacks(disableSingleStepProfiling(), ["", ">", "1,>", "0,1,>", "1,>", ">", ""]);
disableSPSProfiling();
disableGeckoProfiling();
enableSPSProfiling();
enableGeckoProfiling();
enableSingleStepProfiling();
assertEq(e2.baz(1), 13);
assertEqStacks(disableSingleStepProfiling(), ["", ">", "1,>", "1,1,>", "1,>", ">", ""]);
disableSPSProfiling();
disableGeckoProfiling();
enableSPSProfiling();
enableGeckoProfiling();
enableSingleStepProfiling();
assertEq(e2.baz(2), 99);
assertEqStacks(disableSingleStepProfiling(), ["", ">", "1,>", "0,1,>", "1,>", ">", ""]);
disableSPSProfiling();
disableGeckoProfiling();
})();
(function() {
@ -228,20 +228,20 @@ WebAssembly.RuntimeError,
// Instantiate while not active:
var e1 = new Instance(m1).exports;
var e2 = new Instance(m2, {a:e1}).exports;
enableSPSProfiling();
enableGeckoProfiling();
enableSingleStepProfiling();
assertEq(e2.bar(), 42);
assertEqStacks(disableSingleStepProfiling(), ["", ">", "1,>", "0,1,>", "1,>", ">", ""]);
disableSPSProfiling();
disableGeckoProfiling();
assertEq(e2.bar(), 42);
// Instantiate while active:
enableSPSProfiling();
enableGeckoProfiling();
var e3 = new Instance(m1).exports;
var e4 = new Instance(m2, {a:e3}).exports;
enableSingleStepProfiling();
assertEq(e4.bar(), 42);
assertEqStacks(disableSingleStepProfiling(), ["", ">", "1,>", "0,1,>", "1,>", ">", ""]);
disableSPSProfiling();
disableGeckoProfiling();
assertEq(e4.bar(), 42);
})();

View File

@ -1,7 +1,7 @@
if (typeof enableSPSProfiling === 'undefined' || !isAsmJSCompilationAvailable())
if (typeof enableGeckoProfiling === 'undefined' || !isAsmJSCompilationAvailable())
quit();
enableSPSProfiling();
enableGeckoProfiling();
var code = evaluate("(function() { 'use asm'; function g() { return 43 } return g })", {
fileName: null
});

View File

@ -62,7 +62,7 @@ jit::Bailout(BailoutStack* sp, BaselineBailoutInfo** bailoutInfo)
if (retval != BAILOUT_RETURN_OK) {
JSScript* script = iter.script();
probes::ExitScript(cx, script, script->functionNonDelazifying(),
/* popSPSFrame = */ false);
/* popProfilerFrame = */ false);
}
// This condition was wrong when we entered this bailout function, but it
@ -136,18 +136,18 @@ jit::InvalidationBailout(InvalidationBailoutStack* sp, size_t* frameSizeOut,
if (retval != BAILOUT_RETURN_OK) {
// If the bailout failed, then bailout trampoline will pop the
// current frame and jump straight to exception handling code when
// this function returns. Any SPS entry pushed for this frame will
// be silently forgotten.
// this function returns. Any Gecko Profiler entry pushed for this
// frame will be silently forgotten.
//
// We call ExitScript here to ensure that if the ionScript had SPS
// instrumentation, then the SPS entry for it is popped.
// We call ExitScript here to ensure that if the ionScript had Gecko
// Profiler instrumentation, then the entry for it is popped.
//
// However, if the bailout was during argument check, then a
// pseudostack frame would not have been pushed in the first
// place, so don't pop anything in that case.
JSScript* script = iter.script();
probes::ExitScript(cx, script, script->functionNonDelazifying(),
/* popSPSFrame = */ false);
/* popProfilerFrame = */ false);
#ifdef JS_JITSPEW
JitFrameLayout* frame = iter.jsFrame();

View File

@ -1179,7 +1179,7 @@ InitFromBailout(JSContext* cx, HandleScript caller, jsbytecode* callerPC,
JitSpew(JitSpew_BaselineBailouts, " Set resumeAddr=%p", opReturnAddr);
}
if (cx->runtime()->spsProfiler.enabled()) {
if (cx->runtime()->geckoProfiler.enabled()) {
// Register bailout with profiler.
const char* filename = script->filename();
if (filename == nullptr)
@ -1197,7 +1197,7 @@ InitFromBailout(JSContext* cx, HandleScript caller, jsbytecode* callerPC,
PCToLineNumber(script, pc),
filename,
script->lineno());
cx->runtime()->spsProfiler.markEvent(buf);
cx->runtime()->geckoProfiler.markEvent(buf);
js_free(buf);
}

View File

@ -4418,7 +4418,7 @@ BaselineCompiler::emit_JSOP_RESUME()
{
Register scratchReg = scratch2;
Label skip;
AbsoluteAddress addressOfEnabled(cx->runtime()->spsProfiler.addressOfEnabled());
AbsoluteAddress addressOfEnabled(cx->runtime()->geckoProfiler.addressOfEnabled());
masm.branch32(Assembler::Equal, addressOfEnabled, Imm32(0), &skip);
masm.loadPtr(AbsoluteAddress(cx->runtime()->addressOfProfilingActivation()), scratchReg);
masm.storePtr(masm.getStackPointer(),

View File

@ -443,7 +443,7 @@ PatchBaselineFramesForDebugMode(JSContext* cx, const Debugger::ExecutionObservab
MOZ_ASSERT(iter.baselineFrame()->isHandlingException());
MOZ_ASSERT(iter.baselineFrame()->overridePc() == pc);
uint8_t* retAddr;
if (cx->runtime()->spsProfiler.enabled())
if (cx->runtime()->geckoProfiler.enabled())
retAddr = bl->nativeCodeForPC(script, pc);
else
retAddr = nullptr;

View File

@ -152,7 +152,7 @@ DoWarmUpCounterFallbackOSR(JSContext* cx, BaselineFrame* frame, ICWarmUpCounter_
}
IonScript* ion = script->ionScript();
MOZ_ASSERT(cx->runtime()->spsProfiler.enabled() == ion->hasProfilingInstrumentation());
MOZ_ASSERT(cx->runtime()->geckoProfiler.enabled() == ion->hasProfilingInstrumentation());
MOZ_ASSERT(ion->osrPc() == pc);
JitSpew(JitSpew_BaselineOSR, " OSR possible!");
@ -234,7 +234,7 @@ ICWarmUpCounter_Fallback::Compiler::generateStubCode(MacroAssembler& masm)
// the frame currently being OSR-ed
{
Label checkOk;
AbsoluteAddress addressOfEnabled(cx->runtime()->spsProfiler.addressOfEnabled());
AbsoluteAddress addressOfEnabled(cx->runtime()->geckoProfiler.addressOfEnabled());
masm.branch32(Assembler::Equal, addressOfEnabled, Imm32(0), &checkOk);
masm.loadPtr(AbsoluteAddress((void*)&cx->runtime()->jitActivation), scratchReg);
masm.loadPtr(Address(scratchReg, JitActivation::offsetOfLastProfilingFrame()), scratchReg);

View File

@ -9802,7 +9802,8 @@ CodeGenerator::link(JSContext* cx, CompilerConstraintList* constraints)
ionScript->setMethod(code);
ionScript->setSkipArgCheckEntryOffset(getSkipArgCheckEntryOffset());
// If SPS is enabled, mark IonScript as having been instrumented with SPS
// If the Gecko Profiler is enabled, mark IonScript as having been
// instrumented accordingly.
if (isProfilerInstrumentationEnabled())
ionScript->setHasProfilingInstrumentation();

View File

@ -100,10 +100,10 @@ CompileRuntime::jitRuntime()
return runtime()->jitRuntime();
}
SPSProfiler&
CompileRuntime::spsProfiler()
GeckoProfiler&
CompileRuntime::geckoProfiler()
{
return runtime()->spsProfiler;
return runtime()->geckoProfiler;
}
bool
@ -296,7 +296,7 @@ CompileCompartment::setSingletonsAsValues()
JitCompileOptions::JitCompileOptions()
: cloneSingletons_(false),
spsSlowAssertionsEnabled_(false),
profilerSlowAssertionsEnabled_(false),
offThreadCompilationAvailable_(false)
{
}
@ -304,7 +304,7 @@ JitCompileOptions::JitCompileOptions()
JitCompileOptions::JitCompileOptions(JSContext* cx)
{
cloneSingletons_ = cx->compartment()->creationOptions().cloneSingletons();
spsSlowAssertionsEnabled_ = cx->runtime()->spsProfiler.enabled() &&
cx->runtime()->spsProfiler.slowAssertionsEnabled();
profilerSlowAssertionsEnabled_ = cx->runtime()->geckoProfiler.enabled() &&
cx->runtime()->geckoProfiler.slowAssertionsEnabled();
offThreadCompilationAvailable_ = OffThreadCompilationAvailable(cx);
}

View File

@ -63,8 +63,8 @@ class CompileRuntime
const JitRuntime* jitRuntime();
// Compilation does not occur off thread when the SPS profiler is enabled.
SPSProfiler& spsProfiler();
// Compilation does not occur off thread when the Gecko Profiler is enabled.
GeckoProfiler& geckoProfiler();
bool jitSupportsFloatingPoint();
bool hadOutOfMemory();
@ -138,8 +138,8 @@ class JitCompileOptions
return cloneSingletons_;
}
bool spsSlowAssertionsEnabled() const {
return spsSlowAssertionsEnabled_;
bool profilerSlowAssertionsEnabled() const {
return profilerSlowAssertionsEnabled_;
}
bool offThreadCompilationAvailable() const {
@ -148,7 +148,7 @@ class JitCompileOptions
private:
bool cloneSingletons_;
bool spsSlowAssertionsEnabled_;
bool profilerSlowAssertionsEnabled_;
bool offThreadCompilationAvailable_;
};

View File

@ -162,7 +162,8 @@ RegisterExecutableMemory(void* p, size_t bytes, size_t pageSize)
return false;
// XXX NB: The profiler believes this function is only called from the main
// thread. If that ever becomes untrue, SPS must be updated immediately.
// thread. If that ever becomes untrue, the profiler must be updated
// immediately.
AcquireStackWalkWorkaroundLock();
bool success = RtlAddFunctionTable(&r->runtimeFunction, 1, reinterpret_cast<DWORD64>(p));
@ -178,7 +179,8 @@ UnregisterExecutableMemory(void* p, size_t bytes, size_t pageSize)
ExceptionHandlerRecord* r = reinterpret_cast<ExceptionHandlerRecord*>(p);
// XXX NB: The profiler believes this function is only called from the main
// thread. If that ever becomes untrue, SPS must be updated immediately.
// thread. If that ever becomes untrue, the profiler must be updated
// immediately.
AcquireStackWalkWorkaroundLock();
RtlDeleteFunctionTable(&r->runtimeFunction);

View File

@ -619,7 +619,7 @@ JitRuntime::Trace(JSTracer* trc, AutoLockForExclusiveAccess& lock)
/* static */ void
JitRuntime::TraceJitcodeGlobalTable(JSTracer* trc)
{
if (trc->runtime()->spsProfiler.enabled() &&
if (trc->runtime()->geckoProfiler.enabled() &&
trc->runtime()->hasJitRuntime() &&
trc->runtime()->jitRuntime()->hasJitcodeGlobalTable())
{
@ -3321,7 +3321,7 @@ jit::Invalidate(JSContext* cx, JSScript* script, bool resetUses, bool cancelOffT
{
MOZ_ASSERT(script->hasIonScript());
if (cx->runtime()->spsProfiler.enabled()) {
if (cx->runtime()->geckoProfiler.enabled()) {
// Register invalidation with profiler.
// Format of event payload string:
// "<filename>:<lineno>"
@ -3336,7 +3336,7 @@ jit::Invalidate(JSContext* cx, JSScript* script, bool resetUses, bool cancelOffT
// Ignore the event on allocation failure.
if (buf) {
cx->runtime()->spsProfiler.markEvent(buf);
cx->runtime()->geckoProfiler.markEvent(buf);
JS_smprintf_free(buf);
}
}

View File

@ -380,7 +380,7 @@ JitCode*
IonCacheIRCompiler::compile()
{
masm.setFramePushed(ionScript_->frameSize());
if (cx_->spsProfiler.enabled())
if (cx_->geckoProfiler.enabled())
masm.enableProfilingInstrumentation();
do {

View File

@ -9,18 +9,18 @@
namespace js {
class SPSProfiler;
class GeckoProfiler;
namespace jit {
class MacroAssembler;
typedef SPSInstrumentation<MacroAssembler, Register> BaseInstrumentation;
typedef GeckoProfilerInstrumentation<MacroAssembler, Register> BaseInstrumentation;
class IonInstrumentation : public BaseInstrumentation
{
public:
IonInstrumentation(SPSProfiler* profiler, jsbytecode** pc)
IonInstrumentation(GeckoProfiler* profiler, jsbytecode** pc)
: BaseInstrumentation(profiler)
{
MOZ_ASSERT(pc != nullptr);

View File

@ -373,7 +373,7 @@ class JitRuntime
}
bool isProfilerInstrumentationEnabled(JSRuntime* rt) {
return rt->spsProfiler.enabled();
return rt->geckoProfiler.enabled();
}
bool isOptimizationTrackingEnabled(JSRuntime* rt) {

View File

@ -30,8 +30,8 @@
#include "jit/VMFunctions.h"
#include "vm/ArgumentsObject.h"
#include "vm/Debugger.h"
#include "vm/GeckoProfiler.h"
#include "vm/Interpreter.h"
#include "vm/SPSProfiler.h"
#include "vm/TraceLogging.h"
#include "vm/TypeInference.h"
@ -866,7 +866,7 @@ HandleException(ResumeFromException* rfe)
JSScript* script = frames.script();
probes::ExitScript(cx, script, script->functionNonDelazifying(),
/* popSPSFrame = */ false);
/* popProfilerFrame = */ false);
if (!frames.more()) {
TraceLogStopEvent(logger, TraceLogger_IonMonkey);
TraceLogStopEvent(logger, TraceLogger_Scripts);
@ -916,7 +916,7 @@ HandleException(ResumeFromException* rfe)
// Unwind profiler pseudo-stack
JSScript* script = iter.script();
probes::ExitScript(cx, script, script->functionNonDelazifying(),
/* popSPSFrame = */ false);
/* popProfilerFrame = */ false);
if (rfe->kind == ResumeFromException::RESUME_FORCED_RETURN)
return;

View File

@ -439,8 +439,8 @@ jit::CheckLogging()
" logs C1 and JSON visualization logging\n"
" logs-sync Same as logs, but flushes between each pass (sync. compiled functions only).\n"
" profiling Profiling-related information\n"
" trackopts Optimization tracking information gathered by SPS. "
"(Note: call enableSPSProfiling() in your script to enable it).\n"
" trackopts Optimization tracking information gathered by the Gecko profiler. "
"(Note: call enableGeckoProfiling() in your script to enable it).\n"
" trackopts-ext Encoding information about optimization tracking"
" dump-mir-expr Dump the MIR expressions\n"
" cfg Control flow graph generation\n"

View File

@ -21,7 +21,7 @@
#include "jit/BaselineJIT.h"
#include "jit/JitSpewer.h"
#include "js/Vector.h"
#include "vm/SPSProfiler.h"
#include "vm/GeckoProfiler.h"
#include "jsscriptinlines.h"
@ -733,7 +733,7 @@ JitcodeGlobalTable::trace(JSTracer* trc)
// Trace all entries unconditionally. This is done during minor collection
// to tenure and update object pointers.
MOZ_ASSERT(trc->runtime()->spsProfiler.enabled());
MOZ_ASSERT(trc->runtime()->geckoProfiler.enabled());
AutoSuppressProfilerSampling suppressSampling(trc->runtime());
for (Range r(*this); !r.empty(); r.popFront())
@ -784,7 +784,7 @@ JitcodeGlobalTable::markIteratively(GCMarker* marker)
uint32_t lapCount = marker->runtime()->profilerSampleBufferLapCount();
// If the profiler is off, all entries are considered to be expired.
if (!marker->runtime()->spsProfiler.enabled())
if (!marker->runtime()->geckoProfiler.enabled())
gen = UINT32_MAX;
bool markedAny = false;

View File

@ -91,7 +91,7 @@ class MIRGenerator
MOZ_MUST_USE bool instrumentedProfiling() {
if (!instrumentedProfilingIsCached_) {
instrumentedProfiling_ = GetJitContext()->runtime->spsProfiler().enabled();
instrumentedProfiling_ = GetJitContext()->runtime->geckoProfiler().enabled();
instrumentedProfilingIsCached_ = true;
}
return instrumentedProfiling_;

View File

@ -2366,7 +2366,7 @@ MacroAssembler::MacroAssembler(JSContext* cx, IonScript* ion,
#endif
if (ion) {
setFramePushed(ion->frameSize());
if (pc && cx->runtime()->spsProfiler.enabled())
if (pc && cx->runtime()->geckoProfiler.enabled())
enableProfilingInstrumentation();
}
}

View File

@ -1052,7 +1052,7 @@ class ICStubCompiler
void enterStubFrame(MacroAssembler& masm, Register scratch);
void leaveStubFrame(MacroAssembler& masm, bool calledIntoIon = false);
// Some stubs need to emit SPS profiler updates. This emits the guarding
// Some stubs need to emit Gecko Profiler updates. This emits the guarding
// jitcode for those stubs. If profiling is not enabled, jumps to the
// given label.
void guardProfilingEnabled(MacroAssembler& masm, Register scratch, Label* skip);

View File

@ -3699,7 +3699,7 @@ MacroAssemblerARMCompat::handleFailureWithHandlerTail(void* handler)
{
Label skipProfilingInstrumentation;
// Test if profiler enabled.
AbsoluteAddress addressOfEnabled(GetJitContext()->runtime->spsProfiler().addressOfEnabled());
AbsoluteAddress addressOfEnabled(GetJitContext()->runtime->geckoProfiler().addressOfEnabled());
asMasm().branch32(Assembler::Equal, addressOfEnabled, Imm32(0),
&skipProfilingInstrumentation);
profilerExitFrame();

View File

@ -33,7 +33,7 @@ static const FloatRegisterSet NonVolatileFloatRegs =
(1ULL << FloatRegisters::d15));
static void
GenerateReturn(MacroAssembler& masm, int returnCode, SPSProfiler* prof)
GenerateReturn(MacroAssembler& masm, int returnCode, GeckoProfiler* prof)
{
// Restore non-volatile floating point registers.
masm.transferMultipleByRuns(NonVolatileFloatRegs, IsLoad, StackPointer, IA);
@ -314,7 +314,7 @@ JitRuntime::generateEnterJIT(JSContext* cx, EnterJitType type)
{
Label skipProfilingInstrumentation;
Register realFramePtr = numStackValues;
AbsoluteAddress addressOfEnabled(cx->runtime()->spsProfiler.addressOfEnabled());
AbsoluteAddress addressOfEnabled(cx->runtime()->geckoProfiler.addressOfEnabled());
masm.branch32(Assembler::Equal, addressOfEnabled, Imm32(0),
&skipProfilingInstrumentation);
masm.as_add(realFramePtr, framePtr, Imm8(sizeof(void*)));
@ -376,7 +376,7 @@ JitRuntime::generateEnterJIT(JSContext* cx, EnterJitType type)
// JSReturnReg_Data, EDtrAddr(r5, EDtrOffImm(0)));
// Restore non-volatile registers and return.
GenerateReturn(masm, true, &cx->runtime()->spsProfiler);
GenerateReturn(masm, true, &cx->runtime()->geckoProfiler);
Linker linker(masm);
AutoFlushICache afc("EnterJIT");
@ -1042,7 +1042,7 @@ JitRuntime::generateDebugTrapHandler(JSContext* cx)
// is set to the correct caller frame.
{
Label skipProfilingInstrumentation;
AbsoluteAddress addressOfEnabled(cx->runtime()->spsProfiler.addressOfEnabled());
AbsoluteAddress addressOfEnabled(cx->runtime()->geckoProfiler.addressOfEnabled());
masm.branch32(Assembler::Equal, addressOfEnabled, Imm32(0), &skipProfilingInstrumentation);
masm.profilerExitFrame();
masm.bind(&skipProfilingInstrumentation);

View File

@ -118,7 +118,7 @@ JitRuntime::generateEnterJIT(JSContext* cx, EnterJitType type)
// sp -= 8
// Since we're using PostIndex Str below, this is necessary to avoid overwriting
// the SPS mark pushed above.
// the Gecko Profiler mark pushed above.
masm.subFromStackPtr(Imm32(8));
// sp -= 8 * argc

View File

@ -1912,7 +1912,7 @@ MacroAssemblerMIPSCompat::handleFailureWithHandlerTail(void* handler)
{
Label skipProfilingInstrumentation;
// Test if profiler enabled.
AbsoluteAddress addressOfEnabled(GetJitContext()->runtime->spsProfiler().addressOfEnabled());
AbsoluteAddress addressOfEnabled(GetJitContext()->runtime->geckoProfiler().addressOfEnabled());
asMasm().branch32(Assembler::Equal, addressOfEnabled, Imm32(0),
&skipProfilingInstrumentation);
profilerExitFrame();

View File

@ -283,7 +283,7 @@ JitRuntime::generateEnterJIT(JSContext* cx, EnterJitType type)
{
Label skipProfilingInstrumentation;
Register realFramePtr = numStackValues;
AbsoluteAddress addressOfEnabled(cx->runtime()->spsProfiler.addressOfEnabled());
AbsoluteAddress addressOfEnabled(cx->runtime()->geckoProfiler.addressOfEnabled());
masm.branch32(Assembler::Equal, addressOfEnabled, Imm32(0),
&skipProfilingInstrumentation);
masm.ma_addu(realFramePtr, framePtr, Imm32(sizeof(void*)));
@ -1020,7 +1020,7 @@ JitRuntime::generateDebugTrapHandler(JSContext* cx)
// is set to the correct caller frame.
{
Label skipProfilingInstrumentation;
AbsoluteAddress addressOfEnabled(cx->runtime()->spsProfiler.addressOfEnabled());
AbsoluteAddress addressOfEnabled(cx->runtime()->geckoProfiler.addressOfEnabled());
masm.branch32(Assembler::Equal, addressOfEnabled, Imm32(0), &skipProfilingInstrumentation);
masm.profilerExitFrame();
masm.bind(&skipProfilingInstrumentation);

View File

@ -2087,7 +2087,7 @@ MacroAssemblerMIPS64Compat::handleFailureWithHandlerTail(void* handler)
{
Label skipProfilingInstrumentation;
// Test if profiler enabled.
AbsoluteAddress addressOfEnabled(GetJitContext()->runtime->spsProfiler().addressOfEnabled());
AbsoluteAddress addressOfEnabled(GetJitContext()->runtime->geckoProfiler().addressOfEnabled());
asMasm().branch32(Assembler::Equal, addressOfEnabled, Imm32(0),
&skipProfilingInstrumentation);
profilerExitFrame();

View File

@ -299,7 +299,7 @@ JitRuntime::generateEnterJIT(JSContext* cx, EnterJitType type)
{
Label skipProfilingInstrumentation;
Register realFramePtr = numStackValues;
AbsoluteAddress addressOfEnabled(cx->runtime()->spsProfiler.addressOfEnabled());
AbsoluteAddress addressOfEnabled(cx->runtime()->geckoProfiler.addressOfEnabled());
masm.branch32(Assembler::Equal, addressOfEnabled, Imm32(0),
&skipProfilingInstrumentation);
masm.ma_daddu(realFramePtr, framePtr, Imm32(sizeof(void*)));
@ -965,7 +965,7 @@ JitRuntime::generateDebugTrapHandler(JSContext* cx)
// is set to the correct caller frame.
{
Label skipProfilingInstrumentation;
AbsoluteAddress addressOfEnabled(cx->runtime()->spsProfiler.addressOfEnabled());
AbsoluteAddress addressOfEnabled(cx->runtime()->geckoProfiler.addressOfEnabled());
masm.branch32(Assembler::Equal, addressOfEnabled, Imm32(0), &skipProfilingInstrumentation);
masm.profilerExitFrame();
masm.bind(&skipProfilingInstrumentation);

View File

@ -33,7 +33,7 @@ BaselineCompilerShared::BaselineCompilerShared(JSContext* cx, TempAllocator& all
#ifdef DEBUG
inCall_(false),
#endif
spsPushToggleOffset_(),
profilerPushToggleOffset_(),
profilerEnterFrameToggleOffset_(),
profilerExitFrameToggleOffset_(),
traceLoggerToggleOffsets_(cx),

View File

@ -62,7 +62,7 @@ class BaselineCompilerShared
bool inCall_;
#endif
CodeOffset spsPushToggleOffset_;
CodeOffset profilerPushToggleOffset_;
CodeOffset profilerEnterFrameToggleOffset_;
CodeOffset profilerExitFrameToggleOffset_;

View File

@ -1290,8 +1290,8 @@ CodeGeneratorShared::verifyOsiPointRegs(LSafepoint* safepoint)
// forces them to have an osi point associated with them. The
// FunctionBoundary for inline function entry is added to the caller's
// graph with a PC from the caller's code, but during codegen it modifies
// SPS instrumentation to add the callee as the current top-most script.
// When codegen gets to the OSIPoint, and the callWithABI below is
// Gecko Profiler instrumentation to add the callee as the current top-most
// script. When codegen gets to the OSIPoint, and the callWithABI below is
// emitted, the codegen thinks that the current frame is the callee, but
// the PC it's using from the OSIPoint refers to the caller. This causes
// the profiler instrumentation of the callWithABI below to ASSERT, since

View File

@ -362,7 +362,7 @@ MacroAssemblerX64::handleFailureWithHandlerTail(void* handler)
// frame before returning.
{
Label skipProfilingInstrumentation;
AbsoluteAddress addressOfEnabled(GetJitContext()->runtime->spsProfiler().addressOfEnabled());
AbsoluteAddress addressOfEnabled(GetJitContext()->runtime->geckoProfiler().addressOfEnabled());
asMasm().branch32(Assembler::Equal, addressOfEnabled, Imm32(0), &skipProfilingInstrumentation);
profilerExitFrame();
bind(&skipProfilingInstrumentation);

View File

@ -257,7 +257,7 @@ JitRuntime::generateEnterJIT(JSContext* cx, EnterJitType type)
{
Label skipProfilingInstrumentation;
Register realFramePtr = numStackValues;
AbsoluteAddress addressOfEnabled(cx->runtime()->spsProfiler.addressOfEnabled());
AbsoluteAddress addressOfEnabled(cx->runtime()->geckoProfiler.addressOfEnabled());
masm.branch32(Assembler::Equal, addressOfEnabled, Imm32(0),
&skipProfilingInstrumentation);
masm.lea(Operand(framePtr, sizeof(void*)), realFramePtr);
@ -916,7 +916,7 @@ JitRuntime::generateDebugTrapHandler(JSContext* cx)
// is set to the correct caller frame.
{
Label skipProfilingInstrumentation;
AbsoluteAddress addressOfEnabled(cx->runtime()->spsProfiler.addressOfEnabled());
AbsoluteAddress addressOfEnabled(cx->runtime()->geckoProfiler.addressOfEnabled());
masm.branch32(Assembler::Equal, addressOfEnabled, Imm32(0), &skipProfilingInstrumentation);
masm.profilerExitFrame();
masm.bind(&skipProfilingInstrumentation);

View File

@ -268,7 +268,7 @@ MacroAssemblerX86::handleFailureWithHandlerTail(void* handler)
{
Label skipProfilingInstrumentation;
// Test if profiler enabled.
AbsoluteAddress addressOfEnabled(GetJitContext()->runtime->spsProfiler().addressOfEnabled());
AbsoluteAddress addressOfEnabled(GetJitContext()->runtime->geckoProfiler().addressOfEnabled());
asMasm().branch32(Assembler::Equal, addressOfEnabled, Imm32(0),
&skipProfilingInstrumentation);
profilerExitFrame();

View File

@ -250,7 +250,7 @@ JitRuntime::generateEnterJIT(JSContext* cx, EnterJitType type)
{
Label skipProfilingInstrumentation;
Register realFramePtr = numStackValues;
AbsoluteAddress addressOfEnabled(cx->runtime()->spsProfiler.addressOfEnabled());
AbsoluteAddress addressOfEnabled(cx->runtime()->geckoProfiler.addressOfEnabled());
masm.branch32(Assembler::Equal, addressOfEnabled, Imm32(0),
&skipProfilingInstrumentation);
masm.lea(Operand(framePtr, sizeof(void*)), realFramePtr);
@ -946,7 +946,7 @@ JitRuntime::generateDebugTrapHandler(JSContext* cx)
// is set to the correct caller frame.
{
Label skipProfilingInstrumentation;
AbsoluteAddress addressOfEnabled(cx->runtime()->spsProfiler.addressOfEnabled());
AbsoluteAddress addressOfEnabled(cx->runtime()->geckoProfiler.addressOfEnabled());
masm.branch32(Assembler::Equal, addressOfEnabled, Imm32(0), &skipProfilingInstrumentation);
masm.profilerExitFrame();
masm.bind(&skipProfilingInstrumentation);

View File

@ -20,8 +20,8 @@ reset(JSContext* cx)
{
psize = max_stack = 0;
memset(pstack, 0, sizeof(pstack));
cx->spsProfiler.stringsReset();
cx->spsProfiler.enableSlowAssertions(true);
cx->geckoProfiler.stringsReset();
cx->geckoProfiler.enableSlowAssertions(true);
js::EnableContextProfilingStack(cx, true);
}
@ -108,21 +108,21 @@ BEGIN_TEST(testProfileStrings_isCalledWithInterpreter)
&rval));
CHECK(psize == 0);
CHECK(max_stack >= 8);
CHECK(cx->runtime()->spsProfiler.stringsCount() == 8);
CHECK(cx->runtime()->geckoProfiler.stringsCount() == 8);
/* Make sure the stack resets and we added no new entries */
max_stack = 0;
CHECK(JS_CallFunctionName(cx, global, "check", JS::HandleValueArray::empty(),
&rval));
CHECK(psize == 0);
CHECK(max_stack >= 8);
CHECK(cx->runtime()->spsProfiler.stringsCount() == 8);
CHECK(cx->runtime()->geckoProfiler.stringsCount() == 8);
}
reset(cx);
{
JS::RootedValue rval(cx);
CHECK(JS_CallFunctionName(cx, global, "check2", JS::HandleValueArray::empty(),
&rval));
CHECK(cx->runtime()->spsProfiler.stringsCount() == 5);
CHECK(cx->runtime()->geckoProfiler.stringsCount() == 5);
CHECK(max_stack >= 6);
CHECK(psize == 0);
}
@ -168,12 +168,12 @@ BEGIN_TEST(testProfileStrings_isCalledWithJIT)
CHECK(max_stack >= 8);
/* Make sure the stack resets and we added no new entries */
uint32_t cnt = cx->runtime()->spsProfiler.stringsCount();
uint32_t cnt = cx->runtime()->geckoProfiler.stringsCount();
max_stack = 0;
CHECK(JS_CallFunctionName(cx, global, "check", JS::HandleValueArray::empty(),
&rval));
CHECK(psize == 0);
CHECK(cx->runtime()->spsProfiler.stringsCount() == cnt);
CHECK(cx->runtime()->geckoProfiler.stringsCount() == cnt);
CHECK(max_stack >= 8);
}
@ -210,7 +210,7 @@ BEGIN_TEST(testProfileStrings_isCalledWhenError)
&rval);
CHECK(!ok);
CHECK(psize == 0);
CHECK(cx->runtime()->spsProfiler.stringsCount() == 1);
CHECK(cx->runtime()->geckoProfiler.stringsCount() == 1);
JS_ClearPendingException(cx);
}
@ -234,7 +234,7 @@ BEGIN_TEST(testProfileStrings_worksWhenEnabledOnTheFly)
JS_CallFunctionName(cx, global, "a", JS::HandleValueArray::empty(), &rval);
CHECK(psize == 0);
CHECK(max_stack >= 1);
CHECK(cx->runtime()->spsProfiler.stringsCount() == 1);
CHECK(cx->runtime()->geckoProfiler.stringsCount() == 1);
}
EXEC("function d(p) { p.disable(); }");
@ -261,7 +261,7 @@ BEGIN_TEST(testProfileStrings_worksWhenEnabledOnTheFly)
EXEC("function g(p) { p.disable(); for (var i = 0; i < 100; i++) i++; }");
EXEC("function f() { g(new Prof()); }");
reset(cx);
cx->runtime()->spsProfiler.enableSlowAssertions(false);
cx->runtime()->geckoProfiler.enableSlowAssertions(false);
{
JS::RootedValue rval(cx);
/* disable, and make sure that if we try to re-enter the JIT the pop

View File

@ -1173,7 +1173,7 @@ js::array_join(JSContext* cx, unsigned argc, Value* vp)
{
JS_CHECK_RECURSION(cx, return false);
AutoSPSEntry pseudoFrame(cx->runtime(), "Array.prototype.join");
AutoGeckoProfilerEntry pseudoFrame(cx->runtime(), "Array.prototype.join");
CallArgs args = CallArgsFromVp(argc, vp);
// Step 1
@ -1428,7 +1428,7 @@ DefineBoxedOrUnboxedFunctor3(ArrayReverseDenseKernel,
bool
js::array_reverse(JSContext* cx, unsigned argc, Value* vp)
{
AutoSPSEntry pseudoFrame(cx->runtime(), "Array.prototype.reverse");
AutoGeckoProfilerEntry pseudoFrame(cx->runtime(), "Array.prototype.reverse");
CallArgs args = CallArgsFromVp(argc, vp);
RootedObject obj(cx, ToObject(cx, args.thisv()));
if (!obj)
@ -2045,7 +2045,7 @@ js::NewbornArrayPush(JSContext* cx, HandleObject obj, const Value& v)
bool
js::array_push(JSContext* cx, unsigned argc, Value* vp)
{
AutoSPSEntry pseudoFrame(cx->runtime(), "Array.prototype.push");
AutoGeckoProfilerEntry pseudoFrame(cx->runtime(), "Array.prototype.push");
CallArgs args = CallArgsFromVp(argc, vp);
/* Step 1. */
@ -2097,7 +2097,7 @@ js::array_push(JSContext* cx, unsigned argc, Value* vp)
bool
js::array_pop(JSContext* cx, unsigned argc, Value* vp)
{
AutoSPSEntry pseudoFrame(cx->runtime(), "Array.prototype.pop");
AutoGeckoProfilerEntry pseudoFrame(cx->runtime(), "Array.prototype.pop");
CallArgs args = CallArgsFromVp(argc, vp);
/* Step 1. */
@ -2203,7 +2203,7 @@ DefineBoxedOrUnboxedFunctor3(ArrayShiftDenseKernel,
bool
js::array_shift(JSContext* cx, unsigned argc, Value* vp)
{
AutoSPSEntry pseudoFrame(cx->runtime(), "Array.prototype.shift");
AutoGeckoProfilerEntry pseudoFrame(cx->runtime(), "Array.prototype.shift");
CallArgs args = CallArgsFromVp(argc, vp);
/* Step 1. */
@ -2271,7 +2271,7 @@ js::array_shift(JSContext* cx, unsigned argc, Value* vp)
bool
js::array_unshift(JSContext* cx, unsigned argc, Value* vp)
{
AutoSPSEntry pseudoFrame(cx->runtime(), "Array.prototype.unshift");
AutoGeckoProfilerEntry pseudoFrame(cx->runtime(), "Array.prototype.unshift");
CallArgs args = CallArgsFromVp(argc, vp);
RootedObject obj(cx, ToObject(cx, args.thisv()));
if (!obj)
@ -2439,7 +2439,7 @@ ArraySpliceCopy(JSContext* cx, HandleObject arr, HandleObject obj,
bool
js::array_splice_impl(JSContext* cx, unsigned argc, Value* vp, bool returnValueIsUsed)
{
AutoSPSEntry pseudoFrame(cx->runtime(), "Array.prototype.splice");
AutoGeckoProfilerEntry pseudoFrame(cx->runtime(), "Array.prototype.splice");
CallArgs args = CallArgsFromVp(argc, vp);
/* Step 1. */
@ -2900,7 +2900,7 @@ ArraySliceOrdinary(JSContext* cx, HandleObject obj, uint32_t length, uint32_t be
bool
js::array_slice(JSContext* cx, unsigned argc, Value* vp)
{
AutoSPSEntry pseudoFrame(cx->runtime(), "Array.prototype.slice");
AutoGeckoProfilerEntry pseudoFrame(cx->runtime(), "Array.prototype.slice");
CallArgs args = CallArgsFromVp(argc, vp);
/* Step 1. */

View File

@ -226,9 +226,9 @@
#include "js/SliceBudget.h"
#include "proxy/DeadObjectProxy.h"
#include "vm/Debugger.h"
#include "vm/GeckoProfiler.h"
#include "vm/ProxyObject.h"
#include "vm/Shape.h"
#include "vm/SPSProfiler.h"
#include "vm/String.h"
#include "vm/Symbol.h"
#include "vm/Time.h"
@ -2529,7 +2529,7 @@ GCRuntime::updatePointersToRelocatedCells(Zone* zone, AutoLockForExclusiveAccess
for (CompartmentsInZoneIter comp(zone); !comp.done(); comp.next())
comp->fixupAfterMovingGC();
JSCompartment::fixupCrossCompartmentWrappersAfterMovingGC(&trc);
rt->spsProfiler.fixupStringsMapAfterMovingGC();
rt->geckoProfiler.fixupStringsMapAfterMovingGC();
// Iterate through all cells that can contain relocatable pointers to update
// them. Since updating each cell is independent we try to parallelize this
@ -7123,7 +7123,7 @@ js::gc::CheckHashTablesAfterMovingGC(JSRuntime* rt)
* Check that internal hash tables no longer have any pointers to things
* that have been moved.
*/
rt->spsProfiler.checkStringsMapAfterMovingGC();
rt->geckoProfiler.checkStringsMapAfterMovingGC();
for (ZonesIter zone(rt, SkipAtoms); !zone.done(); zone.next()) {
zone->checkUniqueIdTableAfterMovingGC();
zone->checkInitialShapesTableAfterMovingGC();

View File

@ -2863,7 +2863,7 @@ JSScript::finalize(FreeOp* fop)
if (fop->runtime()->lcovOutput.isEnabled())
compartment()->lcovOutput.collectCodeCoverageInfo(compartment(), sourceObject(), this);
fop->runtime()->spsProfiler.onScriptFinalized(this);
fop->runtime()->geckoProfiler.onScriptFinalized(this);
if (types_)
types_->destroy();

View File

@ -322,6 +322,7 @@ UNIFIED_SOURCES += [
'vm/EnvironmentObject.cpp',
'vm/ErrorObject.cpp',
'vm/ForOfIterator.cpp',
'vm/GeckoProfiler.cpp',
'vm/GeneratorObject.cpp',
'vm/GlobalObject.cpp',
'vm/HelperThreads.cpp',
@ -345,7 +346,6 @@ UNIFIED_SOURCES += [
'vm/Shape.cpp',
'vm/SharedArrayObject.cpp',
'vm/SharedImmutableStringsCache.cpp',
'vm/SPSProfiler.cpp',
'vm/Stack.cpp',
'vm/Stopwatch.cpp',
'vm/String.cpp',

View File

@ -286,9 +286,9 @@ struct ShellContext
UniqueChars readLineBuf;
size_t readLineBufPos;
static const uint32_t SpsProfilingMaxStackSize = 1000;
ProfileEntry spsProfilingStack[SpsProfilingMaxStackSize];
uint32_t spsProfilingStackSize;
static const uint32_t GeckoProfilingMaxStackSize = 1000;
ProfileEntry geckoProfilingStack[GeckoProfilingMaxStackSize];
uint32_t geckoProfilingStackSize;
OffThreadState offThreadState;
};
@ -437,7 +437,7 @@ ShellContext::ShellContext(JSContext* cx)
exitCode(0),
quitting(false),
readLineBufPos(0),
spsProfilingStackSize(0)
geckoProfilingStackSize(0)
{}
static ShellContext*
@ -4844,7 +4844,7 @@ static bool
PrintProfilerEvents(JSContext* cx, unsigned argc, Value* vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (cx->runtime()->spsProfiler.enabled())
if (cx->runtime()->geckoProfiler.enabled())
js::RegisterContextProfilingEventMarker(cx, &PrintProfilerEvents_Callback);
args.rval().setUndefined();
return true;
@ -4860,7 +4860,7 @@ SingleStepCallback(void* arg, jit::Simulator* sim, void* pc)
JSContext* cx = reinterpret_cast<JSContext*>(arg);
// If profiling is not enabled, don't do anything.
if (!cx->spsProfiler.enabled())
if (!cx->geckoProfiler.enabled())
return;
JS::ProfilingFrameIterator::RegisterState state;
@ -4963,62 +4963,62 @@ IsLatin1(JSContext* cx, unsigned argc, Value* vp)
}
static bool
EnableSPSProfiling(JSContext* cx, unsigned argc, Value* vp)
EnableGeckoProfiling(JSContext* cx, unsigned argc, Value* vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
ShellContext* sc = GetShellContext(cx);
// Disable before re-enabling; see the assertion in |SPSProfiler::setProfilingStack|.
if (cx->spsProfiler.installed())
cx->spsProfiler.enable(false);
// Disable before re-enabling; see the assertion in |GeckoProfiler::setProfilingStack|.
if (cx->geckoProfiler.installed())
cx->geckoProfiler.enable(false);
SetContextProfilingStack(cx, sc->spsProfilingStack, &sc->spsProfilingStackSize,
ShellContext::SpsProfilingMaxStackSize);
cx->spsProfiler.enableSlowAssertions(false);
cx->spsProfiler.enable(true);
SetContextProfilingStack(cx, sc->geckoProfilingStack, &sc->geckoProfilingStackSize,
ShellContext::GeckoProfilingMaxStackSize);
cx->geckoProfiler.enableSlowAssertions(false);
cx->geckoProfiler.enable(true);
args.rval().setUndefined();
return true;
}
static bool
EnableSPSProfilingWithSlowAssertions(JSContext* cx, unsigned argc, Value* vp)
EnableGeckoProfilingWithSlowAssertions(JSContext* cx, unsigned argc, Value* vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
args.rval().setUndefined();
ShellContext* sc = GetShellContext(cx);
if (cx->spsProfiler.enabled()) {
if (cx->geckoProfiler.enabled()) {
// If profiling already enabled with slow assertions disabled,
// this is a no-op.
if (cx->spsProfiler.slowAssertionsEnabled())
if (cx->geckoProfiler.slowAssertionsEnabled())
return true;
// Slow assertions are off. Disable profiling before re-enabling
// with slow assertions on.
cx->spsProfiler.enable(false);
cx->geckoProfiler.enable(false);
}
// Disable before re-enabling; see the assertion in |SPSProfiler::setProfilingStack|.
if (cx->spsProfiler.installed())
cx->spsProfiler.enable(false);
// Disable before re-enabling; see the assertion in |GeckoProfiler::setProfilingStack|.
if (cx->geckoProfiler.installed())
cx->geckoProfiler.enable(false);
SetContextProfilingStack(cx, sc->spsProfilingStack, &sc->spsProfilingStackSize,
ShellContext::SpsProfilingMaxStackSize);
cx->spsProfiler.enableSlowAssertions(true);
cx->spsProfiler.enable(true);
SetContextProfilingStack(cx, sc->geckoProfilingStack, &sc->geckoProfilingStackSize,
ShellContext::GeckoProfilingMaxStackSize);
cx->geckoProfiler.enableSlowAssertions(true);
cx->geckoProfiler.enable(true);
return true;
}
static bool
DisableSPSProfiling(JSContext* cx, unsigned argc, Value* vp)
DisableGeckoProfiling(JSContext* cx, unsigned argc, Value* vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (cx->runtime()->spsProfiler.installed())
cx->runtime()->spsProfiler.enable(false);
if (cx->runtime()->geckoProfiler.installed())
cx->runtime()->geckoProfiler.enable(false);
args.rval().setUndefined();
return true;
}
@ -6057,19 +6057,19 @@ static const JSFunctionSpecWithHelp shell_functions[] = {
"disableSingleStepProfiling()",
" Return the array of backtraces recorded by enableSingleStepProfiling."),
JS_FN_HELP("enableSPSProfiling", EnableSPSProfiling, 0, 0,
"enableSPSProfiling()",
" Enables SPS instrumentation and corresponding assertions, with slow\n"
JS_FN_HELP("enableGeckoProfiling", EnableGeckoProfiling, 0, 0,
"enableGeckoProfiling()",
" Enables Gecko Profiler instrumentation and corresponding assertions, with slow\n"
" assertions disabled.\n"),
JS_FN_HELP("enableSPSProfilingWithSlowAssertions", EnableSPSProfilingWithSlowAssertions, 0, 0,
"enableSPSProfilingWithSlowAssertions()",
" Enables SPS instrumentation and corresponding assertions, with slow\n"
JS_FN_HELP("enableGeckoProfilingWithSlowAssertions", EnableGeckoProfilingWithSlowAssertions, 0, 0,
"enableGeckoProfilingWithSlowAssertions()",
" Enables Gecko Profiler instrumentation and corresponding assertions, with slow\n"
" assertions enabled.\n"),
JS_FN_HELP("disableSPSProfiling", DisableSPSProfiling, 0, 0,
"disableSPSProfiling()",
" Disables SPS instrumentation"),
JS_FN_HELP("disableGeckoProfiling", DisableGeckoProfiling, 0, 0,
"disableGeckoProfiling()",
" Disables Gecko Profiler instrumentation"),
JS_FN_HELP("isLatin1", IsLatin1, 1, 0,
"isLatin1(s)",

View File

@ -5,7 +5,7 @@
//-----------------------------------------------------------------------------
var BUGNUMBER = 822041;
var summary = "Live generators should not cache SPS state";
var summary = "Live generators should not cache Gecko Profiler state";
print(BUGNUMBER + ": " + summary);
@ -17,16 +17,16 @@ function gen() {
function turnoff() {
print("Turning off profiler\n");
disableSPSProfiling();
disableGeckoProfiling();
return 'hi';
}
for (var slowAsserts of [ true, false ]) {
// The slowAssertions setting is not expected to matter
if (slowAsserts)
enableSPSProfilingWithSlowAssertions();
enableGeckoProfilingWithSlowAssertions();
else
enableSPSProfiling();
enableGeckoProfiling();
g = gen();
assertEq(g.next(), 'hi');

View File

@ -34,8 +34,8 @@
#include "vm/ArgumentsObject.h"
#include "vm/AsyncFunction.h"
#include "vm/DebuggerMemory.h"
#include "vm/GeckoProfiler.h"
#include "vm/GeneratorObject.h"
#include "vm/SPSProfiler.h"
#include "vm/TraceLogging.h"
#include "vm/WrapperObject.h"
#include "wasm/WasmInstance.h"

View File

@ -4,7 +4,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "vm/SPSProfiler.h"
#include "vm/GeckoProfiler.h"
#include "mozilla/DebugOnly.h"
@ -23,9 +23,9 @@ using namespace js;
using mozilla::DebugOnly;
SPSProfiler::SPSProfiler(JSRuntime* rt)
GeckoProfiler::GeckoProfiler(JSRuntime* rt)
: rt(rt),
strings(mutexid::SPSProfilerStrings),
strings(mutexid::GeckoProfilerStrings),
stack_(nullptr),
size_(nullptr),
max_(0),
@ -37,7 +37,7 @@ SPSProfiler::SPSProfiler(JSRuntime* rt)
}
bool
SPSProfiler::init()
GeckoProfiler::init()
{
auto locked = strings.lock();
if (!locked->init())
@ -47,7 +47,7 @@ SPSProfiler::init()
}
void
SPSProfiler::setProfilingStack(ProfileEntry* stack, uint32_t* size, uint32_t max)
GeckoProfiler::setProfilingStack(ProfileEntry* stack, uint32_t* size, uint32_t max)
{
MOZ_ASSERT_IF(size_ && *size_ != 0, !enabled());
MOZ_ASSERT(strings.lock()->initialized());
@ -58,13 +58,13 @@ SPSProfiler::setProfilingStack(ProfileEntry* stack, uint32_t* size, uint32_t max
}
void
SPSProfiler::setEventMarker(void (*fn)(const char*))
GeckoProfiler::setEventMarker(void (*fn)(const char*))
{
eventMarker_ = fn;
}
void
SPSProfiler::enable(bool enabled)
GeckoProfiler::enable(bool enabled)
{
MOZ_ASSERT(installed());
@ -94,7 +94,7 @@ SPSProfiler::enable(bool enabled)
enabled_ = enabled;
/* Toggle SPS-related jumps on baseline jitcode.
/* Toggle Gecko Profiler-related jumps on baseline jitcode.
* The call to |ReleaseAllJITCode| above will release most baseline jitcode, but not
* jitcode for scripts with active frames on the stack. These scripts need to have
* their profiler state toggled so they behave properly.
@ -129,7 +129,7 @@ SPSProfiler::enable(bool enabled)
/* Lookup the string for the function/script, creating one if necessary */
const char*
SPSProfiler::profileString(JSScript* script, JSFunction* maybeFun)
GeckoProfiler::profileString(JSScript* script, JSFunction* maybeFun)
{
auto locked = strings.lock();
MOZ_ASSERT(locked->initialized());
@ -146,7 +146,7 @@ SPSProfiler::profileString(JSScript* script, JSFunction* maybeFun)
}
void
SPSProfiler::onScriptFinalized(JSScript* script)
GeckoProfiler::onScriptFinalized(JSScript* script)
{
/*
* This function is called whenever a script is destroyed, regardless of
@ -163,7 +163,7 @@ SPSProfiler::onScriptFinalized(JSScript* script)
}
void
SPSProfiler::markEvent(const char* event)
GeckoProfiler::markEvent(const char* event)
{
MOZ_ASSERT(enabled());
if (eventMarker_) {
@ -173,7 +173,7 @@ SPSProfiler::markEvent(const char* event)
}
bool
SPSProfiler::enter(JSContext* cx, JSScript* script, JSFunction* maybeFun)
GeckoProfiler::enter(JSContext* cx, JSScript* script, JSFunction* maybeFun)
{
const char* str = profileString(script, maybeFun);
if (str == nullptr) {
@ -197,7 +197,7 @@ SPSProfiler::enter(JSContext* cx, JSScript* script, JSFunction* maybeFun)
}
void
SPSProfiler::exit(JSScript* script, JSFunction* maybeFun)
GeckoProfiler::exit(JSScript* script, JSFunction* maybeFun)
{
pop();
@ -230,7 +230,7 @@ SPSProfiler::exit(JSScript* script, JSFunction* maybeFun)
}
void
SPSProfiler::beginPseudoJS(const char* string, void* sp)
GeckoProfiler::beginPseudoJS(const char* string, void* sp)
{
/* these operations cannot be re-ordered, so volatile-ize operations */
volatile ProfileEntry* stack = stack_;
@ -247,7 +247,7 @@ SPSProfiler::beginPseudoJS(const char* string, void* sp)
}
void
SPSProfiler::push(const char* string, void* sp, JSScript* script, jsbytecode* pc, bool copy,
GeckoProfiler::push(const char* string, void* sp, JSScript* script, jsbytecode* pc, bool copy,
ProfileEntry::Category category)
{
MOZ_ASSERT_IF(sp != nullptr, script == nullptr && pc == nullptr);
@ -284,7 +284,7 @@ SPSProfiler::push(const char* string, void* sp, JSScript* script, jsbytecode* pc
}
void
SPSProfiler::pop()
GeckoProfiler::pop()
{
MOZ_ASSERT(installed());
MOZ_ASSERT(*size_ > 0);
@ -298,7 +298,7 @@ SPSProfiler::pop()
* AddPtr held while invoking allocProfileString.
*/
UniqueChars
SPSProfiler::allocProfileString(JSScript* script, JSFunction* maybeFun)
GeckoProfiler::allocProfileString(JSScript* script, JSFunction* maybeFun)
{
// Note: this profiler string is regexp-matched by
// devtools/client/profiler/cleopatra/js/parserWorker.js.
@ -346,7 +346,7 @@ SPSProfiler::allocProfileString(JSScript* script, JSFunction* maybeFun)
}
void
SPSProfiler::trace(JSTracer* trc)
GeckoProfiler::trace(JSTracer* trc)
{
if (stack_) {
size_t limit = Min(*size_, max_);
@ -356,7 +356,7 @@ SPSProfiler::trace(JSTracer* trc)
}
void
SPSProfiler::fixupStringsMapAfterMovingGC()
GeckoProfiler::fixupStringsMapAfterMovingGC()
{
auto locked = strings.lock();
if (!locked->initialized())
@ -373,7 +373,7 @@ SPSProfiler::fixupStringsMapAfterMovingGC()
#ifdef JSGC_HASH_TABLE_CHECKS
void
SPSProfiler::checkStringsMapAfterMovingGC()
GeckoProfiler::checkStringsMapAfterMovingGC()
{
auto locked = strings.lock();
if (!locked->initialized())
@ -398,10 +398,10 @@ ProfileEntry::trace(JSTracer* trc)
}
}
SPSEntryMarker::SPSEntryMarker(JSRuntime* rt,
JSScript* script
MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)
: profiler(&rt->spsProfiler)
GeckoProfilerEntryMarker::GeckoProfilerEntryMarker(JSRuntime* rt,
JSScript* script
MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)
: profiler(&rt->geckoProfiler)
{
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
if (!profiler->installed()) {
@ -414,7 +414,7 @@ SPSEntryMarker::SPSEntryMarker(JSRuntime* rt,
profiler->push("js::RunScript", nullptr, script, script->code(), /* copy = */ false);
}
SPSEntryMarker::~SPSEntryMarker()
GeckoProfilerEntryMarker::~GeckoProfilerEntryMarker()
{
if (profiler == nullptr)
return;
@ -424,9 +424,10 @@ SPSEntryMarker::~SPSEntryMarker()
MOZ_ASSERT(size_before == *profiler->size_);
}
AutoSPSEntry::AutoSPSEntry(JSRuntime* rt, const char* label, ProfileEntry::Category category
MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)
: profiler_(&rt->spsProfiler)
AutoGeckoProfilerEntry::AutoGeckoProfilerEntry(JSRuntime* rt, const char* label,
ProfileEntry::Category category
MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)
: profiler_(&rt->geckoProfiler)
{
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
if (!profiler_->installed()) {
@ -438,7 +439,7 @@ AutoSPSEntry::AutoSPSEntry(JSRuntime* rt, const char* label, ProfileEntry::Categ
profiler_->push(label, this, nullptr, nullptr, /* copy = */ false, category);
}
AutoSPSEntry::~AutoSPSEntry()
AutoGeckoProfilerEntry::~AutoGeckoProfilerEntry()
{
if (!profiler_)
return;
@ -448,12 +449,12 @@ AutoSPSEntry::~AutoSPSEntry()
MOZ_ASSERT(sizeBefore_ == *profiler_->size_);
}
SPSBaselineOSRMarker::SPSBaselineOSRMarker(JSRuntime* rt, bool hasSPSFrame
MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)
: profiler(&rt->spsProfiler)
GeckoProfilerBaselineOSRMarker::GeckoProfilerBaselineOSRMarker(JSRuntime* rt, bool hasProfilerFrame
MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)
: profiler(&rt->geckoProfiler)
{
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
if (!hasSPSFrame || !profiler->enabled() ||
if (!hasProfilerFrame || !profiler->enabled() ||
profiler->size() >= profiler->maxSize())
{
profiler = nullptr;
@ -469,7 +470,7 @@ SPSBaselineOSRMarker::SPSBaselineOSRMarker(JSRuntime* rt, bool hasSPSFrame
entry.setOSR();
}
SPSBaselineOSRMarker::~SPSBaselineOSRMarker()
GeckoProfilerBaselineOSRMarker::~GeckoProfilerBaselineOSRMarker()
{
if (profiler == nullptr)
return;
@ -525,26 +526,26 @@ ProfileEntry::setPC(jsbytecode* pc) volatile
JS_FRIEND_API(void)
js::SetContextProfilingStack(JSContext* cx, ProfileEntry* stack, uint32_t* size, uint32_t max)
{
cx->spsProfiler.setProfilingStack(stack, size, max);
cx->geckoProfiler.setProfilingStack(stack, size, max);
}
JS_FRIEND_API(void)
js::EnableContextProfilingStack(JSContext* cx, bool enabled)
{
cx->spsProfiler.enable(enabled);
cx->geckoProfiler.enable(enabled);
}
JS_FRIEND_API(void)
js::RegisterContextProfilingEventMarker(JSContext* cx, void (*fn)(const char*))
{
MOZ_ASSERT(cx->spsProfiler.enabled());
cx->spsProfiler.setEventMarker(fn);
MOZ_ASSERT(cx->geckoProfiler.enabled());
cx->geckoProfiler.setEventMarker(fn);
}
JS_FRIEND_API(jsbytecode*)
js::ProfilingGetPC(JSContext* cx, JSScript* script, void* ip)
{
return cx->spsProfiler.ipToPC(script, size_t(ip));
return cx->geckoProfiler.ipToPC(script, size_t(ip));
}
AutoSuppressProfilerSampling::AutoSuppressProfilerSampling(JSContext* cx

View File

@ -4,8 +4,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef vm_SPSProfiler_h
#define vm_SPSProfiler_h
#ifndef vm_GeckoProfiler_h
#define vm_GeckoProfiler_h
#include "mozilla/DebugOnly.h"
#include "mozilla/GuardObjects.h"
@ -19,36 +19,37 @@
#include "vm/MutexIDs.h"
/*
* SPS Profiler integration with the JS Engine
* Gecko Profiler integration with the JS Engine
* https://developer.mozilla.org/en/Performance/Profiling_with_the_Built-in_Profiler
*
* The SPS profiler (found in tools/profiler) is an implementation of a profiler
* which has the ability to walk the C++ stack as well as use instrumentation to
* gather information. When dealing with JS, however, SPS needs integration
* with the engine because otherwise it is very difficult to figure out what
* javascript is executing.
* The Gecko Profiler (found in tools/profiler) is an implementation of a
* profiler which has the ability to walk the C++ stack as well as use
* instrumentation to gather information. When dealing with JS, however, the
* profiler needs integration with the engine because otherwise it is very
* difficult to figure out what javascript is executing.
*
* The current method of integration with SPS is a form of instrumentation:
* every time a JS function is entered, a bit of information is pushed onto a
* stack that SPS owns and maintains. This information is then popped at the end
* of the JS function. SPS informs the JS engine of this stack at runtime, and
* it can by turned on/off dynamically.
* The current method of integration with the profiler is a form of
* instrumentation: every time a JS function is entered, a bit of information
* is pushed onto a stack that the profiler owns and maintains. This
* information is then popped at the end of the JS function. The profiler
* informs the JS engine of this stack at runtime, and it can by turned on/off
* dynamically.
*
* The SPS stack has three parameters: a base pointer, a size, and a maximum
* size. The stack is the ProfileEntry stack which will have information written
* to it. The size location is a pointer to an integer which represents the
* current size of the stack (number of valid frames). This size will be
* modified when JS functions are called. The maximum specified is the maximum
* capacity of the ProfileEntry stack.
* The profiler stack has three parameters: a base pointer, a size, and a
* maximum size. The stack is the ProfileEntry stack which will have
* information written to it. The size location is a pointer to an integer
* which represents the current size of the stack (number of valid frames).
* This size will be modified when JS functions are called. The maximum
* specified is the maximum capacity of the ProfileEntry stack.
*
* Throughout execution, the size of the stack recorded in memory may exceed the
* maximum. The JS engine will not write any information past the maximum limit,
* but it will still maintain the size of the stack. SPS code is aware of this
* and iterates the stack accordingly.
* but it will still maintain the size of the stack. Profiler code is aware of
* this and iterates the stack accordingly.
*
* There is some information pushed on the SPS stack for every JS function that
* is entered. First is a char* pointer of a description of what function was
* entered. Currently this string is of the form "function (file:line)" if
* There is some information pushed on the profiler stack for every JS function
* that is entered. First is a char* pointer of a description of what function
* was entered. Currently this string is of the form "function (file:line)" if
* there's a function name, or just "file:line" if there's no function name
* available. The other bit of information is the relevant C++ (native) stack
* pointer. This stack pointer is what enables the interleaving of the C++ and
@ -64,10 +65,10 @@
* JSScript* pair. A JSScript will destroy its corresponding profile string when
* the script is finalized.
*
* For this reason, a char* pointer pushed on the SPS stack is valid only while
* it is on the SPS stack. SPS uses sampling to read off information from this
* instrumented stack, and it therefore copies the string byte for byte when a
* JS function is encountered during sampling.
* For this reason, a char* pointer pushed on the profiler stack is valid only
* while it is on the profiler stack. The profiler uses sampling to read off
* information from this instrumented stack, and it therefore copies the string
* byte for byte when a JS function is encountered during sampling.
*
* = Native Stack Pointer
*
@ -79,10 +80,11 @@
*
* To alleviate this problem, all JS functions push nullptr as their "native
* stack pointer" to indicate that it's a JS function call. The function
* RunScript(), however, pushes an actual C++ stack pointer onto the SPS stack.
* This way when interleaving C++ and JS, if SPS sees a nullptr native stack
* pointer on the SPS stack, it looks backwards for the first non-nullptr
* pointer and uses that for all subsequent nullptr native stack pointers.
* RunScript(), however, pushes an actual C++ stack pointer onto the profiler
* stack. This way when interleaving C++ and JS, if the Gecko Profiler sees a
* nullptr native stack pointer on the profiler stack, it looks backwards for
* the first non-nullptr pointer and uses that for all subsequent nullptr
* native stack pointers.
*
* = Line Numbers
*
@ -109,21 +111,21 @@ namespace js {
// The `ProfileStringMap` weakly holds its `JSScript*` keys and owns its string
// values. Entries are removed when the `JSScript` is finalized; see
// `SPSProfiler::onScriptFinalized`.
// `GeckoProfiler::onScriptFinalized`.
using ProfileStringMap = HashMap<JSScript*,
UniqueChars,
DefaultHasher<JSScript*>,
SystemAllocPolicy>;
class AutoSPSEntry;
class SPSEntryMarker;
class SPSBaselineOSRMarker;
class AutoGeckoProfilerEntry;
class GeckoProfilerEntryMarker;
class GeckoProfilerBaselineOSRMarker;
class SPSProfiler
class GeckoProfiler
{
friend class AutoSPSEntry;
friend class SPSEntryMarker;
friend class SPSBaselineOSRMarker;
friend class AutoGeckoProfilerEntry;
friend class GeckoProfilerEntryMarker;
friend class GeckoProfilerBaselineOSRMarker;
JSRuntime* rt;
ExclusiveData<ProfileStringMap> strings;
@ -140,7 +142,7 @@ class SPSProfiler
void pop();
public:
explicit SPSProfiler(JSRuntime* rt);
explicit GeckoProfiler(JSRuntime* rt);
bool init();
@ -234,13 +236,13 @@ class MOZ_RAII AutoSuppressProfilerSampling
};
inline size_t
SPSProfiler::stringsCount()
GeckoProfiler::stringsCount()
{
return strings.lock()->count();
}
inline void
SPSProfiler::stringsReset()
GeckoProfiler::stringsReset()
{
strings.lock()->clear();
}
@ -250,35 +252,35 @@ SPSProfiler::stringsReset()
* that we're about to enter JS function calls. This is the only time in which a
* valid stack pointer is pushed to the sampling stack.
*/
class MOZ_RAII SPSEntryMarker
class MOZ_RAII GeckoProfilerEntryMarker
{
public:
explicit SPSEntryMarker(JSRuntime* rt,
JSScript* script
MOZ_GUARD_OBJECT_NOTIFIER_PARAM);
~SPSEntryMarker();
explicit GeckoProfilerEntryMarker(JSRuntime* rt,
JSScript* script
MOZ_GUARD_OBJECT_NOTIFIER_PARAM);
~GeckoProfilerEntryMarker();
private:
SPSProfiler* profiler;
GeckoProfiler* profiler;
mozilla::DebugOnly<uint32_t> size_before;
MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
};
/*
* RAII class to automatically add SPS psuedo frame entries.
* RAII class to automatically add Gecko Profiler pseudo frame entries.
*
* NB: The `label` string must be statically allocated.
*/
class MOZ_NONHEAP_CLASS AutoSPSEntry
class MOZ_NONHEAP_CLASS AutoGeckoProfilerEntry
{
public:
explicit AutoSPSEntry(JSRuntime* rt, const char* label,
ProfileEntry::Category category = ProfileEntry::Category::JS
MOZ_GUARD_OBJECT_NOTIFIER_PARAM);
~AutoSPSEntry();
explicit AutoGeckoProfilerEntry(JSRuntime* rt, const char* label,
ProfileEntry::Category category = ProfileEntry::Category::JS
MOZ_GUARD_OBJECT_NOTIFIER_PARAM);
~AutoGeckoProfilerEntry();
private:
SPSProfiler* profiler_;
GeckoProfiler* profiler_;
mozilla::DebugOnly<uint32_t> sizeBefore_;
MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
};
@ -288,23 +290,22 @@ class MOZ_NONHEAP_CLASS AutoSPSEntry
* being entered via OSR. It marks the current top pseudostack entry as
* OSR-ed
*/
class MOZ_RAII SPSBaselineOSRMarker
class MOZ_RAII GeckoProfilerBaselineOSRMarker
{
public:
explicit SPSBaselineOSRMarker(JSRuntime* rt, bool hasSPSFrame
MOZ_GUARD_OBJECT_NOTIFIER_PARAM);
~SPSBaselineOSRMarker();
explicit GeckoProfilerBaselineOSRMarker(JSRuntime* rt, bool hasProfilerFrame
MOZ_GUARD_OBJECT_NOTIFIER_PARAM);
~GeckoProfilerBaselineOSRMarker();
private:
SPSProfiler* profiler;
GeckoProfiler* profiler;
mozilla::DebugOnly<uint32_t> size_before;
MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
};
/*
* SPS is the profiling backend used by the JS engine to enable time profiling.
* More information can be found in vm/SPSProfiler.{h,cpp}. This class manages
* the instrumentation portion of the profiling for JIT code.
* This class manages the instrumentation portion of the profiling for JIT
* code.
*
* The instrumentation tracks entry into functions, leaving those functions via
* a function call, reentering the functions from a function call, and exiting
@ -315,20 +316,20 @@ class MOZ_RAII SPSBaselineOSRMarker
* and the management functions are all described in the middle.
*/
template<class Assembler, class Register>
class SPSInstrumentation
class GeckoProfilerInstrumentation
{
SPSProfiler* profiler_; // Instrumentation location management
GeckoProfiler* profiler_; // Instrumentation location management
public:
/*
* Creates instrumentation which writes information out the the specified
* profiler's stack and constituent fields.
*/
explicit SPSInstrumentation(SPSProfiler* profiler) : profiler_(profiler) {}
explicit GeckoProfilerInstrumentation(GeckoProfiler* profiler) : profiler_(profiler) {}
/* Small proxies around SPSProfiler */
/* Small proxies around GeckoProfiler */
bool enabled() { return profiler_ && profiler_->enabled(); }
SPSProfiler* profiler() { MOZ_ASSERT(enabled()); return profiler_; }
GeckoProfiler* profiler() { MOZ_ASSERT(enabled()); return profiler_; }
void disable() { profiler_ = nullptr; }
};
@ -338,4 +339,4 @@ void* GetTopProfilingJitFrame(uint8_t* exitFramePtr);
} /* namespace js */
#endif /* vm_SPSProfiler_h */
#endif /* vm_GeckoProfiler_h */

View File

@ -374,7 +374,7 @@ js::RunScript(JSContext* cx, RunState& state)
js::AutoStopwatch stopwatch(cx);
#endif // defined(MOZ_HAVE_RDTSC)
SPSEntryMarker marker(cx->runtime(), state.script());
GeckoProfilerEntryMarker marker(cx->runtime(), state.script());
state.script()->ensureNonLazyCanonicalFunction();
@ -1925,11 +1925,11 @@ CASE(JSOP_LOOPENTRY)
if (status == jit::Method_Error)
goto error;
if (status == jit::Method_Compiled) {
bool wasSPS = REGS.fp()->hasPushedSPSFrame();
bool wasProfiler = REGS.fp()->hasPushedGeckoProfilerFrame();
jit::JitExecStatus maybeOsr;
{
SPSBaselineOSRMarker spsOSR(cx->runtime(), wasSPS);
GeckoProfilerBaselineOSRMarker osr(cx->runtime(), wasProfiler);
maybeOsr = jit::EnterBaselineAtBranch(cx, REGS.fp(), REGS.pc);
}
@ -1939,10 +1939,11 @@ CASE(JSOP_LOOPENTRY)
interpReturnOK = (maybeOsr == jit::JitExec_Ok);
// Pop the SPS frame pushed by the interpreter. (The compiled version of the
// function popped a copy of the frame pushed by the OSR trampoline.)
if (wasSPS)
cx->runtime()->spsProfiler.exit(script, script->functionNonDelazifying());
// Pop the profiler frame pushed by the interpreter. (The compiled
// version of the function popped a copy of the frame pushed by the
// OSR trampoline.)
if (wasProfiler)
cx->runtime()->geckoProfiler.exit(script, script->functionNonDelazifying());
if (activation.entryFrame() != REGS.fp())
goto jit_return_pop_frame;
@ -2883,8 +2884,8 @@ END_CASE(JSOP_EVAL)
CASE(JSOP_SPREADNEW)
CASE(JSOP_SPREADCALL)
CASE(JSOP_SPREADSUPERCALL)
if (REGS.fp()->hasPushedSPSFrame())
cx->runtime()->spsProfiler.updatePC(script, REGS.pc);
if (REGS.fp()->hasPushedGeckoProfilerFrame())
cx->runtime()->geckoProfiler.updatePC(script, REGS.pc);
/* FALL THROUGH */
CASE(JSOP_SPREADEVAL)
@ -2928,8 +2929,8 @@ CASE(JSOP_CALLITER)
CASE(JSOP_SUPERCALL)
CASE(JSOP_FUNCALL)
{
if (REGS.fp()->hasPushedSPSFrame())
cx->runtime()->spsProfiler.updatePC(script, REGS.pc);
if (REGS.fp()->hasPushedGeckoProfilerFrame())
cx->runtime()->geckoProfiler.updatePC(script, REGS.pc);
MaybeConstruct construct = MaybeConstruct(*REGS.pc == JSOP_NEW || *REGS.pc == JSOP_SUPERCALL);
unsigned argStackSlots = GET_ARGC(REGS.pc) + construct;

View File

@ -28,7 +28,7 @@
_(SharedImmutableStringsCache, 500) \
_(FutexRuntime, 500) \
_(PromiseTaskPtrVector, 500) \
_(SPSProfilerStrings, 500) \
_(GeckoProfilerStrings, 500) \
_(ProtectedRegionTree, 500) \
_(WasmSigIdSet, 500) \
_(ShellOffThreadState, 500) \

View File

@ -38,26 +38,26 @@ probes::EnterScript(JSContext* cx, JSScript* script, JSFunction* maybeFun,
#endif
JSRuntime* rt = cx->runtime();
if (rt->spsProfiler.enabled()) {
if (!rt->spsProfiler.enter(cx, script, maybeFun))
if (rt->geckoProfiler.enabled()) {
if (!rt->geckoProfiler.enter(cx, script, maybeFun))
return false;
MOZ_ASSERT_IF(!fp->script()->isGenerator(), !fp->hasPushedSPSFrame());
fp->setPushedSPSFrame();
MOZ_ASSERT_IF(!fp->script()->isGenerator(), !fp->hasPushedGeckoProfilerFrame());
fp->setPushedGeckoProfilerFrame();
}
return true;
}
inline void
probes::ExitScript(JSContext* cx, JSScript* script, JSFunction* maybeFun, bool popSPSFrame)
probes::ExitScript(JSContext* cx, JSScript* script, JSFunction* maybeFun, bool popProfilerFrame)
{
#ifdef INCLUDE_MOZILLA_DTRACE
if (JAVASCRIPT_FUNCTION_RETURN_ENABLED())
DTraceExitJSFun(cx, maybeFun, script);
#endif
if (popSPSFrame)
cx->runtime()->spsProfiler.exit(script, maybeFun);
if (popProfilerFrame)
cx->runtime()->geckoProfiler.exit(script, maybeFun);
}
inline bool

View File

@ -63,7 +63,7 @@ bool CallTrackingActive(JSContext*);
bool EnterScript(JSContext*, JSScript*, JSFunction*, InterpreterFrame*);
/* About to leave a JS function */
void ExitScript(JSContext*, JSScript*, JSFunction*, bool popSPSFrame);
void ExitScript(JSContext*, JSScript*, JSFunction*, bool popProfilerFrame);
/* Executing a script */
bool StartExecution(JSScript* script);

View File

@ -197,7 +197,7 @@ JSRuntime::JSRuntime(JSRuntime* parentRuntime)
negativeInfinityValue(DoubleValue(NegativeInfinity<double>())),
positiveInfinityValue(DoubleValue(PositiveInfinity<double>())),
emptyString(nullptr),
spsProfiler(thisFromCtor()),
geckoProfiler(thisFromCtor()),
profilingScripts(false),
suppressProfilerSampling(false),
hadOutOfMemory(false),
@ -350,7 +350,7 @@ JSRuntime::init(uint32_t maxbytes, uint32_t maxNurseryBytes)
if (!wasm::EnsureSignalHandlers(this))
return false;
if (!spsProfiler.init())
if (!geckoProfiler.init())
return false;
if (!fx.initInstance())
@ -927,7 +927,7 @@ JS_FRIEND_API(bool)
JS::IsProfilingEnabledForContext(JSContext* cx)
{
MOZ_ASSERT(cx);
return cx->spsProfiler.enabled();
return cx->geckoProfiler.enabled();
}
JSRuntime::IonBuilderList&

View File

@ -45,10 +45,10 @@
#include "vm/CodeCoverage.h"
#include "vm/CommonPropertyNames.h"
#include "vm/DateTime.h"
#include "vm/GeckoProfiler.h"
#include "vm/MallocProvider.h"
#include "vm/Scope.h"
#include "vm/SharedImmutableStringsCache.h"
#include "vm/SPSProfiler.h"
#include "vm/Stack.h"
#include "vm/Stopwatch.h"
#include "vm/Symbol.h"
@ -909,8 +909,8 @@ struct JSRuntime : public JS::shadow::Runtime,
mozilla::UniquePtr<js::SourceHook> sourceHook;
/* SPS profiling metadata */
js::SPSProfiler spsProfiler;
/* Gecko profiling metadata */
js::GeckoProfiler geckoProfiler;
/* If true, new scripts must be created with PC counter information. */
bool profilingScripts;

View File

@ -28,8 +28,8 @@
#include "js/CharacterEncoding.h"
#include "js/Vector.h"
#include "vm/Debugger.h"
#include "vm/GeckoProfiler.h"
#include "vm/SavedFrame.h"
#include "vm/SPSProfiler.h"
#include "vm/StringBuffer.h"
#include "vm/Time.h"
#include "vm/WrapperObject.h"
@ -1147,7 +1147,7 @@ SavedStacks::saveCurrentStack(JSContext* cx, MutableHandleSavedFrame frame,
return true;
}
AutoSPSEntry psuedoFrame(cx->runtime(), "js::SavedStacks::saveCurrentStack");
AutoGeckoProfilerEntry psuedoFrame(cx->runtime(), "js::SavedStacks::saveCurrentStack");
FrameIter iter(cx);
return insertFrames(cx, iter, frame, mozilla::Move(capture));
}

View File

@ -265,7 +265,7 @@ void
InterpreterFrame::epilogue(JSContext* cx, jsbytecode* pc)
{
RootedScript script(cx, this->script());
probes::ExitScript(cx, script, script->functionNonDelazifying(), hasPushedSPSFrame());
probes::ExitScript(cx, script, script->functionNonDelazifying(), hasPushedGeckoProfilerFrame());
// Check that the scope matches the environment at the point of leaving
// the frame.
@ -1728,8 +1728,8 @@ JS::ProfilingFrameIterator::ProfilingFrameIterator(JSContext* cx, const Register
activation_(nullptr),
savedPrevJitTop_(nullptr)
{
if (!cx->spsProfiler.enabled())
MOZ_CRASH("ProfilingFrameIterator called when spsProfiler not enabled for runtime.");
if (!cx->geckoProfiler.enabled())
MOZ_CRASH("ProfilingFrameIterator called when geckoProfiler not enabled for runtime.");
if (!cx->profilingActivation())
return;

Some files were not shown because too many files have changed in this diff Show More