< prev index next >
src/hotspot/share/gc/shared/cardTableRS.cpp
Print this page
*** 137,147 ****
"We shouldn't be looking at clean cards, and this should "
"be the only place they get cleaned.");
if (CardTableRS::card_is_dirty_wrt_gen_iter(entry_val)
|| _ct->is_prev_youngergen_card_val(entry_val)) {
CardValue res =
! Atomic::cmpxchg(CardTableRS::clean_card_val(), entry, entry_val);
if (res == entry_val) {
break;
} else {
assert(res == CardTableRS::cur_youngergen_and_prev_nonclean_card,
"The CAS above should only fail if another thread did "
--- 137,147 ----
"We shouldn't be looking at clean cards, and this should "
"be the only place they get cleaned.");
if (CardTableRS::card_is_dirty_wrt_gen_iter(entry_val)
|| _ct->is_prev_youngergen_card_val(entry_val)) {
CardValue res =
! Atomic::cmpxchg(entry, entry_val, CardTableRS::clean_card_val());
if (res == entry_val) {
break;
} else {
assert(res == CardTableRS::cur_youngergen_and_prev_nonclean_card,
"The CAS above should only fail if another thread did "
*** 262,272 ****
} else if (card_is_dirty_wrt_gen_iter(entry_val)
|| is_prev_youngergen_card_val(entry_val)) {
// Mark it as both cur and prev youngergen; card cleaning thread will
// eventually remove the previous stuff.
CardValue new_val = cur_youngergen_and_prev_nonclean_card;
! CardValue res = Atomic::cmpxchg(new_val, entry, entry_val);
// Did the CAS succeed?
if (res == entry_val) return;
// Otherwise, retry, to see the new value.
continue;
} else {
--- 262,272 ----
} else if (card_is_dirty_wrt_gen_iter(entry_val)
|| is_prev_youngergen_card_val(entry_val)) {
// Mark it as both cur and prev youngergen; card cleaning thread will
// eventually remove the previous stuff.
CardValue new_val = cur_youngergen_and_prev_nonclean_card;
! CardValue res = Atomic::cmpxchg(entry, entry_val, new_val);
// Did the CAS succeed?
if (res == entry_val) return;
// Otherwise, retry, to see the new value.
continue;
} else {
< prev index next >