Skip to content
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

x86: Implement String.hashCode with vectorizedHashCode() #21119

Merged
merged 1 commit into from
Feb 26, 2025

Conversation

BradleyWood
Copy link
Member

@BradleyWood BradleyWood commented Feb 12, 2025

Leaving as draft until #21000 is resolved.

@BradleyWood
Copy link
Member Author

@vijaysun-omr Would you mind reviewing?

@vijaysun-omr
Copy link
Contributor

Looks fine to me, but I'll also get @0xdaryl to look since this is x86 codegen

@0xdaryl
Copy link
Contributor

0xdaryl commented Feb 13, 2025

Seems like a good change to me.

@vijaysun-omr
Copy link
Contributor

If/when the WIP is taken off this PR, one of Daryl or I can start testing, thanks.

@BradleyWood BradleyWood marked this pull request as ready for review February 22, 2025 20:25
@BradleyWood
Copy link
Member Author

@vijaysun-omr @0xdaryl I have undrafted this PR. The fix for #21000 was merged in OMR (not promoted yet)

@vijaysun-omr
Copy link
Contributor

jenkins test sanity all JDK21

@BradleyWood
Copy link
Member Author

BradleyWood commented Feb 25, 2025

@vijaysun-omr I am seeing erroneous NullPointerExceptions and NoClassDefFoundError, I couldn't find any know issue for the way these are produced. I think a string hashCode() problem could easily cause these kinds of issues. I also noticed that since OMR hadn't promoted at the time you launch the build (it has now), the fix for #21000 was not in the build. I would suggest relaunching the build now that OMR has promoted, and if the same issues reproduce, a further investigation is warranted.

@vijaysun-omr
Copy link
Contributor

jenkins test sanity all JDK21

@BradleyWood
Copy link
Member Author

@vijaysun-omr Build looks good to me.

I count 1 CRIU issue, 2 infrastructure issues, and 1 other known issue.

CRIU

Infrastructure - sha checksum error

Infrastructure - ubu24-x86-1: Name or service not known

cmdLineTester_jfr_0 - #21181

@vijaysun-omr vijaysun-omr merged commit 373c847 into eclipse-openj9:master Feb 26, 2025
23 of 27 checks passed
@pshipton
Copy link
Member

Causing failures on 32-bit.

Assertion failed at /tmp/bld_88867/bld_linux_x86/compiler/../omr/compiler/x/codegen/OMRMachine.cpp:558: considerVirtAsSpillCandidate
VMState: 0x0005ff06
	freeBestGPRegister(): could not find any GPR spill candidates for VRF_0xce6f9070

@pshipton
Copy link
Member

Reverted via #21199

@BradleyWood
Copy link
Member Author

That assert sounds like the register assigner is trying to spill a vector register into a general purpose register 🤦

@BradleyWood
Copy link
Member Author

This could be a 64 bit issue too. It's possible there is low register pressure on 64-bit due to the extra vector registers.

@BradleyWood
Copy link
Member Author

@vijaysun-omr @0xdaryl VectorHashCode is capable of using more vector registers then are available on 32-bit mode. There is a bug somewhere in assigning registers for register dependency conditions, where if more registers of the same type are listed (even without requesting specific registers) that it fails to spill registers where needed.

I was able to reproduce the issue on 64-bit by adding a few extra vector registers to the register dependency conditions and keeping them live across the entire function. If you do not add them to the register dependencies conditions, there is no issue, and spilling happens when needed. This issue shouldn't be able to reproduce organically on 64-bit because we currently support 16 vector/fpr/gpr registers, and no intrinsic uses that many registers.

I have opened an issue: eclipse-omr/omr#7672

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants