Need Information for memory sharing with AppCDS
    Ioi Lam 
    ioi.lam at oracle.com
       
    Mon Mar  9 05:03:03 UTC 2020
    
    
  
On 3/8/20 8:51 PM, 向伟(识月) wrote:
> Hi,
>
> We am trying to take advantage of the characteristics of memory sharing with AppCDS, and we expected that the
> JVM internal packages and common packages can be shared with AppCDS.
>
> In the user scenario, there are some common base packages for different Java processes with "-cp common_path"
> Process A: -cp common_path:pathA
> Process B: -cp common_path:pathA:pathB
> Process C: -cp common_path:pathC
>
> I check the code in JDK11, and it uses SharedPathsMiscInfo to do the consistency check for class path.
> The below usage can work in JDK11
> Dump stage:
> -cp common_path
>
> Runtime stage:
> -cp  common_path:new_path
>
> But I find that SharedPathsMiscInfo has been removed in the latest JDK code.
>
> I need the information:
> 1. the new flow to do the consistency check.
> 2. constraint condition about the memory sharing among the different Java processes.
>
> Is there any user guide to use the memory sharing feature for AppCDS?
Hi Wei,
The topic of sharing the same CDS archive between different apps that 
have the same classpath prefix can be found here:
https://docs.oracle.com/en/java/javase/13/docs/specs/man/java.html#application-class-data-sharing
See the section "Sharing a Shared Archive Across Multiple Application 
Processes".
SharedPathsMiscInfo was removed in this RFE in JDK 14: 
https://bugs.openjdk.java.net/browse/JDK-8227370
However, we still enforce the same set of consistency checks as previous 
JDK versions.
Please let me know if you have further questions.
Thanks
- Ioi
> Thanks,
> Wei Xiang
    
    
More information about the hotspot-runtime-dev
mailing list