< prev index next >
src/share/vm/gc/g1/g1CardCounts.cpp
Print this page
rev 12906 : [mq]: gc_interface
@@ -38,16 +38,16 @@
}
size_t G1CardCounts::compute_size(size_t mem_region_size_in_words) {
// We keep card counts for every card, so the size of the card counts table must
// be the same as the card table.
- return G1SATBCardTableLoggingModRefBS::compute_size(mem_region_size_in_words);
+ return G1CardTable::compute_size(mem_region_size_in_words);
}
size_t G1CardCounts::heap_map_factor() {
// See G1CardCounts::compute_size() why we reuse the card table value.
- return G1SATBCardTableLoggingModRefBS::heap_map_factor();
+ return G1CardTable::heap_map_factor();
}
void G1CardCounts::clear_range(size_t from_card_num, size_t to_card_num) {
if (has_count_table()) {
assert(from_card_num < to_card_num,
@@ -70,12 +70,12 @@
// The max value we can store in the counts table is
// max_jubyte. Guarantee the value of the hot
// threshold limit is no more than this.
guarantee(G1ConcRSHotCardLimit <= max_jubyte, "sanity");
- _ct_bs = _g1h->g1_barrier_set();
- _ct_bot = _ct_bs->byte_for_const(_g1h->reserved_region().start());
+ _ct = _g1h->g1_card_table();
+ _ct_bot = _ct->byte_for_const(_g1h->reserved_region().start());
_card_counts = (jubyte*) mapper->reserved().start();
_reserved_max_card_num = mapper->reserved().byte_size();
mapper->set_mapping_changed_listener(&_listener);
}
@@ -114,21 +114,21 @@
clear_range(mr);
}
void G1CardCounts::clear_range(MemRegion mr) {
if (has_count_table()) {
- const jbyte* from_card_ptr = _ct_bs->byte_for_const(mr.start());
+ const jbyte* from_card_ptr = _ct->byte_for_const(mr.start());
// We use the last address in the range as the range could represent the
// last region in the heap. In which case trying to find the card will be an
// OOB access to the card table.
- const jbyte* last_card_ptr = _ct_bs->byte_for_const(mr.last());
+ const jbyte* last_card_ptr = _ct->byte_for_const(mr.last());
#ifdef ASSERT
- HeapWord* start_addr = _ct_bs->addr_for(from_card_ptr);
+ HeapWord* start_addr = _ct->addr_for(from_card_ptr);
assert(start_addr == mr.start(), "MemRegion start must be aligned to a card.");
- HeapWord* last_addr = _ct_bs->addr_for(last_card_ptr);
- assert((last_addr + CardTableModRefBS::card_size_in_words) == mr.end(), "MemRegion end must be aligned to a card.");
+ HeapWord* last_addr = _ct->addr_for(last_card_ptr);
+ assert((last_addr + G1CardTable::card_size_in_words) == mr.end(), "MemRegion end must be aligned to a card.");
#endif // ASSERT
// Clear the counts for the (exclusive) card range.
size_t from_card_num = ptr_2_card_num(from_card_ptr);
size_t to_card_num = ptr_2_card_num(last_card_ptr) + 1;
< prev index next >