RFR: 8309403: Serial: Remove the useless adaptive size policy in GenCollectedHeap

Albert Mingkun Yang ayang at openjdk.org
Mon Jun 5 11:10:06 UTC 2023


On Sat, 3 Jun 2023 07:27:52 GMT, Guoxiong Li <gli at openjdk.org> wrote:

> Hi all,
> 
> This patch removes the useless code related to the `AdaptiveSizePolicy` in `GenCollectedHeap`.
> As a result, the `SoftRefGenPolicy` is unnecessary too, use `SoftRefPolicy` instead.
> 
> Thanks for the review.
> 
> Best Regards,
> -- Guoxiong

src/hotspot/share/gc/shared/softRefGenPolicy.cpp line 36:

> 34:   AdaptiveSizePolicy* size_policy = GenCollectedHeap::heap()->size_policy();
> 35:   if (size_policy != nullptr) {
> 36:     set_should_clear_all_soft_refs(size_policy->gc_overhead_limit_near());

Why is this call removed? I'd expect `set_should_clear_all_soft_refs(false);` here.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14296#discussion_r1217911071


More information about the hotspot-gc-dev mailing list