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

8272836: Limit run time for java/lang/invoke/LFCaching tests #5214

Closed

Conversation

@shipilev
Copy link
Contributor

@shipilev shipilev commented Aug 23, 2021

See the RFE for discussion.

Current PR improves the test time like this:

$  make run-test TEST=java/lang/invoke/LFCaching/

# Before
real	3m51.608s
user	5m21.612s
sys	0m5.391s

# After
real	1m13.606s
user	2m26.827s
sys	0m4.761s

Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8272836: Limit run time for java/lang/invoke/LFCaching tests

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5214/head:pull/5214
$ git checkout pull/5214

Update a local copy of the PR:
$ git checkout pull/5214
$ git pull https://git.openjdk.java.net/jdk pull/5214/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5214

View PR using the GUI difftool:
$ git pr show -t 5214

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5214.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Aug 23, 2021

👋 Welcome back shade! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

Loading

@openjdk openjdk bot added the rfr label Aug 23, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Aug 23, 2021

@shipilev The following label will be automatically applied to this pull request:

  • core-libs

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.

Loading

@openjdk openjdk bot added the core-libs label Aug 23, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Aug 23, 2021

Webrevs

Loading

cl4es
cl4es approved these changes Aug 23, 2021
Copy link
Member

@cl4es cl4es left a comment

Looks reasonable. Maybe "Limit" rather than "Optimize"?

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Aug 23, 2021

@shipilev 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:

8272836: Limit run time for java/lang/invoke/LFCaching tests

Reviewed-by: redestad, iignatyev

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 1 new commit pushed to the master branch:

  • 7212561: 8267188: gc/stringdedup/TestStringDeduplicationInterned.java fails with Shenandoah

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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 master branch, type /integrate in a new comment.

Loading

@openjdk openjdk bot added the ready label Aug 23, 2021
@shipilev shipilev changed the title 8272836: Optimize run time for java/lang/invoke/LFCaching tests 8272836: Limit run time for java/lang/invoke/LFCaching tests Aug 23, 2021
@shipilev
Copy link
Contributor Author

@shipilev shipilev commented Aug 23, 2021

Can be "Limit", sure.

Loading

@shipilev
Copy link
Contributor Author

@shipilev shipilev commented Aug 25, 2021

Any other comments for this patch? I would integrate it soon otherwise. @iignatev, maybe?

Loading

@iignatev
Copy link
Member

@iignatev iignatev commented Aug 25, 2021

the reason we tie time-budget in this test (and other similar stress tests) to timeout is to give a test chance to do actual testing in slow configurations (which will set higher timeout factor), for example, runs w/ -Xcomp on debug builds. if we use hardcoded value, the test might spend (almost) all its allocated time to just init and wouldn't perform any testing. ]

so instead of using the hardcode limit, I'd prefer to adjust the multiplication, 0.25 will give you the same 60s w/ current default timeout factor.

-- Igor

Loading

@shipilev
Copy link
Contributor Author

@shipilev shipilev commented Aug 25, 2021

so instead of using the hardcode limit, I'd prefer to adjust the multiplication, 0.25 will give you the same 60s w/ current default timeout factor.

Oh, okay, good point. I changed multiplier from 0.9 to 0.2. That works out to ~75 seconds per actual test, and 90 seconds for entire run:

----------messages:(5/416)----------
command: main -XX:ReservedCodeCacheSize=128m LFSingleThreadCachingTest
reason: User specified action: run main/othervm -XX:ReservedCodeCacheSize=128m LFSingleThreadCachingTest 
Mode: othervm [/othervm specified]
Additional options from @modules: --add-modules java.base,java.management --add-opens java.base/java.lang.ref=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED
elapsed time (seconds): 76.789
...

real	1m38.629s
user	2m55.333s
sys	0m5.318s

Loading

Copy link
Member

@iignatev iignatev left a comment

LGTM

Loading

cl4es
cl4es approved these changes Aug 25, 2021
@shipilev
Copy link
Contributor Author

@shipilev shipilev commented Aug 26, 2021

Thanks!

/integrate

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Aug 26, 2021

Going to push as commit a3308af.
Since your change was applied there have been 3 commits pushed to the master branch:

  • c4c76e2: 8272811: Document the effects of building with _GNU_SOURCE in os_posix.hpp
  • 673ce7e: 8272873: C2: Inlining should not depend on absolute call site counts
  • 7212561: 8267188: gc/stringdedup/TestStringDeduplicationInterned.java fails with Shenandoah

Your commit was automatically rebased without conflicts.

Loading

@openjdk openjdk bot closed this Aug 26, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Aug 26, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Aug 26, 2021

@shipilev Pushed as commit a3308af.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Loading

@shipilev shipilev deleted the JDK-8272836-perf-test-lfcaching branch Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants