mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-15 18:33:41 +00:00
8293544: G1: Add comment in G1BarrierSetC1::pre_barrier
Reviewed-by: kbarrett, sjohanss
This commit is contained in:
parent
37df5f5625
commit
d5aae0103a
@ -72,6 +72,14 @@ void G1BarrierSetC1::pre_barrier(LIRAccess& access, LIR_Opr addr_opr,
|
||||
in_bytes(G1ThreadLocalData::satb_mark_queue_active_offset()),
|
||||
flag_type);
|
||||
// Read the marking-in-progress flag.
|
||||
// Note: When loading pre_val requires patching, i.e. do_load == true &&
|
||||
// patch == true, a safepoint can occur while patching. This makes the
|
||||
// pre-barrier non-atomic and invalidates the marking-in-progress check.
|
||||
// Therefore, in the presence of patching, we must repeat the same
|
||||
// marking-in-progress checking before calling into the Runtime. For
|
||||
// simplicity, we do this check unconditionally (regardless of the presence
|
||||
// of patching) in the runtime stub
|
||||
// (G1BarrierSetAssembler::generate_c1_pre_barrier_runtime_stub).
|
||||
LIR_Opr flag_val = gen->new_register(T_INT);
|
||||
__ load(mark_active_flag_addr, flag_val);
|
||||
__ cmp(lir_cond_notEqual, flag_val, LIR_OprFact::intConst(0));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user