< prev index next >

src/share/vm/gc/g1/g1CardLiveData.cpp

Print this page

        

*** 129,147 **** // lots of work most of the time. BitMap::idx_t _last_marked_bit_idx; void clear_card_bitmap_range(HeapWord* start, HeapWord* end) { BitMap::idx_t start_idx = card_live_bitmap_index_for(start); ! BitMap::idx_t end_idx = card_live_bitmap_index_for(align_ptr_up(end, CardTableModRefBS::card_size)); _card_bm.clear_range(start_idx, end_idx); } // Mark the card liveness bitmap for the object spanning from start to end. void mark_card_bitmap_range(HeapWord* start, HeapWord* end) { BitMap::idx_t start_idx = card_live_bitmap_index_for(start); ! BitMap::idx_t end_idx = card_live_bitmap_index_for(align_ptr_up(end, CardTableModRefBS::card_size)); assert((end_idx - start_idx) > 0, "Trying to mark zero sized range."); if (start_idx == _last_marked_bit_idx) { start_idx++; --- 129,147 ---- // lots of work most of the time. BitMap::idx_t _last_marked_bit_idx; void clear_card_bitmap_range(HeapWord* start, HeapWord* end) { BitMap::idx_t start_idx = card_live_bitmap_index_for(start); ! BitMap::idx_t end_idx = card_live_bitmap_index_for(align_up(end, CardTableModRefBS::card_size)); _card_bm.clear_range(start_idx, end_idx); } // Mark the card liveness bitmap for the object spanning from start to end. void mark_card_bitmap_range(HeapWord* start, HeapWord* end) { BitMap::idx_t start_idx = card_live_bitmap_index_for(start); ! BitMap::idx_t end_idx = card_live_bitmap_index_for(align_up(end, CardTableModRefBS::card_size)); assert((end_idx - start_idx) > 0, "Trying to mark zero sized range."); if (start_idx == _last_marked_bit_idx) { start_idx++;
*** 421,431 **** }; void G1CardLiveData::clear(WorkGang* workers) { guarantee(Universe::is_fully_initialized(), "Should not call this during initialization."); ! size_t const num_chunks = align_size_up(live_cards_bm().size_in_bytes(), G1ClearCardLiveDataTask::chunk_size()) / G1ClearCardLiveDataTask::chunk_size(); uint const num_workers = (uint)MIN2(num_chunks, (size_t)workers->active_workers()); G1ClearCardLiveDataTask cl(live_cards_bm(), num_chunks); log_debug(gc, ergo)("Running %s using %u workers for " SIZE_FORMAT " work units.", cl.name(), num_workers, num_chunks); --- 421,431 ---- }; void G1CardLiveData::clear(WorkGang* workers) { guarantee(Universe::is_fully_initialized(), "Should not call this during initialization."); ! size_t const num_chunks = align_up(live_cards_bm().size_in_bytes(), G1ClearCardLiveDataTask::chunk_size()) / G1ClearCardLiveDataTask::chunk_size(); uint const num_workers = (uint)MIN2(num_chunks, (size_t)workers->active_workers()); G1ClearCardLiveDataTask cl(live_cards_bm(), num_chunks); log_debug(gc, ergo)("Running %s using %u workers for " SIZE_FORMAT " work units.", cl.name(), num_workers, num_chunks);
< prev index next >