RFR (S) 8078438: Interpreter should support conditional card marks (UseCondCardMark)
Andrew Dinn
adinn at redhat.com
Wed Apr 29 08:27:30 UTC 2015
On 29/04/15 08:57, Andrew Haley wrote:
> 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]
Well, ok, so it looks like e can get away with an strb when we are doing
a card mark for a volatile store i.e. where we are using an stlr<x> for
the field write.
But for non-volatile stores the accompanying StoreCM needs to be
translated to stlrb. We need that to enforce completion of the preceding
stlr<x> before the card mark becomes visible. So, the status quo is
still inadequate.
regards,
Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in UK and Wales under Company Registration No. 3798903
Directors: Michael Cunningham (USA), Matt Parson (USA), Charlie Peters
(USA), Michael O'Neill (Ireland)
More information about the hotspot-gc-dev
mailing list