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:
Y. Srinivas Ramakrishna 2009-10-16 02:05:46 -07:00
parent a67426faf8
commit 928ac69fcd
13 changed files with 209 additions and 73 deletions

View file

@ -684,8 +684,13 @@ class JavaThread: public Thread {
methodOop _callee_target;
// Oop results of VM runtime calls
oop _vm_result; // Used to pass back an oop result into Java code, GC-preserved
oop _vm_result_2; // Used to pass back an oop result into Java code, GC-preserved
oop _vm_result; // Used to pass back an oop result into Java code, GC-preserved
oop _vm_result_2; // Used to pass back an oop result into Java code, GC-preserved
// See ReduceInitialCardMarks: this holds the precise space interval of
// the most recent slow path allocation for which compiled code has
// elided card-marks for performance along the fast-path.
MemRegion _deferred_card_mark;
MonitorChunk* _monitor_chunks; // Contains the off stack monitors
// allocated during deoptimization
@ -1082,6 +1087,9 @@ class JavaThread: public Thread {
oop vm_result_2() const { return _vm_result_2; }
void set_vm_result_2 (oop x) { _vm_result_2 = x; }
MemRegion deferred_card_mark() const { return _deferred_card_mark; }
void set_deferred_card_mark(MemRegion mr) { _deferred_card_mark = mr; }
// Exception handling for compiled methods
oop exception_oop() const { return _exception_oop; }
int exception_stack_size() const { return _exception_stack_size; }