--- old/src/hotspot/share/gc/serial/serialHeap.cpp 2020-08-05 21:22:43.185589930 +0800 +++ new/src/hotspot/share/gc/serial/serialHeap.cpp 2020-08-05 21:22:42.893589919 +0800 @@ -87,3 +87,8 @@ memory_pools.append(_old_pool); return memory_pools; } + +// No workGang for SerialHeap, work serially with thread 0. +void SerialHeap::run_task(AbstractGangTask* task) { + task->work(0); +}