RFR (S): 8133047: Rename G1ParScanThreadState::_queue_num to _worker_id

Thomas Schatzl thomas.schatzl at oracle.com
Thu Aug 6 07:59:36 UTC 2015


Hi Jon,

On Wed, 2015-08-05 at 10:03 -0700, Jon Masamitsu wrote:
> http://cr.openjdk.java.net/~tschatzl/8133047/webrev.1/src/share/vm/gc/g1/g1CollectedHeap.cpp.udiff.html
> 
> -  assert(_worker_id == _par_scan_state->queue_num(), "sanity");
> +  assert(_worker_id == _par_scan_state->worker_id(), "sanity");
> 
> 
> 
> Kind of makes you wonder why G1ParClosureSuper needs its own _worker_id
> when it has _par_scan_state.  Or is removal of _worker_id from 
> G1ParClosureSuper
> a change that coming soon?  If not, I'll file a CR.

No. The renaming was mostly because I have been working in the
G1ParScanState/G1Allocator area and noticed these issues, I did not
perform some sort of general cleanup.

Also, this change is not merely a renaming, but changes code, so would
imo need more scrutiny regarding performance impact (I am guessing the
extra _worker_id is because of this reason).

I filed JDK-8133096.

> class G1ParClosureSuper : public OopsInHeapRegionClosure {
> protected:
>    G1CollectedHeap* _g1;
>    G1ParScanThreadState* _par_scan_state;
>    uint _worker_id;
> 
> Looks good.

Thanks,
  Thomas





More information about the hotspot-gc-dev mailing list