JDK-8192921 : Improve CDS support for custom loaders
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 10
  • Priority: P3
  • Status: Resolved
  • Resolution: Won't Fix
  • Submitted: 2017-12-01
  • Updated: 2021-05-12
  • Resolved: 2020-02-28
Related Reports
Relates :  
Relates :  
Relates :  
Description
In JDK 12, there's experimental support for custom loader in CDS. However, there are limitations:

1. if two or more custom loaders want to load a class named "A", only one of those loaders can actually succeed in loading an archived class.

2. the classlist needs to be crafted (manually, or by a script that parses the output of -Xlog:class+load=debug). We should make it possible to include information for custom loaders automatically with -XX:DumpLoadedClassList.

(TBD - the actual proposal will be discussed on hotspot-runtime-dev@openjdk.java.net).
Comments
Runtime Triage: This is not on our current list of priorities. We will consider this feature if we receive additional customer requirements.
28-02-2020

http://cr.openjdk.java.net/~iklam/jdk13/8192921-cds-cust-loader-improve.v01/
22-12-2018

An example of the current CDS support for custom loader can be found at: https://iklam.github.io/jekyll/update/2018/07/30/eclipse-ide-startup-with-appcds.html
31-07-2018

Sounds good. Breaking a big project into smaller and manageable tasks is always a good idea.
20-07-2018

We should probably do it in 2 steps: JDK-8207812 -- handle only classes loaded by the application class loader. This bug -- handle the classes loaded by other loaders.
19-07-2018

[~iklam]Should this be closed as a duplicate of JDK-8207812, which addresses the custom class loader issue as well? Thanks.
18-07-2018