Skip to content

chains-project/aotp

Repository files navigation

aotp — AOT Cache Parser

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.

Build

mvn package

Usage

Print file map header

java -jar aotp/target/aotp-0.0.1-SNAPSHOT.jar <cache.aot> --header

List instance classes in the AOTCache

java -jar aotp/target/aotp-0.0.1-SNAPSHOT.jar <cache.aot> --list-classes

List classes with a specific flag

For 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_mirror

Multiple 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_objs

Print details of a class

java -jar aotp/target/aotp-0.0.1-SNAPSHOT.jar <cache.aot> --print-class "java/lang/String"

Print class sizes

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"

Related Work

Java AOT Cache Diagnostics Tool

About

Looking inside AOTCache

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors