[crac] RFR: 8373784: [CRaC] VM Option to require perfect CPU fit

Radim Vansa rvansa at openjdk.org
Tue Jan 6 14:47:20 UTC 2026


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.

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

Commit messages:
 - 8373784: [CRaC] VM Option to require perfect CPU fit

Changes: https://git.openjdk.org/crac/pull/285/files
  Webrev: https://webrevs.openjdk.org/?repo=crac&pr=285&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8373784
  Stats: 146 lines in 7 files changed: 137 ins; 0 del; 9 mod
  Patch: https://git.openjdk.org/crac/pull/285.diff
  Fetch: git fetch https://git.openjdk.org/crac.git pull/285/head:pull/285

PR: https://git.openjdk.org/crac/pull/285


More information about the crac-dev mailing list