1920 return;
1921 }
1922
1923 g1h->verify_region_sets_optional();
1924
1925 if (VerifyDuringGC) {
1926 HandleMark hm; // handle scope
1927 g1h->prepare_for_verify();
1928 Universe::verify(VerifyOption_G1UsePrevMarking,
1929 " VerifyDuringGC:(before)");
1930 }
1931 g1h->check_bitmaps("Cleanup Start");
1932
1933 G1CollectorPolicy* g1p = g1h->g1_policy();
1934 g1p->record_concurrent_mark_cleanup_start();
1935
1936 double start = os::elapsedTime();
1937
1938 HeapRegionRemSet::reset_for_cleanup_tasks();
1939
1940 uint n_workers;
1941
1942 // Do counting once more with the world stopped for good measure.
1943 G1ParFinalCountTask g1_par_count_task(g1h, &_region_bm, &_card_bm);
1944
1945 g1h->set_par_threads();
1946 n_workers = g1h->n_par_threads();
1947 assert(g1h->n_par_threads() == n_workers,
1948 "Should not have been reset");
1949 g1h->workers()->run_task(&g1_par_count_task);
1950 // Done with the parallel phase so reset to 0.
1951 g1h->set_par_threads(0);
1952
1953 if (VerifyDuringGC) {
1954 // Verify that the counting data accumulated during marking matches
1955 // that calculated by walking the marking bitmap.
1956
1957 // Bitmaps to hold expected values
1958 BitMap expected_region_bm(_region_bm.size(), true);
1959 BitMap expected_card_bm(_card_bm.size(), true);
1960
1961 G1ParVerifyFinalCountTask g1_par_verify_task(g1h,
1962 &_region_bm,
1963 &_card_bm,
1964 &expected_region_bm,
1965 &expected_card_bm);
1966
1967 g1h->set_par_threads((int)n_workers);
1968 g1h->workers()->run_task(&g1_par_verify_task);
|
1920 return;
1921 }
1922
1923 g1h->verify_region_sets_optional();
1924
1925 if (VerifyDuringGC) {
1926 HandleMark hm; // handle scope
1927 g1h->prepare_for_verify();
1928 Universe::verify(VerifyOption_G1UsePrevMarking,
1929 " VerifyDuringGC:(before)");
1930 }
1931 g1h->check_bitmaps("Cleanup Start");
1932
1933 G1CollectorPolicy* g1p = g1h->g1_policy();
1934 g1p->record_concurrent_mark_cleanup_start();
1935
1936 double start = os::elapsedTime();
1937
1938 HeapRegionRemSet::reset_for_cleanup_tasks();
1939
1940 // Do counting once more with the world stopped for good measure.
1941 G1ParFinalCountTask g1_par_count_task(g1h, &_region_bm, &_card_bm);
1942
1943 g1h->set_par_threads();
1944 uint n_workers = _g1h->workers()->active_workers();
1945 g1h->workers()->run_task(&g1_par_count_task);
1946 // Done with the parallel phase so reset to 0.
1947 g1h->set_par_threads(0);
1948
1949 if (VerifyDuringGC) {
1950 // Verify that the counting data accumulated during marking matches
1951 // that calculated by walking the marking bitmap.
1952
1953 // Bitmaps to hold expected values
1954 BitMap expected_region_bm(_region_bm.size(), true);
1955 BitMap expected_card_bm(_card_bm.size(), true);
1956
1957 G1ParVerifyFinalCountTask g1_par_verify_task(g1h,
1958 &_region_bm,
1959 &_card_bm,
1960 &expected_region_bm,
1961 &expected_card_bm);
1962
1963 g1h->set_par_threads((int)n_workers);
1964 g1h->workers()->run_task(&g1_par_verify_task);
|