< prev index next >
src/hotspot/share/prims/jvmtiEventController.cpp
Print this page
rev 47819 : imported patch 10.07.open.rebase_20171110.dcubed
@@ -31,11 +31,12 @@
#include "prims/jvmtiEventController.inline.hpp"
#include "prims/jvmtiExport.hpp"
#include "prims/jvmtiImpl.hpp"
#include "prims/jvmtiThreadState.inline.hpp"
#include "runtime/frame.hpp"
-#include "runtime/thread.hpp"
+#include "runtime/thread.inline.hpp"
+#include "runtime/threadSMR.hpp"
#include "runtime/vframe.hpp"
#include "runtime/vframe_hp.hpp"
#include "runtime/vmThread.hpp"
#include "runtime/vm_operations.hpp"
@@ -578,17 +579,14 @@
// We need to create any missing jvmti_thread_state if there are globally set thread
// filtered events and there weren't last time
if ( (any_env_thread_enabled & THREAD_FILTERED_EVENT_BITS) != 0 &&
(was_any_env_thread_enabled & THREAD_FILTERED_EVENT_BITS) == 0) {
- {
- MutexLocker mu(Threads_lock); //hold the Threads_lock for the iteration
- for (JavaThread *tp = Threads::first(); tp != NULL; tp = tp->next()) {
+ for (JavaThreadIteratorWithHandle jtiwh; JavaThread *tp = jtiwh.next(); ) {
// state_for_while_locked() makes tp->is_exiting() check
JvmtiThreadState::state_for_while_locked(tp); // create the thread state if missing
}
- }// release Threads_lock
}
// compute and set thread-filtered events
for (JvmtiThreadState *state = JvmtiThreadState::first(); state != NULL; state = state->next()) {
any_env_thread_enabled |= recompute_thread_enabled(state);
< prev index next >