src/share/vm/opto/graphKit.cpp
Print this page
rev 4973 : imported patch change-yg-card-value.diff
rev 4974 : imported patch conditional-storeload-young.diff
rev 4975 : imported patch refactor-and-sparc.diff
*** 3690,3700 ****
Node* tls = __ thread(); // ThreadLocalStorage
Node* no_base = __ top();
float likely = PROB_LIKELY(0.999);
float unlikely = PROB_UNLIKELY(0.999);
! Node* zero = __ ConI(0);
Node* zeroX = __ ConX(0);
// Get the alias_index for raw card-mark memory
const TypePtr* card_type = TypeRawPtr::BOTTOM;
--- 3690,3701 ----
Node* tls = __ thread(); // ThreadLocalStorage
Node* no_base = __ top();
float likely = PROB_LIKELY(0.999);
float unlikely = PROB_UNLIKELY(0.999);
! Node* young_card = __ ConI((jint)CardTableModRefBS::g1_young_card_val());
! Node* dirty_card = __ ConI((jint)CardTableModRefBS::dirty_card_val());
Node* zeroX = __ ConX(0);
// Get the alias_index for raw card-mark memory
const TypePtr* card_type = TypeRawPtr::BOTTOM;
*** 3746,3760 ****
// Ok must mark the card if not already dirty
// load the original value of the card
Node* card_val = __ load(__ ctrl(), card_adr, TypeInt::INT, T_BYTE, Compile::AliasIdxRaw);
! __ if_then(card_val, BoolTest::ne, zero); {
g1_mark_card(ideal, card_adr, oop_store, alias_idx, index, index_adr, buffer, tf);
} __ end_if();
} __ end_if();
} __ end_if();
} else {
// Object.clone() instrinsic uses this path.
g1_mark_card(ideal, card_adr, oop_store, alias_idx, index, index_adr, buffer, tf);
}
--- 3747,3768 ----
// Ok must mark the card if not already dirty
// load the original value of the card
Node* card_val = __ load(__ ctrl(), card_adr, TypeInt::INT, T_BYTE, Compile::AliasIdxRaw);
! __ if_then(card_val, BoolTest::ne, young_card); {
! sync_kit(ideal);
! insert_mem_bar(Op_MemBarVolatile, oop_store);
! __ sync_kit(this);
!
! Node* card_val_reload = __ load(__ ctrl(), card_adr, TypeInt::INT, T_BYTE, Compile::AliasIdxRaw);
! __ if_then(card_val_reload, BoolTest::ne, dirty_card); {
g1_mark_card(ideal, card_adr, oop_store, alias_idx, index, index_adr, buffer, tf);
} __ end_if();
} __ end_if();
} __ end_if();
+ } __ end_if();
} else {
// Object.clone() instrinsic uses this path.
g1_mark_card(ideal, card_adr, oop_store, alias_idx, index, index_adr, buffer, tf);
}