JDK-8251557 : Avoid dumping unused symbols/strings into the CDS archive
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-08-13
  • Updated: 2024-11-20
  • Resolved: 2020-08-28
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 16
16 b14Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
Currently all entries in the SymbolTable/StringTable are dumped into the CDS archive.  The problems are

(1) We end up writing many unused items, such as the mangled names of hidden classes. 

(2) We have to scan the symbol table inside a safepoint, which had caused bugs before (JDK-8245264).

Since JDK-8250990, we already maintain all used Symbols in a growable array. We can dump the shared symbol table using this array, and avoid walking the SymbolTable. A similar solution can be done for the StringTable.

This proposal will reduce complexity in the CDS code, and reduce the size of the CDS archives.

Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/43d93fb6553c User: iklam Date: 2020-08-28 05:25:24 +0000
28-08-2020