--- old/src/hotspot/share/gc/g1/g1ConcurrentMarkThread.hpp 2020-06-25 10:40:22.932817581 +0200 +++ new/src/hotspot/share/gc/g1/g1ConcurrentMarkThread.hpp 2020-06-25 10:40:22.476810764 +0200 @@ -41,15 +41,20 @@ G1ConcurrentMark* _cm; - enum State { + enum ServiceState { Idle, Started, InProgress }; - volatile State _state; + volatile ServiceState _state; - void sleep_before_next_cycle(); + // Wait for next cycle. Returns true if we should stop the service. + bool wait_for_next_cycle(); + void run_cycle(); + + void concurrent_cycle_start(); + void concurrent_cycle_end(); // Delay marking to meet MMU. void delay_to_keep_mmu(G1Policy* g1_policy, bool remark); double mmu_delay_end(G1Policy* g1_policy, bool remark);