RFR(S): 8227225: ParallelGC: add subspace transitions for young gen for gc+heap=info log lines

Tony Printezis tprintezis at twitter.com
Tue Aug 6 14:23:08 UTC 2019

Hi Kim,

The way instances of this class are used is to “checkpoint” the values at
the start of the GC and just report the size transitions at the end of the
GC. We haven’t had a need to assign to an instance, once it’s been
constructed. So, I’d be inclined to just leave the const modifiers in. If
we want to use the assignment operator in the future, we could just remove
the const modifiers then?


Tony Printezis | @TonyPrintezis | tprintezis at twitter.com

On August 5, 2019 at 8:45:54 PM, Kim Barrett (kim.barrett at oracle.com) wrote:

> On Jul 29, 2019, at 10:41 AM, Tony Printezis <tprintezis at twitter.com>
> Hi Thomas,
> Latest webrev here:
> http://cr.openjdk.java.net/~tonyp/8227225/webrev.1/
> Main change: I renamed the PreGCValues class to PreGenGCValues so that
> clear it’s mainly for generational GCs.


63 const size_t _young_gen_used;
64 const size_t _young_gen_capacity;
65 const size_t _eden_used;
66 const size_t _eden_capacity;
67 const size_t _from_used;
68 const size_t _from_capacity;
69 const size_t _old_gen_used;
70 const size_t _old_gen_capacity;
71 const metaspace::MetaspaceSizesSnapshot _meta_sizes;

Making these members const prevents assignment by the default
assignment operator. I don't know if that's intentional, but it seems

The _meta_sizes const qualifier is pre-existing.


Other than that, looks good. I don't need a new webrev if you decide
to remove those const qualifiers.

More information about the hotspot-gc-dev mailing list