JDK-8003421 : NPG: Move oops out of InstanceKlass into mirror
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: hs25
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2012-11-14
  • Updated: 2014-10-08
  • Resolved: 2013-05-23
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 :  
Relates :  
Description
After permgen removal, the only oops that need to be walked in class metadata are in InstanceKlass besides mirrors are protection_domain, signers, init_lock.   If these fields are moved to the mirror there is no increase in overall footprint.   Also these fields can be card marked when modified because mirrors generally get promoted to tenured early, so that young collections don't need to look at these in our metadata (only mirrors).

This would be supportive of MVM because the mirror and these fields cannot be shared between classes so if the InstanceKlass is shared, these things are kept separately in an array indexed by task id.   If these things were in the mirror, we'd only have to worry about the mirror in this array.   The init_lock had to be virtualized in the MVM prototype.   We had extra code that would lock the per-task information as an oop, so this would also be supportive of that.

In javaClasses.hpp there is a mechanism for injecting fields into our known Java objects, so I don't think this is difficult.
Comments
Jtreg tests in <jdk>/test/java/lang/Class test this code.
25-05-2013