--- a/src/hotspot/share/gc/shared/collectedHeap.cpp Tue Sep 18 16:11:36 2018 -0400
+++ b/src/hotspot/share/gc/shared/collectedHeap.cpp Tue Sep 18 22:46:35 2018 +0200
@@ -506,12 +506,13 @@
}
void CollectedHeap::resize_all_tlabs() {
- if (UseTLAB) {
- assert(SafepointSynchronize::is_at_safepoint() ||
- !is_init_completed(),
- "should only resize tlabs at safepoint");
+ assert(SafepointSynchronize::is_at_safepoint() || !is_init_completed(),
+ "Should only resize tlabs at safepoint");
- ThreadLocalAllocBuffer::resize_all_tlabs();
+ if (UseTLAB && ResizeTLAB) {
+ for (JavaThreadIteratorWithHandle jtiwh; JavaThread *thread = jtiwh.next(); ) {
+ thread->tlab().resize();
+ }
}
}