RFR(s): 8076294: Cleanup of CollectedHeap::kind()
Per Liden
per.liden at oracle.com
Wed Apr 1 08:40:10 UTC 2015
On 2015-04-01 10:29, Stefan Karlsson wrote:
>
> On 2015-03-31 10:21, Per Liden wrote:
>> Hi,
>>
>> Another small cleanup.
>>
>> CollectedHeap::kind() currently returns CollectedHeap::Abstract, which
>> makes little sense. Changing it to be a pure virtual member function
>> instead. The Abstract and SharedHeap members of CollectedHeap::Name
>> can then be removed as they are never used.
>>
>> Webrev: http://cr.openjdk.java.net/~pliden/8076294/webrev.0/
>
> The change looks good to me.
Thanks Stefan!
>
> It's odd that the enum type is called 'Name' while the function is named
> 'kind', but I see that other places uses that duality as well. Maybe we
> could clean that up in a separate change.
Yep, I kind() of agree ;) I'll revisit that after another cleanup I have
in the pipe to see how many uses of the kind() that we have left.
>
> There's also another list of GC names containing the value 'Abstract'.
> See: MemoryManager:Name.
Good point, I filed a bug and will send out a separate patch for that.
/Per
>
> Thanks,
> StefanK
>
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8076294
>>
>> Testing: jprt
>>
>> cheers,
>> /Per
>
More information about the hotspot-gc-dev
mailing list