< prev index next >
src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp
Print this page
rev 47819 : imported patch 10.07.open.rebase_20171110.dcubed
@@ -28,10 +28,11 @@
#include "logging/log.hpp"
#include "memory/resourceArea.hpp"
#include "memory/universe.inline.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/thread.inline.hpp"
+#include "runtime/threadSMR.hpp"
#include "utilities/copy.hpp"
// Thread-Local Edens support
// static member initialization
@@ -46,11 +47,11 @@
}
void ThreadLocalAllocBuffer::accumulate_statistics_before_gc() {
global_stats()->initialize();
- for (JavaThread *thread = Threads::first(); thread != NULL; thread = thread->next()) {
+ for (JavaThreadIteratorWithHandle jtiwh; JavaThread *thread = jtiwh.next(); ) {
thread->tlab().accumulate_statistics();
thread->tlab().initialize_statistics();
}
// Publish new stats if some allocation occurred.
@@ -128,11 +129,11 @@
"TLAB must be reset");
}
void ThreadLocalAllocBuffer::resize_all_tlabs() {
if (ResizeTLAB) {
- for (JavaThread *thread = Threads::first(); thread != NULL; thread = thread->next()) {
+ for (JavaThreadIteratorWithHandle jtiwh; JavaThread *thread = jtiwh.next(); ) {
thread->tlab().resize();
}
}
}
< prev index next >