Mercurial > hg > openjdk > jdk8u > hotspot
changeset 9423:f3c619e4afb1
8200550: Xcode 9.3 produce warning -Wexpansion-to-defined
Summary: Removed problem macros.
Reviewed-by: tschatzl, dholmes, coleenp
author | kbarrett |
---|---|
date | Mon, 09 Apr 2018 20:36:04 -0400 |
parents | e578f653a10d |
children | fd78b4574c4a |
files | src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp src/share/vm/gc_implementation/g1/heapRegionSet.hpp |
diffstat | 2 files changed, 5 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- 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) {
--- 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_BUFSZ> 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<mtGC> { @@ -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); };