[crac] RFR: 8355974: [CRaC] Move CPUFeatures verification to the parent process of JVM [v8]
Timofei Pushkin
tpushkin at openjdk.org
Fri May 9 15:52:17 UTC 2025
On Fri, 9 May 2025 15:25:22 GMT, Jan Kratochvil <jkratochvil at openjdk.org> wrote:
>> src/hotspot/share/runtime/crac.cpp line 532:
>>
>>> 530: }
>>> 531: if (!VM_Version::cpu_features_binary_check(present ? &data : nullptr)) {
>>> 532: log_error(crac)("Image %s has incompatible CPU features in its user data %s", CRaCRestoreFrom, engine.cpufeatures_userdata_name);
>>
>> I think the user doesn't really need to know the name of the user data in this case, just that the image is incompatible with their CPU. Omitting this would also allow making `cpufeatures_userdata_name` a .cpp static as it was before.
>
> I disagree here. When it is incompatible I want to look at the images with `readelf -n` and to know what to look for. Currently `readelf -n` does not support Warp notes but that should be fixed anyway.
Agree, it can be useful for engine developers. But I was thinking as an average user which will see this error — they probably don't know what "user data" is and may get confused thinking something is wrong with their input.
I would suggest making it a debug or verbose log, maybe even unconditional inside the `CracEngine` methods (e.g. "Storing <features_data> as user data <userdata_name>", "Loading user data <userdata_name>") to keep the name private inside the class.
But this is not very important, feel free to skip if doesn't seem as a good idea / feels overcomplicated.
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/227#discussion_r2081966668
More information about the crac-dev
mailing list