RFR: 8198515: Extract SoftReferencePolicy code out of CollectorPolicy
stefan.karlsson at oracle.com
Wed Feb 21 19:33:49 UTC 2018
I realized that I could get rid of the set_size_policy code by simply
fetching the size_policy() from the GenCollectedHeap. That way, I don't
add any behavioral changes to this patch.
I also added _soft_ref_gen_policy to the initializer list.
On 2018-02-21 18:59, Stefan Karlsson wrote:
> Hi all,
> Please review this patch to move code related to SoftReference
> handling out from CollectorPolicy into its own classes and files.
> This patch simply reduces the code in CollectorPolicy, as a step
> towards JDK-8198505. There might be some future cleanups that could be
> done here in the future.
> Note the addition in genCollectedHeap.cpp:
> + // Connect the two policies.
> + _soft_ref_gen_policy.set_size_policy(_gen_policy->size_policy());
> There might be possible to straighten up this code, so that the
> size_policy gets set up earlier, before the SoftRefGenPolicy instance.
> If/when that happens, we could set this field in the constructor and
> get rid of this line.
More information about the hotspot-gc-dev