On Fri, 16 Dec 2022 02:16:36 GMT, David Holmes <dhol...@openjdk.org> wrote:
>> Now the `JvmtiVTMSTransitionDisabler` mechanism supports disabling VTMS >> transitions for all virtual threads only. It should also support disabling >> transitions for any specific virtual thread as well. This will improve >> scalability of the JVMTI functions operating on target virtual threads as >> the functions can be executed concurrently without blocking each other >> execution when target virtual threads are different. >> New constructor `JvmtiVTMSTransitionDisabler(jthread vthread)` is added >> which has jthread parameter of the target virtual thread. >> >> Testing: >> mach5 jobs are TBD (preliminary testing was completed): >> - all JVMTI, JDWP, JDI and JDB tests have to be run >> - Kitchensink >> - tier5 > > src/hotspot/share/prims/jvmtiThreadState.cpp line 304: > >> 302: >> 303: ThreadBlockInVM tbivm(thread); >> 304: MonitorLocker ml(JvmtiVTMSTransition_lock, >> Mutex::_no_safepoint_check_flag); > > Aside: this pattern looks very odd. Why not just lock with the safepoint > check? @dholmes-ora Thank you for looking at this fix and for the comments. I will on replying and resolving them. ------------- PR: https://git.openjdk.org/jdk/pull/11690