# HG changeset patch # User pliden # Date 1565099393 -7200 # Node ID 9429ecaee2e07e40a222123faf993025fee56728 # Parent a95e92c449bfda0246d65c7648580355280cf1a0 8229135: ZGC: Adding missing ZStatTimerDisable before call to ZVerify::roots_strong() Reviewed-by: stefank, eosterlund diff -r a95e92c449bf -r 9429ecaee2e0 src/hotspot/share/gc/z/zDriver.cpp --- a/src/hotspot/share/gc/z/zDriver.cpp Tue Aug 06 09:27:38 2019 -0400 +++ b/src/hotspot/share/gc/z/zDriver.cpp Tue Aug 06 15:49:53 2019 +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(); diff -r a95e92c449bf -r 9429ecaee2e0 src/hotspot/share/gc/z/zVerify.cpp --- a/src/hotspot/share/gc/z/zVerify.cpp Tue Aug 06 09:27:38 2019 -0400 +++ b/src/hotspot/share/gc/z/zVerify.cpp Tue Aug 06 15:49:53 2019 +0200 @@ -143,6 +143,12 @@ objects(verify_weaks); } +void ZVerify::before_zoperation() { + // Verify strong roots + ZStatTimerDisable disable; + roots_strong(); +} + void ZVerify::after_mark() { // Only verify strong roots and references. roots_and_objects(false /* verify_weaks */); diff -r a95e92c449bf -r 9429ecaee2e0 src/hotspot/share/gc/z/zVerify.hpp --- a/src/hotspot/share/gc/z/zVerify.hpp Tue Aug 06 09:27:38 2019 -0400 +++ b/src/hotspot/share/gc/z/zVerify.hpp Tue Aug 06 15:49:53 2019 +0200 @@ -32,6 +32,7 @@ static void roots_impl(); static void roots(bool verify_weaks); + static void roots_strong(); static void roots_weak(); static void roots_concurrent(); static void roots_concurrent_weak(); @@ -42,7 +43,7 @@ public: // Verify strong (non-concurrent) roots. Should always be good. - static void roots_strong(); + static void before_zoperation(); // Verify all strong roots and references after marking. static void after_mark();