RFR: 8139200: Eliminate G1ParClosureSuper::_worker_id

Mikael Gerdin mikael.gerdin at oracle.com
Fri Oct 9 08:29:16 UTC 2015


Hi Kim,

On 2015-10-09 09:26, Kim Barrett 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.

I ran into the same piece of code just last week and had similar 
cleanupy thoughts.

>
> [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/

Nice cleanup!
I noticed that you introduced empty destructors for G1ParClosureSuper 
and G1ParCopyHelper, is there a particular reason for that?

Otherwise the change looks good!

/Mikael

>
> Testing:
> JPRT
>




More information about the hotspot-gc-dev mailing list