RFR (S): JDK-8027428: Different conditions for printing taskqueue statistics for parallel gc, parNew and G1
thomas.schatzl at oracle.com
Wed Oct 1 08:12:26 UTC 2014
On Tue, 2014-09-30 at 22:58 +0200, Jesper Wilhelmsson wrote:
> Sangheon Kim skrev 30/9/14 19:41:
> > Hi Bengt,
> > Thank you for looking at this change.
> > On 09/30/2014 01:36 AM, Bengt Rutisson wrote:
> >> Hi Sangheon,
> >> On 2014-09-30 01:30, Sangheon Kim wrote:
> >>> Hi all,
> >>> can I have reviews for the following small change to print taskqueue statistics
> >>> for parallel gc, parNew and G1?
> >>> Main changes are:
> >>> 1) printing by 'ParallelGCVerbose' flag, not 'PrintGCDetails &&
> >>> ParallelGCVerbose'.
> >>> 2) printing logs via 'gclog_or_tty', not 'tty'.
> >>> 3) adding 'totals' row to sums up.
> >>> CR:
> >>> https://bugs.openjdk.java.net/browse/JDK-8027428
> >>> Webrev:
> >>> http://cr.openjdk.java.net/~jwilhelm/8027428/
> >> But there is a lot of logging that has to do with parallel work (at least in
> >> G1) that is not controlled by this flag. It seems to me that the flag actually
> >> only controls the task queue statistics. Ideally we could change the name of
> >> the flag, but that will be too much overhead I guess. But we can maybe updated
> >> the description to indicate more what it actually controls.
> > After applying this patch, I see this flag in 4 routines (3 files).
> > And as all of them are stats for 'taskqueue' and 'termination', I changed the
> > description as a statistics related flag.
> > But if it's not enough, may I ask your opinion?
> I don't like that this flag controls some, but not all logging for parallel
> Stuff. I think we should do one of the following:
> A. Use ParallelGCVerbose for all verbose logging related to parallel stuff in
> all GCs, or
> B. Only use ParallelGCVerbose in ParallelGC.
> There aren't that many occurrences of the flag so at least B doesn't seem to be
> too much work. A is trickier since it involves finding all verbose logging
> related to parallel stuff.
The question is, what how do we intend to print the task queue
statistics then, consistently across all collectors? This seems to be
the only purpose of ParallelGCVerbose right now.
Sometimes (actually in very specific cases) this information is
There could be an option C) that just adds a new experimental or
diagnostic flag with a proper name that prints task queue statistics,
and let ParallelGCVerbose do nothing and start retiring the flag.
If the task queue statistics are not compiled in, ParallelGCVerbose
prints nothing at all. So this would not be a change in behavior too.
More information about the hotspot-gc-dev