JDK-7023069 : G1: Introduce symmetric locking in the slow allocation path
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs21
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-02-28
  • Updated: 2013-09-18
  • Resolved: 2011-04-24
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
7Fixed hs21Fixed
Related Reports
Relates :  
Relates :  
Description
G1's slow allocation path uses an unusual asymmetric locking scheme according to which some of the methods assume that they have the heap lock when called and they either release the heap lock when returning a non-NULL result or retain it when returning a NULL result.

The last major changes to this code were done as part of CR 6974966 (G1: unnecessary direct-to-old allocations) but the above asymmetric locking scheme was retained.

I've had a lot of encouragement to replace it with a symmetric locking scheme to make long-term maintenance of this code simpler.

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/abdfc822206f
30-03-2011

EVALUATION See Description.
28-02-2011