--- old/src/hotspot/share/gc/g1/g1CollectedHeap.hpp 2020-07-15 16:23:41.459745940 +0800 +++ new/src/hotspot/share/gc/g1/g1CollectedHeap.hpp 2020-07-15 16:23:41.199745931 +0800 @@ -549,9 +549,12 @@ WorkGang* workers() const { return _workers; } - // Runs the given AbstractGangTask with the current active workers, returning the - // total time taken. - Tickspan run_task(AbstractGangTask* task); + // Runs the given AbstractGangTask with the current active workers. + virtual void run_task(AbstractGangTask* task); + + // Runs the given AbstractGangTask with the current active workers, + // returning the total time taken. + Tickspan run_task_timed(AbstractGangTask* task); G1Allocator* allocator() { return _allocator; @@ -1168,9 +1171,13 @@ // Iteration functions. + void object_iterate_parallel(ObjectClosure* cl, uint worker_id, HeapRegionClaimer* claimer); + // Iterate over all objects, calling "cl.do_object" on each. virtual void object_iterate(ObjectClosure* cl); + virtual ParallelObjectIterator* parallel_object_iterator(uint thread_num); + // Keep alive an object that was loaded with AS_NO_KEEPALIVE. virtual void keep_alive(oop obj);