RFR(s): 8029162: G1: Shared SATB queue never enabled

Per Liden per.liden at oracle.com
Fri Nov 29 09:21:08 UTC 2013


Hi Thomas,

On 2013-11-29 10:01, Thomas Schatzl wrote:
> Hi,
>
> On Thu, 2013-11-28 at 17:49 +0100, Per Liden wrote:
>> Summary: When activating/deactivating the G1 pre-barrier all SATB queues
>> are looped through and have their active state set accordingly. There is
>> one queue per Java thread and a shared queue for all non-Java threads.
>> The loop done to set the active state of all queues forgets to set the
>> active state on the shared queue. I suspect this was missed because the
>> logic in SATBMarkQueueSet::set_active_all_threads() is mixed with quite
>> a bit of verification code. This patch also moves this verification code
>> out into a separate function.
>    I actually suspect that the shared queue has intentionally not been
> enabled so that the reference queue code becomes simpler - just do an
> oop_store() instead of manually invoking the barrier.

The reference processor is already doing manual barriers in other places 
so it would seem strange to only leave this part out. But who knows, 
that might have been the reason...  wonder why the shared queue was kept 
around at all in that case. Oh, well :)

>
> So I think this change is just breaking "fine" code (for an arbitrary
> definition of fine :), "fixed" then by JDK-8029255 .
>
>> Testing done: jprt, kitchensink (10 hours), gcbasher (10 hours)
>>
>> http://cr.openjdk.java.net/~pliden/8029162/webrev.0/
>>
>> https://bugs.openjdk.java.net/browse/JDK-8029162
> Looks good. Will have a look at the other change right away.

Thanks a lot!

cheers,
/Per




More information about the hotspot-gc-dev mailing list