RFR: 8355638: Allow -Xlog:aot to be used as an alias for -Xlog:cds when using AOT cache [v3]

Ioi Lam iklam at openjdk.org
Wed May 7 18:13:41 UTC 2025


> *Specification:*
> 
> When the JVM is started with any of the following options: AOTCache, AOTCacheOutput, AOTConfiguration, AOTMode:
> 
> - Any `-Xlog` options that starts with the `aot` tag should also match any `LogTagSets` whose first tag is `LogTag::_cds`
> - When printing a `LogTagSet` whose first tag is `LogTag::_cds`, if its `tags` decoration is to be printed, then the first tag in the decoration should be printed as `aot`.
> 
> *Examples:*
> 
> Control case -- this is an example of an old "cds" log. The decoration should be printed as "cds" to be backwards compatible
> 
> $ java -Xshare:auto -Xlog:cds --version | grep trying
> [0.003s][info][cds] trying to map /jdk3/bld/vox/images/jdk/lib/server/classes.jsa
> 
> 
> "aot" can be used to select the "cds" log, but the log will be printed with "aot" as its decoration
> 
> $ java -XX:AOTMode=auto -Xlog:aot --version | grep trying
> [0.015s][info][aot] trying to map /jdk3/bld/vox/images/jdk/lib/server/classes.jsa
> 
> 
> When using new -XX:AOT flags, even if you specify -Xlog:cds, the output will use "aot" decoration
> 
> $ java -XX:AOTMode=auto -Xlog:cds --version | grep tryi
> [0.004s][info][aot] trying to map /jdk3/bld/vox/images/jdk/lib/server/classes.jsa
> 
> 
> When using new -XX:AOT flags, error messages should be logged with "aot" decoration even when no -Xlog flags are specified
> 
> $ java -XX:AOTMode=auto -XX:AOTCache=nofile.aot --version
> [0.009s][error][aot] An error has occurred while processing the AOT cache. Run with -Xlog:aot for details.
> [0.009s][error][aot] Loading AOT cache failed: nofile.aot
> java 25-internal 2025-09-16
> Java(TM) SE Runtime Environment (build 25-internal-adhoc.iklam.vox)
> Java HotSpot(TM) 64-Bit Server VM (build 25-internal-adhoc.iklam.vox, mixed mode)

Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 14 additional commits since the last revision:

 - cds+aot+load -> aot+load
 - Merge branch 'master' into 8355638-xlog-aot-as-alias-for-xlog-cds
 - @jdksjolen comment
 - Fixed comment
 - clean up of existing UL logs for cds
 - Fixed test cases
 - Merge branch 'master' into 8355638-xlog-aot-as-alias-for-xlog-cds
 - Much more simplification
 - Much simplified
 - More tightening .... but this may be the wrong approach
 - ... and 4 more: https://git.openjdk.org/jdk/compare/f34bc86a...b772b3d4

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/24895/files
  - new: https://git.openjdk.org/jdk/pull/24895/files/15a87cef..b772b3d4

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=24895&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24895&range=01-02

  Stats: 1843 lines in 88 files changed: 902 ins; 534 del; 407 mod
  Patch: https://git.openjdk.org/jdk/pull/24895.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24895/head:pull/24895

PR: https://git.openjdk.org/jdk/pull/24895


More information about the hotspot-runtime-dev mailing list