Skip to content
Permalink
Browse files
8252871: fatal error: must own lock JvmtiThreadState_lock
8252816: JvmtiEnvThreadState::clear_to_frame_pop() is not used

Reviewed-by: ysuenaga, dholmes
  • Loading branch information
robehn committed Sep 8, 2020
1 parent bf5da0c commit 704f784c88ee282837c980948167e741e7227f27
@@ -230,17 +230,6 @@ void JvmtiEnvThreadState::clear_frame_pop(int frame_number) {
}


void JvmtiEnvThreadState::clear_to_frame_pop(int frame_number) {
#ifdef ASSERT
Thread *current = Thread::current();
#endif
assert(get_thread() == current || current == get_thread()->active_handshaker(),
"frame pop data only accessible from same thread or direct handshake");
JvmtiFramePop fpop(frame_number);
JvmtiEventController::clear_to_frame_pop(this, fpop);
}


bool JvmtiEnvThreadState::is_frame_pop(int cur_frame_number) {
#ifdef ASSERT
Thread *current = Thread::current();
@@ -178,7 +178,6 @@ class JvmtiEnvThreadState : public CHeapObj<mtInternal> {

void set_frame_pop(int frame_number);
void clear_frame_pop(int frame_number);
void clear_to_frame_pop(int frame_number);

};

@@ -979,29 +979,18 @@ JvmtiEventController::set_extension_event_callback(JvmtiEnvBase *env,
}
}




void
JvmtiEventController::set_frame_pop(JvmtiEnvThreadState *ets, JvmtiFramePop fpop) {
assert_lock_strong(JvmtiThreadState_lock);
assert(JvmtiThreadState_lock->is_locked(), "Must be locked.");
JvmtiEventControllerPrivate::set_frame_pop(ets, fpop);
}


void
JvmtiEventController::clear_frame_pop(JvmtiEnvThreadState *ets, JvmtiFramePop fpop) {
assert_lock_strong(JvmtiThreadState_lock);
assert(JvmtiThreadState_lock->is_locked(), "Must be locked.");
JvmtiEventControllerPrivate::clear_frame_pop(ets, fpop);
}


void
JvmtiEventController::clear_to_frame_pop(JvmtiEnvThreadState *ets, JvmtiFramePop fpop) {
assert_lock_strong(JvmtiThreadState_lock);
JvmtiEventControllerPrivate::clear_to_frame_pop(ets, fpop);
}

void
JvmtiEventController::change_field_watch(jvmtiEvent event_type, bool added) {
MutexLocker mu(JvmtiThreadState_lock);
@@ -226,7 +226,6 @@ class JvmtiEventController : AllStatic {

static void set_frame_pop(JvmtiEnvThreadState *env_thread, JvmtiFramePop fpop);
static void clear_frame_pop(JvmtiEnvThreadState *env_thread, JvmtiFramePop fpop);
static void clear_to_frame_pop(JvmtiEnvThreadState *env_thread, JvmtiFramePop fpop);

static void change_field_watch(jvmtiEvent event_type, bool added);

1 comment on commit 704f784

@bridgekeeper

This comment has been minimized.

Copy link

@bridgekeeper bridgekeeper bot commented on 704f784 Sep 8, 2020

Please sign in to comment.