< prev index next >
src/share/vm/gc/shared/cardTableRS.cpp
Print this page
*** 102,112 ****
}
void CardTableRS::younger_refs_iterate(Generation* g,
OopsInGenClosure* blk,
uint n_threads) {
! _last_cur_val_in_gen[g->level()+1] = cur_youngergen_card_val();
g->younger_refs_iterate(blk, n_threads);
}
inline bool ClearNoncleanCardWrapper::clear_card(jbyte* entry) {
if (_is_par) {
--- 102,114 ----
}
void CardTableRS::younger_refs_iterate(Generation* g,
OopsInGenClosure* blk,
uint n_threads) {
! // The indexing in this array is slightly odd. We want to access
! // the old generation record here, which is at index 2.
! _last_cur_val_in_gen[2] = cur_youngergen_card_val();
g->younger_refs_iterate(blk, n_threads);
}
inline bool ClearNoncleanCardWrapper::clear_card(jbyte* entry) {
if (_is_par) {
*** 298,319 ****
#endif
_ct_bs->non_clean_card_iterate_possibly_parallel(sp, urasm, cl, this, n_threads);
}
void CardTableRS::clear_into_younger(Generation* old_gen) {
! assert(old_gen->level() == 1, "Should only be called for the old generation");
// The card tables for the youngest gen need never be cleared.
// There's a bit of subtlety in the clear() and invalidate()
// methods that we exploit here and in invalidate_or_clear()
// below to avoid missing cards at the fringes. If clear() or
// invalidate() are changed in the future, this code should
// be revisited. 20040107.ysr
clear(old_gen->prev_used_region());
}
void CardTableRS::invalidate_or_clear(Generation* old_gen) {
! assert(old_gen->level() == 1, "Should only be called for the old generation");
// Invalidate the cards for the currently occupied part of
// the old generation and clear the cards for the
// unoccupied part of the generation (if any, making use
// of that generation's prev_used_region to determine that
// region). No need to do anything for the youngest
--- 300,323 ----
#endif
_ct_bs->non_clean_card_iterate_possibly_parallel(sp, urasm, cl, this, n_threads);
}
void CardTableRS::clear_into_younger(Generation* old_gen) {
! assert(GenCollectedHeap::heap()->is_old_gen(old_gen),
! "Should only be called for the old generation");
// The card tables for the youngest gen need never be cleared.
// There's a bit of subtlety in the clear() and invalidate()
// methods that we exploit here and in invalidate_or_clear()
// below to avoid missing cards at the fringes. If clear() or
// invalidate() are changed in the future, this code should
// be revisited. 20040107.ysr
clear(old_gen->prev_used_region());
}
void CardTableRS::invalidate_or_clear(Generation* old_gen) {
! assert(GenCollectedHeap::heap()->is_old_gen(old_gen),
! "Should only be called for the old generation");
// Invalidate the cards for the currently occupied part of
// the old generation and clear the cards for the
// unoccupied part of the generation (if any, making use
// of that generation's prev_used_region to determine that
// region). No need to do anything for the youngest
*** 375,385 ****
CardTableRS* _ct;
public:
VerifyCTGenClosure(CardTableRS* ct) : _ct(ct) {}
void do_generation(Generation* gen) {
// Skip the youngest generation.
! if (gen->level() == 0) return;
// Normally, we're interested in pointers to younger generations.
VerifyCTSpaceClosure blk(_ct, gen->reserved().start());
gen->space_iterate(&blk, true);
}
};
--- 379,391 ----
CardTableRS* _ct;
public:
VerifyCTGenClosure(CardTableRS* ct) : _ct(ct) {}
void do_generation(Generation* gen) {
// Skip the youngest generation.
! if (GenCollectedHeap::heap()->is_young_gen(gen)) {
! return;
! }
// Normally, we're interested in pointers to younger generations.
VerifyCTSpaceClosure blk(_ct, gen->reserved().start());
gen->space_iterate(&blk, true);
}
};
< prev index next >