Merge

Mon, 04 Feb 2013 19:40:27 -0800

author
johnc
date
Mon, 04 Feb 2013 19:40:27 -0800
changeset 4553
84304a77c4e3
parent 4551
f2f0cf0f5444
parent 4552
06fd03af6ce4
child 4554
95ccff9eee8e
child 4555
f90b9bceb8e5

Merge

     1.1 --- a/src/share/vm/runtime/thread.cpp	Mon Feb 04 13:26:04 2013 -0800
     1.2 +++ b/src/share/vm/runtime/thread.cpp	Mon Feb 04 19:40:27 2013 -0800
     1.3 @@ -1500,7 +1500,7 @@
     1.4    } else {
     1.5      _jni_attach_state = _not_attaching_via_jni;
     1.6    }
     1.7 -  assert(_deferred_card_mark.is_empty(), "Default MemRegion ctor");
     1.8 +  assert(deferred_card_mark().is_empty(), "Default MemRegion ctor");
     1.9    _safepoint_visible = false;
    1.10  }
    1.11  
    1.12 @@ -1896,9 +1896,16 @@
    1.13      JvmtiExport::cleanup_thread(this);
    1.14    }
    1.15  
    1.16 +  // We must flush any deferred card marks before removing a thread from
    1.17 +  // the list of active threads.
    1.18 +  Universe::heap()->flush_deferred_store_barrier(this);
    1.19 +  assert(deferred_card_mark().is_empty(), "Should have been flushed");
    1.20 +
    1.21  #ifndef SERIALGC
    1.22 -  // We must flush G1-related buffers before removing a thread from
    1.23 -  // the list of active threads.
    1.24 +  // We must flush the G1-related buffers before removing a thread
    1.25 +  // from the list of active threads. We must do this after any deferred
    1.26 +  // card marks have been flushed (above) so that any entries that are
    1.27 +  // added to the thread's dirty card queue as a result are not lost.
    1.28    if (UseG1GC) {
    1.29      flush_barrier_queues();
    1.30    }

mercurial