RFR: 8335126: Shenandoah: Improve OOM handling

Roman Kennke rkennke at openjdk.org
Fri Jun 28 14:41:27 UTC 2024


On Thu, 27 Jun 2024 19:01:30 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> My soft ref clearing policy question above was cleared up in the code walkthrough today. We do clear all soft refs upon an allocation failure and therefore, _a fortiori_, before throwing an OOM.
>
> In ShenanoahControlThread::run_service(), we set set_should_clear_all_soft_refs(true) if alloc_failure_pending.  This has the effect of expediting soft-ref processing even before we escalate to full gc.  ShenandoahFullGC::phase1_mark_heap() also sets soft_reference_policy(true), to "forcefully purge all soft references".

I think it is ok because we expect generational Shenandoah Real Soon Now. ;-)

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/19912#discussion_r1658859347


More information about the hotspot-gc-dev mailing list