RFR: 8139200: Eliminate G1ParClosureSuper::_worker_id

Kim Barrett kim.barrett at oracle.com
Tue Oct 13 19:02:15 UTC 2015


On Oct 9, 2015, at 3:26 AM, Kim Barrett <kim.barrett at oracle.com> wrote:
> 
> Please review this cleanup of the construction of G1ParClosureSuper
> and classes derived from it.
> 
> We move the _worker_id member from G1ParClosureSuper down to
> G1ParCopyHelper, where it is actually used.  Other subclasses of
> G1ParClosureSuper no longer need to worry about it.  In particular,
> the complicated initialization of G1ParScanClosure is eliminated,
> getting rid of G1ParClosureSuper::set_par_scan_thread_state.
> 
> [In G1ParCopyHelper we could obtain the worker_id from the
> par_scan_state, but that would add a memory indirection in code that
> is performance sensitive.]
> 
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8139200
> 
> Webrev:
> http://cr.openjdk.java.net/~kbarrett/8139200/webrev.00/
> 
> Testing:
> JPRT

It turns out the webrev.00 I posted wasn’t actually the intended final version, and
contains a mistake that prevents it from even building.  Here’s the corrected webrev
and the incremental change:

http://cr.openjdk.java.net/~kbarrett/8139200/webrev.01/
http://cr.openjdk.java.net/~kbarrett/8139200/webrev.01.incr/

The difference is that G1ParCopyHelper::_worker_id needs to be protected, not private.

Sorry for the mixup.




More information about the hotspot-gc-dev mailing list