equal
deleted
inserted
replaced
1271 |
1271 |
1272 SvcGCMarker sgcm(SvcGCMarker::OTHER); |
1272 SvcGCMarker sgcm(SvcGCMarker::OTHER); |
1273 |
1273 |
1274 if (VerifyDuringGC) { |
1274 if (VerifyDuringGC) { |
1275 HandleMark hm; // handle scope |
1275 HandleMark hm; // handle scope |
1276 gclog_or_tty->print(" VerifyDuringGC:(before)"); |
|
1277 Universe::heap()->prepare_for_verify(); |
1276 Universe::heap()->prepare_for_verify(); |
1278 Universe::verify(/* silent */ false, |
1277 Universe::verify(VerifyOption_G1UsePrevMarking, |
1279 /* option */ VerifyOption_G1UsePrevMarking); |
1278 " VerifyDuringGC:(before)"); |
1280 } |
1279 } |
1281 |
1280 |
1282 G1CollectorPolicy* g1p = g1h->g1_policy(); |
1281 G1CollectorPolicy* g1p = g1h->g1_policy(); |
1283 g1p->record_concurrent_mark_remark_start(); |
1282 g1p->record_concurrent_mark_remark_start(); |
1284 |
1283 |
1298 } |
1297 } |
1299 |
1298 |
1300 // Verify the heap w.r.t. the previous marking bitmap. |
1299 // Verify the heap w.r.t. the previous marking bitmap. |
1301 if (VerifyDuringGC) { |
1300 if (VerifyDuringGC) { |
1302 HandleMark hm; // handle scope |
1301 HandleMark hm; // handle scope |
1303 gclog_or_tty->print(" VerifyDuringGC:(overflow)"); |
|
1304 Universe::heap()->prepare_for_verify(); |
1302 Universe::heap()->prepare_for_verify(); |
1305 Universe::verify(/* silent */ false, |
1303 Universe::verify(VerifyOption_G1UsePrevMarking, |
1306 /* option */ VerifyOption_G1UsePrevMarking); |
1304 " VerifyDuringGC:(overflow)"); |
1307 } |
1305 } |
1308 |
1306 |
1309 // Clear the marking state because we will be restarting |
1307 // Clear the marking state because we will be restarting |
1310 // marking due to overflowing the global mark stack. |
1308 // marking due to overflowing the global mark stack. |
1311 reset_marking_state(); |
1309 reset_marking_state(); |
1321 satb_mq_set.set_active_all_threads(false, /* new active value */ |
1319 satb_mq_set.set_active_all_threads(false, /* new active value */ |
1322 true /* expected_active */); |
1320 true /* expected_active */); |
1323 |
1321 |
1324 if (VerifyDuringGC) { |
1322 if (VerifyDuringGC) { |
1325 HandleMark hm; // handle scope |
1323 HandleMark hm; // handle scope |
1326 gclog_or_tty->print(" VerifyDuringGC:(after)"); |
|
1327 Universe::heap()->prepare_for_verify(); |
1324 Universe::heap()->prepare_for_verify(); |
1328 Universe::verify(/* silent */ false, |
1325 Universe::verify(VerifyOption_G1UseNextMarking, |
1329 /* option */ VerifyOption_G1UseNextMarking); |
1326 " VerifyDuringGC:(after)"); |
1330 } |
1327 } |
1331 assert(!restart_for_overflow(), "sanity"); |
1328 assert(!restart_for_overflow(), "sanity"); |
1332 // Completely reset the marking state since marking completed |
1329 // Completely reset the marking state since marking completed |
1333 set_non_marking_state(); |
1330 set_non_marking_state(); |
1334 } |
1331 } |
1970 HRSPhaseSetter x(HRSPhaseCleanup); |
1967 HRSPhaseSetter x(HRSPhaseCleanup); |
1971 g1h->verify_region_sets_optional(); |
1968 g1h->verify_region_sets_optional(); |
1972 |
1969 |
1973 if (VerifyDuringGC) { |
1970 if (VerifyDuringGC) { |
1974 HandleMark hm; // handle scope |
1971 HandleMark hm; // handle scope |
1975 gclog_or_tty->print(" VerifyDuringGC:(before)"); |
|
1976 Universe::heap()->prepare_for_verify(); |
1972 Universe::heap()->prepare_for_verify(); |
1977 Universe::verify(/* silent */ false, |
1973 Universe::verify(VerifyOption_G1UsePrevMarking, |
1978 /* option */ VerifyOption_G1UsePrevMarking); |
1974 " VerifyDuringGC:(before)"); |
1979 } |
1975 } |
1980 |
1976 |
1981 G1CollectorPolicy* g1p = G1CollectedHeap::heap()->g1_policy(); |
1977 G1CollectorPolicy* g1p = G1CollectedHeap::heap()->g1_policy(); |
1982 g1p->record_concurrent_mark_cleanup_start(); |
1978 g1p->record_concurrent_mark_cleanup_start(); |
1983 |
1979 |
2125 // sure we update the old gen/space data. |
2121 // sure we update the old gen/space data. |
2126 g1h->g1mm()->update_sizes(); |
2122 g1h->g1mm()->update_sizes(); |
2127 |
2123 |
2128 if (VerifyDuringGC) { |
2124 if (VerifyDuringGC) { |
2129 HandleMark hm; // handle scope |
2125 HandleMark hm; // handle scope |
2130 gclog_or_tty->print(" VerifyDuringGC:(after)"); |
|
2131 Universe::heap()->prepare_for_verify(); |
2126 Universe::heap()->prepare_for_verify(); |
2132 Universe::verify(/* silent */ false, |
2127 Universe::verify(VerifyOption_G1UsePrevMarking, |
2133 /* option */ VerifyOption_G1UsePrevMarking); |
2128 " VerifyDuringGC:(after)"); |
2134 } |
2129 } |
2135 |
2130 |
2136 g1h->verify_region_sets_optional(); |
2131 g1h->verify_region_sets_optional(); |
2137 } |
2132 } |
2138 |
2133 |