A tool to inspect and analyze HotSpot AOTCache (.aot) files.
The format is adapted for JDK 27+7 but also works well for JDK 25.
Note that the value of access_flags is different and incorrect in JDK 25-created AOTCache files due to 8372098: Move AccessFlags to InstanceKlass.
mvn packagejava -jar aotp/target/aotp-0.0.1-SNAPSHOT.jar <cache.aot> --headerjava -jar aotp/target/aotp-0.0.1-SNAPSHOT.jar <cache.aot> --list-classesFor example, list classes that have had their <clinit> pre-executed:
java -jar aotp/target/aotp-0.0.1-SNAPSHOT.jar <cache.aot> --list-classes=aotClassFlags:has_aot_initialized_mirrorMultiple flags can be required (all must match):
java -jar aotp/target/aotp-0.0.1-SNAPSHOT.jar <cache.aot> --list-classes=aotClassFlags:has_aot_initialized_mirror,has_archived_enum_objsjava -jar aotp/target/aotp-0.0.1-SNAPSHOT.jar <cache.aot> --print-class "java/lang/String"Caution
This may be wrong. See #9.
java -jar aotp/target/aotp-0.0.1-SNAPSHOT.jar <cache.aot> --class-size "java/lang/String" "java/lang/Object"