Mercurial > hg > truffle
diff src/share/vm/runtime/thread.cpp @ 1027:39b01ab7035a
6888898: CMS: ReduceInitialCardMarks unsafe in the presence of cms precleaning
6889757: G1: enable card mark elision for initializing writes from compiled code (ReduceInitialCardMarks)
Summary: Defer the (compiler-elided) card-mark upon a slow-path allocation until after the store and before the next subsequent safepoint; G1 now answers yes to can_elide_tlab_write_barriers().
Reviewed-by: jcoomes, kvn, never
author | ysr |
---|---|
date | Fri, 16 Oct 2009 02:05:46 -0700 |
parents | 46b819ba120b |
children | 4b966d9946a3 e66fd840cb6b |
line wrap: on
line diff
--- a/src/share/vm/runtime/thread.cpp Wed Oct 07 19:01:55 2009 -0400 +++ b/src/share/vm/runtime/thread.cpp Fri Oct 16 02:05:46 2009 -0700 @@ -1213,6 +1213,7 @@ { initialize(); _is_attaching = is_attaching; + assert(_deferred_card_mark.is_empty(), "Default MemRegion ctor"); } bool JavaThread::reguard_stack(address cur_sp) { @@ -2318,6 +2319,10 @@ void JavaThread::oops_do(OopClosure* f, CodeBlobClosure* cf) { + // Flush deferred store-barriers, if any, associated with + // initializing stores done by this JavaThread in the current epoch. + Universe::heap()->flush_deferred_store_barrier(this); + // The ThreadProfiler oops_do is done from FlatProfiler::oops_do // since there may be more than one thread using each ThreadProfiler.