RFR(XS): 8251179: Word tearing problem with _last_sweep
Kim Barrett
kim.barrett at oracle.com
Thu Aug 6 23:47:20 UTC 2020
> On Aug 6, 2020, at 6:09 PM, Markus Gronlund <markus.gronlund at oracle.com> wrote:
>
> Greetings,
>
> This is a follow-up to 8235573: Move JFR ObjectSample oop into OopStorage.
>
> As of JDK-8235573, the static variable _last_sweep in objectSampler.cpp can be modified and read concurrently. For 64 bit platforms, this isn't a problem but for 32 bit platforms that support concurrent weak reference processing, this could word tear. This change adds atomic accesses for said variable.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8251179
> Webrev: http://cr.openjdk.java.net/~mgronlun/8251179/webrev00/
> Testing: jdk_jfr
>
> Thank you
> Markus
Looks good.
More information about the hotspot-dev
mailing list