[crac] RFR: 8373784: [CRaC] VM Option to require perfect CPU fit
Jan Kratochvil
jkratochvil at openjdk.org
Tue Jan 6 20:33:47 UTC 2026
On Tue, 6 Jan 2026 14:41:20 GMT, Radim Vansa <rvansa at openjdk.org> wrote:
> Right now CRaC will refuse to restore from the image if it is not compatible with current CPU as it assumes extra features. This check can be only relaxed with -XX:+UnlockExperimentalVMOptions -XX:+IgnoreCPUFeatures.
>
> In scenarios with -XX:CRaCIgnoreRestoreIfUnavailable it might be favorable to skip the restore and proceed with running the application from scratch with all CPU features if the image has these restricted. Therefore I propose to create a new option -XX:CheckCPUFeatures with these values:
> * compatible - this is the current behaviour (default)
> * exact - require CPU features from the image to match perfectly
> * skip - the same behaviour as `-XX:+IgnoreCPUFeatures`.
>
> The current `-XX:+IgnoreCPUFeatures` option will be deprecated.
src/hotspot/share/runtime/arguments.cpp line 584:
> 582: { "CRaCAllowToSkipCheckpoint", JDK_Version::jdk(25), JDK_Version::jdk(26), JDK_Version::jdk(27) },
> 583: { "CRaCDoThrowCheckpointException", JDK_Version::undefined(), JDK_Version::jdk(25), JDK_Version::jdk(26) },
> 584: { "IgnoreCPUFeatures", JDK_Version::jdk(26), JDK_Version::jdk(29), JDK_Version::undefined() },
When it is deprecated one should update the existing message:
"If you are sure it will not crash you can override this check by -XX:+UnlockExperimentalVMOptions -XX:+IgnoreCPUFeatures .",
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/285#discussion_r2666203488
More information about the crac-dev
mailing list