Bug 1707489 - Retrieve entry registers and stop areas from JIT - r=canaltinova

ExtractJsFrames fills the provided StackWalkControl with C++-to-JIT entry registers, if any.

Differential Revision: https://phabricator.services.mozilla.com/D113273
This commit is contained in:
Gerald Squelart 2021-06-03 22:11:05 +00:00
Родитель 9f1b967d52
Коммит f6a4d6b7a0
1 изменённых файлов: 19 добавлений и 1 удалений

Просмотреть файл

@ -1842,7 +1842,25 @@ static uint32_t ExtractJsFrames(
}
}
// TODO: Store JIT data in aStackWalkControlIfSupported. See next patch.
if constexpr (StackWalkControl::scIsSupported) {
if (aStackWalkControlIfSupported) {
jsIter.getCppEntryRegisters().apply(
[&](const JS::ProfilingFrameIterator::RegisterState&
aCppEntry) {
StackWalkControl::ResumePoint resumePoint;
resumePoint.resumeSp = aCppEntry.sp;
resumePoint.resumeBp = aCppEntry.fp;
resumePoint.resumePc = aCppEntry.pc;
aStackWalkControlIfSupported->AddResumePoint(
std::move(resumePoint));
});
}
} else {
MOZ_ASSERT(!aStackWalkControlIfSupported,
"aStackWalkControlIfSupported should be null when "
"!StackWalkControl::scIsSupported");
(void)aStackWalkControlIfSupported;
}
}
}
}