mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
6888898: CMS: ReduceInitialCardMarks unsafe in the presence of cms precleaning
6889757: G1: enable card mark elision for initializing writes from compiled code (ReduceInitialCardMarks) 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
This commit is contained in:
parent
a67426faf8
commit
928ac69fcd
13 changed files with 209 additions and 73 deletions
|
@ -3186,6 +3186,15 @@ void GraphKit::write_barrier_post(Node* oop_store,
|
|||
return;
|
||||
}
|
||||
|
||||
if (use_ReduceInitialCardMarks()
|
||||
&& obj == just_allocated_object(control())) {
|
||||
// We can skip marks on a freshly-allocated object in Eden.
|
||||
// Keep this code in sync with maybe_defer_card_mark() in runtime.cpp.
|
||||
// That routine informs GC to take appropriate compensating steps
|
||||
// so as to make this card-mark elision safe.
|
||||
return;
|
||||
}
|
||||
|
||||
if (!use_precise) {
|
||||
// All card marks for a (non-array) instance are in one place:
|
||||
adr = obj;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue