-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8255011: [TESTBUG] compiler/codecache/stress/UnexpectedDeoptimizationAllTest.java timed out #1030
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 neliasso! A progress list of the required criteria for merging this PR into |
Webrevs
|
|
/summary compiler/codecache/stress/UnexpectedDeoptimizationAllTest.java timed out |
|
@neliasso Setting summary to |
test/hotspot/jtreg/compiler/codecache/stress/CodeCacheStressRunner.java
Outdated
Show resolved
Hide resolved
|
@lepestock, IIRC, you are/were working on fixing timeouts in some other code cache tests which use |
|
could you please explain why in |
|
/summary [TESTBUG] UnexpectedDeoptimizationAllTest.java timed out
I was experimenting with different levels of contention. 10 millis + Xcomp gets 30% fewer methods compiled, but in all other cases 10 millis results in more compilations. It's a toss for me. I reverted since it doesn't really matter. |
|
@neliasso Updating existing summary to: |
|
@neliasso, could you please explain how those compile storms cause timeouts? As far as I could find, the JVM doesn't wait for the threads to finish, it gives them approx. 10 seconds, and then just exits. So we only have to make sure that our 20% is larger than 10s + some reasonable margin, right? |
I don't know exactly since 1) I can't reproduce it 2) I didn't get any core or thread dump from the failure. What I do know is 1) The failure was on a slow platform 2) It was probably running concurrently with other tests 3) It was running with -Xcomp Using JFR and jcmd I have seen - 1) very long compile queues (> 500 for C1) I did some measurements on workload too. In normal mode 6500 iterations of CodeCacheStressRunner was performed in 30 sec, with -Xcomp only 250. But in total compiles -Xcomp had 30% less compilations. What I also do know is that the CodeCache lock will be contended by the compile threads and the test thread that is invalidating everything in the cache. With long compile queues the MethodCompileQueue lock can also become contented because the time held is proportional to the number of compile tasks in the queue. In register_method both locks are held.
Yes. I suggest 60 seconds test time and minimum of 60 seconds margin. |
👍 , but could you please add comments to both |
would it make sense to update -- Igor |
I experimented with couting the CodeCaceStressRunner iterations but the different tests have completely different profiles and the variants are many - 4 tests, 2 modes (Xcomp) that all need separate values. I would like to see that we added thread dumps and core files on timeouts. Then we can experiment with lower timeouts since it will be possible to diagnose them quickly. |
we actually do that since JDK 9, JEP 279 added the failure handler which runs many things including -- Igor |
That has completely passed me by. I must look into it. Regarding the test: |
sure-sure, I didn't mean to do it as part of this PR, just a thought for future improvements in these tests. |
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.
LGTM. however I'd like to you to wait for explcit 'ok' from Evgeny (@lepestock) as well.
BTW, you need to either update the title of this PR to [TESTBUG] compiler/codecache/stress/UnexpectedDeoptimizationAllTest.java timed out or change 8255011's title to [TESTBUG] UnexpectedDeoptimizationAllTest.java timed out
-- Igor
|
LGTM. I was considering similar change as well, so I agree. |
|
@neliasso 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 132 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 |
|
/summary Change CodeCacheStressRunner to have a 60 second test time |
|
@neliasso Updating existing summary to |
|
Thank you Evgeny and Igor! |
|
/integrate |
|
@neliasso Since your change was applied there have been 157 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit e281b13. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
…AllTest.java timed out Change CodeCacheStressRunner to have a 60 second test time Reviewed-by: iignatyev
…g to pointer In the cases like: ``` UNSAFE.putLong(address + off1 + 1030, lseed); UNSAFE.putLong(address + 1023, lseed); UNSAFE.putLong(address + off2 + 1001, lseed); ``` Unsafe intrinsifies direct memory access using a long as the base address, generating a `CastX2P` node converting long to pointer in C2. Then we get optoassembly code like: ``` ldr R10, [R15, openjdk#120] # int ! Field: address ldr R11, [R16, openjdk#136] # int ! Field: off1 ldr R12, [R16, openjdk#144] # int ! Field: off2 add R11, R11, R10 mov R11, R11 # long -> ptr add R12, R12, R10 mov R10, R10 # long -> ptr add R11, R11, openjdk#1030 # ptr str R17, [R11] # int add R10, R10, openjdk#1023 # ptr str R17, [R10] # int mov R10, R12 # long -> ptr add R10, R10, openjdk#1001 # ptr str R17, [R10] # int ``` In aarch64, the conversion from long to pointer could be a nop but C2 doesn't know it. On the existing code, we do nothing for `mov dst src` only when `dst` == `src` [1], then we have assembly: ``` ldr x10, [x15,openjdk#120] ldp x11, x12, [x16,openjdk#136] add x11, x11, x10 add x12, x12, x10 add x11, x11, #0x406 str x17, [x11] add x10, x10, #0x3ff str x17, [x10] mov x10, x12 <--- extra register copy add x10, x10, #0x3e9 str x17, [x10] ``` There is still one extra register copy, which we're trying to remove in this patch. This patch folds `CastX2P` into memory operands by introducing `indirectX2P` and `indOffX2P`. We also create a new opclass `iRegPorL2P` to remove extra copies from `CastX2P` in pointer addition. Tier 1~3 passed on aarch64. No obvious change in size of libjvm.so [1] https://github.com/openjdk/jdk/blob/5c612c230b0a852aed5fd36e58b82ebf2e1838af/src/hotspot/cpu/aarch64/aarch64.ad#L7906
Hi,
This patch updates the code cache stress tests. I haven't been able to reproduce or retrieve a core file.
What I can see is that the tests provokes compile storms, and that the single C1 thread (on a 4CPU system) sometimes has trouble keeping up. A factor may also be that the tests run time scale with the timeout time - so that the time allotted as margin before the timeout is only 20% of the total runtime. Combining this with Xcomp, and that the test may run concurrently with other stress tests, it is reasonable that a timeout may occur.
I suggest to cap the tests to 60 seconds of testing. I've experimented with meassuring how much work is done and use that as a metric - but the different tests that use the CodeCacheStressRunner has completely different profiles.
In UnexpectedDeoptimizationAllTest.java I have adjusted the sleep time to 100 millis between the invalidations of the entire code cache.
In UnexpectedDeoptimizationTest.java I have added a sleep of 10 miilis between deoptimizing parts of the stack. The idea is to give the stack time to growth a bit before the next deoptimization. Otherwise the test might end up running mostly in the interpreter.
Please review,
Nils Eliasson
Progress
Testing
Failed test task
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/1030/head:pull/1030$ git checkout pull/1030