Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/hotspot/share/prims/jvmtiEventController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -792,9 +792,6 @@ void JvmtiEventControllerPrivate::set_event_callbacks(JvmtiEnvBase *env,
assert(Threads::number_of_threads() == 0 || JvmtiThreadState_lock->is_locked(), "sanity check");
EC_TRACE(("[*] # set event callbacks"));

// May be changing the event handler for ObjectFree.
flush_object_free_events(env);

env->set_event_callbacks(callbacks, size_of_callbacks);

jlong enabled_bits = env->env_event_enable()->_event_callback_enabled.get_bits();
Expand Down Expand Up @@ -1107,6 +1104,8 @@ JvmtiEventController::set_event_callbacks(JvmtiEnvBase *env,
// call the functionality without holding the JvmtiThreadState_lock.
JvmtiEventControllerPrivate::set_event_callbacks(env, callbacks, size_of_callbacks);
} else {
JvmtiEventControllerPrivate::flush_object_free_events(env);

MutexLocker mu(JvmtiThreadState_lock);
JvmtiEventControllerPrivate::set_event_callbacks(env, callbacks, size_of_callbacks);
}
Expand Down Expand Up @@ -1194,6 +1193,8 @@ JvmtiEventController::env_dispose(JvmtiEnvBase *env) {
// call the functionality without holding the JvmtiThreadState_lock.
JvmtiEventControllerPrivate::env_dispose(env);
} else {
JvmtiEventControllerPrivate::flush_object_free_events(env);

MutexLocker mu(JvmtiThreadState_lock);
JvmtiEventControllerPrivate::env_dispose(env);
}
Expand Down
1 change: 0 additions & 1 deletion test/hotspot/jtreg/ProblemList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ vmTestbase/metaspace/gc/firstGC_default/TestDescription.java 8208250 generic-all

vmTestbase/nsk/jvmti/scenarios/capability/CM03/cm03t001/TestDescription.java 8073470 linux-all
vmTestbase/nsk/jvmti/InterruptThread/intrpthrd003/TestDescription.java 8288911 macosx-all
vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t006/TestDescription.java 8371103 generic-all

vmTestbase/jit/escape/LockCoarsening/LockCoarsening001.java 8148743 generic-all
vmTestbase/jit/escape/LockCoarsening/LockCoarsening002.java 8208259 generic-all
Expand Down