RFR (S) 8078438: Interpreter should support conditional card marks (UseCondCardMark)

Andrew Haley aph at redhat.com
Wed Apr 29 07:57:06 UTC 2015


On 28/04/15 17:13, Andrew Dinn wrote:
>>> or, preferably
>>> >>
>>> >>   add	x10, x13, #0x28
>>> >>   stlr	w14, [x10]
>>> >>   lsr	x10, x13, #9
>>> >>   stlrb	wzr, [x11,x10,lsl #0]
>> > 
>> > That's more like it.
> Yes, that is indeed much preferred.

It's not necessary to use STLRB.  For a volatile OOP store you have

   store -> volatile oop field
   update card mark

It's not necessary for the card mark store to become visible
immediately, just that it not become visible before the OOP store.
This is guaranteed by volatile semantics as long as there is a
happens-before relationship with the reading thread, which there
seems to be because of the way that collector threads use locks.
Therefore, it is not necessary to do anything more than

   add	x10, x13, #0x28
   stlr	w14, [x10]
   lsr	x10, x13, #9
   strb	wzr, [x11,x10,lsl #0]

Andrew.



More information about the hotspot-gc-dev mailing list