Open Bug 1994407 Opened 5 months ago Updated 1 month ago

Pretenuring data can be reset unnecessarily under some circumstances

Categories

(Core :: JavaScript: GC, defect, P3)

defect

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.

Blocks: GC.stability
Severity: -- → S3
Priority: -- → P3

Fortunately this is not a correctness issue.

Blocks: GC.performance
No longer blocks: GC.stability
See Also: → 1952626

one example being shorted lived objects being used as weakmap keys

This does not happen any more since bug 1995021.

You need to log in before you can comment on or make changes to this bug.