8298853: JvmtiVTMSTransitionDisabler should support disabling one virtual thread transitions

Reviewed-by: pchilanomate, lmesnik
This commit is contained in:
Serguei Spitsyn 2023-02-14 01:28:42 +00:00
parent abbeb7e4d2
commit 13b1ebba27
8 changed files with 182 additions and 69 deletions

View file

@ -334,6 +334,8 @@ class java_lang_Class : AllStatic {
#define THREAD_INJECTED_FIELDS(macro) \
macro(java_lang_Thread, jvmti_thread_state, intptr_signature, false) \
macro(java_lang_Thread, jvmti_VTMS_transition_disable_count, int_signature, false) \
macro(java_lang_Thread, jvmti_is_in_VTMS_transition, bool_signature, false) \
JFR_ONLY(macro(java_lang_Thread, jfr_epoch, short_signature, false))
class java_lang_Thread : AllStatic {
@ -347,6 +349,8 @@ class java_lang_Thread : AllStatic {
static int _inheritedAccessControlContext_offset;
static int _eetop_offset;
static int _jvmti_thread_state_offset;
static int _jvmti_VTMS_transition_disable_count_offset;
static int _jvmti_is_in_VTMS_transition_offset;
static int _interrupted_offset;
static int _tid_offset;
static int _continuation_offset;
@ -396,6 +400,11 @@ class java_lang_Thread : AllStatic {
static JvmtiThreadState* jvmti_thread_state(oop java_thread);
static void set_jvmti_thread_state(oop java_thread, JvmtiThreadState* state);
static int VTMS_transition_disable_count(oop java_thread);
static void inc_VTMS_transition_disable_count(oop java_thread);
static void dec_VTMS_transition_disable_count(oop java_thread);
static bool is_in_VTMS_transition(oop java_thread);
static void set_is_in_VTMS_transition(oop java_thread, bool val);
// Clear all scoped value bindings on error
static void clear_scopedValueBindings(oop java_thread);