JDK-7150058 : Allocate symbols from null boot loader to an arena for NMT
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 7u10
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-03-01
  • Updated: 2014-02-04
  • Resolved: 2012-04-11
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 JDK 8 Other
7u40Fixed 8Fixed hs24Fixed
Native memory tracking generates records for individual C heap allocated objets.   At startup time many symbols are created.  Each symbol is a C heap malloc allocation so that they can be individually reclaimed.  The symbols from the null boot loader are never reclaimed, since the null boot loader isn't unloaded.  These symbols can be put in a more permanent memory area.

This seems like it would be a performance gain because the immortal symbols do not need to be ref counted.  It also seems like it would use less real memory since each symbol won't have a malloc buffer.   My measurements so no performance improvements in either of these areas, unfortunately.

The main reason to do this is for NMT.   Also with permgen removal, these symbols are allocated to a mmap space using the same mechanism as arena mechanism, so that they can be shared with class data sharing without having to relocate them in the shared archive.

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-main/hotspot/rev/fc9d8850ab8b

EVALUATION Summary: Move symbol allocation to an arena so NMT doesn't have to track them at startup. Reviewed-by: never, kamg, zgu As usual, guessing at build numbers...

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/fc9d8850ab8b