OpenJDK / jdk / jdk
changeset 55913:9429ecaee2e0
8229135: ZGC: Adding missing ZStatTimerDisable before call to ZVerify::roots_strong()
Reviewed-by: stefank, eosterlund
author | pliden |
---|---|
date | Tue, 06 Aug 2019 15:49:53 +0200 |
parents | a95e92c449bf |
children | 22e12dd8f21a |
files | src/hotspot/share/gc/z/zDriver.cpp src/hotspot/share/gc/z/zVerify.cpp src/hotspot/share/gc/z/zVerify.hpp |
diffstat | 3 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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();
--- 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 */);
--- 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();