RFR: 8199918: Shorten names of CollectedHeap::Name members

Per Liden per.liden at oracle.com
Wed Mar 21 14:18:42 UTC 2018


On 03/21/2018 03:00 PM, Aleksey Shipilev wrote:
> On 03/21/2018 02:57 PM, Per Liden wrote:
>> Thanks for reviewing.
>>
>> Updated webrev:
>>
>> http://cr.openjdk.java.net/~pliden/8199918/webrev.0vs1
>> http://cr.openjdk.java.net/~pliden/8199918/webrev.1
> 
> Looks good.

Thanks!

> 
> Should it be "Invalid kind", not "Invalid name"? Maybe "kind()" is tripping me off, and it clashes
> with "name()" that returns char*. It is a minor nit, your call if you want to keep it this way.

Yeah, it's a bit messy (for some historic reasons), both a kind and name 
would be "right" here. The enum type returned by CollectedHeap::kind() 
is CollectedHeap::Name.

I'd like to change the type name to Kind, but the "enum Name + kind()" 
pattern is in at least 4 other GC-related classes, so for inconsistency 
we should change them all in that case.

/Per

> 
> -Aleksey
> 
> 
> 
> 



More information about the hotspot-gc-dev mailing list