--- old/src/share/vm/gc/g1/g1HeapVerifier.cpp 2017-03-21 16:20:17.374280138 -0400 +++ new/src/share/vm/gc/g1/g1HeapVerifier.cpp 2017-03-21 16:20:16.170210577 -0400 @@ -309,23 +309,19 @@ // This is the task used for parallel verification of the heap regions -class G1ParVerifyTask: public AbstractGangTask { +class G1ParVerifyTask: public G1ParallelizeByRegionsTask { private: - G1CollectedHeap* _g1h; VerifyOption _vo; bool _failures; - HeapRegionClaimer _hrclaimer; public: // _vo == UsePrevMarking -> use "prev" marking information, // _vo == UseNextMarking -> use "next" marking information, // _vo == UseMarkWord -> use mark word from object header. G1ParVerifyTask(G1CollectedHeap* g1h, VerifyOption vo) : - AbstractGangTask("Parallel verify task"), - _g1h(g1h), + G1ParallelizeByRegionsTask("Parallel verify task", g1h->workers()->active_workers()), _vo(vo), - _failures(false), - _hrclaimer(g1h->workers()->active_workers()) {} + _failures(false) {} bool failures() { return _failures; @@ -334,7 +330,7 @@ void work(uint worker_id) { HandleMark hm; VerifyRegionClosure blk(true, _vo); - _g1h->heap_region_par_iterate(&blk, worker_id, &_hrclaimer); + all_heap_regions_work(&blk, worker_id); if (blk.failures()) { _failures = true; }