JDK-8210388 : Use hash table to store archived subgraph_info records
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 12
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-09-04
  • Updated: 2019-06-23
  • Resolved: 2018-10-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 12
12 b15Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
For each archived java object subgraph, a subgraph_info record is created and stored in the archive file at dump time. These records are searched at runtime to retrieve the information associated with a specific subgraph when it needs to be installed in the entry point (which is usually a static filed), triggered by a VM.initializeFromArchive() call. 

We use an array to store the subgraph_info records. Currently the number of archived subgraph_info records are small (< 10) and the overhead of the liner search is not heavy. When more subgraphs are archived in the future and the number of records grows, we should consider using a hashtable to store the archived subgraph info records.
Comments
I am thinking of doing this as part of JDK-8198698 Archive Lambda classes in CDS. Instead of creating a separate hashtable, the subgraph_info record can be added to SharedDictionaryEntry.
04-09-2018