8392453: JVM should be able to display AOT cache configurations #33798
All Vouch review confidence checks passed
Residual risk 0.40 = Change Risk (0.75) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.75 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.344
Sensitive Paths
sensitive_paths
0.075
Real PR Conversation Timeline
1 comments
"Review active on #33798"
general
weight: 0.35
Delawen
This PR adds a way to print a human-readable and diff-able (line-oriented, not JSON) configuration report for either an AOT cache or an arbitrary running JVM.
It uses the already existing
FileMapHeader::print(outputStream st)and the macros PRINT_CDS_MUST_MATCH_FLAG and AOTCODECACHE_CHECK_VAR as codebase for this implementation.Add two new arguments to the printing methods of aot cache header:
-
output_for_diff: To print only the comparable properties between the JVM and the cache. This allows us to use the same method for both the header of the aot cache map file and this functionality.-
actual_jvm_config: Print the actual JVM config instead of the cache configuration. This way we can make sure we use the exact same output for both, just changing the value printed on each version.With these arguments we can now easily print a diff-able list of properties for either the cache or the JVM.
The "ready-to-diff" outputs of both the cache and the actual jvm configuration are outputted on two different log label combinations, to be able to output them on two different files to be able to quickly diff:
-
-Xlog:aot+setting+requiredto print AOT settings that are required to load the AOT cache-
-Xlog:aot+setting+selectedto print AOT settings that are selected by the current JVMIt can be used like this:
1.- Generate the two configuration files:
java -XX:AOTCache=app.aot -Xlog:aot+setting+required=info:file=codecache.config:none -Xlog:aot+setting+selected=info:file=sys.config:none -jar app.jar2.- Diff the output:
diff codecache.config sys.configOutput example:
``
$ cat target/sys.config
core_region_alignment: 4096
obj_alignment: 8
narrow_oop_base: 0x0000000080000000
narrow_oop_shift 3
compact_strings: 1
compact_headers: 1
max_heap_size: 8262778880
narrow_oop_mode: 3
compressed_oops: 1
narrow_klass_pointer_bits: 22
narrow_klass_shift: 10
jvm_ident: OpenJDK 64-Bit Server VM (28-internal-adhoc.delawen.jdk) for linux-amd64 JRE (28-internal-adhoc.delawen.jdk), built on 2026-11-10T09:20:00Z with gcc 16.2.1 20261029 (Red Hat 16.2.1-3)
verify_local: 0
verify_remote: 1
object_streaming_mode: 0
has_full_module_graph 1
has_valhalla_patched_classes 0
UseArrayFlattening false
UseFieldFlattening false
ValueTypePassFieldsAsArgs false
ValueTypeReturnedAsFields false
UseNullFreeNonAtomicValueFlattening false
UseNullFreeAtomicValueFlattening false
UseNullableAtomicValueFlattening false
UseNullableNonAtomicValueFlattening false
FlatteningBudget 1024
FlatArrayElementMaxOops 4
RestrictReservedStack true
DiagnoseSyncOnValueBasedClasses 0
has_aot_linked_classes 0
cpu features: cx8, cmov, fxsr, ht, 3dnowpref, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, lzcnt, tsc, tscinvbit, avx, avx2, aes, erms, clmul, bmi1, bmi2, adx, sha, fma, vzeroupper, clflushopt, clwb, serialize, rdtscp, rdpid, fsrm, gfni, f16c, pku, ospke, cet_ibt, cet_ss, hybrid
type_profile_level: 111
type_profile_args_limit: 2
type_profile_parms_limit: 2
type_profile_width: 2
bci_profile_width: 2
type_profile_casts: 1
profile_traps: 1
profile_exception_handlers: 1
spec_trap_limit_extra_entries: 3
AllocateInstancePrefetchLines: 1
AllocatePrefetchDistance: 192
AllocatePrefetchLines: 4
AllocatePrefetchStepSize: 64
CodeEntryAlignment: 32
EnableContended: true
OptoLoopAlignment: 16
RestrictContended: true
ContendedPaddingWidth: 128
GCCardSizeInBytes: 512
AlwaysSafeConstructors: false
UseCondCardMark: true
DoJVMTIVirtualThreadTransitions: true
PreserveFramePointer: false
StackReservedPages: 1
StackShadowPages: 20
UseTLAB: true
ZeroTLAB: false
UseAdler32Intrinsics: true
UseAESCTRIntrinsics: true
UseAESIntrinsics: true
UseBASE64Intrinsics: true
UseChaCha20Intrinsics: true
UseCRC32CIntrinsics: true
UseCRC32Intrinsics: true
UseDilithiumIntrinsics: true
UseGHASHIntrinsics: true
UseIntPoly25519Intrinsics: true
UseKyberIntrinsics: false
UseMD5Intrinsics: true
UsePoly1305Intrinsics: false
UseSecondarySupersTable: true
UseSHA1Intrinsics: true
UseSHA256Intrinsics: true
UseSHA3Intrinsics: false
UseSHA512Intrinsics: true
UseIntPolyIntrinsics: false
UseVectorizedHashCodeIntrinsic: true
UseVectorizedMismatchIntrinsic: true
VMContinuations: true
VerifyOops: false
CountCompiledCalls: false
DTraceMethodProbes: false
DTraceAllocProbes: false
CompressedKlassPointers_shift: 10
JavaAssertions_systemClassDefault: false
JavaAssertions_userClassDefault: false
COOP_use_implicit_null_checks: true
os_vm_page_size: 4096
Universe_heap_kind: g1 gc
ZAddressHeapBaseShift_for_VerifyOops: 0
ExplicitGCInvokesConcurrent: false
ShenandoahLoadRefBarrier: true
ShenandoahSATBBarrier: true
ShenandoahCloneBarrier: true
ShenandoahCardBarrier: false
ArrayOperationPartialInlineSize: 0
MaxVectorSize: 32
UseMontgomeryMultiplyIntrinsic: true
UseMontgomerySquareIntrinsic: true
UseMulAddIntrinsic: true
UseMultiplyToLenIntrinsic: true
UseSquareToLenIntrinsic: true
StackTraceInThrowable: true
OmitStackTraceInFastThrow: true
AVX3Threshold: 4096
CopyAVX3Threshold: 0
EnableX86ECoreOpts: true
UseCountTrailingZerosInstruction: true
UseLibmIntrinsic: true
UseSSE42Intrinsics: true
CheckJNICalls: false
`---------
<!-- Anything below this marker will be automatically updated, please do not edit manually! -->
---------
Progress
Issue
JDK-8392453: JVM should be able to display AOT cache configurations (Enhancement - P4)
Reviewers
* Vladimir Kozlov (@vnkozlov - Reviewer) 🔄 Re-review required (review applies to 59fde289)
Reviewing
<details><summary>Using <code>git</code></summary>
Checkout this PR locally: \
$ git fetch https://git.openjdk.org/jdk.git pull/33798/head:pull/33798
\
$ git checkout pull/33798Update a local copy of the PR: \
$ git checkout pull/33798
\
$ git pull https://git.openjdk.org/jdk.git pull/33798/head</details>
<details><summary>Using Skara CLI tools</summary>
Checkout this PR locally: \
$ git pr checkout 33798
View PR using the GUI difftool: \
$ git pr show -t 33798`
</details>
<details><summary>Using diff file</summary>
Download this PR as a diff file: \
<a href="https://git.openjdk.org/jdk/pull/33798.diff">https://git.openjdk.org/jdk/pull/33798.diff</a>
</details>
<details><summary>Using Webrev</summary>
Link to Webrev Comment
</details>