RFR: 8322538: remove fatal from JVM_VirtualThread functions for !INCLUDE_JVMTI
Serguei Spitsyn
sspitsyn at openjdk.org
Thu Dec 21 10:10:58 UTC 2023
On Thu, 21 Dec 2023 02:29:33 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:
> The macro `#else` branch conditions of `#if INCLUDE_JVMTI` in the `JVM_VirtualThread*` methods/functions (see `jvm.cpp`) are incorrect and have to be removed.
> For example, the lines 4022-4023 have to be removed from the fragment below:
>
> 4013 JVM_ENTRY(void, JVM_VirtualThreadDisableSuspend(JNIEnv* env, jobject vthread, jboolean enter))
> 4014 #if INCLUDE_JVMTI
> 4015 if (!DoJVMTIVirtualThreadTransitions) {
> 4016 assert(!JvmtiExport::can_support_virtual_threads(), "sanity check");
> 4017 return;
> 4018 }
> 4019 assert(thread->is_disable_suspend() != (bool)enter,
> 4020 "nested or unbalanced monitor enter/exit is not allowed");
> 4021 thread->toggle_is_disable_suspend();
> 4022 #else
> 4023 fatal("Should only be called with JVMTI enabled");
> 4024 #endif
> 4025 JVM_END
Alan and David, thank you for review!
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17174#issuecomment-1865984694
More information about the hotspot-dev
mailing list