changeset 55721:6891a4438ae6

8227671: G1: assert_used_and_recalculate_used_equal performs work in product builds Reviewed-by: kbarrett, sangheki
author tschatzl
date Wed, 17 Jul 2019 16:33:19 +0200
parents dec1d532c000
children 5ee183a90e65
files src/hotspot/share/gc/g1/g1CollectedHeap.hpp
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.hpp	Wed Jul 17 16:33:19 2019 +0200
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.hpp	Wed Jul 17 16:33:19 2019 +0200
@@ -353,6 +353,7 @@
     assert(Thread::current()->is_VM_thread(), "current thread is not VM thread"); \
   } while (0)
 
+#ifdef ASSERT
 #define assert_used_and_recalculate_used_equal(g1h)                           \
   do {                                                                        \
     size_t cur_used_bytes = g1h->used();                                      \
@@ -361,6 +362,9 @@
            " same as recalculated used(" SIZE_FORMAT ").",                    \
            cur_used_bytes, recal_used_bytes);                                 \
   } while (0)
+#else
+#define assert_used_and_recalculate_used_equal(g1h) do {} while(0)
+#endif
 
   const char* young_gc_name() const;