Background
=========
Today, the logging group -Xlog:aot+map can be used in the AOT assembly phase to dump information about the contents of the AOT cache. For example,
$ java -cp HelloWorld.jar -XX:AOTCacheOutput=HelloWorld.aot \
-Xlog:aot+map:file=aot.map:none:filesize=0 \
HelloWorld
To find out what classes are included:
$ grep '@@ Class' cds.map | grep ' java.lang.' | head -5
0x00000008000f99d8: @@ Class 536 java.lang.Cloneable
0x00000008000f9bf8: @@ Class 544 java.lang.Object
0x00000008000fb9c0: @@ Class 544 java.lang.System
0x00000008000fc218: @@ Class 544 java.lang.VersionProps
0x00000008000fe6a0: @@ Class 704 java.lang.String
$ grep '@@ Class' cds.map | wc -l
982
You can get much more information with a log like this:
-Xlog:aot+map=trace,aot+map+oops=trace:file=aot.map:none:filesize=0
Proposal
=======
If you forget to include -Xlog:aot+map when creating the AOT cache, or if you were given an AOT caching without the corresponding map file, it will be desirable to generate the map file again for the AOT cache. For example:
# oops, deleted it by mistake
$ rm -f aot.map
# let's generate it from the cache:
$ java -cp HelloWorld.jar -XX:AOTCache=HelloWorld.aot \
-Xlog:aot+map=file=aot.map:none:filesize=0 \
HelloWorld
This above command will first produce the aot.map file, and then execute the program using the AOT cache.
If you want to just produce the aot.map file without executing the program, specify --version instead of the main class:
$ java -cp HelloWorld.jar -XX:AOTCache=HelloWorld.aot \
-Xlog:aot+map=file=aot.map:none:filesize=0 \
--version
=========
Today, the logging group -Xlog:aot+map can be used in the AOT assembly phase to dump information about the contents of the AOT cache. For example,
$ java -cp HelloWorld.jar -XX:AOTCacheOutput=HelloWorld.aot \
-Xlog:aot+map:file=aot.map:none:filesize=0 \
HelloWorld
To find out what classes are included:
$ grep '@@ Class' cds.map | grep ' java.lang.' | head -5
0x00000008000f99d8: @@ Class 536 java.lang.Cloneable
0x00000008000f9bf8: @@ Class 544 java.lang.Object
0x00000008000fb9c0: @@ Class 544 java.lang.System
0x00000008000fc218: @@ Class 544 java.lang.VersionProps
0x00000008000fe6a0: @@ Class 704 java.lang.String
$ grep '@@ Class' cds.map | wc -l
982
You can get much more information with a log like this:
-Xlog:aot+map=trace,aot+map+oops=trace:file=aot.map:none:filesize=0
Proposal
=======
If you forget to include -Xlog:aot+map when creating the AOT cache, or if you were given an AOT caching without the corresponding map file, it will be desirable to generate the map file again for the AOT cache. For example:
# oops, deleted it by mistake
$ rm -f aot.map
# let's generate it from the cache:
$ java -cp HelloWorld.jar -XX:AOTCache=HelloWorld.aot \
-Xlog:aot+map=file=aot.map:none:filesize=0 \
HelloWorld
This above command will first produce the aot.map file, and then execute the program using the AOT cache.
If you want to just produce the aot.map file without executing the program, specify --version instead of the main class:
$ java -cp HelloWorld.jar -XX:AOTCache=HelloWorld.aot \
-Xlog:aot+map=file=aot.map:none:filesize=0 \
--version
- blocks
-
JDK-8363986 Heap region in AOT cache is not at deterministic address
-
- Open
-
- relates to
-
JDK-8363440 Upgrade AOT map file logging to display more assets and asset content
-
- Open
-