[crac] RFR: 8351701: [CRaC] CRaCEngineOptions=help cannot be used with CRaCRestoreFrom [v2]
Timofei Pushkin
tpushkin at openjdk.org
Wed Mar 12 06:35:26 UTC 2025
On Tue, 11 Mar 2025 22:10:59 GMT, Radim Vansa <rvansa at openjdk.org> wrote:
>> Timofei Pushkin has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Test help being not the only engine option
>
> src/hotspot/share/runtime/arguments.cpp line 2264:
>
>> 2262: postcond(CRaCRestoreFrom != nullptr);
>> 2263:
>> 2264: if (CRaCEngineOptions && strcmp(CRaCEngineOptions, "help") == 0) {
>
> Since you compare the full value, rather than one option... What will
>
> java -XX:CRaCEngineOptions=help -XXCRaCEngineOptions=foo.bar ...
>
> do, and do we have a test for that?
`help` will be treated as just another engine options and passed through to the engine, which in case of crexec will lead to `crexec: unknown configure option: help` error. Using `-XX:CRaCEngineOptions=help,args=--arg` or `-XX:CRaCEngineOptions=help=true` will do the same. Both on checkpoint and on restore. There were tests for this but I removed most of them as excessive, brought them back now.
This is intentional, I made it this way for simplicity: would need to parse options and compare all their names to `help` otherwise — and I don't think it would bring much UX benefit. By saying "use '-XX:CRaCEngineOptions=help' to ..." in the VM option docs I meant exactly that: that "help" should be specified as the only option — this can be stated more explicitly but that would be more wordy and I think it is understandable enough as is.
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/211#discussion_r1990701378
More information about the crac-dev
mailing list