< prev index next >
src/hotspot/share/runtime/thread.cpp
Print this page
rev 48920 : [backport] Use PLAB for evacuations instead of TLAB
@@ -306,10 +306,13 @@
"bug in forced alignment of thread objects");
}
#endif // ASSERT
_oom_during_evac = 0;
+#ifdef INCLUDE_ALL_GCS
+ _gclab = NULL;
+#endif
}
void Thread::set_oom_during_evac(bool oom) {
if (oom) {
_oom_during_evac |= 1;
@@ -2042,12 +2045,12 @@
// card marks have been flushed (above) so that any entries that are
// added to the thread's dirty card queue as a result are not lost.
if (UseG1GC || (UseShenandoahGC && (ShenandoahSATBBarrier || ShenandoahKeepAliveBarrier || ShenandoahStoreValEnqueueBarrier))) {
flush_barrier_queues();
}
- if (UseShenandoahGC && UseTLAB && gclab().is_initialized()) {
- gclab().make_parsable(true);
+ if (UseShenandoahGC && gclab() != NULL) {
+ ShenandoahHeap::heap()->finalize_mutator_gclab(this);
}
#endif // INCLUDE_ALL_GCS
log_info(os, thread)("JavaThread %s (tid: " UINTX_FORMAT ").",
exit_type == JavaThread::normal_exit ? "exiting" : "detaching",
@@ -2103,10 +2106,14 @@
// The dirty card queue should have been constructed with its
// active field set to true.
assert(dirty_queue.is_active(), "dirty card queue should be active");
_gc_state = _gc_state_global;
+
+ if (UseShenandoahGC) {
+ ShenandoahHeap::heap()->initialize_gclab(this);
+ }
}
#endif // INCLUDE_ALL_GCS
void JavaThread::cleanup_failed_attach_current_thread() {
if (active_handles() != NULL) {
@@ -2130,12 +2137,12 @@
#if INCLUDE_ALL_GCS
if (UseG1GC || (UseShenandoahGC && (ShenandoahSATBBarrier || ShenandoahKeepAliveBarrier || ShenandoahStoreValEnqueueBarrier))) {
flush_barrier_queues();
}
- if (UseShenandoahGC && UseTLAB && gclab().is_initialized()) {
- gclab().make_parsable(true);
+ if (UseShenandoahGC && gclab() != NULL) {
+ gclab()->flush_and_retire_stats(ShenandoahHeap::heap()->mutator_gclab_stats());
}
#endif // INCLUDE_ALL_GCS
Threads::remove(this);
this->smr_delete();
< prev index next >