Skip to content

Conversation

@rvansa
Copy link
Collaborator

@rvansa rvansa commented Dec 17, 2025

Currently -XX:CPUFeatures option is available only on x86_64. This complicates creating multiarch container images that are meant to be universally runnable (with -XX:CPUFeatures=generic).

I propose to make this option available on all architectures, with the non-arch specific values:

  • generic
  • native
  • ignore

The implementation on non-x86_64 will only validate the sanity of the value.

The related option -XX:+ShowCPUFeatures will print an informative message (saying that the option does not make much sense).

-XX:+IgnoreCPUFeatures will be permitted as well, but it will be a no-op on the other architectures.


Progress

  • Change must not contain extraneous whitespace

Issue

  • JDK-8373781: [CRaC] Permit -XX:CPUFeatures on other platforms (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/crac.git pull/282/head:pull/282
$ git checkout pull/282

Update a local copy of the PR:
$ git checkout pull/282
$ git pull https://git.openjdk.org/crac.git pull/282/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 282

View PR using the GUI difftool:
$ git pr show -t 282

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/crac/pull/282.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 17, 2025

👋 Welcome back rvansa! A progress list of the required criteria for merging this PR into crac will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Dec 17, 2025

@rvansa This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8373781: [CRaC] Permit -XX:CPUFeatures on other platforms

Reviewed-by: tpushkin

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 3 new commits pushed to the crac branch:

  • 15dcf3b: 8373687: [CRaC] Add metrics through jcmd
  • 6fa1e41: 8373043: [CRaC] remove CPUFeatures qemu-kvm test
  • 311dafd: 8373027: [CRaC] [CRIU] x86: FPU xsave area present, but host cpu doesn't support it

Please see this link for an up-to-date comparison between the source branch of this pull request and the crac branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the crac branch, type /integrate in a new comment.

@openjdk openjdk bot added ready Pull request is ready to be integrated rfr Pull request is ready for review labels Dec 17, 2025
@mlbridge
Copy link

mlbridge bot commented Dec 17, 2025

Webrevs

Copy link
Collaborator

@TimPushkin TimPushkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation LGTM, but we have non-x86 machines in CI so it makes sense to add a test for this

@rvansa
Copy link
Collaborator Author

rvansa commented Dec 23, 2025

I've replaced the shell-based CPUFeatures test, and added test cases.

@rvansa
Copy link
Collaborator Author

rvansa commented Jan 6, 2026

@TimPushkin The tests now pass on all platforms but Mac + x64, where we need to backport upstream changes after GH obsoleted a base image. Please re-review.

Copy link
Collaborator

@TimPushkin TimPushkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two minor things, since you are planning a follow-up maybe it'll be easier/faster to fix them there

Comment on lines -949 to +956
#endif // LINUX
#endif
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to have either #endif // LINUX or #endif // !LINUX — there is a lot of ifdef-s around so it's a bit harder to read without such comments

@@ -0,0 +1,129 @@
/*
* Copyright (c) 2023,2025, Azul Systems, Inc. All rights reserved.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Copyright (c) 2023,2025, Azul Systems, Inc. All rights reserved.
* Copyright (c) 2023, 2025, Azul Systems, Inc. All rights reserved.

@rvansa
Copy link
Collaborator Author

rvansa commented Jan 6, 2026

/integrate

@openjdk
Copy link

openjdk bot commented Jan 6, 2026

Going to push as commit abf0868.
Since your change was applied there have been 3 commits pushed to the crac branch:

  • 15dcf3b: 8373687: [CRaC] Add metrics through jcmd
  • 6fa1e41: 8373043: [CRaC] remove CPUFeatures qemu-kvm test
  • 311dafd: 8373027: [CRaC] [CRIU] x86: FPU xsave area present, but host cpu doesn't support it

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jan 6, 2026
@openjdk openjdk bot closed this Jan 6, 2026
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jan 6, 2026
@openjdk
Copy link

openjdk bot commented Jan 6, 2026

@rvansa Pushed as commit abf0868.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

2 participants