提交 a2f8798e 编写于 作者: J johnc

Merge

...@@ -1500,7 +1500,7 @@ JavaThread::JavaThread(bool is_attaching_via_jni) : ...@@ -1500,7 +1500,7 @@ JavaThread::JavaThread(bool is_attaching_via_jni) :
} else { } else {
_jni_attach_state = _not_attaching_via_jni; _jni_attach_state = _not_attaching_via_jni;
} }
assert(_deferred_card_mark.is_empty(), "Default MemRegion ctor"); assert(deferred_card_mark().is_empty(), "Default MemRegion ctor");
_safepoint_visible = false; _safepoint_visible = false;
} }
...@@ -1896,9 +1896,16 @@ void JavaThread::exit(bool destroy_vm, ExitType exit_type) { ...@@ -1896,9 +1896,16 @@ void JavaThread::exit(bool destroy_vm, ExitType exit_type) {
JvmtiExport::cleanup_thread(this); JvmtiExport::cleanup_thread(this);
} }
#ifndef SERIALGC // We must flush any deferred card marks before removing a thread from
// We must flush G1-related buffers before removing a thread from
// the list of active threads. // the list of active threads.
Universe::heap()->flush_deferred_store_barrier(this);
assert(deferred_card_mark().is_empty(), "Should have been flushed");
#ifndef SERIALGC
// 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) { if (UseG1GC) {
flush_barrier_queues(); flush_barrier_queues();
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册