6018 }
6019 };
6020
6021 void G1CollectedHeap::verify_not_dirty_region(HeapRegion* hr) {
6022 // All of the region should be clean.
6023 G1SATBCardTableModRefBS* ct_bs = g1_barrier_set();
6024 MemRegion mr(hr->bottom(), hr->end());
6025 ct_bs->verify_not_dirty_region(mr);
6026 }
6027
6028 void G1CollectedHeap::verify_dirty_region(HeapRegion* hr) {
6029 // We cannot guarantee that [bottom(),end()] is dirty. Threads
6030 // dirty allocated blocks as they allocate them. The thread that
6031 // retires each region and replaces it with a new one will do a
6032 // maximal allocation to fill in [pre_dummy_top(),end()] but will
6033 // not dirty that area (one less thing to have to do while holding
6034 // a lock). So we can only verify that [bottom(),pre_dummy_top()]
6035 // is dirty.
6036 G1SATBCardTableModRefBS* ct_bs = g1_barrier_set();
6037 MemRegion mr(hr->bottom(), hr->pre_dummy_top());
6038 ct_bs->verify_dirty_region(mr);
6039 }
6040
6041 void G1CollectedHeap::verify_dirty_young_list(HeapRegion* head) {
6042 G1SATBCardTableModRefBS* ct_bs = g1_barrier_set();
6043 for (HeapRegion* hr = head; hr != NULL; hr = hr->get_next_young_region()) {
6044 verify_dirty_region(hr);
6045 }
6046 }
6047
6048 void G1CollectedHeap::verify_dirty_young_regions() {
6049 verify_dirty_young_list(_young_list->first_region());
6050 }
6051 #endif
6052
6053 void G1CollectedHeap::cleanUpCardTable() {
6054 G1SATBCardTableModRefBS* ct_bs = g1_barrier_set();
6055 double start = os::elapsedTime();
6056
6057 {
6058 // Iterate over the dirty cards region list.
|
6018 }
6019 };
6020
6021 void G1CollectedHeap::verify_not_dirty_region(HeapRegion* hr) {
6022 // All of the region should be clean.
6023 G1SATBCardTableModRefBS* ct_bs = g1_barrier_set();
6024 MemRegion mr(hr->bottom(), hr->end());
6025 ct_bs->verify_not_dirty_region(mr);
6026 }
6027
6028 void G1CollectedHeap::verify_dirty_region(HeapRegion* hr) {
6029 // We cannot guarantee that [bottom(),end()] is dirty. Threads
6030 // dirty allocated blocks as they allocate them. The thread that
6031 // retires each region and replaces it with a new one will do a
6032 // maximal allocation to fill in [pre_dummy_top(),end()] but will
6033 // not dirty that area (one less thing to have to do while holding
6034 // a lock). So we can only verify that [bottom(),pre_dummy_top()]
6035 // is dirty.
6036 G1SATBCardTableModRefBS* ct_bs = g1_barrier_set();
6037 MemRegion mr(hr->bottom(), hr->pre_dummy_top());
6038 if (hr->is_young()) {
6039 ct_bs->verify_g1_young_region(mr);
6040 } else {
6041 ct_bs->verify_dirty_region(mr);
6042 }
6043 }
6044
6045 void G1CollectedHeap::verify_dirty_young_list(HeapRegion* head) {
6046 G1SATBCardTableModRefBS* ct_bs = g1_barrier_set();
6047 for (HeapRegion* hr = head; hr != NULL; hr = hr->get_next_young_region()) {
6048 verify_dirty_region(hr);
6049 }
6050 }
6051
6052 void G1CollectedHeap::verify_dirty_young_regions() {
6053 verify_dirty_young_list(_young_list->first_region());
6054 }
6055 #endif
6056
6057 void G1CollectedHeap::cleanUpCardTable() {
6058 G1SATBCardTableModRefBS* ct_bs = g1_barrier_set();
6059 double start = os::elapsedTime();
6060
6061 {
6062 // Iterate over the dirty cards region list.
|