Pretenuring data can be reset unnecessarily under some circumstances
Categories
(Core :: JavaScript: GC, defect, P3)
Tracking
()
People
(Reporter: jonco, Unassigned)
References
(Blocks 1 open bug)
Details
While investigating bug 1952626 I discovered that we have a problem with pretenuring weak map keys. Currently anything used as a weak map key survives minor GC and is tenured, but if these objects are short-lived this confuses our pretenuring recovery strategy and leads to us incorrectly resetting our pretenuring data and not pretenuring such objects.
This is because we see high rates of tenured objects dying in their first GC as evidence towards pretenuring needing to be reset. However this can occur for valid reasons too, one example being shorted lived objects being used as weakmap keys as seen here. This could also apply for any other objects that can't be allocated in the nursery but have short lifetimes.
I don't know how much of an issue this in real use or what the best way to address it is. We should probably collect telemetry on how often these resets happen though.
Updated•5 months ago
|
| Reporter | ||
Comment 2•1 month ago
|
||
one example being shorted lived objects being used as weakmap keys
This does not happen any more since bug 1995021.
Description
•