[crac] RFR: 8372933: [CRaC] Restore failed due to incompatible or missing CPU features, try using -XX:CPUFeatures=0xfoo, 0xbar on checkpoint [v5]

Timofei Pushkin tpushkin at openjdk.org
Mon Feb 2 15:43:36 UTC 2026


On Mon, 2 Feb 2026 15:37:41 GMT, Timofei Pushkin <tpushkin at openjdk.org> wrote:

>> Fixed the exact case, thanks. Renamed it to `current_features` everywhere.
>> 
>> I normally used references for any non-null pointer everywhere but OpenJDK does not do that. I haven't found a coding style rule for it but apparently OpenJDK discourages references. Why do you suggest to use a reference here?
>
> I usually use a pointer-to-class/struct parameter only if it either nullable, the function actually needs a pointer (e.g. does pointer arithmetic), or the function mutates the object (i.e. it's a non-const reference). And even the last two are debatable. Otherwise using a pointer makes the syntax bulkier and makes the function declaration less self-documenting (a pointer allows null).

That is just my opinion, since HotSpot style guide does not have a hard opinion on this (and I don't think it discourages references in any way) I would approve even if this stays a pointer.

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

PR Review Comment: https://git.openjdk.org/crac/pull/278#discussion_r2754977032


More information about the crac-dev mailing list