Archived heap support in Shenandoah GC

Ashutosh Mehra asmehra at redhat.com
Fri Sep 2 16:23:53 UTC 2022


Hi,

I came across this enhancement [1] to add support for loading archived heap
for non-G1 gc policies. But it is missing Shenandoah GC in the list.

Based on the changes done for supporting other policies (like Parallel) I
added following APIs:

- ShenandoahHeap::allocate_loaded_archive_space()
- ShenandoahHeap::can_load_archived_objects()

and tested it with "-XX:+UseShenandoahGC -Xlog:cds,cds+heap=info" options.
The logs show that the jvm is able to load the archived heap and use the
archived objects:

[0.047s][info][cds] Mapped static  region #2 at base 0x00007f7706699000 top
0x00007f77066d5000 (Bitmap)
[0.047s][info][cds] Loaded heap    region #5 at base 0x0000000611e00000 top
0x0000000611e78000 size 491520 delta 21776826368
[0.048s][info][cds] Loaded heap    region #3 at base 0x0000000611e78000 top
0x0000000611efa000 size 532480 delta 21776269312
[0.048s][info][cds] optimized module handling: enabled
[0.048s][info][cds] full module graph: enabled
[0.048s][info][cds] use_full_module_graph = true; java.base =
0x00000008004f46c0
[0.049s][info][cds] Unmapping region #2 at base 0x00007f7706699000 (Bitmap)
[0.077s][info][cds,heap] initialize_from_archived_subgraph
java.lang.Module$ArchivedData 0x000000080019ff10 (early)
[0.078s][info][cds,heap] initialize_from_archived_subgraph
java.util.ImmutableCollections 0x000000080018c190 (early)
[0.083s][info][cds,heap] initialize_from_archived_subgraph
java.lang.Integer$IntegerCache 0x0000000800048d58 (early)
[0.086s][info][cds,heap] initialize_from_archived_subgraph
java.lang.module.Configuration 0x0000000800193128 (early)
[0.086s][info][cds,heap] initialize_from_archived_subgraph
java.lang.ModuleLayer 0x0000000800162b68 (early)
[0.086s][info][cds,heap] Initializing Enum class:
java.lang.module.ModuleDescriptor$Requires$Modifier
[0.087s][info][cds,heap] initialize_from_archived_subgraph
jdk.internal.loader.ArchivedClassLoaders 0x00000008000fe280 (early)
[0.087s][info][cds,heap] initialize_from_archived_subgraph
jdk.internal.module.ArchivedBootLayer 0x000000080023cd40 (early)
[0.090s][info][cds,heap] initialize_from_archived_subgraph
sun.util.locale.BaseLocale 0x0000000800365660
[0.102s][info][cds,heap] initialize_from_archived_subgraph
java.lang.Long$LongCache 0x000000080004c180

I want to check if adding these two APIs is sufficient. Did I miss anything?

[1] https://bugs.openjdk.org/browse/JDK-8234679

Thanks,
Ashutosh Mehra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-dev/attachments/20220902/770584d1/attachment.htm>


More information about the hotspot-dev mailing list