RFR: 8144993: Elide redundant memory barrier after AllocationNode

Axel Siebenborn axel.siebenborn at sap.com
Mon Dec 21 09:10:08 UTC 2015


Hi,

On 18.12.2015 21:23, Andrew Haley wrote:
> Hi,
>
> On 18/12/15 13:11, Axel Siebenborn wrote:
>
>> the concern raised in this mail thread is, that an object will be known
>> known to the GC, though it could be seen, as not fully initialized. I
>> share the opinion, that this might be the case.
>> However, I don't see, how it can be a problem with the concurrent
>> threads of G1 or CMS.
>>
>> The G1 collector uses its snapshot at the beginning and just scans
>> objects, that where reachable at the initial marking. Newly allocated
>> objects are considered as life.
> Right, so say the safepoint in question is the SATB.  Then the newly-
> created objects get scanned, and we have the problem as described.
> Right?  Or perhaps I'm missing something.
>
> Andrew.
Only objects, that where live at the SATB safepoint get scanned. 
Newly-created objects will not be scanned.

Axel


More information about the hotspot-compiler-dev mailing list