--- old/src/hotspot/share/prims/jvmtiTagMap.cpp Wed Nov 8 08:13:01 2017 +++ new/src/hotspot/share/prims/jvmtiTagMap.cpp Wed Nov 8 08:13:00 2017 @@ -3177,9 +3177,7 @@ // stack to find all references and local JNI refs. inline bool VM_HeapWalkOperation::collect_stack_roots() { JNILocalRootsClosure blk; - ThreadsListHandle tlh; - JavaThreadIterator jti(tlh.list()); - for (JavaThread* thread = jti.first(); thread != NULL; thread = jti.next()) { + for (JavaThreadIteratorWithHandle jtiwh; JavaThread *thread = jtiwh.next(); ) { oop threadObj = thread->threadObj(); if (threadObj != NULL && !thread->is_exiting() && !thread->is_hidden_from_external_view()) { // Collect the simple root for this thread before we