mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-22 12:04:39 +02:00
8079315: UseCondCardMark broken in conjunction with CMS precleaning on x86
Add the necessary StoreLoad barrier in interpreter, C1 and C2 for x86 Reviewed-by: tschatzl
This commit is contained in:
parent
6cb9f920e1
commit
b387838cea
3 changed files with 11 additions and 0 deletions
|
@ -4299,6 +4299,9 @@ void MacroAssembler::store_check(Register obj) {
|
||||||
int dirty = CardTableModRefBS::dirty_card_val();
|
int dirty = CardTableModRefBS::dirty_card_val();
|
||||||
if (UseCondCardMark) {
|
if (UseCondCardMark) {
|
||||||
Label L_already_dirty;
|
Label L_already_dirty;
|
||||||
|
if (UseConcMarkSweepGC) {
|
||||||
|
membar(Assembler::StoreLoad);
|
||||||
|
}
|
||||||
cmpb(card_addr, dirty);
|
cmpb(card_addr, dirty);
|
||||||
jcc(Assembler::equal, L_already_dirty);
|
jcc(Assembler::equal, L_already_dirty);
|
||||||
movb(card_addr, dirty);
|
movb(card_addr, dirty);
|
||||||
|
|
|
@ -1619,6 +1619,9 @@ void LIRGenerator::CardTableModRef_post_barrier(LIR_OprDesc* addr, LIR_OprDesc*
|
||||||
LIR_Opr dirty = LIR_OprFact::intConst(CardTableModRefBS::dirty_card_val());
|
LIR_Opr dirty = LIR_OprFact::intConst(CardTableModRefBS::dirty_card_val());
|
||||||
if (UseCondCardMark) {
|
if (UseCondCardMark) {
|
||||||
LIR_Opr cur_value = new_register(T_INT);
|
LIR_Opr cur_value = new_register(T_INT);
|
||||||
|
if (UseConcMarkSweepGC) {
|
||||||
|
__ membar_storeload();
|
||||||
|
}
|
||||||
__ move(card_addr, cur_value);
|
__ move(card_addr, cur_value);
|
||||||
|
|
||||||
LabelObj* L_already_dirty = new LabelObj();
|
LabelObj* L_already_dirty = new LabelObj();
|
||||||
|
|
|
@ -3803,6 +3803,11 @@ void GraphKit::write_barrier_post(Node* oop_store,
|
||||||
Node* zero = __ ConI(0); // Dirty card value
|
Node* zero = __ ConI(0); // Dirty card value
|
||||||
BasicType bt = T_BYTE;
|
BasicType bt = T_BYTE;
|
||||||
|
|
||||||
|
if (UseConcMarkSweepGC && UseCondCardMark) {
|
||||||
|
insert_mem_bar(Op_MemBarVolatile); // StoreLoad barrier
|
||||||
|
__ sync_kit(this);
|
||||||
|
}
|
||||||
|
|
||||||
if (UseCondCardMark) {
|
if (UseCondCardMark) {
|
||||||
// The classic GC reference write barrier is typically implemented
|
// The classic GC reference write barrier is typically implemented
|
||||||
// as a store into the global card mark table. Unfortunately
|
// as a store into the global card mark table. Unfortunately
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue