RFR: 8319980: [JVMCI] libgraal should reuse Thread instances as C2 does

Vladimir Kozlov kvn at openjdk.org
Mon Nov 13 20:59:33 UTC 2023


On Mon, 13 Nov 2023 18:44:38 GMT, Tom Rodriguez <never at openjdk.org> wrote:

> Reuse Threads instances for compiler threads in the same way C1/C2 do.  This has been in use for several months now.  mach5 testing is underway.

src/hotspot/share/compiler/compileBroker.cpp line 950:

> 948:     // for JVMCI compiler which can create further ones on demand.
> 949:     bool create = !UseDynamicNumberOfCompilerThreads || i == 0;
> 950:     if (create JVMCI_ONLY(|| !UseJVMCICompiler || UseJVMCINativeLibrary)) {

Is it possible to make condition easy to understand?
>From what I finally figure out, we always create thread object for C2 and libgraal. And For Java Graal only for conditions you listed in `create`.
May be also add comment about that.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16638#discussion_r1391694714


More information about the hotspot-compiler-dev mailing list