JDK-8211046 : Forced data dependencies serve no purpose on x86
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 12
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • CPU: x86
  • Submitted: 2018-09-23
  • Updated: 2018-10-17
  • Resolved: 2018-10-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 12
12 b16Fixed
Related Reports
Relates :  
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.
Comments
The fix for this is to look at the code prior to 8188764 and delete all the os::is_MP code, and keep only the !is_MP code.
23-09-2018