Closed
Bug 1698427
Opened 4 years ago
Closed 4 years ago
Refactor JS frame extraction out of MergeStacks
Categories
(Core :: Gecko Profiler, task, P2)
Core
Gecko Profiler
Tracking
()
RESOLVED
FIXED
88 Branch
| Tracking | Status | |
|---|---|---|
| firefox88 | --- | fixed |
People
(Reporter: mozbugz, Assigned: mozbugz)
References
Details
Attachments
(3 files)
This small task moves the JS frame extraction code out of MergeStacks.
This ExtractJsFrames function will be called before MergeStacks, and even before stack-walking.
A later task will extract more data from JS frames, to be passed to stack walkers, to help them resume native walking past JIT frames.
| Assignee | ||
Comment 1•4 years ago
|
||
| Assignee | ||
Comment 2•4 years ago
|
||
Some changes after the previous just-move-the-code refactoring:
- Updated functon comment for clarity.
- Moved
samplePosInBuffercomputation to where it's first needed. Bonus: It won't happen anymore if there is no JS stack. - Construct
jsIteras firstforstatement, it's clearer that it's the main loop iterator. - Moved
MAX_JS_FRAMESchecks into the loop body, and only when needed. - Moved
contextretrieval closer to first use. Same inMergeStacks; Note thataRegisteredThread.GetJSContext()is only reading a member variable, so it's cheap enough use it again there if needed, it may even be better overall than storing it in a register or on the stack (if the compiler couldn't optimize it already before).
Depends on D108415
| Assignee | ||
Comment 3•4 years ago
|
||
In a later bug, ExtractJsFrames will retrieve more information about the JS frames, which will be given to stack walkers in order to resume native sampling past JIT stacks.
Depends on D108416
Pushed by gsquelart@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9129f0dc9f38
ExtractJsFrames factored out of MergeStacks - r=canaltinova
https://hg.mozilla.org/integration/autoland/rev/314767eb5be5
Clean and optimize ExtractJsFrames - r=canaltinova
https://hg.mozilla.org/integration/autoland/rev/e90eebb4095d
Call ExtractJsFrames outside of MergeStacks, before native stackwalk (if present) - r=canaltinova
Comment 5•4 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/9129f0dc9f38
https://hg.mozilla.org/mozilla-central/rev/314767eb5be5
https://hg.mozilla.org/mozilla-central/rev/e90eebb4095d
Status: NEW → RESOLVED
Closed: 4 years ago
status-firefox88:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•