RFR(S): 8165489: Missing G1 barrier in Unsafe_GetObjectVolatile
Mikael Gerdin
mikael.gerdin at oracle.com
Tue Sep 13 09:02:29 UTC 2016
Hi Martin,
On 2016-09-12 19:09, Doerr, Martin wrote:
> Hi Mikael,
>
> thanks for reviewing.
>
> I have created a new webrev according to your recommendations.
> "is_java_lang_ref_Reference_write" would be confusing because it is a read access.
Of course! My mind must have been preoccupied with other things while
writing the mail :)
I think the change looks good now.
/Mikael
>
> Webrev is here:
> http://cr.openjdk.java.net/~mdoerr/8165489_G1_Unsafe/webrev.01/
>
> Best regards,
> Martin
>
>
> -----Original Message-----
> From: Mikael Gerdin [mailto:mikael.gerdin at oracle.com]
> Sent: Montag, 12. September 2016 15:06
> To: Doerr, Martin <martin.doerr at sap.com>; Kim Barrett <kim.barrett at oracle.com>; hotspot-runtime-dev at openjdk.java.net; hotspot-gc-dev at openjdk.java.net
> Subject: Re: RFR(S): 8165489: Missing G1 barrier in Unsafe_GetObjectVolatile
>
> Hi Martin,
>
> On 2016-09-06 13:11, Doerr, Martin wrote:
>> Hi Kim,
>>
>> as discussed in the thread for JDK-8165018, I created a bug and a webrev:
>> http://cr.openjdk.java.net/~mdoerr/8165489_G1_Unsafe/webrev.00/
>
> inline void G1SATB_registerReference(oop o, jlong offset, oop v)
>
> * Since this is local to unsafe.cpp you should make it "static"
> * I think "inline" is not really needed, especially since there is an
> intrinsic for Unsafe::getObjectVolatile.
> * Since the function does not unconditionally register the reference a
> more complete name for the function would become very long, perhaps it
> should be split into two separate ones:
>
> static bool is_java_lang_ref_Reference_write(oop o, jlong offset) {
> ...
> }
>
> #if INCLUDE_ALL_GCS
> static void ensure_referent_alive(oop v) {
> if (v != NULL) {
> G1SATB.....
> }
> }
> #else
> static void ensure_referent_alive(oop v) {}
> #endif
>
>
>
> so the code in Unsafe_GetObject would be something like:
>
> if (is_java_lang_ref_Reference_write(p, offset)) {
> ensure_referent_alive(v);
> }
>
>
> /Mikael
>
>>
>> Please review.
>>
>> Thanks for the discussion and for sponsoring.
>>
>> Best regards,
>> Martin
>>
More information about the hotspot-gc-dev
mailing list