--- old/src/hotspot/share/gc/shared/collectedHeap.hpp 2020-08-05 21:29:29.097604413 +0800 +++ new/src/hotspot/share/gc/shared/collectedHeap.hpp 2020-08-05 21:29:28.797604402 +0800 @@ -29,8 +29,8 @@ #include "gc/shared/gcWhen.hpp" #include "gc/shared/verifyOption.hpp" #include "memory/allocation.hpp" -#include "memory/universe.hpp" #include "memory/heapInspection.hpp" +#include "memory/universe.hpp" #include "runtime/handles.hpp" #include "runtime/perfData.hpp" #include "runtime/safepoint.hpp" @@ -412,9 +412,6 @@ return NULL; } - // Run given task. Possibly in parallel if the GC supports it. - virtual void run_task(AbstractGangTask* task) = 0; - // Keep alive an object that was loaded with AS_NO_KEEPALIVE. virtual void keep_alive(oop obj) {} @@ -461,6 +458,9 @@ // Iterator for all GC threads (other than VM thread) virtual void gc_threads_do(ThreadClosure* tc) const = 0; + // Run given task. Possibly in parallel if the GC supports it. + virtual void run_task(AbstractGangTask* task) = 0; + // Print any relevant tracing info that flags imply. // Default implementation does nothing. virtual void print_tracing_info() const = 0;