mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Bug 1304672: Renamings outside asmjs/ and jit/; r=luke
MozReview-Commit-ID: 1LGFJMlHaz2 --HG-- extra : rebase_source : 3ee8b822a6097260c9b9c0487b91a63e6ff1e575
This commit is contained in:
parent
122a158231
commit
3397fa4d20
@ -59,14 +59,14 @@ class JS_PUBLIC_API(ProfilingFrameIterator)
|
||||
|
||||
static const unsigned StorageSpace = 8 * sizeof(void*);
|
||||
mozilla::AlignedStorage<StorageSpace> storage_;
|
||||
js::wasm::ProfilingFrameIterator& asmJSIter() {
|
||||
js::wasm::ProfilingFrameIterator& wasmIter() {
|
||||
MOZ_ASSERT(!done());
|
||||
MOZ_ASSERT(isAsmJS());
|
||||
MOZ_ASSERT(isWasm());
|
||||
return *reinterpret_cast<js::wasm::ProfilingFrameIterator*>(storage_.addr());
|
||||
}
|
||||
const js::wasm::ProfilingFrameIterator& asmJSIter() const {
|
||||
const js::wasm::ProfilingFrameIterator& wasmIter() const {
|
||||
MOZ_ASSERT(!done());
|
||||
MOZ_ASSERT(isAsmJS());
|
||||
MOZ_ASSERT(isWasm());
|
||||
return *reinterpret_cast<const js::wasm::ProfilingFrameIterator*>(storage_.addr());
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ class JS_PUBLIC_API(ProfilingFrameIterator)
|
||||
{
|
||||
Frame_Baseline,
|
||||
Frame_Ion,
|
||||
Frame_AsmJS
|
||||
Frame_Wasm
|
||||
};
|
||||
|
||||
struct Frame
|
||||
@ -126,7 +126,7 @@ class JS_PUBLIC_API(ProfilingFrameIterator)
|
||||
UniqueChars label;
|
||||
};
|
||||
|
||||
bool isAsmJS() const;
|
||||
bool isWasm() const;
|
||||
bool isJit() const;
|
||||
|
||||
uint32_t extractStack(Frame* frames, uint32_t offset, uint32_t end) const;
|
||||
|
@ -8152,7 +8152,7 @@ NewAsmJSModuleFunction(ExclusiveContext* cx, JSFunction* origFun, HandleObject m
|
||||
RootedAtom name(cx, origFun->name());
|
||||
|
||||
JSFunction::Flags flags = origFun->isLambda() ? JSFunction::ASMJS_LAMBDA_CTOR
|
||||
: JSFunction::ASMJS_CTOR;
|
||||
: JSFunction::WASM_CTOR;
|
||||
JSFunction* moduleFun =
|
||||
NewNativeConstructor(cx, InstantiateAsmJS, origFun->nargs(), name,
|
||||
gc::AllocKind::FUNCTION_EXTENDED, TenuredObject,
|
||||
|
@ -773,7 +773,7 @@ WasmInstanceObject::getExportedFunction(JSContext* cx, HandleWasmInstanceObject
|
||||
|
||||
unsigned numArgs = instance.metadata().lookupFuncDefExport(funcDefIndex).sig().args().length();
|
||||
fun.set(NewNativeConstructor(cx, WasmCall, numArgs, name, gc::AllocKind::FUNCTION_EXTENDED,
|
||||
SingletonObject, JSFunction::ASMJS_CTOR));
|
||||
SingletonObject, JSFunction::WASM_CTOR));
|
||||
if (!fun)
|
||||
return false;
|
||||
|
||||
|
@ -1768,8 +1768,8 @@ ReadSPSProfilingStack(JSContext* cx, unsigned argc, Value* vp)
|
||||
case JS::ProfilingFrameIterator::Frame_Ion:
|
||||
frameKindStr = "ion";
|
||||
break;
|
||||
case JS::ProfilingFrameIterator::Frame_AsmJS:
|
||||
frameKindStr = "asmjs";
|
||||
case JS::ProfilingFrameIterator::Frame_Wasm:
|
||||
frameKindStr = "wasm";
|
||||
break;
|
||||
default:
|
||||
frameKindStr = "unknown";
|
||||
@ -4427,7 +4427,7 @@ gc::ZealModeHelpText),
|
||||
"setIonCheckGraphCoherency(bool)",
|
||||
" Set whether Ion should perform graph consistency (DEBUG-only) assertions. These assertions\n"
|
||||
" are valuable and should be generally enabled, however they can be very expensive for large\n"
|
||||
" (asm.js) programs."),
|
||||
" (wasm) programs."),
|
||||
|
||||
JS_FN_HELP("serialize", Serialize, 1, 0,
|
||||
"serialize(data, [transferables, [policy]])",
|
||||
|
@ -3876,7 +3876,7 @@ JS::CompileOptions::CompileOptions(JSContext* cx, JSVersion version)
|
||||
werrorOption = cx->options().werror();
|
||||
if (!cx->options().asmJS())
|
||||
asmJSOption = AsmJSOption::Disabled;
|
||||
else if (cx->compartment()->debuggerObservesAsmJS())
|
||||
else if (cx->compartment()->debuggerObservesWasm())
|
||||
asmJSOption = AsmJSOption::DisabledByDebugger;
|
||||
else
|
||||
asmJSOption = AsmJSOption::Enabled;
|
||||
|
@ -1088,7 +1088,7 @@ JSCompartment::updateDebuggerObservesFlag(unsigned flag)
|
||||
MOZ_ASSERT(isDebuggee());
|
||||
MOZ_ASSERT(flag == DebuggerObservesAllExecution ||
|
||||
flag == DebuggerObservesCoverage ||
|
||||
flag == DebuggerObservesAsmJS);
|
||||
flag == DebuggerObservesWasm);
|
||||
|
||||
GlobalObject* global = zone()->runtimeFromMainThread()->gc.isForegroundSweeping()
|
||||
? unsafeUnbarrieredMaybeGlobal()
|
||||
|
@ -556,7 +556,7 @@ struct JSCompartment
|
||||
enum {
|
||||
IsDebuggee = 1 << 0,
|
||||
DebuggerObservesAllExecution = 1 << 1,
|
||||
DebuggerObservesAsmJS = 1 << 2,
|
||||
DebuggerObservesWasm = 1 << 2,
|
||||
DebuggerObservesCoverage = 1 << 3,
|
||||
DebuggerNeedsDelazification = 1 << 4
|
||||
};
|
||||
@ -567,7 +567,7 @@ struct JSCompartment
|
||||
static const unsigned DebuggerObservesMask = IsDebuggee |
|
||||
DebuggerObservesAllExecution |
|
||||
DebuggerObservesCoverage |
|
||||
DebuggerObservesAsmJS;
|
||||
DebuggerObservesWasm;
|
||||
|
||||
void updateDebuggerObservesFlag(unsigned flag);
|
||||
|
||||
@ -708,8 +708,8 @@ struct JSCompartment
|
||||
// 1. When a compartment's isDebuggee() == true, relazification and lazy
|
||||
// parsing are disabled.
|
||||
//
|
||||
// Whether AOT asm.js is disabled is togglable by the Debugger API. By
|
||||
// default it is disabled. See debuggerObservesAsmJS below.
|
||||
// Whether AOT wasm is disabled is togglable by the Debugger API. By
|
||||
// default it is disabled. See debuggerObservesWasm below.
|
||||
//
|
||||
// 2. When a compartment's debuggerObservesAllExecution() == true, all of
|
||||
// the compartment's scripts are considered debuggee scripts.
|
||||
@ -755,15 +755,15 @@ struct JSCompartment
|
||||
// True if this compartment's global is a debuggee of some Debugger object
|
||||
// whose allowUnobservedAsmJS flag is false.
|
||||
//
|
||||
// Note that since AOT asm.js functions cannot bail out, this flag really
|
||||
// means "observe asm.js from this point forward". We cannot make
|
||||
// already-compiled asm.js code observable to Debugger.
|
||||
bool debuggerObservesAsmJS() const {
|
||||
static const unsigned Mask = IsDebuggee | DebuggerObservesAsmJS;
|
||||
// Note that since AOT wasm functions cannot bail out, this flag really
|
||||
// means "observe wasm from this point forward". We cannot make
|
||||
// already-compiled wasm code observable to Debugger.
|
||||
bool debuggerObservesWasm() const {
|
||||
static const unsigned Mask = IsDebuggee | DebuggerObservesWasm;
|
||||
return (debugModeBits & Mask) == Mask;
|
||||
}
|
||||
void updateDebuggerObservesAsmJS() {
|
||||
updateDebuggerObservesFlag(DebuggerObservesAsmJS);
|
||||
void updateDebuggerObservesWasm() {
|
||||
updateDebuggerObservesFlag(DebuggerObservesWasm);
|
||||
}
|
||||
|
||||
// True if this compartment's global is a debuggee of some Debugger object
|
||||
|
@ -378,7 +378,7 @@ static const JSPropertySpec function_properties[] = {
|
||||
static bool
|
||||
ResolveInterpretedFunctionPrototype(JSContext* cx, HandleFunction fun, HandleId id)
|
||||
{
|
||||
MOZ_ASSERT(fun->isInterpreted() || fun->isAsmJSNative());
|
||||
MOZ_ASSERT(fun->isInterpreted() || fun->isWasmNative());
|
||||
MOZ_ASSERT(id == NameToId(cx->names().prototype));
|
||||
|
||||
// Assert that fun is not a compiler-created function object, which
|
||||
@ -919,7 +919,7 @@ js::FindBody(JSContext* cx, HandleFunction fun, HandleLinearString src, size_t*
|
||||
CompileOptions options(cx);
|
||||
options.setFileAndLine("internal-findBody", 0);
|
||||
|
||||
// For asm.js modules, there's no script.
|
||||
// For asm.js/wasm modules, there's no script.
|
||||
if (fun->hasScript())
|
||||
options.setVersion(fun->nonLazyScript()->getVersion());
|
||||
|
||||
|
@ -40,7 +40,7 @@ class JSFunction : public js::NativeObject
|
||||
ClassConstructor,
|
||||
Getter,
|
||||
Setter,
|
||||
AsmJS, /* function is an asm.js module or exported function */
|
||||
Wasm, /* function is wasm module or exported function */
|
||||
FunctionKindLimit
|
||||
};
|
||||
|
||||
@ -66,7 +66,7 @@ class JSFunction : public js::NativeObject
|
||||
FUNCTION_KIND_SHIFT = 13,
|
||||
FUNCTION_KIND_MASK = 0x7 << FUNCTION_KIND_SHIFT,
|
||||
|
||||
ASMJS_KIND = AsmJS << FUNCTION_KIND_SHIFT,
|
||||
WASM_KIND = Wasm << FUNCTION_KIND_SHIFT,
|
||||
ARROW_KIND = Arrow << FUNCTION_KIND_SHIFT,
|
||||
METHOD_KIND = Method << FUNCTION_KIND_SHIFT,
|
||||
CLASSCONSTRUCTOR_KIND = ClassConstructor << FUNCTION_KIND_SHIFT,
|
||||
@ -77,8 +77,8 @@ class JSFunction : public js::NativeObject
|
||||
NATIVE_FUN = 0,
|
||||
NATIVE_CTOR = NATIVE_FUN | CONSTRUCTOR,
|
||||
NATIVE_CLASS_CTOR = NATIVE_FUN | CONSTRUCTOR | CLASSCONSTRUCTOR_KIND,
|
||||
ASMJS_CTOR = ASMJS_KIND | NATIVE_CTOR,
|
||||
ASMJS_LAMBDA_CTOR = ASMJS_KIND | NATIVE_CTOR | LAMBDA,
|
||||
WASM_CTOR = WASM_KIND | NATIVE_CTOR,
|
||||
ASMJS_LAMBDA_CTOR = WASM_KIND | NATIVE_CTOR | LAMBDA,
|
||||
INTERPRETED_METHOD = INTERPRETED | METHOD_KIND,
|
||||
INTERPRETED_METHOD_GENERATOR = INTERPRETED | METHOD_KIND,
|
||||
INTERPRETED_CLASS_CONSTRUCTOR = INTERPRETED | CLASSCONSTRUCTOR_KIND | CONSTRUCTOR,
|
||||
@ -173,7 +173,7 @@ class JSFunction : public js::NativeObject
|
||||
bool isConstructor() const { return flags() & CONSTRUCTOR; }
|
||||
|
||||
/* Possible attributes of a native function: */
|
||||
bool isAsmJSNative() const { return kind() == AsmJS; }
|
||||
bool isWasmNative() const { return kind() == Wasm; }
|
||||
|
||||
/* Possible attributes of an interpreted function: */
|
||||
bool isExprBody() const { return flags() & EXPR_BODY; }
|
||||
@ -215,7 +215,7 @@ class JSFunction : public js::NativeObject
|
||||
|
||||
/* Compound attributes: */
|
||||
bool isBuiltin() const {
|
||||
return (isNative() && !isAsmJSNative()) || isSelfHostedBuiltin();
|
||||
return (isNative() && !isWasmNative()) || isSelfHostedBuiltin();
|
||||
}
|
||||
|
||||
bool isNamedLambda() const {
|
||||
|
@ -2160,7 +2160,7 @@ GenerateLcovInfo(JSContext* cx, JSCompartment* comp, GenericPrinter& out)
|
||||
continue;
|
||||
JSFunction& fun = obj->as<JSFunction>();
|
||||
|
||||
// Let's skip asm.js for now.
|
||||
// Let's skip wasm for now.
|
||||
if (!fun.isInterpreted())
|
||||
continue;
|
||||
|
||||
|
@ -791,7 +791,7 @@ js::XDRScript(XDRState<mode>* xdr, HandleScope scriptEnclosingScope, HandleScrip
|
||||
} else if (function->isInterpreted()) {
|
||||
funEnclosingScope = function->nonLazyScript()->enclosingScope();
|
||||
} else {
|
||||
MOZ_ASSERT(function->isAsmJSNative());
|
||||
MOZ_ASSERT(function->isWasmNative());
|
||||
return xdr->fail(JS::TranscodeResult_Failure_AsmJSNotSupported);
|
||||
}
|
||||
|
||||
@ -3084,7 +3084,7 @@ js::DescribeScriptedCallerForCompilation(JSContext* cx, MutableHandleScript mayb
|
||||
*mutedErrors = iter.mutedErrors();
|
||||
|
||||
// These values are only used for introducer fields which are debugging
|
||||
// information and can be safely left null for asm.js frames.
|
||||
// information and can be safely left null for wasm frames.
|
||||
if (iter.hasScript()) {
|
||||
maybeScript.set(iter.script());
|
||||
*pcOffset = iter.pc() - maybeScript->code();
|
||||
@ -3210,7 +3210,7 @@ js::detail::CopyScript(JSContext* cx, HandleScript src, HandleScript dst,
|
||||
RootedFunction innerFun(cx, &obj->as<JSFunction>());
|
||||
if (innerFun->isNative()) {
|
||||
if (cx->compartment() != innerFun->compartment()) {
|
||||
MOZ_ASSERT(innerFun->isAsmJSNative());
|
||||
MOZ_ASSERT(innerFun->isWasmNative());
|
||||
JS_ReportErrorASCII(cx, "AsmJS modules do not yet support cloning.");
|
||||
return false;
|
||||
}
|
||||
|
@ -2783,10 +2783,10 @@ Debugger::updateObservesAsmJSOnDebuggees(IsObserving observing)
|
||||
GlobalObject* global = r.front();
|
||||
JSCompartment* comp = global->compartment();
|
||||
|
||||
if (comp->debuggerObservesAsmJS() == observing)
|
||||
if (comp->debuggerObservesWasm() == observing)
|
||||
continue;
|
||||
|
||||
comp->updateDebuggerObservesAsmJS();
|
||||
comp->updateDebuggerObservesWasm();
|
||||
}
|
||||
}
|
||||
|
||||
@ -3479,7 +3479,7 @@ Debugger::setAllowUnobservedAsmJS(JSContext* cx, unsigned argc, Value* vp)
|
||||
for (WeakGlobalObjectSet::Range r = dbg->debuggees.all(); !r.empty(); r.popFront()) {
|
||||
GlobalObject* global = r.front();
|
||||
JSCompartment* comp = global->compartment();
|
||||
comp->updateDebuggerObservesAsmJS();
|
||||
comp->updateDebuggerObservesWasm();
|
||||
}
|
||||
|
||||
args.rval().setUndefined();
|
||||
@ -3931,7 +3931,7 @@ Debugger::addDebuggeeGlobal(JSContext* cx, Handle<GlobalObject*> global)
|
||||
// (6)
|
||||
AutoRestoreCompartmentDebugMode debugModeGuard(debuggeeCompartment);
|
||||
debuggeeCompartment->setIsDebuggee();
|
||||
debuggeeCompartment->updateDebuggerObservesAsmJS();
|
||||
debuggeeCompartment->updateDebuggerObservesWasm();
|
||||
debuggeeCompartment->updateDebuggerObservesCoverage();
|
||||
if (observesAllExecution() && !ensureExecutionObservabilityOfCompartment(cx, debuggeeCompartment))
|
||||
return false;
|
||||
@ -4047,7 +4047,7 @@ Debugger::removeDebuggeeGlobal(FreeOp* fop, GlobalObject* global,
|
||||
global->compartment()->unsetIsDebuggee();
|
||||
} else {
|
||||
global->compartment()->updateDebuggerObservesAllExecution();
|
||||
global->compartment()->updateDebuggerObservesAsmJS();
|
||||
global->compartment()->updateDebuggerObservesWasm();
|
||||
global->compartment()->updateDebuggerObservesCoverage();
|
||||
}
|
||||
}
|
||||
@ -5626,7 +5626,7 @@ DebuggerScript_getChildScripts(JSContext* cx, unsigned argc, Value* vp)
|
||||
obj = objects->vector[i];
|
||||
if (obj->is<JSFunction>()) {
|
||||
fun = &obj->as<JSFunction>();
|
||||
// The inner function could be an asm.js native.
|
||||
// The inner function could be a wasm native.
|
||||
if (fun->isNative())
|
||||
continue;
|
||||
funScript = GetOrCreateFunctionScript(cx, fun);
|
||||
|
@ -881,9 +881,9 @@ GlobalHelperThreadState::maxParseThreads() const
|
||||
return 1;
|
||||
|
||||
// Don't allow simultaneous off thread parses, to reduce contention on the
|
||||
// atoms table. Note that asm.js compilation depends on this to avoid
|
||||
// atoms table. Note that wasm compilation depends on this to avoid
|
||||
// stalling the helper thread, as off thread parse tasks can trigger and
|
||||
// block on other off thread asm.js compilation tasks.
|
||||
// block on other off thread wasm compilation tasks.
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -87,7 +87,7 @@ class GlobalHelperThreadState
|
||||
wasm::IonCompileTaskPtrVector wasmWorklist_, wasmFinishedList_;
|
||||
|
||||
public:
|
||||
// For now, only allow a single parallel asm.js compilation to happen at a
|
||||
// For now, only allow a single parallel wasm compilation to happen at a
|
||||
// time. This avoids race conditions on wasmWorklist/wasmFinishedList/etc.
|
||||
mozilla::Atomic<bool> wasmCompilationInProgress;
|
||||
|
||||
|
@ -383,7 +383,7 @@ JSRuntime::destroyRuntime()
|
||||
|
||||
/*
|
||||
* Cancel any pending, in progress or completed Ion compilations and
|
||||
* parse tasks. Waiting for AsmJS and compression tasks is done
|
||||
* parse tasks. Waiting for wasm and compression tasks is done
|
||||
* synchronously (on the main thread or during parse tasks), so no
|
||||
* explicit canceling is needed for these.
|
||||
*/
|
||||
|
@ -616,11 +616,11 @@ struct JSRuntime : public JS::shadow::Runtime,
|
||||
return &interrupt_;
|
||||
}
|
||||
|
||||
// Set when handling a segfault in the asm.js signal handler.
|
||||
// Set when handling a segfault in the wasm signal handler.
|
||||
bool handlingSegFault;
|
||||
|
||||
private:
|
||||
// Set when we're handling an interrupt of JIT/asm.js code in
|
||||
// Set when we're handling an interrupt of JIT/wasm code in
|
||||
// InterruptRunningJitCode.
|
||||
mozilla::Atomic<bool> handlingJitInterrupt_;
|
||||
|
||||
|
@ -187,7 +187,7 @@ class SPSProfiler
|
||||
}
|
||||
}
|
||||
|
||||
/* Enter asm.js code */
|
||||
/* Enter wasm code */
|
||||
void beginPseudoJS(const char* string, void* sp);
|
||||
void endPseudoJS() { pop(); }
|
||||
|
||||
|
@ -1512,7 +1512,7 @@ SavedStacks::getLocation(JSContext* cx, const FrameIter& iter,
|
||||
|
||||
// When we have a |JSScript| for this frame, use a potentially memoized
|
||||
// location from our PCLocationMap and copy it into |locationp|. When we do
|
||||
// not have a |JSScript| for this frame (asm.js frames), we take a slow path
|
||||
// not have a |JSScript| for this frame (wasm frames), we take a slow path
|
||||
// that doesn't employ memoization, and update |locationp|'s slots directly.
|
||||
|
||||
if (!iter.hasScript()) {
|
||||
|
@ -301,7 +301,7 @@ class SavedStacks {
|
||||
};
|
||||
|
||||
// We eagerly Atomize the script source stored in LocationValue because
|
||||
// asm.js does not always have a JSScript and the source might not be
|
||||
// wasm does not always have a JSScript and the source might not be
|
||||
// available when we need it later. However, since the JSScript does not
|
||||
// actually hold this atom, we have to trace it strongly to keep it alive.
|
||||
// Thus, it takes two GC passes to fully clean up this table: the first GC
|
||||
|
@ -1763,7 +1763,7 @@ JS::ProfilingFrameIterator::operator++()
|
||||
MOZ_ASSERT(activation_->isWasm() || activation_->isJit());
|
||||
|
||||
if (activation_->isWasm()) {
|
||||
++asmJSIter();
|
||||
++wasmIter();
|
||||
settle();
|
||||
return;
|
||||
}
|
||||
@ -1829,7 +1829,7 @@ JS::ProfilingFrameIterator::iteratorDestroy()
|
||||
MOZ_ASSERT(activation_->isWasm() || activation_->isJit());
|
||||
|
||||
if (activation_->isWasm()) {
|
||||
asmJSIter().~ProfilingFrameIterator();
|
||||
wasmIter().~ProfilingFrameIterator();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1845,7 +1845,7 @@ JS::ProfilingFrameIterator::iteratorDone()
|
||||
MOZ_ASSERT(activation_->isWasm() || activation_->isJit());
|
||||
|
||||
if (activation_->isWasm())
|
||||
return asmJSIter().done();
|
||||
return wasmIter().done();
|
||||
|
||||
return jitIter().done();
|
||||
}
|
||||
@ -1857,7 +1857,7 @@ JS::ProfilingFrameIterator::stackAddress() const
|
||||
MOZ_ASSERT(activation_->isWasm() || activation_->isJit());
|
||||
|
||||
if (activation_->isWasm())
|
||||
return asmJSIter().stackAddress();
|
||||
return wasmIter().stackAddress();
|
||||
|
||||
return jitIter().stackAddress();
|
||||
}
|
||||
@ -1867,9 +1867,9 @@ JS::ProfilingFrameIterator::getPhysicalFrameAndEntry(jit::JitcodeGlobalEntry* en
|
||||
{
|
||||
void* stackAddr = stackAddress();
|
||||
|
||||
if (isAsmJS()) {
|
||||
if (isWasm()) {
|
||||
Frame frame;
|
||||
frame.kind = Frame_AsmJS;
|
||||
frame.kind = Frame_Wasm;
|
||||
frame.stackAddress = stackAddr;
|
||||
frame.returnAddress = nullptr;
|
||||
frame.activation = activation_;
|
||||
@ -1913,9 +1913,9 @@ JS::ProfilingFrameIterator::extractStack(Frame* frames, uint32_t offset, uint32_
|
||||
if (physicalFrame.isNothing())
|
||||
return 0;
|
||||
|
||||
if (isAsmJS()) {
|
||||
if (isWasm()) {
|
||||
frames[offset] = mozilla::Move(physicalFrame.ref());
|
||||
frames[offset].label = DuplicateString(asmJSIter().label());
|
||||
frames[offset].label = DuplicateString(wasmIter().label());
|
||||
if (!frames[offset].label)
|
||||
return 0; // Drop stack frames silently on OOM.
|
||||
return 1;
|
||||
@ -1946,7 +1946,7 @@ JS::ProfilingFrameIterator::getPhysicalFrameWithoutLabel() const
|
||||
}
|
||||
|
||||
bool
|
||||
JS::ProfilingFrameIterator::isAsmJS() const
|
||||
JS::ProfilingFrameIterator::isWasm() const
|
||||
{
|
||||
MOZ_ASSERT(!done());
|
||||
return activation_->isWasm();
|
||||
|
@ -1677,11 +1677,11 @@ class WasmActivation : public Activation
|
||||
return true;
|
||||
}
|
||||
|
||||
// Returns a pointer to the base of the innermost stack frame of asm.js code
|
||||
// Returns a pointer to the base of the innermost stack frame of wasm code
|
||||
// in this activation.
|
||||
uint8_t* fp() const { return fp_; }
|
||||
|
||||
// Returns the reason why asm.js code called out of asm.js code.
|
||||
// Returns the reason why wasm code called out of wasm code.
|
||||
wasm::ExitReason exitReason() const { return exitReason_; }
|
||||
|
||||
// Read by JIT code:
|
||||
@ -1710,7 +1710,7 @@ class WasmActivation : public Activation
|
||||
// Additionally, there are derived FrameIter types that automatically skip
|
||||
// certain frames:
|
||||
// - ScriptFrameIter only shows frames that have an associated JSScript
|
||||
// (currently everything other than asm.js stack frames). When !hasScript(),
|
||||
// (currently everything other than wasm stack frames). When !hasScript(),
|
||||
// clients must stick to the portion of the
|
||||
// interface marked below.
|
||||
// - NonBuiltinScriptFrameIter additionally filters out builtin (self-hosted)
|
||||
|
@ -782,7 +782,7 @@ void mergeStacksIntoProfile(ThreadProfile& aProfile, TickSample* aSample, Native
|
||||
startBufferGen);
|
||||
for (; jsCount < maxFrames && !jsIter.done(); ++jsIter) {
|
||||
// See note below regarding 'J' entries.
|
||||
if (aSample->isSamplingCurrentThread || jsIter.isAsmJS()) {
|
||||
if (aSample->isSamplingCurrentThread || jsIter.isWasm()) {
|
||||
uint32_t extracted = jsIter.extractStack(jsFrames, jsCount, maxFrames);
|
||||
jsCount += extracted;
|
||||
if (jsCount == maxFrames)
|
||||
@ -886,7 +886,7 @@ void mergeStacksIntoProfile(ThreadProfile& aProfile, TickSample* aSample, Native
|
||||
MOZ_ASSERT(jsIndex >= 0);
|
||||
const JS::ProfilingFrameIterator::Frame& jsFrame = jsFrames[jsIndex];
|
||||
|
||||
// Stringifying non-asm.js JIT frames is delayed until streaming
|
||||
// Stringifying non-wasm JIT frames is delayed until streaming
|
||||
// time. To re-lookup the entry in the JitcodeGlobalTable, we need to
|
||||
// store the JIT code address ('J') in the circular buffer.
|
||||
//
|
||||
@ -900,7 +900,7 @@ void mergeStacksIntoProfile(ThreadProfile& aProfile, TickSample* aSample, Native
|
||||
// the buffer, nsRefreshDriver would now be holding on to a backtrace
|
||||
// with stale JIT code return addresses.
|
||||
if (aSample->isSamplingCurrentThread ||
|
||||
jsFrame.kind == JS::ProfilingFrameIterator::Frame_AsmJS) {
|
||||
jsFrame.kind == JS::ProfilingFrameIterator::Frame_Wasm) {
|
||||
addDynamicTag(aProfile, 'c', jsFrame.label.get());
|
||||
} else {
|
||||
MOZ_ASSERT(jsFrame.kind == JS::ProfilingFrameIterator::Frame_Ion ||
|
||||
|
Loading…
Reference in New Issue
Block a user