src/hotspot/share/gc/g1/g1HeapVerifier.hpp
changeset 49725 e740e1a38c96
parent 49602 db050c11c3b5
child 50787 5f0266d16543
--- a/src/hotspot/share/gc/g1/g1HeapVerifier.hpp	Mon Apr 09 18:43:40 2018 +0300
+++ b/src/hotspot/share/gc/g1/g1HeapVerifier.hpp	Mon Apr 09 20:36:04 2018 -0400
@@ -28,6 +28,7 @@
 #include "gc/g1/heapRegionSet.hpp"
 #include "memory/allocation.hpp"
 #include "memory/universe.hpp"
+#include "utilities/macros.hpp"
 
 class G1CollectedHeap;
 
@@ -37,9 +38,6 @@
 
   G1CollectedHeap* _g1h;
 
-  // verify_region_sets() performs verification over the region
-  // lists. It will be compiled in the product code to be used when
-  // necessary (i.e., during heap verification).
   void verify_region_sets();
 
 public:
@@ -76,15 +74,8 @@
   void verify(VerifyOption vo);
 
   // verify_region_sets_optional() is planted in the code for
-  // list verification in non-product builds (and it can be enabled in
-  // product builds by defining HEAP_REGION_SET_FORCE_VERIFY to be 1).
-#if HEAP_REGION_SET_FORCE_VERIFY
-  void verify_region_sets_optional() {
-    verify_region_sets();
-  }
-#else // HEAP_REGION_SET_FORCE_VERIFY
-  void verify_region_sets_optional() { }
-#endif // HEAP_REGION_SET_FORCE_VERIFY
+  // list verification in debug builds.
+  void verify_region_sets_optional() { DEBUG_ONLY(verify_region_sets();) }
 
   void prepare_for_verify();
   double verify(G1VerifyType type, VerifyOption vo, const char* msg);