RFR: 8242440: use separate, destroyable JavaVM instances per libgraal compiler thread [v3]
Doug Simon
dnsimon at openjdk.java.net
Thu Apr 21 07:28:30 UTC 2022
On Wed, 20 Apr 2022 22:20:07 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> Doug Simon has updated the pull request incrementally with one additional commit since the last revision:
>>
>> removed (incorrect) volatile modifier from JVMCIRuntime::_shared_library_javavm
>
> src/hotspot/share/jvmci/jvmciCompiler.cpp line 172:
>
>> 170: // Don't detach JVMCI compiler threads from their JVMCI
>> 171: // runtime during the VM startup grace period
>> 172: if (runtime != nullptr && delay > 0 && tty->time_stamp().milliseconds() > DEFAULT_COMPILER_IDLE_DELAY) {
>
> Can it be more coordinated by some status instead of time? Time depends on machine you run and does not guarantee right case. I could be done in separate changes.
This check exists only to avoid adding extra overhead of creating and destroying libgraal runtimes during early VM execution for very short lived apps (i.e. less than 1000 ms). After that, normal libgraal runtime management should not be a problem. In combination with [lazy allocation of compiler threads](https://bugs.openjdk.java.net/browse/JDK-8198756), it's very rare in practice for a compiler thread to want to shutdown anyway during the first 1000 ms of VM execution.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8262
More information about the hotspot-dev
mailing list