--- old/src/hotspot/share/gc/parallel/mutableNUMASpace.cpp Tue Nov 21 15:09:41 2017 +++ new/src/hotspot/share/gc/parallel/mutableNUMASpace.cpp Tue Nov 21 15:09:40 2017 @@ -29,6 +29,7 @@ #include "oops/oop.inline.hpp" #include "runtime/atomic.hpp" #include "runtime/thread.inline.hpp" +#include "runtime/threadSMR.hpp" #include "utilities/align.hpp" MutableNUMASpace::MutableNUMASpace(size_t alignment) : MutableSpace(alignment), _must_use_large_pages(false) { @@ -287,7 +288,7 @@ FREE_C_HEAP_ARRAY(int, lgrp_ids); if (changed) { - for (JavaThread *thread = Threads::first(); thread; thread = thread->next()) { + for (JavaThreadIteratorWithHandle jtiwh; JavaThread *thread = jtiwh.next(); ) { thread->set_lgrp_id(-1); } }