RFR (XXS): 8133043: Clean up code related to termination stats printing

Thomas Schatzl thomas.schatzl at oracle.com
Wed Aug 5 15:55:13 UTC 2015

Hi Jon,

On Wed, 2015-08-05 at 08:52 -0700, Jon Masamitsu wrote:
> Thomas,
> You substituted _queue_num for i (worker_id) in
> http://cr.openjdk.java.net/~tschatzl/8133043/webrev/src/share/vm/gc/g1/g1ParScanThreadState.cpp.udiff.html
> -               i, elapsed_ms, s_roots_ms, s_roots_ms * 100 / elapsed_ms,
> +               _queue_num, elapsed_ms, s_roots_ms, s_roots_ms * 100 / elapsed_ms,
> I can see how _queue_num would be more interesting  but is worker_id just
> of no value so it is not worth printing?   I don't have any perspective 
> on this
> so I'm not objecting to dropping the worker_id.    Just wondering if 
> printing
> less is better.  And you can push it as is.

The original code passed worker_id as "i" here, however, _queue_num ==

If you look at g1CollectedHeap.cpp line 4514, the code passes worker_id
to the ParScanThreadState, that is _queue_num.

A later patch also for review changes _queue_num to _worker_id, and then
it becomes clear again.

> Rest looks good.
> Reviewed.

Thanks for the review,

More information about the hotspot-gc-dev mailing list