JDK-8005082 : NPG: Add specialized Metachunk sizes for reflection and anonymous classloaders for test262parallel
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 8
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2012-12-14
  • Updated: 2013-04-30
  • Resolved: 2012-12-25
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 8 Other
8Fixed hs25Fixed
Related Reports
Relates :  
Description
Reflection classloader and anonymous  classloaders typically only load a single class so should
have a small chunk size than other classlaoders.

The goal of this fix is to not throw out-of-memory exceptions on the test262parallel nashorn test.
While this addition of the specialized does reduce the memory usage for Metaspace chunks, it
has not eliminated the OOME.

Part of the change was to add the special chunk size for the initial chunk for reflection and anonymous
classloaders.  There was a bug in setting the initial chunk which caused the allocation of a new chunk
instead of the reuse of the chunk.  Fixed that fixed some of the OOME's.

For large allocations a humongous chunk is allocated.  The humongous chunk was only being
used for that single large allocation.  When a new Virtualspace was allocated for a  humongous 
chunk allocation, 1 page of the Virtualspace was committed.  That was a bug in that the 1 page
looked like it was already being used.  Fixed it so that no pages are initially allocated.

When gc_locker was active sometimes the GC for a metadata allocation was locked out.  The
satify_failed_metaspace_allocation() was not correctly trying again if GC was locked out.
Fixed that by doing the same test done with of GC's.
Comments
Adding the SpecializedChunkSize for reflection classloaders and anonymous classloaders.
14-12-2012