Mercurial > hg > graal-compiler
changeset 8012:84304a77c4e3
Merge
author | johnc |
---|---|
date | Mon, 04 Feb 2013 19:40:27 -0800 |
parents | f2f0cf0f5444 (current diff) 06fd03af6ce4 (diff) |
children | 95ccff9eee8e f90b9bceb8e5 |
files | |
diffstat | 1 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/runtime/thread.cpp Mon Feb 04 13:26:04 2013 -0800 +++ b/src/share/vm/runtime/thread.cpp Mon Feb 04 19:40:27 2013 -0800 @@ -1500,7 +1500,7 @@ } else { _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; } @@ -1896,9 +1896,16 @@ 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"); + #ifndef SERIALGC - // We must flush G1-related buffers before removing a thread from - // the list of active threads. + // 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(); }