JDK-8155638 : Resource allocated BitMaps are often cleared twice
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-04-28
  • Updated: 2017-02-20
  • Resolved: 2016-06-08
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 9
9 b126Fixed
Related Reports
Relates :  
Description
The following pattern can be seen throughout the JVM, but mostly the compiler code:

BitMap map(size); // The bitmap is cleared here
map.clear(); // Then here again

The reason for this is that resource allocated bitmaps used to not be cleared in the constructor.

When G1 was introduced, the code was changed to clear all bitmaps when the backing storage was created, but the compiler code wasn't updated accordingly.

See:
http://hg.openjdk.java.net/jdk9/hs/hotspot/diff/37f87013dfd8/src/share/vm/utilities/bitMap.cpp
Comments
Review request: http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2016-May/022857.html
19-05-2016

Changing back to bug. This is an regression and a fix is already in progress. ILW=Perf regression, C1 compiler but not always seen, none=MMH=P3
19-05-2016

That's not a bug.
28-04-2016