Closed Bug 1773486 Opened 2 years ago Closed 2 years ago

Set frame pointer correctly in arm64 EnterJit trampoline

Categories

(Core :: JavaScript Engine: JIT, task, P3)

task

Tracking

()

RESOLVED FIXED
103 Branch
Tracking Status
firefox103 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(1 file)

  masm.push(r29, r30);
  masm.moveStackPtrTo(r29);

This is incorrect because it ends up pushing r29 first and r30 second:

stp     x30, x29, [sp, #-16]!
mov     x29, sp

We were generating:

stp     x30, x29, [sp, #-16]!
mov     x29, sp

The standard frame prologue has x29 and x30 reversed.

Markus, I'm curious if this patch makes a difference for you? Should probably disable Ion/Warp until bug 1770366 is in.

I can also just land this patch first if that's easier for you.

Flags: needinfo?(mstange.moz)

I just kicked off a local build with this patch, will let you know once it's done!

No, this patch does not appear to fix it. Profile with javascript.options.ion set to false and this bug's patch applied on top of c2f2df823a07: https://share.firefox.dev/3H5m5Yc

If you expand the sidebar, select the "start" frame at the bottom of the "good" stacks, and then expand the JavaScript category in the sidebar, you can see that there is no time spent in Baseline under the good stacks.

Flags: needinfo?(mstange.moz)

As mentioned on Matrix, I updated the patch: we were clobbering the frame pointer elsewhere in EnterJit :/

(In reply to Markus Stange [:mstange] from comment #6)

It works!! 🎉🎉🎉

Thanks for testing! Hopefully this will also give us much better stack traces for crashes/debugging :)

Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/65177f9de8c4 Set frame pointer correctly in arm64 EnterJit trampoline. r=iain
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: