HeapRegionRemSetIterator question

Jesper Wilhelmsson jesper.wilhelmsson at oracle.com
Thu Apr 4 20:53:20 UTC 2013


John,

It looks to me as if this array is accessed by different threads over and over 
again. Could this be a source for contention and cache misses due to false 
sharing? Stack allocating new instances in the thread that is to use the 
iterator sounds more efficient to me, especially in a NUMA world which is where 
we are heading I guess.
/Jesper

John Cuthbertson skrev 4/4/13 7:29 PM:
> Hi Everyone,
>
> I've been looking at G1's HeapRegionRemSetIterator and I was wondering if anyone
> knows why we pre-allocate instances of the iterator during startup and then
> initalize them repeatedly when RSet scanning claims new regions? I don't see
> much difference between this and stack allocating new instances - other than
> saving the initialization of one or two fields. Is there any reason not to stack
> allocate the iterator instances?
>
> Thanks,
>
> JohnC



More information about the hotspot-gc-dev mailing list