-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8349007: The jtreg test ResolvedMethodTableHash takes excessive time #24383
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 coleenp! A progress list of the required criteria for merging this PR into |
|
@coleenp 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 142 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 |
Webrevs
|
lmesnik
left a comment
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.
Seems that test is become much shorter, doesn't it the case of rehashing lost?
Might be better to have 2 tests:
- check that 1000 iterations don't cause rehashing
- original, stress scenario
How much time the take now?
Also, does it make sense to run test in several threads ? No need to now, just file RFE.
See more comments iline.
| } | ||
| public static class ResolvedMethodTableHashTest extends ClassLoader { | ||
| // Generate a MethodHandle for ClassName.m() | ||
| private MethodHandle generate(String className) throws ReflectiveOperationException { |
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.
The indentation is wrong in line 53, 60, 70, 71, 96, 102, might be other places also.
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 indent script was a bit too agressive.
| ResolvedMethodTableHashTest generator = new ResolvedMethodTableHashTest(); | ||
| List<MethodHandle> handles = new ArrayList<>(); | ||
|
|
||
| int count = args.length > 0 ? Integer.parseInt(args[0]) : 200000; |
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.
no need to check args and have default 20000, it is not executed, actually.
might be just hardcode 1000 here?
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 fixed this to hardcode 1001 (want 1001 iterations to print the message).
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 was a good suggestion, thank you.
|
This test was never meant to be a stress test, it was just checking that the hashcode didn't result in collisions for methods with the same name and signature. |
|
lmesnik
left a comment
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 for addressing the comments.
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.
The change looks good!
Edit: I had the same question as Leonid and didn't notice that you had already answered it. Thanks!
|
Thank you for the code reviews Leonid and Matias. |
|
Going to push as commit 6352ee1.
Your commit was automatically rebased without conflicts. |
This is mostly test change. ResolvedMethodTableHash.java is run /manual but still takes a long time and doesn't really verify that the hash code is any good. This add logging, triggers concurrent work like other ConcurrentHashtables, and checks that a small table is not rehashed.
Tested with tier1 (including test).
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24383/head:pull/24383$ git checkout pull/24383Update a local copy of the PR:
$ git checkout pull/24383$ git pull https://git.openjdk.org/jdk.git pull/24383/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 24383View PR using the GUI difftool:
$ git pr show -t 24383Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24383.diff
Using Webrev
Link to Webrev Comment