# HG changeset patch # User kbarrett # Date 1523320564 14400 # Node ID f3c619e4afb11e6abd2f882138c7a9c50b3b6c65 # Parent e578f653a10d70e004f108d827107648143b36e4 8200550: Xcode 9.3 produce warning -Wexpansion-to-defined Summary: Removed problem macros. Reviewed-by: tschatzl, dholmes, coleenp diff -r e578f653a10d -r f3c619e4afb1 src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp Wed Apr 15 09:34:46 2015 +0200 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp Mon Apr 09 20:36:04 2018 -0400 @@ -44,6 +44,7 @@ #include "memory/barrierSet.hpp" #include "memory/memRegion.hpp" #include "memory/sharedHeap.hpp" +#include "utilities/macros.hpp" #include "utilities/stack.hpp" // A "G1CollectedHeap" is an implementation of a java heap for HotSpot. @@ -1150,21 +1151,11 @@ // Do sanity check on the contents of the in-cset fast test table. bool check_cset_fast_test() PRODUCT_RETURN_( return true; ); - // 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(); // 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();) } #ifdef ASSERT bool is_on_master_free_list(HeapRegion* hr) { diff -r e578f653a10d -r f3c619e4afb1 src/share/vm/gc_implementation/g1/heapRegionSet.hpp --- a/src/share/vm/gc_implementation/g1/heapRegionSet.hpp Wed Apr 15 09:34:46 2015 +0200 +++ b/src/share/vm/gc_implementation/g1/heapRegionSet.hpp Mon Apr 09 20:36:04 2018 -0400 @@ -26,18 +26,12 @@ #define SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONSET_HPP #include "gc_implementation/g1/heapRegion.hpp" +#include "utilities/macros.hpp" // Large buffer for some cases where the output might be larger than normal. #define HRS_ERR_MSG_BUFSZ 512 typedef FormatBuffer hrs_err_msg; -// 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 hrs_ext_msg; class HRSMtSafeChecker : public CHeapObj { @@ -145,13 +139,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); };