src/hotspot/share/gc/g1/heapRegionSet.hpp
changeset 49725 e740e1a38c96
parent 49632 64f9ebc85e67
child 51332 c25572739e7c
--- a/src/hotspot/share/gc/g1/heapRegionSet.hpp	Mon Apr 09 18:43:40 2018 +0300
+++ b/src/hotspot/share/gc/g1/heapRegionSet.hpp	Mon Apr 09 20:36:04 2018 -0400
@@ -26,6 +26,7 @@
 #define SHARE_VM_GC_G1_HEAPREGIONSET_HPP
 
 #include "gc/g1/heapRegion.hpp"
+#include "utilities/macros.hpp"
 
 #define assert_heap_region_set(p, message) \
   do {                                     \
@@ -46,13 +47,6 @@
   } while (0)
 
 
-// Set verification will be forced either if someone defines
-// HEAP_REGION_SET_FORCE_VERIFY to be 1, or in builds in which
-// asserts are compiled in.
-#ifndef HEAP_REGION_SET_FORCE_VERIFY
-#define HEAP_REGION_SET_FORCE_VERIFY defined(ASSERT)
-#endif // HEAP_REGION_SET_FORCE_VERIFY
-
 class HRSMtSafeChecker : public CHeapObj<mtGC> {
 public:
   virtual void check() = 0;
@@ -122,13 +116,7 @@
   void verify_next_region(HeapRegion* hr);
   void verify_end();
 
-#if HEAP_REGION_SET_FORCE_VERIFY
-  void verify_optional() {
-    verify();
-  }
-#else // HEAP_REGION_SET_FORCE_VERIFY
-  void verify_optional() { }
-#endif // HEAP_REGION_SET_FORCE_VERIFY
+  void verify_optional() { DEBUG_ONLY(verify();) }
 
   virtual void print_on(outputStream* out, bool print_contents = false);
 };