Skip to content

Commit

Permalink
8252871: fatal error: must own lock JvmtiThreadState_lock
Browse files Browse the repository at this point in the history
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 704f784
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 26 deletions.
11 changes: 0 additions & 11 deletions src/hotspot/share/prims/jvmtiEnvThreadState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 0 additions & 1 deletion src/hotspot/share/prims/jvmtiEnvThreadState.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

};

Expand Down
15 changes: 2 additions & 13 deletions src/hotspot/share/prims/jvmtiEventController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion src/hotspot/share/prims/jvmtiEventController.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 704f784

Please sign in to comment.