Lazily linked Ion scripts can be discarded even if we're preserving JIT code
Categories
(Core :: JavaScript Engine: JIT, task)
Tracking
()
People
(Reporter: jandem, Unassigned, NeedInfo)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [sp3])
Lazy linking is used for off-thread Ion compilations. Major GCs cancel off-thread compilations (and this includes anything on the lazy link list), even if we're preserving JIT code. We could be smarter and just link those Ion compilations eagerly instead of throwing them away.
It's not clear if doing this is an improvement: maybe those compilations are mostly dead and unused, and in that case linking them could be slower than discarding them.
This affects hundreds of compilations on Speedometer 3 so I'm filing this to at least do some measurements.
Reporter | ||
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 1•2 years ago
|
||
Given that sp3 runs subtests really fast, I'd expect there to be tons of mostly-dead compilations around. And major GC happens mostly outside the measured time (and outside the actual subtests).
Reporter | ||
Comment 2•2 years ago
•
|
||
There are two things I'm looking into atm:
- Ion compilation memory is freed off-thread, with one free task per compilation. We can instead batch those into a single free task for cases where we cancel multiple compilations at once. This both avoids per-task (dispatch) overhead and also helps us avoid freeing memory concurrently (jemalloc lock contention).
- When we link an Ion compilation, we can link all pending compilations for the current realm. This also lets us take advantage of the batched freeing mechanism above.
I have some patches implementing this; now I just need to see how it affects performance.
Updated•1 years ago
|
Description
•