RFR: Uses keep_alive_barrier to keep deduped char array alive
Aleksey Shipilev
shade at redhat.com
Wed Oct 11 19:01:57 UTC 2017
On 10/11/2017 08:58 PM, Zhengyu Gu wrote:
> On 10/11/2017 02:53 PM, Aleksey Shipilev wrote:
>> On 10/11/2017 08:41 PM, Zhengyu Gu wrote:
>>> We need to use newly introduced keep_alive_barrier to ensure deduped string's char array alive, as
>>> required by new concurrent partial GC.
>>>
>>> Webrev: http://cr.openjdk.java.net/~zgu/shenandoah/strdedup_keep_alive/webrev.00/e
>>
>> Shouldn't the read barrier be on some common path, and not here, at least not under UseShenandoahGC?
>> Why do we need it here?
>
> Because keep_alive_barrier can move the oop, while SATB barrier does not.
Ah, damn, OK then. Good to go.
Roman, this is something to fix generically for keep_alive_barrier, right? There are dangerous uses
like that in e.g JNIHandles::resolve_jweak and friends.
Thanks,
-Aleksey
More information about the shenandoah-dev
mailing list