RFR: 8364166: Parallel: Remove the use of soft_ref_policy in Full GC

Thomas Schatzl tschatzl at openjdk.org
Tue Jul 29 08:10:58 UTC 2025


On Mon, 28 Jul 2025 08:00:23 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

> Simple removing redundant soft-ref-clearing checking in full-gc, because Parallel already reacts to this particular gc-cause, `_wb_full_gc`.
> 
> Test: tier1-3

Changes requested by tschatzl (Reviewer).

src/hotspot/share/gc/parallel/psParallelCompact.cpp line 984:

> 982:   clear_all_soft_refs = clear_all_soft_refs
> 983:                      || heap->soft_ref_policy()->should_clear_all_soft_refs();
> 984: 

* the comment for this method needs to be fixed
* the CR description in JIRA should be clarified. This change does not remove all occurrences of `_soft_ref_policy` in Parallel.
* the parameter name `clear_all_soft_refs` in the declaration and the definition are different

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

PR Review: https://git.openjdk.org/jdk/pull/26496#pullrequestreview-3066111354
PR Review Comment: https://git.openjdk.org/jdk/pull/26496#discussion_r2238910328


More information about the hotspot-gc-dev mailing list