--- old/make/linux/makefiles/zeroshark.make 2015-11-16 17:03:21.684223400 -0500 +++ new/make/linux/makefiles/zeroshark.make 2015-11-16 17:03:21.559947937 -0500 @@ -25,8 +25,16 @@ # Setup common to Zero (non-Shark) and Shark versions of VM -# override this from the main file because some version of llvm do not like -Wundef -WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wunused-function -Wunused-value +# Some versions of llvm do not like -Wundef +ifeq ($(USE_CLANG), true) + WARNING_FLAGS += -Wno-undef +endif +# Suppress some warning flags that are normally turned on for hotspot, +# because some of the zero code has not been updated accordingly. +WARNING_FLAGS += -Wno-return-type \ + -Wno-format-nonliteral -Wno-format-security \ + -Wno-maybe-uninitialized + # The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) --- old/src/share/vm/runtime/java.cpp 2015-11-16 17:03:21.952611268 -0500 +++ new/src/share/vm/runtime/java.cpp 2015-11-16 17:03:21.597616225 -0500 @@ -49,6 +49,7 @@ #include "runtime/arguments.hpp" #include "runtime/biasedLocking.hpp" #include "runtime/compilationPolicy.hpp" +#include "runtime/deoptimization.hpp" #include "runtime/fprofiler.hpp" #include "runtime/init.hpp" #include "runtime/interfaceSupport.hpp" --- /dev/null 2015-11-11 11:25:00.135484724 -0500 +++ new/src/share/vm/gc/g1/g1EvacStats.inline.hpp 2015-11-16 17:03:21.626977562 -0500 @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef SHARE_VM_GC_G1_G1EVACSTATS_INLINE_HPP +#define SHARE_VM_GC_G1_G1EVACSTATS_INLINE_HPP + +#include "gc/g1/g1EvacStats.hpp" +#include "runtime/atomic.inline.hpp" + +inline void G1EvacStats::add_direct_allocated(size_t value) { + Atomic::add_ptr(value, &_direct_allocated); +} + +inline void G1EvacStats::add_region_end_waste(size_t value) { + Atomic::add_ptr(value, &_region_end_waste); + Atomic::add_ptr(1, &_regions_filled); +} + +inline void G1EvacStats::add_failure_used_and_waste(size_t used, size_t waste) { + Atomic::add_ptr(used, &_failure_used); + Atomic::add_ptr(waste, &_failure_waste); +} + +#endif // SHARE_VM_GC_G1_G1EVACSTATS_INLINE_HPP --- old/src/share/vm/gc/g1/g1Allocator.cpp 2015-11-16 17:03:22.038619373 -0500 +++ new/src/share/vm/gc/g1/g1Allocator.cpp 2015-11-16 17:03:21.667986545 -0500 @@ -25,6 +25,7 @@ #include "precompiled.hpp" #include "gc/g1/g1Allocator.inline.hpp" #include "gc/g1/g1AllocRegion.inline.hpp" +#include "gc/g1/g1EvacStats.inline.hpp" #include "gc/g1/g1CollectedHeap.inline.hpp" #include "gc/g1/g1CollectorPolicy.hpp" #include "gc/g1/g1MarkSweep.hpp" --- old/src/share/vm/gc/g1/g1AllocRegion.cpp 2015-11-16 17:03:22.002781371 -0500 +++ new/src/share/vm/gc/g1/g1AllocRegion.cpp 2015-11-16 17:03:21.621916345 -0500 @@ -24,6 +24,7 @@ #include "precompiled.hpp" #include "gc/g1/g1AllocRegion.inline.hpp" +#include "gc/g1/g1EvacStats.inline.hpp" #include "gc/g1/g1CollectedHeap.inline.hpp" #include "runtime/orderAccess.inline.hpp" --- old/src/share/vm/gc/g1/g1EvacStats.cpp 2015-11-16 17:03:22.013458658 -0500 +++ new/src/share/vm/gc/g1/g1EvacStats.cpp 2015-11-16 17:03:21.635963519 -0500 @@ -23,6 +23,7 @@ */ #include "precompiled.hpp" +#include "memory/allocation.inline.hpp" #include "gc/g1/g1EvacStats.hpp" #include "gc/shared/gcId.hpp" #include "trace/tracing.hpp" @@ -114,3 +115,4 @@ reset(); } +G1EvacStats::~G1EvacStats() { } --- old/src/share/vm/gc/g1/g1EvacStats.hpp 2015-11-16 17:03:22.049158806 -0500 +++ new/src/share/vm/gc/g1/g1EvacStats.hpp 2015-11-16 17:03:21.676631880 -0500 @@ -22,11 +22,10 @@ * */ -#ifndef SHARE_VM_gc_G1_G1EVACSTATS_HPP -#define SHARE_VM_gc_G1_G1EVACSTATS_HPP +#ifndef SHARE_VM_GC_G1_G1EVACSTATS_HPP +#define SHARE_VM_GC_G1_G1EVACSTATS_HPP #include "gc/shared/plab.hpp" -#include "runtime/atomic.hpp" // Records various memory allocation statistics gathered during evacuation. class G1EvacStats : public PLABStats { @@ -75,19 +74,11 @@ // Amount of space in heapwords wasted (unused) in the failing regions when an evacuation failure happens. size_t failure_waste() const { return _failure_waste; } - void add_direct_allocated(size_t value) { - Atomic::add_ptr(value, &_direct_allocated); - } - - void add_region_end_waste(size_t value) { - Atomic::add_ptr(value, &_region_end_waste); - Atomic::add_ptr(1, &_regions_filled); - } + inline void add_direct_allocated(size_t value); + inline void add_region_end_waste(size_t value); + inline void add_failure_used_and_waste(size_t used, size_t waste); - void add_failure_used_and_waste(size_t used, size_t waste) { - Atomic::add_ptr(used, &_failure_used); - Atomic::add_ptr(waste, &_failure_waste); - } + ~G1EvacStats(); }; -#endif // SHARE_VM_gc_G1_G1EVACSTATS_HPP +#endif // SHARE_VM_GC_G1_G1EVACSTATS_HPP --- old/src/share/vm/gc/g1/g1CollectedHeap.cpp 2015-11-16 17:03:22.312515867 -0500 +++ new/src/share/vm/gc/g1/g1CollectedHeap.cpp 2015-11-16 17:03:21.921326797 -0500 @@ -37,6 +37,7 @@ #include "gc/g1/g1CollectorState.hpp" #include "gc/g1/g1ErgoVerbose.hpp" #include "gc/g1/g1EvacFailure.hpp" +#include "gc/g1/g1EvacStats.inline.hpp" #include "gc/g1/g1GCPhaseTimes.hpp" #include "gc/g1/g1Log.hpp" #include "gc/g1/g1MarkSweep.hpp"