RFR (M): JDK-8043607: Add a GC id as a log decoration similar to PrintGCTimeStamps
Thomas Schatzl
thomas.schatzl at oracle.com
Tue Jun 10 09:09:03 UTC 2014
Hi,
On Mon, 2014-06-09 at 14:04 +0200, Bengt Rutisson wrote:
> Hi again,
>
> Another updated webrev:
> http://cr.openjdk.java.net/~brutisso/8043607/webrev.05/
>
> Mainly two changes compared to the previous version. I had to remove the
> assert hat we only increment the GC id during a safepoint. That is not
> true for CMS, but I remember us looking thoroughly at that when we
> introduced the GC id for JFR and we came to the conclusion that it was
> safe. Anyway, this is not different than before, so I will just leave it
> out of this change for now.
Okay.
>
> The other thing is that C++ does not guarantee the order of how static
> instances are initialized. Since the parallel collector uses static
> instances of everything, including the GCTracer we may get conflicts
> with the statically initialized GCId::UNDEFINED value. To work around
> this I changed to a method called GCId::undefnied() that returns the
> undefined GCId. That made it possible to have an instance method on GCId
> to check if it is valid. Using that method (GCId::is_undefined())
> removed the need of overloading the equals operators.
>
> Here's a diff compared to the last webrev:
> http://cr.openjdk.java.net/~brutisso/8043607/webrev.04-05.diff/
Okay.
Regarding the test and possible backporting: the test currently assumes
that gc id printing is on by default. Wouldn't it be better to specify
+/-PrintGCId in the these tests to make sure it also works with
different default settings, and possibly one run checking default
settings?
You mentioned somewhere that you want to backport this change to 8u with
the default value of PrintGCid to be false (iirc) too.
Thanks,
Thomas
More information about the hotspot-dev
mailing list