RFR: 8362566: Use -Xlog:aot+map to print contents of existing AOT cache [v4]
Ioi Lam
iklam at openjdk.org
Thu Aug 14 02:39:30 UTC 2025
> Implement `-Xlog:aot+map` in the production run:
>
>
> $ java -cp HelloWorld.jar -XX:AOTCache=HelloWorld.aot \
> -Xlog:aot+map=file=aot.map:none:filesize=0 \
> HelloWorld
>
>
> I moved the old logging code from archiveBuilder.cpp into a new fille, aotMapLogger.cpp. I did the following to print the map in the production run:
>
> 1. When dumping the AOT cache, `ArchiveBuilder` maintains a list of all the metaspace objects in the archive. However, there's no such list when we are loading from the AOT cache. Therefore, I added a new `RuntimeGatherArchivedMetaspaceObjs` class to discover all the metaspace objects that are stored in the AOT cache.
> 2. A significant rewrite is needed for printing the oops (see comments around `FakeOop`) because we only have an image of the oops in the AOT cache and these aren't real heap objects.
Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
Fixed Windows crashes
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/26514/files
- new: https://git.openjdk.org/jdk/pull/26514/files/b2d2ddda..dab6f6ae
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=26514&range=03
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=26514&range=02-03
Stats: 30 lines in 1 file changed: 18 ins; 12 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/26514.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/26514/head:pull/26514
PR: https://git.openjdk.org/jdk/pull/26514
More information about the hotspot-dev
mailing list