[crac] RFR: Support -XX:+IgnoreCPUFeatures during -XX:CRaCRestoreFrom [v3]

Anton Kozlov akozlov at openjdk.org
Mon Aug 14 17:37:28 UTC 2023


On Mon, 14 Aug 2023 09:38:58 GMT, Jan Kratochvil <jkratochvil at openjdk.org> wrote:

>> Support -XX:+IgnoreCPUFeatures during -XX:CRaCRestoreFrom
>
> Jan Kratochvil has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits:
> 
>  - Implement -XX:+IgnoreCPUFeatures
>  - Merge branch 'crac' into crac-restoreignore
>  - Split off crac_restore_finalize() from crac_restore().
>  - Document -XX:CPUFeatures=ignore, reject !ignore during -XX:CRaCRestoreFrom
>  - Support -XX:CPUFeatures=ignore during -XX:CRaCRestoreFrom

LGTM except the declaration nit.

src/hotspot/cpu/x86/vm_version_x86.cpp line 2758:

> 2756:   }
> 2757: 
> 2758:   auto supports_exit = [&](const char *supports, bool file, bool this_cpu) {

Just a note, not a part of this PR: all `_supports_*`, except _supports_cx8, are hard-wired to `true`, and all of them mostly serve to communicate CPU capabilities to the shared code.

The `_supports_cx8` equals to supports_cmpxchg8(), and I assume this is supported pretty widely. And supports_cmpxchg8 implemented via` _features & CPU_CX8`, so that is tested along CPU features check.

It looks the whole handling of `_supports_*` can be removed, or at least be turned into assert()s.

src/hotspot/cpu/x86/vm_version_x86.hpp line 630:

> 628:   static void nonlibc_tty_print_uint64_comma_uint64(uint64_t num1, uint64_t num2);
> 629:   static void print_using_features_cr();
> 630:   static bool nonlibc_str_equals(const char *a, const char *b);

Stray declaration

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

PR Review: https://git.openjdk.org/crac/pull/100#pullrequestreview-1577278348
PR Review Comment: https://git.openjdk.org/crac/pull/100#discussion_r1293759380
PR Review Comment: https://git.openjdk.org/crac/pull/100#discussion_r1293742065


More information about the crac-dev mailing list