RFR (M): 8157952: Parallelize Memory Pretouch

Thomas Schatzl thomas.schatzl at oracle.com
Thu Sep 8 10:30:51 UTC 2016

Hi again,

On Thu, 2016-09-08 at 12:26 +0200, Thomas Schatzl wrote:
> Hi Jon,
> > http://cr.openjdk.java.net/~tschatzl/8157952/webrev/src/share/vm/gc
> > /s
> > hared/workgroup.hpp.frames.html
> > 
> >  64     _gc_id(Universe::is_fully_initialized() ?
> > GCId::current_raw()
> > : 0)
> > What prompted the above change?
> The problem is that we need to use a work gang during initialization
> of the VM. GCId and the whole logging framework is not up at this
> point, and GCId::current_raw() returns -1 (invalid) that is checked
> in some asserts.

To make this more specific: the GCId is stored in the current Thread,
and retrieved by the gangtask from there. However, we do startup in the
primordial thread which is not a Thread, so we can't use it.

I will make an additional constructor of AbstractGangTask that takes a
GC id by parameter, that is probably cleaner and less surprising than
the current code.


More information about the hotspot-gc-dev mailing list