comparison src/share/vm/opto/graphKit.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 685e959d09ea
children 7c57aead6d3e
comparison
equal deleted inserted replaced
1025:1ee412f7fec9 1027:39b01ab7035a
3184 && Universe::heap()->can_elide_permanent_oop_store_barriers()) 3184 && Universe::heap()->can_elide_permanent_oop_store_barriers())
3185 // no store barrier needed, because no old-to-new ref created 3185 // no store barrier needed, because no old-to-new ref created
3186 return; 3186 return;
3187 } 3187 }
3188 3188
3189 if (use_ReduceInitialCardMarks()
3190 && obj == just_allocated_object(control())) {
3191 // We can skip marks on a freshly-allocated object in Eden.
3192 // Keep this code in sync with maybe_defer_card_mark() in runtime.cpp.
3193 // That routine informs GC to take appropriate compensating steps
3194 // so as to make this card-mark elision safe.
3195 return;
3196 }
3197
3189 if (!use_precise) { 3198 if (!use_precise) {
3190 // All card marks for a (non-array) instance are in one place: 3199 // All card marks for a (non-array) instance are in one place:
3191 adr = obj; 3200 adr = obj;
3192 } 3201 }
3193 // (Else it's an array (or unknown), and we want more precise card marks.) 3202 // (Else it's an array (or unknown), and we want more precise card marks.)