< prev index next >
src/hotspot/share/prims/jvmtiTagMap.cpp
Print this page
rev 47794 : Port 09.17.Thread_SMR_logging_update from JDK9 to JDK10
rev 47796 : eosterlund, stefank CR - refactor code into threadSMR.cpp and threadSMR.hpp
rev 47797 : eosterlund CR - need more inline fixes.
rev 47799 : stefank, coleenp CR - refactor most JavaThreadIterator usage to use JavaThreadIteratorWithHandle.
@@ -43,10 +43,12 @@
#include "runtime/javaCalls.hpp"
#include "runtime/jniHandles.hpp"
#include "runtime/mutex.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/reflectionUtils.hpp"
+#include "runtime/thread.inline.hpp"
+#include "runtime/threadSMR.hpp"
#include "runtime/vframe.hpp"
#include "runtime/vmThread.hpp"
#include "runtime/vm_operations.hpp"
#include "services/serviceUtil.hpp"
#include "utilities/macros.hpp"
@@ -3172,11 +3174,11 @@
// Collects the simple roots for all threads and collects all
// stack roots - for each thread it walks the execution
// stack to find all references and local JNI refs.
inline bool VM_HeapWalkOperation::collect_stack_roots() {
JNILocalRootsClosure blk;
- for (JavaThread* thread = Threads::first(); thread != NULL ; thread = thread->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
// collect its stack roots
if (!CallbackInvoker::report_simple_root(JVMTI_HEAP_REFERENCE_THREAD,
< prev index next >