зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1406879: Skip wasm frames when when enabling profiler and setting profiling FP; r=jandem
MozReview-Commit-ID: EIjjda2AorV --HG-- extra : rebase_source : 826c31104983b0207ff4ce1f9a7a89ea75f2630c
This commit is contained in:
Родитель
5610a0e1a8
Коммит
e1285cf36b
|
@ -0,0 +1,9 @@
|
|||
var module = new WebAssembly.Module(wasmTextToBinary(`
|
||||
(module
|
||||
(import "global" "func")
|
||||
(func (export "f")
|
||||
call 0
|
||||
)
|
||||
)
|
||||
`));
|
||||
new WebAssembly.Instance(module, { global: { func: enableGeckoProfiling } }).exports.f();
|
|
@ -69,14 +69,23 @@ GetTopProfilingJitFrame(Activation* act)
|
|||
if (!act || !act->isJit())
|
||||
return nullptr;
|
||||
|
||||
// For null exitFrame, there is no previous exit frame, just return.
|
||||
uint8_t* jsExitFP = act->asJit()->jsExitFP();
|
||||
if (!jsExitFP)
|
||||
jit::JitActivation* jitActivation = act->asJit();
|
||||
|
||||
// If there is no exit frame set, just return.
|
||||
if (!jitActivation->hasExitFP())
|
||||
return nullptr;
|
||||
|
||||
jit::JSJitProfilingFrameIterator iter(jsExitFP);
|
||||
MOZ_ASSERT(!iter.done());
|
||||
return iter.fp();
|
||||
// Skip wasm frames that might be in the way.
|
||||
JitFrameIter iter(jitActivation);
|
||||
while (!iter.done() && iter.isWasm())
|
||||
++iter;
|
||||
|
||||
if (!iter.isJSJit())
|
||||
return nullptr;
|
||||
|
||||
jit::JSJitProfilingFrameIterator jitIter(iter.asJSJit().fp());
|
||||
MOZ_ASSERT(!jitIter.done());
|
||||
return jitIter.fp();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Загрузка…
Ссылка в новой задаче