< prev index next > src/hotspot/share/runtime/thread.cpp
RFE_8195103_reduce_initial_card_marks
/*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
if (JvmtiEnv::environments_might_exist()) {
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",
os::current_thread_id());
< prev index next >