This commit is contained in:
Jesper Wilhelmsson 2018-02-19 04:50:50 +01:00
commit aa9cf33c1e
191 changed files with 5511 additions and 1885 deletions

View file

@ -1994,20 +1994,10 @@ void JavaThread::exit(bool destroy_vm, ExitType exit_type) {
JvmtiExport::cleanup_thread(this);
}
// We must flush any deferred card marks before removing a thread from
// the list of active threads.
Universe::heap()->flush_deferred_store_barrier(this);
assert(deferred_card_mark().is_empty(), "Should have been flushed");
#if INCLUDE_ALL_GCS
// We must flush the G1-related buffers before removing a thread
// from the list of active threads. We must do this after any deferred
// 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) {
flush_barrier_queues();
}
#endif // INCLUDE_ALL_GCS
// We must flush any deferred card marks and other various GC barrier
// related buffers (e.g. G1 SATB buffer and G1 dirty card queue buffer)
// before removing a thread from the list of active threads.
BarrierSet::barrier_set()->flush_deferred_barriers(this);
log_info(os, thread)("JavaThread %s (tid: " UINTX_FORMAT ").",
exit_type == JavaThread::normal_exit ? "exiting" : "detaching",