Add java21-to-25 module: compile-once probes on JDK 21 and 25, removed APIs, build matrix, pinning, compact headers and containers

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b7N4ZDbUtA3ofqAqRV
This commit is contained in:
Claude
2026-12-03 09:26:21 +05:30
parent d4b8552957
commit 3502fd7804
46 changed files with 1371 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
#!/usr/bin/env bash
# Which JVM options that a Java 21 service might carry still start on Java 25, and the other way round (rollback).
source "$(dirname "$0")/env.sh"
echo "# 02-startup-flags: flag, then for each JDK the exit code and the first line the JVM printed (if any)"
for f in \
"-Djava.security.manager=allow" \
"-XX:+UseZGC -XX:+ZGenerational" \
"-XX:+UseZGC -XX:-ZGenerational" \
"-XX:+UseCompactObjectHeaders" \
"-XX:+UnlockExperimentalVMOptions -XX:+UseCompactObjectHeaders" \
"-XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational" \
"-XX:+UseStringDeduplication" \
"-XX:+UseLargePagesIndividualAllocation" \
"-XX:+UseNeon" \
"-XX:LockingMode=2" \
"-XX:+UseEmptySlotsInSupers" \
"-XX:+UseOprofile" \
"-XX:+DontYieldALot" \
"-Xnoagent" \
"-XX:+RegisterFinalizersAtInit" \
"-XX:+UseCompressedClassPointers" \
"-XX:-UseCompressedClassPointers" \
"-XX:+PreserveAllAnnotations" \
"-XX:+UseAdaptiveSizePolicyWithSystemGC" \
"-XX:+EnableDynamicAgentLoading" \
"--sun-misc-unsafe-memory-access=allow" \
"--enable-native-access=ALL-UNNAMED" \
"--illegal-native-access=deny" \
"-Djdk.tracePinnedThreads=full" \
; do
echo "--- $f"
for j in "$J21" "$J25"; do
out=$("$j/bin/java" $f -version 2>&1 | clean); code=$?
out=$("$j/bin/java" $f -version 2>&1 | clean | grep -v -E '^(openjdk |OpenJDK Runtime|OpenJDK 64-Bit Server VM (Temurin|\(build))' | head -1)
"$j/bin/java" $f -version >/dev/null 2>&1; code=$?
printf ' [%s] exit %s %s\n' "$(ver "$j")" "$code" "$out"
done
done