1978 return;
1979 }
1980
1981 g1h->verify_region_sets_optional();
1982
1983 if (VerifyDuringGC) {
1984 HandleMark hm; // handle scope
1985 g1h->prepare_for_verify();
1986 Universe::verify(VerifyOption_G1UsePrevMarking,
1987 " VerifyDuringGC:(before)");
1988 }
1989 g1h->check_bitmaps("Cleanup Start");
1990
1991 G1CollectorPolicy* g1p = g1h->g1_policy();
1992 g1p->record_concurrent_mark_cleanup_start();
1993
1994 double start = os::elapsedTime();
1995
1996 HeapRegionRemSet::reset_for_cleanup_tasks();
1997
1998 uint n_workers;
1999
2000 // Do counting once more with the world stopped for good measure.
2001 G1ParFinalCountTask g1_par_count_task(g1h, &_region_bm, &_card_bm);
2002
2003 g1h->set_par_threads();
2004 n_workers = g1h->n_par_threads();
2005 assert(g1h->n_par_threads() == n_workers,
2006 "Should not have been reset");
2007 g1h->workers()->run_task(&g1_par_count_task);
2008 // Done with the parallel phase so reset to 0.
2009 g1h->set_par_threads(0);
2010
2011 if (VerifyDuringGC) {
2012 // Verify that the counting data accumulated during marking matches
2013 // that calculated by walking the marking bitmap.
2014
2015 // Bitmaps to hold expected values
2016 BitMap expected_region_bm(_region_bm.size(), true);
2017 BitMap expected_card_bm(_card_bm.size(), true);
2018
2019 G1ParVerifyFinalCountTask g1_par_verify_task(g1h,
2020 &_region_bm,
2021 &_card_bm,
2022 &expected_region_bm,
2023 &expected_card_bm);
2024
2025 g1h->set_par_threads((int)n_workers);
2026 g1h->workers()->run_task(&g1_par_verify_task);
|
1978 return;
1979 }
1980
1981 g1h->verify_region_sets_optional();
1982
1983 if (VerifyDuringGC) {
1984 HandleMark hm; // handle scope
1985 g1h->prepare_for_verify();
1986 Universe::verify(VerifyOption_G1UsePrevMarking,
1987 " VerifyDuringGC:(before)");
1988 }
1989 g1h->check_bitmaps("Cleanup Start");
1990
1991 G1CollectorPolicy* g1p = g1h->g1_policy();
1992 g1p->record_concurrent_mark_cleanup_start();
1993
1994 double start = os::elapsedTime();
1995
1996 HeapRegionRemSet::reset_for_cleanup_tasks();
1997
1998 // Do counting once more with the world stopped for good measure.
1999 G1ParFinalCountTask g1_par_count_task(g1h, &_region_bm, &_card_bm);
2000
2001 g1h->set_par_threads();
2002 uint n_workers = _g1h->workers()->active_workers();
2003 g1h->workers()->run_task(&g1_par_count_task);
2004 // Done with the parallel phase so reset to 0.
2005 g1h->set_par_threads(0);
2006
2007 if (VerifyDuringGC) {
2008 // Verify that the counting data accumulated during marking matches
2009 // that calculated by walking the marking bitmap.
2010
2011 // Bitmaps to hold expected values
2012 BitMap expected_region_bm(_region_bm.size(), true);
2013 BitMap expected_card_bm(_card_bm.size(), true);
2014
2015 G1ParVerifyFinalCountTask g1_par_verify_task(g1h,
2016 &_region_bm,
2017 &_card_bm,
2018 &expected_region_bm,
2019 &expected_card_bm);
2020
2021 g1h->set_par_threads((int)n_workers);
2022 g1h->workers()->run_task(&g1_par_verify_task);
|