Forced data dependencies serve no purpose on x86

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 12
    • Affects Version/s: 12
    • Component/s: hotspot
    • None
    • b16
    • x86

      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.

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

              Created:
              Updated:
              Resolved: