Optimize and tidy up some LSafepoint methods
Categories
(Core :: JavaScript Engine: JIT, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox140 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
addBoxedValue
has quadratic behavior for no good reason.
See bug 1938512 comment 11 where this showed up in a profile from Mayank.
Assignee | ||
Comment 1•22 days ago
|
||
This avoids quadratic behavior that showed up in a profile. It's also consistent
with what we do in addGcPointer
, addSlotsOrElementsPointer
, etc.
(Furthermore, all jit-tests passed when turning this check into an assertion and
this vector is converted to a BitSet
of slots when we encode the safepoint.)
This likely was based on the nunbox code for 32-bit platforms where we need a
lookup because we have separate type and payload halves, but that doesn't apply
to 64-bit.
Assignee | ||
Comment 2•22 days ago
|
||
This also avoids some redundant assertInvariants
calls.
Also turn some alloc.isGeneralReg()
checks into assertions because GC things
can't be in float registers.
Updated•22 days ago
|
Assignee | ||
Comment 3•21 days ago
|
||
Nunbox handling for 32-bit platforms also had quadratic behavior and has gotten
pretty complicated over the years.
This patch rewrites it with a simpler approach: we now add the separate type and
payload parts to a vector initially (similar to the other things stored in safepoints)
without trying to combine them. Then at the end we sort the entries and process them
all at once.
Comment 5•16 days ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/360898bc3638
https://hg.mozilla.org/mozilla-central/rev/80fb19bd626e
https://hg.mozilla.org/mozilla-central/rev/f479a53a3df5
Comment 6•15 days ago
|
||
Profile with latest Nightly which hopefully has the patches from this bug: https://share.firefox.dev/4kcSHlf
(Looks to me like the Lsnapshot stuff is mostly gone)
Description
•