RFR: 8286063: check compiler queue after calling AbstractCompiler::on_empty_queue

Doug Simon dnsimon at openjdk.java.net
Tue May 3 14:14:33 UTC 2022


[JDK-8242440](https://bugs.openjdk.java.net/browse/JDK-8242440) added support for a JIT compiler to be notified when a `CompilerThread` has an empty compilation queue. It's possible for an implementation of `AbstractCompiler::on_empty_queue` to temporarily release `MethodCompileQueue_lock` (e.g. [here](https://github.com/openjdk/jdk/blob/357b1b18c20233f16fba872b79237e9459f5ba43/src/hotspot/share/jvmci/jvmciCompiler.cpp#L174)). This means a non-CompilerThread has a chance to enqueue a new compilation task. As such, the `CompilerThread` should check for this after calling `AbstractCompiler::on_empty_queue`.

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

Commit messages:
 - check compilation queue after calling on_empty_queue

Changes: https://git.openjdk.java.net/jdk/pull/8517/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8517&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8286063
  Stats: 5 lines in 1 file changed: 5 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8517.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8517/head:pull/8517

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


More information about the hotspot-compiler-dev mailing list