-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8315770: serviceability/sa/TestJmapCoreMetaspace.java should run with -XX:-VerifyDependencies #15631
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
8315770: serviceability/sa/TestJmapCoreMetaspace.java should run with -XX:-VerifyDependencies #15631
Conversation
… -XX:-VerifyDependencies serviceability/sa/TestJmapCoreMetaspace.java runs in hotspot:tier2, and takes about 330 seconds out of 670 seconds of the entire run on x86_64 fastdebug. The tier2 completion usually waits on it. Profiling shows we are spending time during classloading, checking dependencies. Since we load lots of classes, we do it many times, and each time the cost grows linearly to the number of classes. Some other tests that target metaspace explicitly disable `VerifyDependencies` to avoid this. The commit includes adding "-XX:-VerifyDependencies" along with "-XX:+IgnoreUnrecognizedVMOptions" in TestJmapCore.java to make sure that release builds work with the test, as VerifyDependencies is a develop option and not available in release builds. The changes in the commit is resulting in considerable improvement for the test in fastdebug mode as can be seen below: * before: **130.41s user 14.11s system 118% cpu 2:01.85 total** * after: **27.52s user 13.64s system 213% cpu 19.249 total**
|
👋 Welcome back roy-soumadipta! A progress list of the required criteria for merging this PR into |
|
@roy-soumadipta The following label 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 list. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
| static void test(String type) throws Throwable { | ||
| ProcessBuilder pb = ProcessTools.createTestJvm("-XX:+CreateCoredumpOnCrash", | ||
| "-Xmx512m", "-XX:MaxMetaspaceSize=64m", "-XX:+CrashOnOutOfMemoryError", | ||
| "-XX:-VerifyDependencies", "-XX:+IgnoreUnrecognizedVMOptions", |
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.
Have you tried this test with release? I think IgnoreUnrecognizedVMOptions is positional, and should go before VerifyDependencies to actually 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.
I will try it and raise another commit if that is required
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.
It would make sense to change the order, even if it works right now. This would specify what option is being ignored more clearly.
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 Aleksey, release is working as well
shipilev
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.
Looks good to me. Let's ask @plummercj to take a look as well.
|
@roy-soumadipta 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 58 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. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@shipilev, @kevinjwalls, @plummercj, @lmesnik) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
kevinjwalls
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.
Looks good.
I also assumed IgnoreUnrecognizedVMOptions would be positional, but it isn't. I checked various major Java versions and it works after an unknown option.
But I'm very pleased to see the update to have it appear first in the list, it just reads easier and removes that question.
plummercj
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.
The changes look good, but I'd suggest adding a comment so the reader knows why these options were added.
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.
It would be check if it is a debug build with 'Platform.isDebugBuild()' instead of IgnoreUnrecognizedVMOptions.
If test takes ~30 seconds it does it makes sense to reduce it's timeout to default and return it into tier1 group?
Agreed. Something like: |
|
I'm adding a small comment @plummercj and 'Platform.isDebugBuild()' instead of IgnoreUnrecognizedVMOptions @lmesnik in the next commit. But I would like to defer the move to tier1 in a separate commit |
…add comment about the change forbetter readability.
shipilev
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.
Still good.
|
/integrate |
|
@roy-soumadipta |
|
/sponsor |
|
Going to push as commit 877731d.
Your commit was automatically rebased without conflicts. |
|
@shipilev @roy-soumadipta Pushed as commit 877731d. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Backporting the fix for https://bugs.openjdk.org/browse/JDK-8315683 merged as part of openjdk/jdk#15631. https://github.com/openjdk/jdk/commit/877731d2a20249ce4724a071ba2da1faa56daca4.patch has been cleanly applied. Below are the test results: * after_release: **54.64s user 7.50s system 231% cpu 26.806 total** * after_fastdebug: **247.97s user 12.78s system 407% cpu 1:03.99 total** * before_release: **52.23s user 8.39s system 232% cpu 26.070 total** * before_fastdebug: **504.20s user 9.34s system 211% cpu 4:03.01 total**
Backporting the fix for https://bugs.openjdk.org/browse/JDK-8315770 merged as part of openjdk/jdk#15631. https://github.com/openjdk/jdk/commit/877731d2a20249ce4724a071ba2da1faa56daca4.patch apply failed due to differences in the file and the changes have been performed selectively. Below are the test results: * after_release: **99.63s user 10.34s system 171% cpu 1:04.25 total** * after_fastdebug: **433.45s user 17.35s system 401% cpu 1:52.15 total** * before_release: **102.65s user 10.50s system 172% cpu 1:05.65 total** * before_fastdebug: **516.82s user 16.68s system 253% cpu 3:30.51 total**
Backporting the fix for https://bugs.openjdk.org/browse/JDK-8315770 merged as part of openjdk/jdk#15631. https://github.com/openjdk/jdk/commit/877731d2a20249ce4724a071ba2da1faa56daca4.patch apply failed due to differences in the file and the changes have been performed selectively. Below are the test results: * after_release: **123.62s user 10.26s system 160% cpu 1:23.59 total** * after_fastdebug: **197.42s user 15.07s system 195% cpu 1:48.49 total** * before_release: **123.65s user 9.56s system 159% cpu 1:23.38 total** * before_fastdebug: **232.70s user 15.29s system 170% cpu 2:25.70 total**
8315770: serviceability/sa/TestJmapCoreMetaspace.java should run with -XX:-VerifyDependencies
serviceability/sa/TestJmapCoreMetaspace.java runs in hotspot:tier2, and takes about 330 seconds out of 670 seconds of the entire run on x86_64 fastdebug. The tier2 completion usually waits on it. Profiling shows we are spending time during classloading, checking dependencies. Since we load lots of classes, we do it many times, and each time the cost grows linearly to the number of classes. Some other tests that target metaspace explicitly disable
VerifyDependenciesto avoid this.The commit includes adding "-XX:-VerifyDependencies" along with "-XX:+IgnoreUnrecognizedVMOptions" in TestJmapCore.java to make sure that release builds work with the test, as VerifyDependencies is a develop option and not available in release builds. The changes in the commit are resulting in considerable improvement for the test in fastdebug mode as can be seen below:
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/15631/head:pull/15631$ git checkout pull/15631Update a local copy of the PR:
$ git checkout pull/15631$ git pull https://git.openjdk.org/jdk.git pull/15631/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 15631View PR using the GUI difftool:
$ git pr show -t 15631Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/15631.diff
Webrev
Link to Webrev Comment