--- old/src/hotspot/share/gc/z/zDriver.cpp 2019-08-02 11:24:50.715315444 +0200 +++ new/src/hotspot/share/gc/z/zDriver.cpp 2019-08-02 11:24:50.476307533 +0200 @@ -87,8 +87,8 @@ GCIdMark gc_id_mark(_gc_id); IsGCActiveMark gc_active_mark; - // Verify roots - ZVerify::roots_strong(); + // Verify before operation + ZVerify::before_zoperation(); // Execute operation _success = do_operation(); @@ -211,6 +211,17 @@ } }; +class VM_ZVerify : public VM_Operation { +public: + virtual VMOp_Type type() const { + return VMOp_ZVerify; + } + + virtual void doit() { + ZVerify::after_weak_processing(); + } +}; + ZDriver::ZDriver() : _gc_cycle_port(), _gc_locker_port() { @@ -308,10 +319,9 @@ // Full verification VM_Verify op; VMThread::execute(&op); - } else if (ZVerifyRoots || ZVerifyObjects) { // Limited verification - VM_ZVerifyOperation op; + VM_ZVerify op; VMThread::execute(&op); } }