RFR: 8166554: Avoid compilation blocking in OverloadCompileQueueTest.java [v2]

Evgeny Nikitin enikitin at openjdk.java.net
Mon Sep 7 20:55:56 UTC 2020


> **Problem explanation**
> 
> 1. The stress test [uses 0.8 of allowed running
> time](https://hg.openjdk.java.net/jdk/jdk/file/e10f558e1df5/test/hotspot/jtreg/compiler/codecache/stress/CodeCacheStressRunner.java#l40)
> + 10 seconds, thus exceeding the limit; 2. 10 additional seconds are [given by the
> VM](https://hg.openjdk.java.net/jdk/jdk/file/6db0cb3893c5/src/hotspot/share/runtime/vmOperations.cpp#l388) for stuck
> compiler threads to finish; 3. Compiler threads aren't progressing due to the compilation being blocked; 4. Compilation
> is blocked via WhiteBox by the test, its lockUnlock thread; 5. The lockUnlock thread doesn't unblock the compilation
> because [it is a
> daemon](https://hg.openjdk.java.net/jdk/jdk/file/e10f558e1df5/test/hotspot/jtreg/compiler/codecache/stress/Helper.java#l59),
> it is stopped in the middle of the sleep.
> **Solution**
> 
> Since the 'lockUnlock' is started via InfiniteLoop, it's not possible to un-daemon it. So I just turned the lockUnlock
> method into a Thread descendant, which got joined in the end.

Evgeny Nikitin has updated the pull request incrementally with one additional commit since the last revision:

  Interrupt LockUnlockThread before test finish, fix coding style issues.

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/46/files
  - new: https://git.openjdk.java.net/jdk/pull/46/files/0651702e..ca6694b6

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=46&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=46&range=00-01

  Stats: 6 lines in 1 file changed: 4 ins; 1 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/46.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/46/head:pull/46

PR: https://git.openjdk.java.net/jdk/pull/46


More information about the hotspot-compiler-dev mailing list