RFR: 8198515: Extract SoftReferencePolicy code out of CollectorPolicy
stefan.johansson at oracle.com
Thu Feb 22 15:32:48 UTC 2018
Looks good to me too,
On 2018-02-22 14:13, Per Liden wrote:
> Looks good. I agree that there are more things to clean up in the soft
> ref area, but this is a good first strep.
> On 02/21/2018 08:33 PM, Stefan Karlsson wrote:
>> Hi all,
>> Updated webrevs:
>> 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