JDK-8246181 : Avoid walking SymbolTable during -Xshare:dump
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 15
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-05-29
  • Updated: 2024-11-13
  • Resolved: 2020-06-24
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 b04Fixed
Related Reports
Relates :  
Relates :  
Description
Walking the symbol table during static dump time is problematic (see JDK-8245264). Since all Symbols are marked as permanent during static dumping, we can just save all of them in a global array as they are created, and walk this array during the dump process.

Comments
Changeset: 0e60e8ad Author: Yumin Qi <minqi@openjdk.org> Date: 2020-06-24 11:15:22 +0000 URL: https://git.openjdk.java.net/panama-foreign/commit/0e60e8ad
02-07-2020

Changeset: 0e60e8ad Author: Yumin Qi <minqi@openjdk.org> Date: 2020-06-24 11:15:22 +0000 URL: https://git.openjdk.java.net/amber/commit/0e60e8ad
02-07-2020

Changeset: 0e60e8ad Author: Yumin Qi <minqi@openjdk.org> Date: 2020-06-24 11:15:22 +0000 URL: https://git.openjdk.java.net/mobile/commit/0e60e8ad
02-07-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/5e4af417bb41 User: minqi Date: 2020-06-24 18:16:56 +0000
24-06-2020

An earlier version of the Description: ==== + when creating extra symbols from SharedArchiveConfigFile, record each such symbol in a global array + at the beginning of dumping, use GatherKlassesAndSymbols (from dynamicArchive.cpp) to discover all symbols that are reachable from the classes that will be archived. This will collect all the symbols that we need, without walking the symbol table. This has the extra advantage of not archiving temporary symbols that are not needed by the archive (e.g., names of dynamically generated classes that are not archived). ==== However, adding this extra pass of GatherKlassesAndSymbols using MetaspaceClosure will slow down static CDS dump. This should be implemented as part of JDK-8234693 (Consolidate CDS static and dynamic archive dumping code) which should also optimize the speed of MetaspaceClosure.
23-06-2020