Closed Bug 1884368 Opened 1 year ago Closed 1 year ago

Retire jit::GetPcScript and PcScriptCache

Categories

(Core :: JavaScript Engine: JIT, task)

task

Tracking

()

RESOLVED FIXED
125 Branch
Tracking Status
firefox125 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

(Whiteboard: [sp3])

Attachments

(1 file)

GetPcScript used to be very hot and a cache was added for it a long time ago. It no longer is called a lot: the only caller is JSContext::currentScript which also isn't used a lot and I think we can rewrite it to use FrameIter.

This lets us remove the custom JIT frame iteration code and also simplifies bug 1884360 because I was running into an edge case with this that doesn't apply with FrameIter.

The cache is pretty large (73 entries of 24 bytes each) so this is also good for memory usage.

We no longer call GetPcScript or cx->currentScript() on hot paths so we
can now try to use FrameIter instead. This lets us remove the custom frame iteration
code and the fixed-size cache for it.

Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/de0a8ca2b267 Remove GetPcScript and PcScriptCache. r=iain
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch
Whiteboard: [sp3]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: