JDK-7074017 : Introduce MemBarAcquireLock/MemBarReleaseLock nodes for monitor enter/exit code paths
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs21,hs22
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,linux
  • CPU: generic,arm
  • Submitted: 2011-08-02
  • Updated: 2011-11-25
  • Resolved: 2011-09-30
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 7 Other
7u2Fixed hs22Fixed
Description
To implement the java memory model, on a monitor operation, c2 currently adds a MemBarAcquire/MemBarRelease node after/before the monitor enter/exit. No membar instruction is emitted for these MemBarAcquire/MemBarRelease: in the ad file, Matcher::prior_fast_lock()/Matcher::post_fast_unlock() is used to detect a MemBarAcquire/MemBarRelease associated with a monitor enter/exit and to use an empty encoding.

Matcher::post_fast_unlock() is broken with UseOptoBiasInlining: it never returns true.

This CR covers the replacement of MemBarAcquire/MemBarRelease nodes on the monitor enter/exit code paths with new MemBarAcquireLock/MemBarReleaseLock nodes. It  makes it straightforward to distinguish between MemBarAcquire/MemBarRelease on the monitor enter/exit code paths and other code paths without the need for the MemBarAcquire/MemBarRelease machinery.

Comments
EVALUATION See main CR
12-09-2011

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/f1c12354c3f7
23-08-2011

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/f1c12354c3f7
10-08-2011

EVALUATION See description.
02-08-2011