JDK-8293979 : Resolve JVM_CONSTANT_Class references at CDS dump time
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 20
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-09-19
  • Updated: 2023-10-19
  • Resolved: 2022-10-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 20
20 b21Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
This is preparation work for JDK-8293336 - Store LambdaForms in CDS archive heap

Some JVM_CONSTANT_Class entries are guaranteed to resolve to the same value at both CDS dump time and run time:

[1] Classes that are resolved during vmClasses::resolve_all(). These classes cannot be replaced by JVMTI agents at run time.

[2] Supertypes -- at run time, a class C can be loaded from the CDS archive only if all of C's super types are also loaded from the CDS archive. Therefore, we know that a  JVM_CONSTANT_Class reference to a supertype of C must resolved to the same value at both CDS dump time and run time.

By doing the resolution at dump time, we can speed up run time start-up by a little bit.
 
Comments
Changeset: aad81f2e Author: Ioi Lam <iklam@openjdk.org> Date: 2022-10-23 23:26:05 +0000 URL: https://git.openjdk.org/jdk/commit/aad81f2eba5a77a028a58a767fd4afc11b4dd528
23-10-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/10330 Date: 2022-09-19 04:33:55 +0000
19-09-2022