Introduce "region type" field to G1 HeapRegions

Thomas Schatzl thomas.schatzl at oracle.com
Wed Sep 10 13:09:24 UTC 2014


Hi,

On Tue, 2014-09-09 at 20:09 -0400, Tony Printezis wrote:
> Thomas,
> 
> On 9/9/14, 5:23 PM, Thomas Schatzl wrote:
> > Hi,
> >
> > On Tue, 2014-09-09 at 16:43 -0400, Tony Printezis wrote:
> >> Thomas,
> >>
> >> Thanks for looking at this. Inline.
> >>
> >> On 9/9/14, 7:59 AM, Thomas Schatzl wrote:
> >>>     - while we are at touching this code I would appreciate if the method
> >>> names for isHumongous(), startsHumongous() and continuesHumongous() in
> >>> the HeapRegion class would be changed to fit the others as well. I.e.
> >>> is_humongous(), is_startsHu.., is_contin...().
> >>>
> >>> That could probably done in an extra CR as it adds lots of noise.
> >> How about this: I never liked the lower camel case in the *Humongous()
> >> methods on HeapRegion and I'd like to rename them to is_humongous(),
> >> is_starts_humongous(), is_continues_humongous(). However, as you pointed
> >> out that'd be a big noisy change (there are 100+ instances of those
> >> methods in the G1 codebase). So, how about I leave the methods on
> >> HeapRegionType as we'd like them to be and rename the rest as a
> >> follow-up change (and I'll be happy to work on that once this goes in)?
> >> Sounds reasonable?
> > Yes, let's leave the rename out for now.
> 
> OK.
> 
> > I quickly thought about the naming, the state names were StartsHumongous
> > and ContinuesHumongous, so similar to the others, I would somewhat
> > slightly prefer to keep them together (i.e. is_<state-name>) and not add
> > underscores to break the two words of the state name. Not really against
> > the proposed naming though (adding the underscore).
> 
> is_humongous()
> is_StartsHumongous()
> is_ContinuesHumongous()
> 
> At the risk of sounding totally pedantic :-), lower case h on the first 
> and capital on the next two bothers me a bit. I'd prefer the 
> all-lowercase version with underscores if that's OK.

Oh, I meant to suggest is_starts/continuesHumongous() with the first
lower-case letters. The other states have a lower case initial letter
too in combination with the is_-prefix.

I do not mind about the version with the underscores though.

Pushed the latest change through JPRT, looks good to me.

Thanks,
  Thomas





More information about the hotspot-gc-dev mailing list