HeapRegionRemSetIterator question
John Cuthbertson
john.cuthbertson at oracle.com
Thu Apr 4 22:01:12 UTC 2013
Hi Jesper,
That's a good point about the false sharing. If we see it with
PSPromotionManager instances with ParallelGC then it's possible for this
array.
If no one objects I'll change the iterator to be stack allocated - it's
going to make like a little simpler for me.
JohnC
On 4/4/2013 1:53 PM, Jesper Wilhelmsson wrote:
> 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