8229135: ZGC: Adding missing ZStatTimerDisable before call to ZVerify::roots_strong()
Reviewed-by: stefank, eosterlund
--- 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();