[crac] RFR: 8355974: [CRaC] Move CPUFeatures verification to the parent process of JVM [v5]
Jan Kratochvil
jkratochvil at openjdk.org
Wed Apr 30 12:40:16 UTC 2025
On Tue, 29 Apr 2025 17:43:12 GMT, Timofei Pushkin <tpushkin at openjdk.org> wrote:
>> No longer:
>>
>> crac_engine.cpp:443:32: error: passing ‘const CracEngine’ as ‘this’ argument discards qualifiers [-fpermissive]
>> 443 | switch (prepare_user_data_api()) {
>
> I actually was imagining `prepare_user_data_api` to be called in `crac.cpp` like with the other `prepare_*_api` methods, not inside these functions. And also when getting `ApiStatus::UNSUPPORTED` do something else instead of failing like now.
>
> Sorry, I forgot to write that initially: API extensions, like user data, ideally should not be mandatory, i.e. we shouldn't fail if an engine does not support an extension. In the case of CPU features I think this can be done meaningfully: if user data is not supported and `-XX:CPUFeatures` was not set we can emit a warning (on checkpoint and on every subsequent restore, `-XX:CPUFeatures=ignore`/`IgnoreCPUFeatures` can be used to silence the warning) and try to restore without verifying the features.
Refactored in b0c8012b5173fd049844f0d4f33e2f58f10af96f but I am not sure it is as you intended.
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/227#discussion_r2068575308
More information about the crac-dev
mailing list