-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8299671: speed up compiler/intrinsics/string/TestStringLatin1IndexOfChar.java #11862
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 epeter! A progress list of the required criteria for merging this PR into |
Webrevs
|
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI | ||
* -Xbatch -XX:+UnlockDiagnosticVMOptions -XX:DisableIntrinsic=_indexOfL_char compiler.intrinsics.string.TestStringLatin1IndexOfChar | ||
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI | ||
* -Xbatch -XX:+IgnoreUnrecognizedVMOptions -XX:UseSSE=0 compiler.intrinsics.string.TestStringLatin1IndexOfChar |
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.
I think -XX:UseSSE=0
was typo in original changes. It should be -XX:UseAVX=0
because we don't support anything less than SSE2 with 64-bit VM.
StrIndexOf
is only supported when UseSSE42Intrinsics == true
for both 32- and 64-bit VMs. See x86_*.ad
files.
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.
Thanks, I replaced 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.
Looks good to me.
@eme64 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 17 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 |
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.
@TobiHartmann @vnkozlov Thanks for the help and reviews! |
Going to push as commit d2827ec.
Your commit was automatically rebased without conflicts. |
This test took very long, it was the slowest compiler test.
In total it took almost 3 minutes on my laptop. Now it is down to half a minute. The run statements also are about 10x faster now.
We could parallelize the run statements, but given that it is already fairly small the benefit is not so big, and it would imply overheads of parallelization, like loading libraries multiple times.
Goal of this test: trigger
indexOfChar
intrinsic inside the test functions. To trigger this reliably without too many repetitions of the test functions, we had set the flags-XX:Tier4InvocationThreshold=200 -XX:CompileThreshold=100
. But this also triggers lots of other compilations, and makes everything slow.I removed those flags, and used the white-box API to trigger compilation of the test functions. With sufficient warm-up, the paths to the intrinsic is hot, and we get intrinsification of
indexOfChar
.Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/11862/head:pull/11862
$ git checkout pull/11862
Update a local copy of the PR:
$ git checkout pull/11862
$ git pull https://git.openjdk.org/jdk pull/11862/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 11862
View PR using the GUI difftool:
$ git pr show -t 11862
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/11862.diff