8141570: Fix Zero interpreter build for --disable-precompiled-headers

Change to include atomic.inline.hpp and allocation.inline.hpp only in .cpp files and some build fixes from Kim to build on ubuntu without devkits

Reviewed-by: kbarrett, sgehwolf, erikj
This commit is contained in:
Coleen Phillimore 2015-11-18 11:47:55 -05:00
parent 581c251007
commit 72756888e9
8 changed files with 69 additions and 21 deletions

@ -1,5 +1,5 @@
#
# Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
# Copyright 2007, 2008 Red Hat, Inc.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
@ -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)
@ -42,5 +50,3 @@ endif
ifeq ($(ARCH_DATA_MODEL), 64)
CFLAGS += -D_LP64=1
endif
OPT_CFLAGS/compactingPermGenGen.o = -O1

@ -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"

@ -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"

@ -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"

@ -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 @@ void G1EvacStats::adjust_desired_plab_sz() {
reset();
}
G1EvacStats::~G1EvacStats() { }

@ -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 @@ class G1EvacStats : public PLABStats {
// 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);
}
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_region_end_waste(size_t value) {
Atomic::add_ptr(value, &_region_end_waste);
Atomic::add_ptr(1, &_regions_filled);
}
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

@ -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

@ -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"