-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8329031: CPUID feature detection for Advanced Performance Extensions (Intel® APX) #18562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
👋 Welcome back jbhateja! A progress list of the required criteria for merging this PR into |
|
@jatin-bhateja 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: 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 224 new commits pushed to the
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 |
|
@jatin-bhateja The following labels will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command. |
|
/label add hotspot-compiler-dev |
|
@jatin-bhateja |
|
Hi @jatin-bhateja, Can you merge with the latest since PR #18476 is in now? |
Webrevs
|
|
|
||
| VM_Version_StubGenerator(CodeBuffer *c) : StubCodeGenerator(c) {} | ||
|
|
||
| address clear_apx_test_state() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to clear_apx_test_state? r16 onwards are not callee saved. And checking r15 save/restore is not needed so we could remove r15 changes altogether.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, EGPRs are call clobbered registers, but here we are trying to ascertain if their values are preserved across signal handling. Explicit clearing of r16 and r31 during signal handling guarantees that preserved register values post signal handling were re-instantiated by operating system and not because they were not modified externally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, add comment about that.
|
/reviewers 2 |
|
@jatin-bhateja Please ignore my approval above, it was in mistake, I don't know how to undo that. Please do look into the review comments/suggestions above. |
|
Hi @vnkozlov , Please let us know if its good to land in 23. |
No, I don't see the urgency. We need extensive testing that everything works with APX. It is actually good time to push it into JDK 24 to have long testing period before next release. Let us review it and test before integrating. |
|
Actually we can't even fully test it until VM start using all registers provided by APX. |
|
And we don't have HW currently. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few comments
|
|
||
| VM_Version_StubGenerator(CodeBuffer *c) : StubCodeGenerator(c) {} | ||
|
|
||
| address clear_apx_test_state() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, add comment about that.
Hi @vnkozlov , EGPR state restoration across signal handling can only be validated after OS support, CPUID and UseAPX flag validation has been done using Intel® Software Development Emulator, other comments addressed. |
| /* FIXME: Uncomment while integrating JDK-8329032 | ||
| bool save_apx = UseAPX; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are you missing to uncomment this code?
8329032 is about .ad file changes. It should not affect execution of this code.
You need changes in register_x86.* files and may be somewhere else but you don't need C2 changes for this code to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we already have that in place with #19042, which will be open for review after this patch. I added it in comments since this piece of logic is centered around CPUID feature check and pertinent to this patch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay.
| }; | ||
|
|
||
| void VM_Version::report_apx_state_restore_warning() { | ||
| tty->print("warning: Unsuccessful EGPRs state restoration across signal handling, setting UseAPX to false.\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This print is fine during development but I would instead save some value in memory to indicate that OS does not save/restore APX. And then check it after we execute this assembler code. Similar how we do that for AVX.
You would not need to do runtime call and this method then.
Note: tty->print() can do "nasty"/unexpected things which you want to avoid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @vnkozlov , doing a lazy restored state comparison now to align with existing AVX handling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good. Let me test it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My testing passed.
|
/integrate |
|
Going to push as commit a941397.
Your commit was automatically rebased without conflicts. |
|
@jatin-bhateja Pushed as commit a941397. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Summary of changes include with the patch:-
Kindly review and share your feedback.
Best Regards,
Jatin
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/18562/head:pull/18562$ git checkout pull/18562Update a local copy of the PR:
$ git checkout pull/18562$ git pull https://git.openjdk.org/jdk.git pull/18562/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 18562View PR using the GUI difftool:
$ git pr show -t 18562Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/18562.diff
Webrev
Link to Webrev Comment