Closed Bug 1700869 Opened 4 years ago Closed 4 years ago

Add `JS::ProfilingFrameIterator::getCppEntryRegisters()` to retrieve registers needed to resume stack-walking

Categories

(Core :: Gecko Profiler, task, P2)

task

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: mozbugz, Assigned: mozbugz)

References

(Blocks 2 open bugs)

Details

Attachments

(3 files)

This bug will focus on the initial implementation of JS::ProfilingFrameIterator::getCppEntryRegisters(), doing nothing on all platforms, except on x64 to start with (as this will be the first platform where stack walkers will be updated).

getCppEntryRegisters() for JIT frames delegates to jit::JitRuntime::getCppEntryRegisters(), which retrieves important state registers pointing at the native caller.

For now implementations on all platforms do nothing. They will be implemented in subsequent patches and bugs, to be used with modified stack walkers, so that they may resume sampling past JIT frames -- see main bug 1635987.

EnterJITStack reflects the native entry stack.

Depends on D109696

From a frame pointer, getCppEntryRegisters() can use the descriptor in CommonFrameLayout, first to verify that it's a CppToJit frame, and then to find the EnterJITStackEntry, in which the native call registers can be retrieved.

Depends on D109697

Depends on: 1700990
Pushed by gsquelart@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bd43525ba2fc JS::ProfilingFrameIterator::getCppEntryRegisters() skeleton - r=jandem https://hg.mozilla.org/integration/autoland/rev/9245b486d243 Add struct EnterJITStack in Trampoline-x64.cpp - r=jandem https://hg.mozilla.org/integration/autoland/rev/7dcf53ec0e8f Implement JitRuntime::getCppEntryRegisters() on x64 - r=jandem
Blocks: 1964452
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: