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

Forced data dependencies serve no purpose on x86

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 12
    • Fix Version/s: 12
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b16
    • CPU:
      x86

      Description

      Erik Osterlund writes:

      In src/hotspot/cpu/x86/jniFastGetField_x86_64.cpp

      Note that the is_MP() check was used to conditionally poke in an xor trick to create a data dependency to the safepoint counter. You removed the not is_MP() path with this patch. However, note that this use of forced data dependency to elide the need for an acquire or loadload fence is nonsense on x86 hardware, as loadload simply does not reorder. If you look at the corresponding SPARC code, you will find that there is no such confused xor trick, and rightfully so.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dholmes David Holmes
              Reporter:
              dholmes David Holmes
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: