[crac] RFR: 8364662: [CRaC] Process restore options in the common arguments parser [v2]

Radim Vansa rvansa at openjdk.org
Fri Aug 8 10:56:39 UTC 2025


On Thu, 7 Aug 2025 10:09:34 GMT, Timofei Pushkin <tpushkin at openjdk.org> wrote:

>> Options for restore are now processed during the common VM arguments parsing stage.
>> 
>> Notable improvements compared to the old code:
>> - Options from `-XX:Flags=<file>` and `-XX:VMOptionsFile=<file>` are now also considered
>> - Option aliasing is now handled correctly
>> 
>> **Behavioral change**. If `CRaCIgnoreRestoreIfUnavailable` is true it is now not an error to specify non-restore-settable options on restore — these will just be omitted from forwarding to the restored JVM. This makes it possible to specify non-restore-settable to be used after a failed restore.
>
> Timofei Pushkin has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Fix flag name comparison
>  - Handle aliased restore-settable boolean options

src/hotspot/share/runtime/arguments.cpp line 2971:

> 2969:     // Restored JVM will search for the flag using the name we record here so we
> 2970:     // must ensure the real one is recorded
> 2971:     if (strcmp(flag->name(), name) == 0) {

IIUC the `name` can still contain the equals sign and value? Maybe if you used the `stripped_name`...

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

PR Review Comment: https://git.openjdk.org/crac/pull/258#discussion_r2262627328


More information about the crac-dev mailing list