-
Type:
Sub-task
-
Resolution: Delivered
-
Priority:
P4
-
Affects Version/s: 26
-
Component/s: hotspot
Enhance the ahead-of-time cache, which enables the HotSpot Java Virtual Machine to improve startup and warmup time, so that it can be used with any garbage collector, including the low-latency Z Garbage Collector (ZGC).
Prior to [JEP 516: Ahead-of-Time Object Caching with Any GC](https://openjdk.org/jeps/516), some of the AOT optimizations of the AOT cache from [project Leyden](https://openjdk.org/projects/leyden/), introduced in JDK 24 by [JEP 483: Ahead-of-Time Class Loading & Linking](https://openjdk.org/jeps/483), did not work when using ZGC. The state of objects could not be cached due to memory mapping the object state bit by bit from a file into the heap, which requires a common object format. The advanced memory layout of ZGC was incompatible with the simpler object format used by other GC implementations.
[JEP 516](https://openjdk.org/jeps/516) introduces a new way of loading objects in the background, instead of directly memory mapping a file, which is compatible across all GC implementations. Hence, the full range of optimizations of the AOT cache is now available across all GC implementations, including ZGC.
Prior to [JEP 516: Ahead-of-Time Object Caching with Any GC](https://openjdk.org/jeps/516), some of the AOT optimizations of the AOT cache from [project Leyden](https://openjdk.org/projects/leyden/), introduced in JDK 24 by [JEP 483: Ahead-of-Time Class Loading & Linking](https://openjdk.org/jeps/483), did not work when using ZGC. The state of objects could not be cached due to memory mapping the object state bit by bit from a file into the heap, which requires a common object format. The advanced memory layout of ZGC was incompatible with the simpler object format used by other GC implementations.
[JEP 516](https://openjdk.org/jeps/516) introduces a new way of loading objects in the background, instead of directly memory mapping a file, which is compatible across all GC implementations. Hence, the full range of optimizations of the AOT cache is now available across all GC implementations, including ZGC.