Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8243456

AArch64: Obsolete UseBarriersForVolatile option

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P4
    • Resolution: Approved
    • Fix Version/s: 15
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      Hide
      Internet searches its production usages and found none. Its only usage is an original work-around for a prototype version of a CPU which would also remove it (See https://bugs.openjdk.java.net/browse/JDK-8242469).
      Show
      Internet searches its production usages and found none. Its only usage is an original work-around for a prototype version of a CPU which would also remove it (See https://bugs.openjdk.java.net/browse/JDK-8242469) .
    • Interface Kind:
      add/remove/modify command line option
    • Scope:
      JDK

      Description

      Summary

      Obsolete the VM product option UseBarriersForVolatile

      Problem

      Running application with option "-XX:+UseBarriersForVolatile" might have memory consistent issue like what mentioned in https://bugs.openjdk.java.net/browse/JDK-8241137. Besides it adds complexity to the volatile access implementation, and each usage of it needs to take more consideration of the memory consistent and tests. Since ldar/stlr can work well stably for volatile access, and so does ldaxr/stlxr for unsafe atomic operations, we'd better simplify things by removing this flag and the alternative implementation for volatile memory access.

      Solution

      Obsolete the option and remove its usages in hotspot.

      Here is the discussion details about this flag:

      http://mail.openjdk.java.net/pipermail/aarch64-port-dev/2020-March/008679.html

      http://mail.openjdk.java.net/pipermail/aarch64-port-dev/2020-April/008706.html

      Specification

      Running java with option -XX:+/-UseBarriersForVolatile will no longer enable or disable the feature. Instead, it will print the usual obsolete option warning.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                xgong Xiaohong Gong
                Reporter:
                xgong Xiaohong Gong
                Reviewed By:
                Ningsheng Jian
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: