Merge
This commit is contained in:
commit
1f7d21bf05
.hgtags-top-repo
hotspot
.hgtags
agent/src/share/classes/sun/jvm/hotspot/runtime
make
Makefilealtsrc.makehotspot_versionjprt.properties
linux
Makefile
makefiles
adlc.makearm.makebuildtree.makegcc.makemapfile-vers-debugmapfile-vers-productppc.makerules.maketop.makevm.make
platform_armplatform_ppcsolaris/makefiles
windows
src
cpu
os
linux/vm
posix/vm
solaris/vm
windows/vm
os_cpu
linux_sparc/vm
linux_x86/vm
linux_zero/vm
solaris_sparc/vm
solaris_x86/vm
share/vm
asm
c1
c1_Defs.hppc1_FpuStackSim.hppc1_FrameMap.cppc1_FrameMap.hppc1_Instruction.hppc1_LIRAssembler.cppc1_LIRAssembler.hppc1_LinearScan.cppc1_LinearScan.hppc1_MacroAssembler.hppc1_globals.hpp
classfile
code
compiler
gc_implementation
g1
concurrentG1Refine.cppconcurrentMarkThread.cppg1CollectedHeap.cppg1CollectedHeap.hppg1CollectorPolicy.cppg1RemSet.cppg1_globals.hpp
shared
interpreter
abstractInterpreter.hppbytecode.hppbytecodeInterpreter.cppbytecodeInterpreter.hppbytecodeInterpreter.inline.hppbytecodeStream.hppbytecodes.cppbytecodes.hppcppInterpreter.hppcppInterpreterGenerator.hppinterpreter.hppinterpreterGenerator.hppinterpreterRuntime.cppinterpreterRuntime.hpptemplateInterpreter.hpptemplateInterpreterGenerator.hpp
@ -103,3 +103,4 @@ ed6950da30cf1e8904b4bdb034d471647942271f jdk7-b123
|
||||
b566d490905691787f8931f69947a92c67c6d5e4 jdk7-b126
|
||||
bd70f76b0309068f157ae759c36eac8f2c6d098e jdk7-b127
|
||||
57d702105b23fb90e40beaf00f8f8aeae5e249e7 jdk7-b128
|
||||
a6b015b59fbc2518762c17ccc35702f03ef7713a jdk7-b129
|
||||
|
@ -146,3 +146,5 @@ e24ab3fa6aafad3efabbe7dba9918c5f461a20b1 hs20-b06
|
||||
d535bf4c12355a2897e918da9f8910c0aceec4fb hs20-b07
|
||||
102466e70debc4b907afbd7624e34ddb1aafee9f jdk7-b127
|
||||
9a5762f448595794d449a8e17342abd81a3fadaf jdk7-b128
|
||||
ae4b185f2ed14af7bab610738c333840598cdcc4 jdk7-b129
|
||||
ae4b185f2ed14af7bab610738c333840598cdcc4 hs21-b01
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2011 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
|
||||
@ -29,13 +29,13 @@ import java.io.*;
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
|
||||
public class LowMemoryDetectorThread extends JavaThread {
|
||||
public LowMemoryDetectorThread(Address addr) {
|
||||
public class ServiceThread extends JavaThread {
|
||||
public ServiceThread(Address addr) {
|
||||
super(addr);
|
||||
}
|
||||
|
||||
public boolean isJavaThread() { return false; }
|
||||
public boolean isHiddenFromExternalView() { return true; }
|
||||
public boolean isLowMemoryDetectorThread() { return true; }
|
||||
public boolean isServiceThread() { return true; }
|
||||
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2011, 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
|
||||
@ -111,7 +111,7 @@ public class Thread extends VMObject {
|
||||
public boolean isJvmtiAgentThread() { return false; }
|
||||
public boolean isWatcherThread() { return false; }
|
||||
public boolean isConcurrentMarkSweepThread() { return false; }
|
||||
public boolean isLowMemoryDetectorThread() { return false; }
|
||||
public boolean isServiceThread() { return false; }
|
||||
|
||||
/** Memory operations */
|
||||
public void oopsDo(AddressVisitor oopVisitor) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2011, 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
|
||||
@ -107,14 +107,14 @@ public class Threads {
|
||||
// for now, use JavaThread itself. fix it later with appropriate class if needed
|
||||
virtualConstructor.addMapping("SurrogateLockerThread", JavaThread.class);
|
||||
virtualConstructor.addMapping("JvmtiAgentThread", JvmtiAgentThread.class);
|
||||
virtualConstructor.addMapping("LowMemoryDetectorThread", LowMemoryDetectorThread.class);
|
||||
virtualConstructor.addMapping("ServiceThread", ServiceThread.class);
|
||||
}
|
||||
|
||||
public Threads() {
|
||||
}
|
||||
|
||||
/** NOTE: this returns objects of type JavaThread, CompilerThread,
|
||||
JvmtiAgentThread, and LowMemoryDetectorThread.
|
||||
JvmtiAgentThread, and ServiceThread.
|
||||
The latter four are subclasses of the former. Most operations
|
||||
(fetching the top frame, etc.) are only allowed to be performed on
|
||||
a "pure" JavaThread. For this reason, {@link
|
||||
@ -143,7 +143,7 @@ public class Threads {
|
||||
return thread;
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Unable to deduce type of thread from address " + threadAddr +
|
||||
" (expected type JavaThread, CompilerThread, LowMemoryDetectorThread, JvmtiAgentThread, or SurrogateLockerThread)", e);
|
||||
" (expected type JavaThread, CompilerThread, ServiceThread, JvmtiAgentThread, or SurrogateLockerThread)", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -73,6 +73,7 @@ else
|
||||
include defs.make
|
||||
endif
|
||||
|
||||
include $(GAMMADIR)/make/altsrc.make
|
||||
|
||||
ifneq ($(ALT_OUTPUTDIR),)
|
||||
ALT_OUT=ALT_OUTPUTDIR=$(ALT_OUTPUTDIR)
|
||||
@ -361,7 +362,8 @@ $(EXPORT_INCLUDE_DIR)/%: $(HS_SRC_DIR)/share/vm/code/%
|
||||
$(EXPORT_INCLUDE_DIR)/%: $(HS_SRC_DIR)/share/vm/prims/%
|
||||
$(install-file)
|
||||
|
||||
$(EXPORT_INCLUDE_DIR)/$(JDK_INCLUDE_SUBDIR)/jni_md.h: $(HS_SRC_DIR)/cpu/$(HS_ARCH)/vm/jni_$(HS_ARCH).h
|
||||
HS_JNI_ARCH_SRC=$(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(HS_ARCH)/vm/jni_$(HS_ARCH).h)
|
||||
$(EXPORT_INCLUDE_DIR)/$(JDK_INCLUDE_SUBDIR)/jni_md.h: $(HS_JNI_ARCH_SRC)
|
||||
$(install-file)
|
||||
|
||||
$(EXPORT_INCLUDE_DIR)/%: $(HS_SRC_DIR)/share/vm/services/%
|
||||
|
92
hotspot/make/altsrc.make
Normal file
92
hotspot/make/altsrc.make
Normal file
@ -0,0 +1,92 @@
|
||||
#
|
||||
# Copyright (c) 2011, 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.
|
||||
#
|
||||
#
|
||||
|
||||
# This file defines variables and macros which are used in the makefiles to
|
||||
# allow distributions to augment or replace common hotspot code with
|
||||
# distribution-specific source files.
|
||||
|
||||
# Requires: GAMMADIR
|
||||
# Provides:
|
||||
# variables: HS_COMMON_SRC, HS_ALT_SRC, HS_COMMON_SRC_REL, and HS_ALT_SRC_REL
|
||||
# functions: altsrc-equiv, if-has-altsrc, altsrc, altsrc-replace
|
||||
|
||||
HS_COMMON_SRC_REL=src
|
||||
|
||||
# This needs to be changed to a more generic location, but we keep it as this
|
||||
# for now for compatibility
|
||||
HS_ALT_SRC_REL=src/closed
|
||||
|
||||
HS_COMMON_SRC=$(GAMMADIR)/$(HS_COMMON_SRC_REL)
|
||||
HS_ALT_SRC=$(GAMMADIR)/$(HS_ALT_SRC_REL)
|
||||
|
||||
|
||||
## altsrc-equiv
|
||||
#
|
||||
# Convert a common source path to an alternative source path
|
||||
#
|
||||
# Parameter: An absolute path into the common sources
|
||||
# Result: The matching path to the alternate-source location
|
||||
#
|
||||
altsrc-equiv=$(subst $(HS_COMMON_SRC)/,$(HS_ALT_SRC)/,$(1))
|
||||
|
||||
|
||||
## if-has-altsrc
|
||||
#
|
||||
# Conditional macro to test for the existence of an alternate source path
|
||||
#
|
||||
# Parameter: An absolute path into the common sources
|
||||
# Parameter: Result if the alternative-source location exists
|
||||
# Parameter: Result if the alternative-source location does not exist
|
||||
# Result: expands to parameter 2 or 3 depending on existence of alternate source
|
||||
#
|
||||
if-has-altsrc=$(if $(wildcard $(call altsrc-equiv,$(1))),$(2),$(3))
|
||||
|
||||
|
||||
## altsrc
|
||||
#
|
||||
# Converts common source path to alternate source path if the alternate
|
||||
# path exists, otherwise evaluates to nul (empty string)
|
||||
#
|
||||
# Parameter: An absolute path into the common sources
|
||||
# Result: The equivalent path to the alternate-source location, if such a
|
||||
# location exists on the filesystem. Otherwise it expands to empty.
|
||||
#
|
||||
altsrc=$(call if-has-altsrc,$(1),$(call altsrc-equiv,$(1)))
|
||||
|
||||
## commonsrc
|
||||
#
|
||||
# Returns parameter.
|
||||
#
|
||||
commonsrc=$(1)
|
||||
|
||||
|
||||
## altsrc-replace
|
||||
#
|
||||
# Converts a common source path to an alternate source path if the alternate
|
||||
# source path exists. Otherwise it evaluates to the input common source path.
|
||||
#
|
||||
# Parameter: An absolute path into the common sources
|
||||
# Result: A path to either the common or alternate sources
|
||||
#
|
||||
altsrc-replace=$(call if-has-altsrc,$(1),$(call altsrc-equiv,$(1)),$(1))
|
@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2011
|
||||
|
||||
HS_MAJOR_VER=21
|
||||
HS_MINOR_VER=0
|
||||
HS_BUILD_NUMBER=01
|
||||
HS_BUILD_NUMBER=02
|
||||
|
||||
JDK_MAJOR_VER=1
|
||||
JDK_MINOR_VER=7
|
||||
|
@ -44,6 +44,11 @@ jprt.tools.default.release=${jprt.submit.release}
|
||||
|
||||
jprt.sync.push=false
|
||||
|
||||
# Note: we want both embedded releases and regular releases to build and test
|
||||
# all platforms so that regressions are not introduced (eg. change to
|
||||
# common code by SE breaks PPC/ARM; change to common code by SE-E breaks
|
||||
# sparc etc.
|
||||
|
||||
# Define the Solaris platforms we want for the various releases
|
||||
|
||||
jprt.my.solaris.sparc.jdk7=solaris_sparc_5.10
|
||||
@ -55,6 +60,8 @@ jprt.my.solaris.sparc.jdk6u10=solaris_sparc_5.8
|
||||
jprt.my.solaris.sparc.jdk6u14=solaris_sparc_5.8
|
||||
jprt.my.solaris.sparc.jdk6u18=solaris_sparc_5.8
|
||||
jprt.my.solaris.sparc.jdk6u20=solaris_sparc_5.8
|
||||
jprt.my.solaris.sparc.ejdk7=${jprt.my.solaris.sparc.jdk7}
|
||||
jprt.my.solaris.sparc.ejdk6=${jprt.my.solaris.sparc.jdk6}
|
||||
jprt.my.solaris.sparc=${jprt.my.solaris.sparc.${jprt.tools.default.release}}
|
||||
|
||||
jprt.my.solaris.sparcv9.jdk7=solaris_sparcv9_5.10
|
||||
@ -66,6 +73,8 @@ jprt.my.solaris.sparcv9.jdk6u10=solaris_sparcv9_5.8
|
||||
jprt.my.solaris.sparcv9.jdk6u14=solaris_sparcv9_5.8
|
||||
jprt.my.solaris.sparcv9.jdk6u18=solaris_sparcv9_5.8
|
||||
jprt.my.solaris.sparcv9.jdk6u20=solaris_sparcv9_5.8
|
||||
jprt.my.solaris.sparcv9.ejdk7=${jprt.my.solaris.sparcv9.jdk7}
|
||||
jprt.my.solaris.sparcv9.ejdk6=${jprt.my.solaris.sparcv9.jdk6}
|
||||
jprt.my.solaris.sparcv9=${jprt.my.solaris.sparcv9.${jprt.tools.default.release}}
|
||||
|
||||
jprt.my.solaris.i586.jdk7=solaris_i586_5.10
|
||||
@ -77,6 +86,8 @@ jprt.my.solaris.i586.jdk6u10=solaris_i586_5.8
|
||||
jprt.my.solaris.i586.jdk6u14=solaris_i586_5.8
|
||||
jprt.my.solaris.i586.jdk6u18=solaris_i586_5.8
|
||||
jprt.my.solaris.i586.jdk6u20=solaris_i586_5.8
|
||||
jprt.my.solaris.i586.ejdk7=${jprt.my.solaris.i586.jdk7}
|
||||
jprt.my.solaris.i586.ejdk6=${jprt.my.solaris.i586.jdk6}
|
||||
jprt.my.solaris.i586=${jprt.my.solaris.i586.${jprt.tools.default.release}}
|
||||
|
||||
jprt.my.solaris.x64.jdk7=solaris_x64_5.10
|
||||
@ -88,6 +99,8 @@ jprt.my.solaris.x64.jdk6u10=solaris_x64_5.10
|
||||
jprt.my.solaris.x64.jdk6u14=solaris_x64_5.10
|
||||
jprt.my.solaris.x64.jdk6u18=solaris_x64_5.10
|
||||
jprt.my.solaris.x64.jdk6u20=solaris_x64_5.10
|
||||
jprt.my.solaris.x64.ejdk7=${jprt.my.solaris.x64.jdk7}
|
||||
jprt.my.solaris.x64.ejdk6=${jprt.my.solaris.x64.jdk6}
|
||||
jprt.my.solaris.x64=${jprt.my.solaris.x64.${jprt.tools.default.release}}
|
||||
|
||||
jprt.my.linux.i586.jdk7=linux_i586_2.6
|
||||
@ -99,6 +112,8 @@ jprt.my.linux.i586.jdk6u10=linux_i586_2.4
|
||||
jprt.my.linux.i586.jdk6u14=linux_i586_2.4
|
||||
jprt.my.linux.i586.jdk6u18=linux_i586_2.4
|
||||
jprt.my.linux.i586.jdk6u20=linux_i586_2.4
|
||||
jprt.my.linux.i586.ejdk7=linux_i586_2.6
|
||||
jprt.my.linux.i586.ejdk6=linux_i586_2.6
|
||||
jprt.my.linux.i586=${jprt.my.linux.i586.${jprt.tools.default.release}}
|
||||
|
||||
jprt.my.linux.x64.jdk7=linux_x64_2.6
|
||||
@ -110,8 +125,45 @@ jprt.my.linux.x64.jdk6u10=linux_x64_2.4
|
||||
jprt.my.linux.x64.jdk6u14=linux_x64_2.4
|
||||
jprt.my.linux.x64.jdk6u18=linux_x64_2.4
|
||||
jprt.my.linux.x64.jdk6u20=linux_x64_2.4
|
||||
jprt.my.linux.x64.ejdk7=${jprt.my.linux.x64.jdk7}
|
||||
jprt.my.linux.x64.ejdk6=${jprt.my.linux.x64.jdk6}
|
||||
jprt.my.linux.x64=${jprt.my.linux.x64.${jprt.tools.default.release}}
|
||||
|
||||
jprt.my.linux.ppc.jdk7=linux_ppc_2.6
|
||||
jprt.my.linux.ppc.jdk7b107=linux_ppc_2.6
|
||||
jprt.my.linux.ppc.jdk7temp=linux_ppc_2.6
|
||||
jprt.my.linux.ppc.ejdk6=linux_ppc_2.6
|
||||
jprt.my.linux.ppc.ejdk7=linux_ppc_2.6
|
||||
jprt.my.linux.ppc=${jprt.my.linux.ppc.${jprt.tools.default.release}}
|
||||
|
||||
jprt.my.linux.ppcv2.jdk7=linux_ppcv2_2.6
|
||||
jprt.my.linux.ppcv2.jdk7b107=linux_ppcv2_2.6
|
||||
jprt.my.linux.ppcv2.jdk7temp=linux_ppcv2_2.6
|
||||
jprt.my.linux.ppcv2.ejdk6=linux_ppcv2_2.6
|
||||
jprt.my.linux.ppcv2.ejdk7=linux_ppcv2_2.6
|
||||
jprt.my.linux.ppcv2=${jprt.my.linux.ppcv2.${jprt.tools.default.release}}
|
||||
|
||||
jprt.my.linux.ppcsflt.jdk7=linux_ppcsflt_2.6
|
||||
jprt.my.linux.ppcsflt.jdk7b107=linux_ppcsflt_2.6
|
||||
jprt.my.linux.ppcsflt.jdk7temp=linux_ppcsflt_2.6
|
||||
jprt.my.linux.ppcsflt.ejdk6=linux_ppcsflt_2.6
|
||||
jprt.my.linux.ppcsflt.ejdk7=linux_ppcsflt_2.6
|
||||
jprt.my.linux.ppcsflt=${jprt.my.linux.ppcsflt.${jprt.tools.default.release}}
|
||||
|
||||
jprt.my.linux.armvfp.jdk7=linux_armvfp_2.6
|
||||
jprt.my.linux.armvfp.jdk7b107=linux_armvfp_2.6
|
||||
jprt.my.linux.armvfp.jdk7temp=linux_armvfp_2.6
|
||||
jprt.my.linux.armvfp.ejdk6=linux_armvfp_2.6
|
||||
jprt.my.linux.armvfp.ejdk7=linux_armvfp_2.6
|
||||
jprt.my.linux.armvfp=${jprt.my.linux.armvfp.${jprt.tools.default.release}}
|
||||
|
||||
jprt.my.linux.armsflt.jdk7=linux_armsflt_2.6
|
||||
jprt.my.linux.armsflt.jdk7b107=linux_armsflt_2.6
|
||||
jprt.my.linux.armsflt.jdk7temp=linux_armsflt_2.6
|
||||
jprt.my.linux.armsflt.ejdk6=linux_armsflt_2.6
|
||||
jprt.my.linux.armsflt.ejdk7=linux_armsflt_2.6
|
||||
jprt.my.linux.armsflt=${jprt.my.linux.armsflt.${jprt.tools.default.release}}
|
||||
|
||||
jprt.my.windows.i586.jdk7=windows_i586_5.1
|
||||
jprt.my.windows.i586.jdk7b107=windows_i586_5.0
|
||||
jprt.my.windows.i586.jdk7temp=windows_i586_5.0
|
||||
@ -121,6 +173,8 @@ jprt.my.windows.i586.jdk6u10=windows_i586_5.0
|
||||
jprt.my.windows.i586.jdk6u14=windows_i586_5.0
|
||||
jprt.my.windows.i586.jdk6u18=windows_i586_5.0
|
||||
jprt.my.windows.i586.jdk6u20=windows_i586_5.0
|
||||
jprt.my.windows.i586.ejdk7=${jprt.my.windows.i586.jdk7}
|
||||
jprt.my.windows.i586.ejdk6=${jprt.my.windows.i586.jdk6}
|
||||
jprt.my.windows.i586=${jprt.my.windows.i586.${jprt.tools.default.release}}
|
||||
|
||||
jprt.my.windows.x64.jdk7=windows_x64_5.2
|
||||
@ -132,11 +186,13 @@ jprt.my.windows.x64.jdk6u10=windows_x64_5.2
|
||||
jprt.my.windows.x64.jdk6u14=windows_x64_5.2
|
||||
jprt.my.windows.x64.jdk6u18=windows_x64_5.2
|
||||
jprt.my.windows.x64.jdk6u20=windows_x64_5.2
|
||||
jprt.my.windows.x64.ejdk7=${jprt.my.windows.x64.jdk7}
|
||||
jprt.my.windows.x64.ejdk6=${jprt.my.windows.x64.jdk6}
|
||||
jprt.my.windows.x64=${jprt.my.windows.x64.${jprt.tools.default.release}}
|
||||
|
||||
# Standard list of jprt build targets for this source tree
|
||||
|
||||
jprt.build.targets= \
|
||||
jprt.build.targets.standard= \
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug|debug}, \
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug|debug}, \
|
||||
${jprt.my.solaris.i586}-{product|fastdebug|debug}, \
|
||||
@ -146,6 +202,30 @@ jprt.build.targets= \
|
||||
${jprt.my.windows.i586}-{product|fastdebug|debug}, \
|
||||
${jprt.my.windows.x64}-{product|fastdebug|debug}
|
||||
|
||||
jprt.build.targets.embedded= \
|
||||
${jprt.my.linux.i586}-{product|fastdebug|debug}, \
|
||||
${jprt.my.linux.ppc}-{product|fastdebug}, \
|
||||
${jprt.my.linux.ppcv2}-{product|fastdebug}, \
|
||||
${jprt.my.linux.ppcsflt}-{product|fastdebug}, \
|
||||
${jprt.my.linux.armvfp}-{product|fastdebug}, \
|
||||
${jprt.my.linux.armsflt}-{product|fastdebug}
|
||||
|
||||
jprt.build.targets.all=${jprt.build.targets.standard}, \
|
||||
${jprt.build.targets.embedded}
|
||||
|
||||
jprt.build.targets.jdk7=${jprt.build.targets.all}
|
||||
jprt.build.targets.jdk7temp=${jprt.build.targets.all}
|
||||
jprt.build.targets.jdk7b107=${jprt.build.targets.all}
|
||||
jprt.build.targets.jdk6=${jprt.build.targets.standard}
|
||||
jprt.build.targets.jdk6perf=${jprt.build.targets.standard}
|
||||
jprt.build.targets.jdk6u10=${jprt.build.targets.standard}
|
||||
jprt.build.targets.jdk6u14=${jprt.build.targets.standard}
|
||||
jprt.build.targets.jdk6u18=${jprt.build.targets.standard}
|
||||
jprt.build.targets.jdk6u20=${jprt.build.targets.standard}
|
||||
jprt.build.targets.ejdk6=${jprt.build.targets.all}
|
||||
jprt.build.targets.ejdk7=${jprt.build.targets.all}
|
||||
jprt.build.targets=${jprt.build.targets.${jprt.tools.default.release}}
|
||||
|
||||
# Subset lists of test targets for this source tree
|
||||
|
||||
jprt.my.solaris.sparc.test.targets= \
|
||||
@ -372,9 +452,14 @@ jprt.my.windows.x64.test.targets = \
|
||||
${jprt.my.windows.x64}-product-c2-jbb_G1, \
|
||||
${jprt.my.windows.x64}-product-c2-jbb_ParOldGC
|
||||
|
||||
# The complete list of test targets for jprt
|
||||
# Testing for actual embedded builds is different to standard
|
||||
jprt.my.linux.i586.test.targets.embedded = \
|
||||
linux_i586_2.6-product-c1-scimark
|
||||
|
||||
jprt.test.targets = \
|
||||
# The complete list of test targets for jprt
|
||||
# Note: no PPC or ARM tests at this stage
|
||||
|
||||
jprt.test.targets.standard = \
|
||||
${jprt.my.solaris.sparc.test.targets}, \
|
||||
${jprt.my.solaris.sparcv9.test.targets}, \
|
||||
${jprt.my.solaris.i586.test.targets}, \
|
||||
@ -384,15 +469,41 @@ jprt.test.targets = \
|
||||
${jprt.my.windows.i586.test.targets}, \
|
||||
${jprt.my.windows.x64.test.targets}
|
||||
|
||||
jprt.test.targets.embedded= \
|
||||
${jprt.my.linux.i586.test.targets.embedded}, \
|
||||
${jprt.my.solaris.sparc.test.targets}, \
|
||||
${jprt.my.solaris.sparcv9.test.targets}, \
|
||||
${jprt.my.solaris.i586.test.targets}, \
|
||||
${jprt.my.solaris.x64.test.targets}, \
|
||||
${jprt.my.linux.x64.test.targets}, \
|
||||
${jprt.my.windows.i586.test.targets}, \
|
||||
${jprt.my.windows.x64.test.targets}
|
||||
|
||||
|
||||
jprt.test.targets.jdk7=${jprt.test.targets.standard}
|
||||
jprt.test.targets.jdk7temp=${jprt.test.targets.standard}
|
||||
jprt.test.targets.jdk7b105=${jprt.test.targets.standard}
|
||||
jprt.test.targets.jdk6=${jprt.test.targets.standard}
|
||||
jprt.test.targets.jdk6perf=${jprt.test.targets.standard}
|
||||
jprt.test.targets.jdk6u10=${jprt.test.targets.standard}
|
||||
jprt.test.targets.jdk6u14=${jprt.test.targets.standard}
|
||||
jprt.test.targets.jdk6u18=${jprt.test.targets.standard}
|
||||
jprt.test.targets.jdk6u20=${jprt.test.targets.standard}
|
||||
jprt.test.targets.ejdk6=${jprt.test.targets.embedded}
|
||||
jprt.test.targets.ejdk7=${jprt.test.targets.embedded}
|
||||
jprt.test.targets=${jprt.test.targets.${jprt.tools.default.release}}
|
||||
|
||||
# The default test/Makefile targets that should be run
|
||||
|
||||
#jprt.make.rule.test.targets=*-product-*-packtest
|
||||
|
||||
jprt.make.rule.test.targets = \
|
||||
jprt.make.rule.test.targets.standard.client = \
|
||||
${jprt.my.solaris.sparc}-*-c1-clienttest, \
|
||||
${jprt.my.solaris.i586}-*-c1-clienttest, \
|
||||
${jprt.my.linux.i586}-*-c1-clienttest, \
|
||||
${jprt.my.windows.i586}-*-c1-clienttest, \
|
||||
${jprt.my.windows.i586}-*-c1-clienttest
|
||||
|
||||
jprt.make.rule.test.targets.standard.server = \
|
||||
${jprt.my.solaris.sparc}-*-c2-servertest, \
|
||||
${jprt.my.solaris.sparcv9}-*-c2-servertest, \
|
||||
${jprt.my.solaris.i586}-*-c2-servertest, \
|
||||
@ -402,3 +513,23 @@ jprt.make.rule.test.targets = \
|
||||
${jprt.my.windows.i586}-*-c2-servertest, \
|
||||
${jprt.my.windows.x64}-*-c2-servertest
|
||||
|
||||
jprt.make.rule.test.targets.standard = \
|
||||
${jprt.make.rule.test.targets.standard.client}, \
|
||||
${jprt.make.rule.test.targets.standard.server}
|
||||
|
||||
jprt.make.rule.test.targets.embedded = \
|
||||
${jprt.make.rule.test.targets.standard.client}
|
||||
|
||||
jprt.make.rule.test.targets.jdk7=${jprt.make.rule.test.targets.standard}
|
||||
jprt.make.rule.test.targets.jdk7temp=${jprt.make.rule.test.targets.standard}
|
||||
jprt.make.rule.test.targets.jdk7b107=${jprt.make.rule.test.targets.standard}
|
||||
jprt.make.rule.test.targets.jdk6=${jprt.make.rule.test.targets.standard}
|
||||
jprt.make.rule.test.targets.jdk6perf=${jprt.make.rule.test.targets.standard}
|
||||
jprt.make.rule.test.targets.jdk6u10=${jprt.make.rule.test.targets.standard}
|
||||
jprt.make.rule.test.targets.jdk6u14=${jprt.make.rule.test.targets.standard}
|
||||
jprt.make.rule.test.targets.jdk6u18=${jprt.make.rule.test.targets.standard}
|
||||
jprt.make.rule.test.targets.jdk6u20=${jprt.make.rule.test.targets.standard}
|
||||
jprt.make.rule.test.targets.ejdk6=${jprt.make.rule.test.targets.embedded}
|
||||
jprt.make.rule.test.targets.ejdk7=${jprt.make.rule.test.targets.embedded}
|
||||
jprt.make.rule.test.targets=${jprt.make.rule.test.targets.${jprt.tools.default.release}}
|
||||
|
||||
|
@ -208,7 +208,7 @@ TARGETS_ZERO = $(addsuffix zero,$(TARGETS))
|
||||
TARGETS_SHARK = $(addsuffix shark,$(TARGETS))
|
||||
|
||||
BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make
|
||||
BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) ARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH)
|
||||
BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH)
|
||||
BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION) JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
|
||||
|
||||
BUILDTREE = $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_VARS)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1999, 2011, 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
|
||||
@ -39,8 +39,9 @@ OS = $(Platform_os_family)
|
||||
|
||||
SOURCE.AD = $(OUTDIR)/$(OS)_$(Platform_arch_model).ad
|
||||
|
||||
SOURCES.AD = $(GAMMADIR)/src/cpu/$(ARCH)/vm/$(Platform_arch_model).ad \
|
||||
$(GAMMADIR)/src/os_cpu/$(OS)_$(ARCH)/vm/$(OS)_$(Platform_arch_model).ad
|
||||
SOURCES.AD = \
|
||||
$(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(ARCH)/vm/$(Platform_arch_model).ad) \
|
||||
$(call altsrc-replace,$(HS_COMMON_SRC)/os_cpu/$(OS)_$(ARCH)/vm/$(OS)_$(Platform_arch_model).ad)
|
||||
|
||||
EXEC = $(OUTDIR)/adlc
|
||||
|
||||
|
10
hotspot/make/linux/makefiles/arm.make
Normal file
10
hotspot/make/linux/makefiles/arm.make
Normal file
@ -0,0 +1,10 @@
|
||||
#
|
||||
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
||||
#
|
||||
|
||||
Obj_Files += linux_arm.o
|
||||
|
||||
LIBS += $(EXT_LIBS_PATH)/sflt_glibc.a
|
||||
|
||||
CFLAGS += -DVM_LITTLE_ENDIAN
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2005, 2011, 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
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
# Usage:
|
||||
#
|
||||
# $(MAKE) -f buildtree.make ARCH=arch BUILDARCH=buildarch LIBARCH=libarch
|
||||
# $(MAKE) -f buildtree.make SRCARCH=srcarch BUILDARCH=buildarch LIBARCH=libarch
|
||||
# GAMMADIR=dir OS_FAMILY=os VARIANT=variant
|
||||
#
|
||||
# The macros ARCH, GAMMADIR, OS_FAMILY and VARIANT must be defined in the
|
||||
@ -56,6 +56,8 @@
|
||||
# having to read the dependency files for the vm.
|
||||
|
||||
include $(GAMMADIR)/make/scm.make
|
||||
include $(GAMMADIR)/make/altsrc.make
|
||||
|
||||
|
||||
# 'gmake MAKE_VERBOSE=y' or 'gmake QUIETLY=' gives all the gory details.
|
||||
QUIETLY$(MAKE_VERBOSE) = @
|
||||
@ -127,7 +129,7 @@ BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make jvmti.ma
|
||||
env.sh env.csh jdkpath.sh .dbxrc test_gamma
|
||||
|
||||
BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \
|
||||
ARCH=$(ARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) VARIANT=$(VARIANT)
|
||||
SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) VARIANT=$(VARIANT)
|
||||
|
||||
# Define variables to be set in flags.make.
|
||||
# Default values are set in make/defs.make.
|
||||
@ -146,13 +148,7 @@ endif
|
||||
# Define HOTSPOT_VM_DISTRO based on settings in make/openjdk_distro
|
||||
# or make/hotspot_distro.
|
||||
ifndef HOTSPOT_VM_DISTRO
|
||||
CLOSED_DIR_EXISTS := $(shell \
|
||||
if [ -d $(GAMMADIR)/src/closed ] ; then \
|
||||
echo true; \
|
||||
else \
|
||||
echo false; \
|
||||
fi)
|
||||
ifeq ($(CLOSED_DIR_EXISTS), true)
|
||||
ifeq ($(call if-has-altsrc,$(HS_COMMON_SRC)/,true,false),true)
|
||||
include $(GAMMADIR)/make/hotspot_distro
|
||||
else
|
||||
include $(GAMMADIR)/make/openjdk_distro
|
||||
@ -177,6 +173,11 @@ $(SUBMAKE_DIRS): $(SIMPLE_DIRS) FORCE
|
||||
$(SIMPLE_DIRS):
|
||||
$(QUIETLY) mkdir -p $@
|
||||
|
||||
# Convenience macro which takes a source relative path, applies $(1) to the
|
||||
# absolute path, and then replaces $(GAMMADIR) in the result with a
|
||||
# literal "$(GAMMADIR)/" suitable for inclusion in a Makefile.
|
||||
gamma-path=$(subst $(GAMMADIR),\$$(GAMMADIR),$(call $(1),$(HS_COMMON_SRC)/$(2)))
|
||||
|
||||
flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
|
||||
@echo Creating $@ ...
|
||||
$(QUIETLY) ( \
|
||||
@ -187,7 +188,7 @@ flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
|
||||
echo; \
|
||||
echo "GAMMADIR = $(GAMMADIR)"; \
|
||||
echo "SYSDEFS = \$$(Platform_sysdefs)"; \
|
||||
echo "SRCARCH = $(ARCH)"; \
|
||||
echo "SRCARCH = $(SRCARCH)"; \
|
||||
echo "BUILDARCH = $(BUILDARCH)"; \
|
||||
echo "LIBARCH = $(LIBARCH)"; \
|
||||
echo "TARGET = $(TARGET)"; \
|
||||
@ -208,16 +209,28 @@ flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
|
||||
echo; \
|
||||
echo "Src_Dirs_V = \\"; \
|
||||
sed 's/$$/ \\/;s|$(GAMMADIR)|$$(GAMMADIR)|' ../shared_dirs.lst; \
|
||||
echo "\$$(GAMMADIR)/src/cpu/$(ARCH)/vm \\"; \
|
||||
echo "\$$(GAMMADIR)/src/os/$(OS_FAMILY)/vm \\"; \
|
||||
echo "\$$(GAMMADIR)/src/os_cpu/$(OS_FAMILY)_$(ARCH)/vm"; \
|
||||
echo "$(call gamma-path,altsrc,cpu/$(SRCARCH)/vm) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,cpu/$(SRCARCH)/vm) \\"; \
|
||||
echo "$(call gamma-path,altsrc,os_cpu/$(OS_FAMILY)_$(SRCARCH)/vm) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,os_cpu/$(OS_FAMILY)_$(SRCARCH)/vm) \\"; \
|
||||
echo "$(call gamma-path,altsrc,os/$(OS_FAMILY)/vm) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,os/$(OS_FAMILY)/vm) \\"; \
|
||||
echo "$(call gamma-path,altsrc,os/posix/vm) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,os/posix/vm)"; \
|
||||
echo; \
|
||||
echo "Src_Dirs_I = \\"; \
|
||||
echo "\$$(GAMMADIR)/src/share/vm \\"; \
|
||||
echo "\$$(GAMMADIR)/src/share/vm/prims \\"; \
|
||||
echo "\$$(GAMMADIR)/src/cpu/$(ARCH)/vm \\"; \
|
||||
echo "\$$(GAMMADIR)/src/os/$(OS_FAMILY)/vm \\"; \
|
||||
echo "\$$(GAMMADIR)/src/os_cpu/$(OS_FAMILY)_$(ARCH)/vm"; \
|
||||
echo "$(call gamma-path,altsrc,share/vm/prims) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,share/vm/prims) \\"; \
|
||||
echo "$(call gamma-path,altsrc,share/vm) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,share/vm) \\"; \
|
||||
echo "$(call gamma-path,altsrc,cpu/$(SRCARCH)/vm) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,cpu/$(SRCARCH)/vm) \\"; \
|
||||
echo "$(call gamma-path,altsrc,os_cpu/$(OS_FAMILY)_$(SRCARCH)/vm) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,os_cpu/$(OS_FAMILY)_$(SRCARCH)/vm) \\"; \
|
||||
echo "$(call gamma-path,altsrc,os/$(OS_FAMILY)/vm) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,os/$(OS_FAMILY)/vm) \\"; \
|
||||
echo "$(call gamma-path,altsrc,os/posix/vm) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,os/posix/vm)"; \
|
||||
[ -n "$(CFLAGS_BROWSE)" ] && \
|
||||
echo && echo "CFLAGS_BROWSE = $(CFLAGS_BROWSE)"; \
|
||||
[ -n "$(HOTSPOT_EXTRA_SYSDEFS)" ] && \
|
||||
@ -241,9 +254,14 @@ flags_vm.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
|
||||
|
||||
../shared_dirs.lst: $(BUILDTREE_MAKE) $(GAMMADIR)/src/share/vm
|
||||
@echo Creating directory list $@
|
||||
$(QUIETLY) find $(GAMMADIR)/src/share/vm/* -prune \
|
||||
$(QUIETLY) if [ -d $(HS_ALT_SRC)/share/vm ]; then \
|
||||
find $(HS_ALT_SRC)/share/vm/* -prune \
|
||||
-type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \
|
||||
\( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; > $@; \
|
||||
fi;
|
||||
$(QUIETLY) find $(HS_COMMON_SRC)/share/vm/* -prune \
|
||||
-type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \
|
||||
\( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; > $@
|
||||
\( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; >> $@
|
||||
|
||||
Makefile: $(BUILDTREE_MAKE)
|
||||
@echo Creating $@ ...
|
||||
|
@ -75,6 +75,11 @@ CFLAGS += -fno-rtti
|
||||
CFLAGS += -fno-exceptions
|
||||
CFLAGS += -D_REENTRANT
|
||||
CFLAGS += -fcheck-new
|
||||
# version 4 and above support fvisibility=hidden (matches jni_x86.h file)
|
||||
# except 4.1.2 gives pointless warnings that can't be disabled (afaik)
|
||||
ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
|
||||
CFLAGS += -fvisibility=hidden
|
||||
endif
|
||||
|
||||
ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
|
||||
ARCHFLAG/i486 = -m32 -march=i586
|
||||
|
@ -262,14 +262,6 @@ SUNWprivate_1.1 {
|
||||
JVM_SetField;
|
||||
JVM_SetPrimitiveField;
|
||||
|
||||
# Needed for dropping VM into JDK 1.3.x, 1.4
|
||||
_JVM_native_threads;
|
||||
jdk_sem_init;
|
||||
jdk_sem_post;
|
||||
jdk_sem_wait;
|
||||
jdk_pthread_sigmask;
|
||||
jdk_waitpid;
|
||||
|
||||
# debug JVM
|
||||
JVM_AccessVMBooleanFlag;
|
||||
JVM_AccessVMIntFlag;
|
||||
|
@ -262,14 +262,6 @@ SUNWprivate_1.1 {
|
||||
JVM_SetField;
|
||||
JVM_SetPrimitiveField;
|
||||
|
||||
# Needed for dropping VM into JDK 1.3.x, 1.4
|
||||
_JVM_native_threads;
|
||||
jdk_sem_init;
|
||||
jdk_sem_post;
|
||||
jdk_sem_wait;
|
||||
jdk_pthread_sigmask;
|
||||
jdk_waitpid;
|
||||
|
||||
# miscellaneous functions
|
||||
jio_fprintf;
|
||||
jio_printf;
|
||||
|
11
hotspot/make/linux/makefiles/ppc.make
Normal file
11
hotspot/make/linux/makefiles/ppc.make
Normal file
@ -0,0 +1,11 @@
|
||||
#
|
||||
# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
||||
#
|
||||
|
||||
# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
|
||||
OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
|
||||
|
||||
# Must also specify if CPU is big endian
|
||||
CFLAGS += -DVM_BIG_ENDIAN
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2003, 2011, 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
|
||||
@ -146,6 +146,8 @@ ifndef LP64
|
||||
include $(GAMMADIR)/make/pic.make
|
||||
endif
|
||||
|
||||
include $(GAMMADIR)/make/altsrc.make
|
||||
|
||||
# The non-PIC object files are only generated for 32 bit platforms.
|
||||
ifdef LP64
|
||||
%.o: %.cpp
|
||||
|
@ -39,6 +39,8 @@
|
||||
# Instead, use "gmake" (or "gnumake") from the command line. --Rose
|
||||
#MAKE = gmake
|
||||
|
||||
include $(GAMMADIR)/make/altsrc.make
|
||||
|
||||
TOPDIR = $(shell echo `pwd`)
|
||||
GENERATED = $(TOPDIR)/../generated
|
||||
VM = $(GAMMADIR)/src/share/vm
|
||||
@ -57,8 +59,8 @@ Cached_plat = $(GENERATED)/platform.current
|
||||
|
||||
AD_Dir = $(GENERATED)/adfiles
|
||||
ADLC = $(AD_Dir)/adlc
|
||||
AD_Spec = $(GAMMADIR)/src/cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad
|
||||
AD_Src = $(GAMMADIR)/src/share/vm/adlc
|
||||
AD_Spec = $(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad)
|
||||
AD_Src = $(call altsrc-replace,$(HS_COMMON_SRC)/share/vm/adlc)
|
||||
AD_Names = ad_$(Platform_arch_model).hpp ad_$(Platform_arch_model).cpp
|
||||
AD_Files = $(AD_Names:%=$(AD_Dir)/%)
|
||||
|
||||
|
@ -28,6 +28,7 @@
|
||||
# Common build rules.
|
||||
MAKEFILES_DIR=$(GAMMADIR)/make/$(Platform_os_family)/makefiles
|
||||
include $(MAKEFILES_DIR)/rules.make
|
||||
include $(GAMMADIR)/make/altsrc.make
|
||||
|
||||
default: build
|
||||
|
||||
@ -119,17 +120,27 @@ JVM = jvm
|
||||
LIBJVM = lib$(JVM).so
|
||||
LIBJVM_G = lib$(JVM)$(G_SUFFIX).so
|
||||
|
||||
CORE_PATHS := $(shell find $(GAMMADIR)/src/share/vm/* -type d \! \( -name adlc -o -name c1 -o -name gc_implementation -o -name opto -o -name shark -o -name libadt \))
|
||||
CORE_PATHS += $(GAMMADIR)/src/os/$(Platform_os_family)/vm
|
||||
CORE_PATHS += $(GAMMADIR)/src/cpu/$(Platform_arch)/vm
|
||||
CORE_PATHS += $(GAMMADIR)/src/os_cpu/$(Platform_os_arch)/vm
|
||||
CORE_PATHS += $(GENERATED)/jvmtifiles
|
||||
SPECIAL_PATHS:=adlc c1 gc_implementation opto shark libadt
|
||||
|
||||
COMPILER1_PATHS := $(GAMMADIR)/src/share/vm/c1
|
||||
SOURCE_PATHS=\
|
||||
$(shell find $(HS_COMMON_SRC)/share/vm/* -type d \! \
|
||||
\( -name DUMMY $(foreach dir,$(SPECIAL_PATHS),-o -name $(dir)) \))
|
||||
SOURCE_PATHS+=$(HS_COMMON_SRC)/os/$(Platform_os_family)/vm
|
||||
SOURCE_PATHS+=$(HS_COMMON_SRC)/os/posix/vm
|
||||
SOURCE_PATHS+=$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm
|
||||
SOURCE_PATHS+=$(HS_COMMON_SRC)/os_cpu/$(Platform_os_arch)/vm
|
||||
|
||||
COMPILER2_PATHS := $(GAMMADIR)/src/share/vm/opto
|
||||
COMPILER2_PATHS += $(GAMMADIR)/src/share/vm/libadt
|
||||
COMPILER2_PATHS += $(GENERATED)/adfiles
|
||||
CORE_PATHS=$(foreach path,$(SOURCE_PATHS),$(call altsrc,$(path)) $(path))
|
||||
CORE_PATHS+=$(GENERATED)/jvmtifiles
|
||||
|
||||
COMPILER1_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/c1)
|
||||
COMPILER1_PATHS += $(HS_COMMON_SRC)/share/vm/c1
|
||||
|
||||
COMPILER2_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/opto)
|
||||
COMPILER2_PATHS += $(call altsrc,$(HS_COMMON_SRC)/share/vm/libadt)
|
||||
COMPILER2_PATHS += $(HS_COMMON_SRC)/share/vm/opto
|
||||
COMPILER2_PATHS += $(HS_COMMON_SRC)/share/vm/libadt
|
||||
COMPILER2_PATHS += $(GENERATED)/adfiles
|
||||
|
||||
# Include dirs per type.
|
||||
Src_Dirs/CORE := $(CORE_PATHS)
|
||||
|
17
hotspot/make/linux/platform_arm
Normal file
17
hotspot/make/linux/platform_arm
Normal file
@ -0,0 +1,17 @@
|
||||
os_family = linux
|
||||
|
||||
arch = arm
|
||||
|
||||
arch_model = arm
|
||||
|
||||
os_arch = linux_arm
|
||||
|
||||
os_arch_model = linux_arm
|
||||
|
||||
lib_arch = arm
|
||||
|
||||
compiler = gcc
|
||||
|
||||
gnu_dis_arch = arm
|
||||
|
||||
sysdefs = -DLINUX -D_GNU_SOURCE -DARM
|
17
hotspot/make/linux/platform_ppc
Normal file
17
hotspot/make/linux/platform_ppc
Normal file
@ -0,0 +1,17 @@
|
||||
os_family = linux
|
||||
|
||||
arch = ppc
|
||||
|
||||
arch_model = ppc
|
||||
|
||||
os_arch = linux_ppc
|
||||
|
||||
os_arch_model = linux_ppc
|
||||
|
||||
lib_arch = ppc
|
||||
|
||||
compiler = gcc
|
||||
|
||||
gnu_dis_arch = ppc
|
||||
|
||||
sysdefs = -DLINUX -D_GNU_SOURCE -DPPC
|
@ -27,6 +27,7 @@
|
||||
# It knows how to compile, link, and run the adlc.
|
||||
|
||||
include $(GAMMADIR)/make/$(Platform_os_family)/makefiles/rules.make
|
||||
include $(GAMMADIR)/make/altsrc.make
|
||||
|
||||
# #########################################################################
|
||||
|
||||
@ -39,8 +40,9 @@ OS = $(Platform_os_family)
|
||||
|
||||
SOURCE.AD = $(OUTDIR)/$(OS)_$(Platform_arch_model).ad
|
||||
|
||||
SOURCES.AD = $(GAMMADIR)/src/cpu/$(ARCH)/vm/$(Platform_arch_model).ad \
|
||||
$(GAMMADIR)/src/os_cpu/$(OS)_$(ARCH)/vm/$(OS)_$(Platform_arch_model).ad
|
||||
SOURCES.AD = \
|
||||
$(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(ARCH)/vm/$(Platform_arch_model).ad) \
|
||||
$(call altsrc-replace,$(HS_COMMON_SRC)/os_cpu/$(OS)_$(ARCH)/vm/$(OS)_$(Platform_arch_model).ad)
|
||||
|
||||
EXEC = $(OUTDIR)/adlc
|
||||
|
||||
|
@ -56,6 +56,7 @@
|
||||
# having to read the dependency files for the vm.
|
||||
|
||||
include $(GAMMADIR)/make/scm.make
|
||||
include $(GAMMADIR)/make/altsrc.make
|
||||
|
||||
# 'gmake MAKE_VERBOSE=y' or 'gmake QUIETLY=' gives all the gory details.
|
||||
QUIETLY$(MAKE_VERBOSE) = @
|
||||
@ -139,13 +140,7 @@ endif
|
||||
# Define HOTSPOT_VM_DISTRO based on settings in make/openjdk_distro
|
||||
# or make/hotspot_distro.
|
||||
ifndef HOTSPOT_VM_DISTRO
|
||||
CLOSED_DIR_EXISTS := $(shell \
|
||||
if [ -d $(GAMMADIR)/src/closed ] ; then \
|
||||
echo true; \
|
||||
else \
|
||||
echo false; \
|
||||
fi)
|
||||
ifeq ($(CLOSED_DIR_EXISTS), true)
|
||||
ifeq ($(call if-has-altsrc,$(HS_COMMON_SRC)/,true,false),true)
|
||||
include $(GAMMADIR)/make/hotspot_distro
|
||||
else
|
||||
include $(GAMMADIR)/make/openjdk_distro
|
||||
@ -170,6 +165,11 @@ $(SUBMAKE_DIRS): $(SIMPLE_DIRS) FORCE
|
||||
$(SIMPLE_DIRS):
|
||||
$(QUIETLY) mkdir -p $@
|
||||
|
||||
# Convenience macro which takes a source relative path, applies $(1) to the
|
||||
# absolute path, and then replaces $(GAMMADIR) in the result with a
|
||||
# literal "$(GAMMADIR)/" suitable for inclusion in a Makefile.
|
||||
gamma-path=$(subst $(GAMMADIR),\$$(GAMMADIR),$(call $(1),$(HS_COMMON_SRC)/$(2)))
|
||||
|
||||
flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
|
||||
@echo Creating $@ ...
|
||||
$(QUIETLY) ( \
|
||||
@ -202,16 +202,28 @@ flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
|
||||
echo; \
|
||||
echo "Src_Dirs_V = \\"; \
|
||||
sed 's/$$/ \\/;s|$(GAMMADIR)|$$(GAMMADIR)|' ../shared_dirs.lst; \
|
||||
echo "\$$(GAMMADIR)/src/cpu/$(ARCH)/vm \\"; \
|
||||
echo "\$$(GAMMADIR)/src/os/$(OS_FAMILY)/vm \\"; \
|
||||
echo "\$$(GAMMADIR)/src/os_cpu/$(OS_FAMILY)_$(ARCH)/vm"; \
|
||||
echo "$(call gamma-path,altsrc,cpu/$(ARCH)/vm) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,cpu/$(ARCH)/vm) \\"; \
|
||||
echo "$(call gamma-path,altsrc,os_cpu/$(OS_FAMILY)_$(ARCH)/vm) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,os_cpu/$(OS_FAMILY)_$(ARCH)/vm) \\"; \
|
||||
echo "$(call gamma-path,altsrc,os/$(OS_FAMILY)/vm) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,os/$(OS_FAMILY)/vm) \\"; \
|
||||
echo "$(call gamma-path,altsrc,os/posix/vm) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,os/posix/vm)"; \
|
||||
echo; \
|
||||
echo "Src_Dirs_I = \\"; \
|
||||
echo "\$$(GAMMADIR)/src/share/vm \\"; \
|
||||
echo "\$$(GAMMADIR)/src/share/vm/prims \\"; \
|
||||
echo "\$$(GAMMADIR)/src/cpu/$(ARCH)/vm \\"; \
|
||||
echo "\$$(GAMMADIR)/src/os/$(OS_FAMILY)/vm \\"; \
|
||||
echo "\$$(GAMMADIR)/src/os_cpu/$(OS_FAMILY)_$(ARCH)/vm"; \
|
||||
echo "$(call gamma-path,altsrc,share/vm/prims) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,share/vm/prims) \\"; \
|
||||
echo "$(call gamma-path,altsrc,share/vm) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,share/vm) \\"; \
|
||||
echo "$(call gamma-path,altsrc,cpu/$(ARCH)/vm) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,cpu/$(ARCH)/vm) \\"; \
|
||||
echo "$(call gamma-path,altsrc,os_cpu/$(OS_FAMILY)_$(ARCH)/vm) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,os_cpu/$(OS_FAMILY)_$(ARCH)/vm) \\"; \
|
||||
echo "$(call gamma-path,altsrc,os/$(OS_FAMILY)/vm) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,os/$(OS_FAMILY)/vm) \\"; \
|
||||
echo "$(call gamma-path,altsrc,os/posix/vm) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,os/posix/vm)"; \
|
||||
[ -n "$(CFLAGS_BROWSE)" ] && \
|
||||
echo && echo "CFLAGS_BROWSE = $(CFLAGS_BROWSE)"; \
|
||||
[ -n "$(HOTSPOT_EXTRA_SYSDEFS)" ] && \
|
||||
@ -235,9 +247,14 @@ flags_vm.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
|
||||
|
||||
../shared_dirs.lst: $(BUILDTREE_MAKE) $(GAMMADIR)/src/share/vm
|
||||
@echo Creating directory list $@
|
||||
$(QUIETLY) find $(GAMMADIR)/src/share/vm/* -prune \
|
||||
$(QUIETLY) if [ -d $(HS_ALT_SRC)/share/vm ]; then \
|
||||
find $(HS_ALT_SRC)/share/vm/* -prune \
|
||||
-type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \
|
||||
\( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; > $@; \
|
||||
fi;
|
||||
$(QUIETLY) find $(HS_COMMON_SRC)/share/vm/* -prune \
|
||||
-type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \
|
||||
\( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; > $@
|
||||
\( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; >> $@
|
||||
|
||||
Makefile: $(BUILDTREE_MAKE)
|
||||
@echo Creating $@ ...
|
||||
|
@ -146,6 +146,8 @@ ifndef LP64
|
||||
include $(GAMMADIR)/make/pic.make
|
||||
endif
|
||||
|
||||
include $(GAMMADIR)/make/altsrc.make
|
||||
|
||||
# Sun compiler for 64 bit Solaris does not support building non-PIC object files.
|
||||
ifdef LP64
|
||||
%.o: %.cpp
|
||||
|
@ -39,6 +39,8 @@
|
||||
# Instead, use "gmake" (or "gnumake") from the command line. --Rose
|
||||
#MAKE = gmake
|
||||
|
||||
include $(GAMMADIR)/make/altsrc.make
|
||||
|
||||
GENERATED = ../generated
|
||||
VM = $(GAMMADIR)/src/share/vm
|
||||
Plat_File = $(Platform_file)
|
||||
@ -48,8 +50,8 @@ Cached_plat = $(GENERATED)/platform.current
|
||||
|
||||
AD_Dir = $(GENERATED)/adfiles
|
||||
ADLC = $(AD_Dir)/adlc
|
||||
AD_Spec = $(GAMMADIR)/src/cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad
|
||||
AD_Src = $(GAMMADIR)/src/share/vm/adlc
|
||||
AD_Spec = $(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad)
|
||||
AD_Src = $(call altsrc-replace,$(HS_COMMON_SRC)/share/vm/adlc)
|
||||
AD_Names = ad_$(Platform_arch_model).hpp ad_$(Platform_arch_model).cpp
|
||||
AD_Files = $(AD_Names:%=$(AD_Dir)/%)
|
||||
|
||||
|
@ -28,6 +28,7 @@
|
||||
# Common build rules.
|
||||
MAKEFILES_DIR=$(GAMMADIR)/make/$(Platform_os_family)/makefiles
|
||||
include $(MAKEFILES_DIR)/rules.make
|
||||
include $(GAMMADIR)/make/altsrc.make
|
||||
|
||||
default: build
|
||||
|
||||
@ -139,16 +140,26 @@ JVM = jvm
|
||||
LIBJVM = lib$(JVM).so
|
||||
LIBJVM_G = lib$(JVM)$(G_SUFFIX).so
|
||||
|
||||
CORE_PATHS := $(shell find $(GAMMADIR)/src/share/vm/* -type d \! \( -name adlc -o -name c1 -o -name gc_implementation -o -name opto -o -name shark -o -name libadt \))
|
||||
CORE_PATHS += $(GAMMADIR)/src/os/$(Platform_os_family)/vm
|
||||
CORE_PATHS += $(GAMMADIR)/src/cpu/$(Platform_arch)/vm
|
||||
CORE_PATHS += $(GAMMADIR)/src/os_cpu/$(Platform_os_arch)/vm
|
||||
CORE_PATHS += $(GENERATED)/jvmtifiles
|
||||
SPECIAL_PATHS:=adlc c1 dist gc_implementation opto shark libadt
|
||||
|
||||
COMPILER1_PATHS := $(GAMMADIR)/src/share/vm/c1
|
||||
SOURCE_PATHS=\
|
||||
$(shell find $(HS_COMMON_SRC)/share/vm/* -type d \! \
|
||||
\( -name DUMMY $(foreach dir,$(SPECIAL_PATHS),-o -name $(dir)) \))
|
||||
SOURCE_PATHS+=$(HS_COMMON_SRC)/os/$(Platform_os_family)/vm
|
||||
SOURCE_PATHS+=$(HS_COMMON_SRC)/os/posix/vm
|
||||
SOURCE_PATHS+=$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm
|
||||
SOURCE_PATHS+=$(HS_COMMON_SRC)/os_cpu/$(Platform_os_arch)/vm
|
||||
|
||||
COMPILER2_PATHS := $(GAMMADIR)/src/share/vm/opto
|
||||
COMPILER2_PATHS += $(GAMMADIR)/src/share/vm/libadt
|
||||
CORE_PATHS=$(foreach path,$(SOURCE_PATHS),$(call altsrc,$(path)) $(path))
|
||||
CORE_PATHS+=$(GENERATED)/jvmtifiles
|
||||
|
||||
COMPILER1_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/c1)
|
||||
COMPILER1_PATHS += $(HS_COMMON_SRC)/share/vm/c1
|
||||
|
||||
COMPILER2_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/opto)
|
||||
COMPILER2_PATHS += $(call altsrc,$(HS_COMMON_SRC)/share/vm/libadt)
|
||||
COMPILER2_PATHS += $(HS_COMMON_SRC)/share/vm/opto
|
||||
COMPILER2_PATHS += $(HS_COMMON_SRC)/share/vm/libadt
|
||||
COMPILER2_PATHS += $(GENERATED)/adfiles
|
||||
|
||||
# Include dirs per type.
|
||||
|
@ -51,21 +51,48 @@ Platform_os_arch=windows_$Platform_arch
|
||||
WorkSpace=$4
|
||||
GENERATED=$5
|
||||
|
||||
BASE_PATHS="` $FIND ${WorkSpace}/src/share/vm ! -name vm -prune -type d \! \( -name adlc -o -name c1 -o -name gc_implementation -o -name opto -o -name shark -o -name libadt \)`"
|
||||
BASE_PATHS="${BASE_PATHS} ${WorkSpace}/src/share/vm/gc_implementation/shared"
|
||||
BASE_PATHS="${BASE_PATHS} ${WorkSpace}/src/os/${Platform_os_family}/vm"
|
||||
BASE_PATHS="${BASE_PATHS} ${WorkSpace}/src/cpu/${Platform_arch}/vm"
|
||||
BASE_PATHS="${BASE_PATHS} ${WorkSpace}/src/os_cpu/${Platform_os_arch}/vm"
|
||||
COMMONSRC_REL=src
|
||||
ALTSRC_REL=src/closed # Change this to pick up alt sources from somewhere else
|
||||
|
||||
COMMONSRC=${WorkSpace}/${COMMONSRC_REL}
|
||||
ALTSRC=${WorkSpace}/${ALTSRC_REL}
|
||||
|
||||
BASE_PATHS="`if [ -d ${ALTSRC}/share/vm ]; then $FIND ${ALTSRC}/share/vm ! -name vm -prune -type d \! \( -name adlc -o -name c1 -o -name gc_implementation -o -name opto -o -name shark -o -name libadt \); fi`"
|
||||
BASE_PATHS="${BASE_PATHS} ` $FIND ${COMMONSRC}/share/vm ! -name vm -prune -type d \! \( -name adlc -o -name c1 -o -name gc_implementation -o -name opto -o -name shark -o -name libadt \)`"
|
||||
|
||||
for sd in \
|
||||
share/vm/gc_implementation/shared \
|
||||
os/${Platform_os_family}/vm \
|
||||
cpu/${Platform_arch}/vm \
|
||||
os_cpu/${Platform_os_arch}/vm; do
|
||||
if [ -d "${ALTSRC}/${sd}" ]; then
|
||||
BASE_PATHS="${BASE_PATHS} ${ALTSRC}/${sd}"
|
||||
fi
|
||||
BASE_PATHS="${BASE_PATHS} ${COMMONSRC}/${sd}"
|
||||
done
|
||||
|
||||
BASE_PATHS="${BASE_PATHS} ${GENERATED}/jvmtifiles"
|
||||
|
||||
CORE_PATHS="${BASE_PATHS}"
|
||||
# shared is already in BASE_PATHS. Should add vm/memory but that one is also in BASE_PATHS.
|
||||
CORE_PATHS="${CORE_PATHS} `$FIND ${WorkSpace}/src/share/vm/gc_implementation ! -name gc_implementation -prune -type d \! -name shared`"
|
||||
if [ -d "${ALTSRC}/share/vm/gc_implementation" ]; then
|
||||
CORE_PATHS="${CORE_PATHS} `$FIND ${ALTSRC}/share/vm/gc_implementation ! -name gc_implementation -prune -type d \! -name shared`"
|
||||
fi
|
||||
CORE_PATHS="${CORE_PATHS} `$FIND ${COMMONSRC}/share/vm/gc_implementation ! -name gc_implementation -prune -type d \! -name shared`"
|
||||
|
||||
COMPILER1_PATHS="${WorkSpace}/src/share/vm/c1"
|
||||
if [ -d "${ALTSRC}/share/vm/c1" ]; then
|
||||
COMPILER1_PATHS="${ALTSRC}/share/vm/c1"
|
||||
fi
|
||||
COMPILER1_PATHS="${COMPILER1_PATHS} ${COMMONSRC}/share/vm/c1"
|
||||
|
||||
COMPILER2_PATHS="${WorkSpace}/src/share/vm/opto"
|
||||
COMPILER2_PATHS="${COMPILER2_PATHS} ${WorkSpace}/src/share/vm/libadt"
|
||||
if [ -d "${ALTSRC}/share/vm/opto" ]; then
|
||||
COMPILER2_PATHS="${ALTSRC}/share/vm/opto"
|
||||
fi
|
||||
COMPILER2_PATHS="${COMPILER2_PATHS} ${COMMONSRC}/share/vm/opto"
|
||||
if [ -d "${ALTSRC}/share/vm/libadt" ]; then
|
||||
COMPILER2_PATHS="${COMPILER2_PATHS} ${ALTSRC}/share/vm/libadt"
|
||||
fi
|
||||
COMPILER2_PATHS="${COMPILER2_PATHS} ${COMMONSRC}/share/vm/libadt"
|
||||
COMPILER2_PATHS="${COMPILER2_PATHS} ${GENERATED}/adfiles"
|
||||
|
||||
# Include dirs per type.
|
||||
|
@ -27,6 +27,9 @@ Res_Files=.\version.res
|
||||
|
||||
!include ..\generated\objfiles.make
|
||||
|
||||
COMMONSRC=$(WorkSpace)\src
|
||||
ALTSRC=$(WorkSpace)\src\closed
|
||||
|
||||
!ifdef RELEASE
|
||||
!ifdef DEVELOP
|
||||
CPP_FLAGS=$(CPP_FLAGS) /D "DEBUG"
|
||||
@ -111,13 +114,30 @@ LINK_FLAGS=$(LINK_FLAGS) $(STACK_SIZE) /subsystem:windows /dll /base:0x8000000 \
|
||||
/export:JVM_GetThreadStateValues \
|
||||
/export:JVM_InitAgentProperties
|
||||
|
||||
CPP_INCLUDE_DIRS=\
|
||||
/I "..\generated" \
|
||||
/I "$(WorkSpace)\src\share\vm" \
|
||||
/I "$(WorkSpace)\src\share\vm\prims" \
|
||||
/I "$(WorkSpace)\src\os\windows\vm" \
|
||||
/I "$(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm" \
|
||||
/I "$(WorkSpace)\src\cpu\$(Platform_arch)\vm"
|
||||
CPP_INCLUDE_DIRS=/I "..\generated"
|
||||
|
||||
!if exists($(ALTSRC)\share\vm)
|
||||
CPP_INCLUDE_DIRS=$(CPP_INCLUDE_DIRS) /I "$(ALTSRC)\share\vm"
|
||||
!endif
|
||||
|
||||
!if exists($(ALTSRC)\os\windows\vm)
|
||||
CPP_INCLUDE_DIRS=$(CPP_INCLUDE_DIRS) /I "$(ALTSRC)\os\windows\vm"
|
||||
!endif
|
||||
|
||||
!if exists($(ALTSRC)\os_cpu\windows_$(Platform_arch)\vm)
|
||||
CPP_INCLUDE_DIRS=$(CPP_INCLUDE_DIRS) /I "$(ALTSRC)\os_cpu\windows_$(Platform_arch)\vm"
|
||||
!endif
|
||||
|
||||
!if exists($(ALTSRC)\cpu\$(Platform_arch)\vm)
|
||||
CPP_INCLUDE_DIRS=$(CPP_INCLUDE_DIRS) /I "$(ALTSRC)\cpu\$(Platform_arch)\vm"
|
||||
!endif
|
||||
|
||||
CPP_INCLUDE_DIRS=$(CPP_INCLUDE_DIRS) \
|
||||
/I "$(COMMONSRC)\share\vm" \
|
||||
/I "$(COMMONSRC)\share\vm\prims" \
|
||||
/I "$(COMMONSRC)\os\windows\vm" \
|
||||
/I "$(COMMONSRC)\os_cpu\windows_$(Platform_arch)\vm" \
|
||||
/I "$(COMMONSRC)\cpu\$(Platform_arch)\vm"
|
||||
|
||||
CPP_DONT_USE_PCH=/D DONT_USE_PRECOMPILED_HEADER
|
||||
|
||||
@ -127,7 +147,7 @@ CPP_USE_PCH=/Fp"vm.pch" /Yu"precompiled.hpp"
|
||||
CPP_USE_PCH=$(CPP_DONT_USE_PCH)
|
||||
!endif
|
||||
|
||||
# Where to find the source code for the virtual machine
|
||||
# Where to find the source code for the virtual machine (is this used?)
|
||||
VM_PATH=../generated
|
||||
VM_PATH=$(VM_PATH);../generated/adfiles
|
||||
VM_PATH=$(VM_PATH);../generated/jvmtifiles
|
||||
@ -188,81 +208,157 @@ bytecodeInterpreterWithChecks.obj: ..\generated\jvmtifiles\bytecodeInterpreterWi
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c ..\generated\jvmtifiles\bytecodeInterpreterWithChecks.cpp
|
||||
|
||||
# Default rules for the Virtual Machine
|
||||
{$(WorkSpace)\src\share\vm\c1}.cpp.obj::
|
||||
{$(COMMONSRC)\share\vm\c1}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(WorkSpace)\src\share\vm\compiler}.cpp.obj::
|
||||
{$(COMMONSRC)\share\vm\compiler}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(WorkSpace)\src\share\vm\code}.cpp.obj::
|
||||
{$(COMMONSRC)\share\vm\code}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(WorkSpace)\src\share\vm\interpreter}.cpp.obj::
|
||||
{$(COMMONSRC)\share\vm\interpreter}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(WorkSpace)\src\share\vm\ci}.cpp.obj::
|
||||
{$(COMMONSRC)\share\vm\ci}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(WorkSpace)\src\share\vm\classfile}.cpp.obj::
|
||||
{$(COMMONSRC)\share\vm\classfile}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(WorkSpace)\src\share\vm\gc_implementation\parallelScavenge}.cpp.obj::
|
||||
{$(COMMONSRC)\share\vm\gc_implementation\parallelScavenge}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(WorkSpace)\src\share\vm\gc_implementation\shared}.cpp.obj::
|
||||
{$(COMMONSRC)\share\vm\gc_implementation\shared}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(WorkSpace)\src\share\vm\gc_implementation\parNew}.cpp.obj::
|
||||
{$(COMMONSRC)\share\vm\gc_implementation\parNew}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(WorkSpace)\src\share\vm\gc_implementation\concurrentMarkSweep}.cpp.obj::
|
||||
{$(COMMONSRC)\share\vm\gc_implementation\concurrentMarkSweep}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(WorkSpace)\src\share\vm\gc_implementation\g1}.cpp.obj::
|
||||
{$(COMMONSRC)\share\vm\gc_implementation\g1}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(WorkSpace)\src\share\vm\gc_interface}.cpp.obj::
|
||||
{$(COMMONSRC)\share\vm\gc_interface}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(WorkSpace)\src\share\vm\asm}.cpp.obj::
|
||||
{$(COMMONSRC)\share\vm\asm}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(WorkSpace)\src\share\vm\memory}.cpp.obj::
|
||||
{$(COMMONSRC)\share\vm\memory}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(WorkSpace)\src\share\vm\oops}.cpp.obj::
|
||||
{$(COMMONSRC)\share\vm\oops}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(WorkSpace)\src\share\vm\prims}.cpp.obj::
|
||||
{$(COMMONSRC)\share\vm\prims}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(WorkSpace)\src\share\vm\runtime}.cpp.obj::
|
||||
{$(COMMONSRC)\share\vm\runtime}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(WorkSpace)\src\share\vm\services}.cpp.obj::
|
||||
{$(COMMONSRC)\share\vm\services}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(WorkSpace)\src\share\vm\utilities}.cpp.obj::
|
||||
{$(COMMONSRC)\share\vm\utilities}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(WorkSpace)\src\share\vm\libadt}.cpp.obj::
|
||||
{$(COMMONSRC)\share\vm\libadt}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(WorkSpace)\src\share\vm\opto}.cpp.obj::
|
||||
{$(COMMONSRC)\share\vm\opto}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(WorkSpace)\src\os\windows\vm}.cpp.obj::
|
||||
{$(COMMONSRC)\os\windows\vm}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
# This guy should remain a single colon rule because
|
||||
# otherwise we can't specify the output filename.
|
||||
{$(WorkSpace)\src\os\windows\vm}.rc.res:
|
||||
{$(COMMONSRC)\os\windows\vm}.rc.res:
|
||||
@$(RC) $(RC_FLAGS) /fo"$@" $<
|
||||
|
||||
{$(WorkSpace)\src\cpu\$(Platform_arch)\vm}.cpp.obj::
|
||||
{$(COMMONSRC)\cpu\$(Platform_arch)\vm}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm}.cpp.obj::
|
||||
{$(COMMONSRC)\os_cpu\windows_$(Platform_arch)\vm}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(ALTSRC)\share\vm\c1}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(ALTSRC)\share\vm\compiler}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(ALTSRC)\share\vm\code}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(ALTSRC)\share\vm\interpreter}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(ALTSRC)\share\vm\ci}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(ALTSRC)\share\vm\classfile}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(ALTSRC)\share\vm\gc_implementation\parallelScavenge}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(ALTSRC)\share\vm\gc_implementation\shared}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(ALTSRC)\share\vm\gc_implementation\parNew}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(ALTSRC)\share\vm\gc_implementation\concurrentMarkSweep}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(ALTSRC)\share\vm\gc_implementation\g1}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(ALTSRC)\share\vm\gc_interface}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(ALTSRC)\share\vm\asm}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(ALTSRC)\share\vm\memory}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(ALTSRC)\share\vm\oops}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(ALTSRC)\share\vm\prims}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(ALTSRC)\share\vm\runtime}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(ALTSRC)\share\vm\services}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(ALTSRC)\share\vm\utilities}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(ALTSRC)\share\vm\libadt}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(ALTSRC)\share\vm\opto}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(ALTSRC)\os\windows\vm}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
# otherwise we can't specify the output filename.
|
||||
{$(ALTSRC)\os\windows\vm}.rc.res:
|
||||
@$(RC) $(RC_FLAGS) /fo"$@" $<
|
||||
|
||||
{$(ALTSRC)\cpu\$(Platform_arch)\vm}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{$(ALTSRC)\os_cpu\windows_$(Platform_arch)\vm}.cpp.obj::
|
||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||
|
||||
{..\generated\incls}.cpp.obj::
|
||||
|
@ -23,8 +23,13 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
#define JNIEXPORT
|
||||
#define JNIIMPORT
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 4)
|
||||
#define JNIEXPORT __attribute__((visibility("default")))
|
||||
#define JNIIMPORT __attribute__((visibility("default")))
|
||||
#else
|
||||
#define JNIEXPORT
|
||||
#define JNIIMPORT
|
||||
#endif
|
||||
#define JNICALL
|
||||
|
||||
typedef int jint;
|
||||
|
@ -27,10 +27,16 @@
|
||||
#define _JAVASOFT_JNI_MD_H_
|
||||
|
||||
#if defined(SOLARIS) || defined(LINUX)
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2)
|
||||
#define JNIEXPORT __attribute__((visibility("default")))
|
||||
#define JNIIMPORT __attribute__((visibility("default")))
|
||||
#else
|
||||
#define JNIEXPORT
|
||||
#define JNIIMPORT
|
||||
#define JNICALL
|
||||
#endif
|
||||
|
||||
#define JNICALL
|
||||
typedef int jint;
|
||||
|
||||
#ifdef _LP64
|
||||
|
@ -24,8 +24,14 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
#define JNIEXPORT
|
||||
#define JNIIMPORT
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 4)
|
||||
#define JNIEXPORT __attribute__((visibility("default")))
|
||||
#define JNIIMPORT __attribute__((visibility("default")))
|
||||
#else
|
||||
#define JNIEXPORT
|
||||
#define JNIIMPORT
|
||||
#endif
|
||||
#define JNICALL
|
||||
|
||||
typedef int jint;
|
||||
|
@ -29,11 +29,6 @@
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
/*
|
||||
* FIXME: This is temporary hack to keep Linux Runtime.exec()
|
||||
* code happy. See $JDK/src/linux/native/java/lang/UnixProcess_md.c
|
||||
*/
|
||||
int _JVM_native_threads = 1;
|
||||
|
||||
// sun.misc.Signal ///////////////////////////////////////////////////////////
|
||||
// Signal code is mostly copied from classic vm, signals_md.c 1.4 98/08/23
|
||||
|
@ -39,6 +39,12 @@
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "assembler_zero.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "assembler_arm.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "assembler_ppc.inline.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
void OSThread::pd_initialize() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2011, 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
|
||||
@ -76,6 +76,14 @@
|
||||
# include "assembler_zero.inline.hpp"
|
||||
# include "nativeInst_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "assembler_arm.inline.hpp"
|
||||
# include "nativeInst_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "assembler_ppc.inline.hpp"
|
||||
# include "nativeInst_ppc.hpp"
|
||||
#endif
|
||||
#ifdef COMPILER1
|
||||
#include "c1/c1_Runtime1.hpp"
|
||||
#endif
|
||||
@ -123,6 +131,7 @@
|
||||
#define ALL_64_BITS CONST64(0xFFFFFFFFFFFFFFFF)
|
||||
#define SEC_IN_NANOSECS 1000000000LL
|
||||
|
||||
#define LARGEPAGES_BIT (1 << 6)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// global variables
|
||||
julong os::Linux::_physical_memory = 0;
|
||||
@ -2509,8 +2518,10 @@ char *os::scan_pages(char *start, char* end, page_info* page_expected, page_info
|
||||
return end;
|
||||
}
|
||||
|
||||
extern "C" void numa_warn(int number, char *where, ...) { }
|
||||
extern "C" void numa_error(char *where) { }
|
||||
// Something to do with the numa-aware allocator needs these symbols
|
||||
extern "C" JNIEXPORT void numa_warn(int number, char *where, ...) { }
|
||||
extern "C" JNIEXPORT void numa_error(char *where) { }
|
||||
extern "C" JNIEXPORT int fork1() { return fork(); }
|
||||
|
||||
|
||||
// If we are running with libnuma version > 2, then we should
|
||||
@ -2807,6 +2818,43 @@ bool os::unguard_memory(char* addr, size_t size) {
|
||||
return linux_mprotect(addr, size, PROT_READ|PROT_WRITE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the coredump_filter bits to include largepages in core dump (bit 6)
|
||||
*
|
||||
* From the coredump_filter documentation:
|
||||
*
|
||||
* - (bit 0) anonymous private memory
|
||||
* - (bit 1) anonymous shared memory
|
||||
* - (bit 2) file-backed private memory
|
||||
* - (bit 3) file-backed shared memory
|
||||
* - (bit 4) ELF header pages in file-backed private memory areas (it is
|
||||
* effective only if the bit 2 is cleared)
|
||||
* - (bit 5) hugetlb private memory
|
||||
* - (bit 6) hugetlb shared memory
|
||||
*/
|
||||
static void set_coredump_filter(void) {
|
||||
FILE *f;
|
||||
long cdm;
|
||||
|
||||
if ((f = fopen("/proc/self/coredump_filter", "r+")) == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (fscanf(f, "%lx", &cdm) != 1) {
|
||||
fclose(f);
|
||||
return;
|
||||
}
|
||||
|
||||
rewind(f);
|
||||
|
||||
if ((cdm & LARGEPAGES_BIT) == 0) {
|
||||
cdm |= LARGEPAGES_BIT;
|
||||
fprintf(f, "%#lx", cdm);
|
||||
}
|
||||
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
// Large page support
|
||||
|
||||
static size_t _large_page_size = 0;
|
||||
@ -2864,6 +2912,8 @@ bool os::large_page_init() {
|
||||
_page_sizes[2] = 0;
|
||||
}
|
||||
|
||||
set_coredump_filter();
|
||||
|
||||
// Large page support is available on 2.6 or newer kernel, some vendors
|
||||
// (e.g. Redhat) have backported it to their 2.4 based distributions.
|
||||
// We optimistically assume the support is available. If later it turns out
|
||||
@ -3483,7 +3533,7 @@ bool os::is_interrupted(Thread* thread, bool clear_interrupted) {
|
||||
// Note that the VM will print warnings if it detects conflicting signal
|
||||
// handlers, unless invoked with the option "-XX:+AllowUserSignalHandlers".
|
||||
//
|
||||
extern "C" int
|
||||
extern "C" JNIEXPORT int
|
||||
JVM_handle_linux_signal(int signo, siginfo_t* siginfo,
|
||||
void* ucontext, int abort_if_unrecognized);
|
||||
|
||||
@ -4678,44 +4728,6 @@ void os::pause() {
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
|
||||
/**
|
||||
* NOTE: the following code is to keep the green threads code
|
||||
* in the libjava.so happy. Once the green threads is removed,
|
||||
* these code will no longer be needed.
|
||||
*/
|
||||
int
|
||||
jdk_waitpid(pid_t pid, int* status, int options) {
|
||||
return waitpid(pid, status, options);
|
||||
}
|
||||
|
||||
int
|
||||
fork1() {
|
||||
return fork();
|
||||
}
|
||||
|
||||
int
|
||||
jdk_sem_init(sem_t *sem, int pshared, unsigned int value) {
|
||||
return sem_init(sem, pshared, value);
|
||||
}
|
||||
|
||||
int
|
||||
jdk_sem_post(sem_t *sem) {
|
||||
return sem_post(sem);
|
||||
}
|
||||
|
||||
int
|
||||
jdk_sem_wait(sem_t *sem) {
|
||||
return sem_wait(sem);
|
||||
}
|
||||
|
||||
int
|
||||
jdk_pthread_sigmask(int how , const sigset_t* newmask, sigset_t* oldmask) {
|
||||
return pthread_sigmask(how , newmask, oldmask);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Refer to the comments in os_solaris.cpp park-unpark.
|
||||
//
|
||||
|
@ -39,6 +39,14 @@
|
||||
# include "atomic_linux_zero.inline.hpp"
|
||||
# include "orderAccess_linux_zero.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_OS_ARCH_linux_arm
|
||||
# include "atomic_linux_arm.inline.hpp"
|
||||
# include "orderAccess_linux_arm.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_OS_ARCH_linux_ppc
|
||||
# include "atomic_linux_ppc.inline.hpp"
|
||||
# include "orderAccess_linux_ppc.inline.hpp"
|
||||
#endif
|
||||
|
||||
// System includes
|
||||
|
||||
|
@ -44,6 +44,16 @@
|
||||
# include "orderAccess_linux_zero.inline.hpp"
|
||||
# include "prefetch_linux_zero.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_OS_ARCH_linux_arm
|
||||
# include "atomic_linux_arm.inline.hpp"
|
||||
# include "orderAccess_linux_arm.inline.hpp"
|
||||
# include "prefetch_linux_arm.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_OS_ARCH_linux_ppc
|
||||
# include "atomic_linux_ppc.inline.hpp"
|
||||
# include "orderAccess_linux_ppc.inline.hpp"
|
||||
# include "prefetch_linux_ppc.inline.hpp"
|
||||
#endif
|
||||
|
||||
// Contains inlined functions for class Thread and ThreadLocalStorage
|
||||
|
||||
|
61
hotspot/src/os/posix/vm/os_posix.cpp
Normal file
61
hotspot/src/os/posix/vm/os_posix.cpp
Normal file
@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2011, 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "prims/jvm.h"
|
||||
#include "runtime/os.hpp"
|
||||
#include "utilities/vmError.hpp"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
// Check core dump limit and report possible place where core can be found
|
||||
void os::check_or_create_dump(void* exceptionRecord, void* contextRecord, char* buffer, size_t bufferSize) {
|
||||
struct rlimit rlim;
|
||||
static char cwd[O_BUFLEN];
|
||||
bool success;
|
||||
|
||||
get_current_directory(cwd, sizeof(cwd));
|
||||
|
||||
if (getrlimit(RLIMIT_CORE, &rlim) != 0) {
|
||||
jio_snprintf(buffer, bufferSize, "%s/core or core.%d (may not exist)", cwd, current_process_id());
|
||||
success = true;
|
||||
} else {
|
||||
switch(rlim.rlim_cur) {
|
||||
case RLIM_INFINITY:
|
||||
jio_snprintf(buffer, bufferSize, "%s/core or core.%d", cwd, current_process_id());
|
||||
success = true;
|
||||
break;
|
||||
case 0:
|
||||
jio_snprintf(buffer, bufferSize, "Core dumps have been disabled. To enable core dumping, try \"ulimit -c unlimited\" before starting Java again");
|
||||
success = false;
|
||||
break;
|
||||
default:
|
||||
jio_snprintf(buffer, bufferSize, "%s/core or core.%d (max size %lu kB). To ensure a full core dump, try \"ulimit -c unlimited\" before starting Java again", cwd, current_process_id(), (unsigned long)(rlim.rlim_cur >> 10));
|
||||
success = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
VMError::report_coredump_status(buffer, success);
|
||||
}
|
||||
|
@ -4221,7 +4221,9 @@ void os::os_exception_wrapper(java_call_t f, JavaValue* value, methodHandle* met
|
||||
// Note that the VM will print warnings if it detects conflicting signal
|
||||
// handlers, unless invoked with the option "-XX:+AllowUserSignalHandlers".
|
||||
//
|
||||
extern "C" int JVM_handle_solaris_signal(int signo, siginfo_t* siginfo, void* ucontext, int abort_if_unrecognized);
|
||||
extern "C" JNIEXPORT int
|
||||
JVM_handle_solaris_signal(int signo, siginfo_t* siginfo, void* ucontext,
|
||||
int abort_if_unrecognized);
|
||||
|
||||
|
||||
void signalHandler(int sig, siginfo_t* info, void* ucVoid) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* CopyrighT (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2011, 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
|
||||
@ -915,6 +915,85 @@ void os::shutdown() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static BOOL (WINAPI *_MiniDumpWriteDump) ( HANDLE, DWORD, HANDLE, MINIDUMP_TYPE, PMINIDUMP_EXCEPTION_INFORMATION,
|
||||
PMINIDUMP_USER_STREAM_INFORMATION, PMINIDUMP_CALLBACK_INFORMATION);
|
||||
|
||||
void os::check_or_create_dump(void* exceptionRecord, void* contextRecord, char* buffer, size_t bufferSize) {
|
||||
HINSTANCE dbghelp;
|
||||
EXCEPTION_POINTERS ep;
|
||||
MINIDUMP_EXCEPTION_INFORMATION mei;
|
||||
HANDLE hProcess = GetCurrentProcess();
|
||||
DWORD processId = GetCurrentProcessId();
|
||||
HANDLE dumpFile;
|
||||
MINIDUMP_TYPE dumpType;
|
||||
static const char* cwd;
|
||||
|
||||
// If running on a client version of Windows and user has not explicitly enabled dumping
|
||||
if (!os::win32::is_windows_server() && !CreateMinidumpOnCrash) {
|
||||
VMError::report_coredump_status("Minidumps are not enabled by default on client versions of Windows", false);
|
||||
return;
|
||||
// If running on a server version of Windows and user has explictly disabled dumping
|
||||
} else if (os::win32::is_windows_server() && !FLAG_IS_DEFAULT(CreateMinidumpOnCrash) && !CreateMinidumpOnCrash) {
|
||||
VMError::report_coredump_status("Minidump has been disabled from the command line", false);
|
||||
return;
|
||||
}
|
||||
|
||||
dbghelp = LoadLibrary("DBGHELP.DLL");
|
||||
|
||||
if (dbghelp == NULL) {
|
||||
VMError::report_coredump_status("Failed to load dbghelp.dll", false);
|
||||
return;
|
||||
}
|
||||
|
||||
_MiniDumpWriteDump = CAST_TO_FN_PTR(
|
||||
BOOL(WINAPI *)( HANDLE, DWORD, HANDLE, MINIDUMP_TYPE, PMINIDUMP_EXCEPTION_INFORMATION,
|
||||
PMINIDUMP_USER_STREAM_INFORMATION, PMINIDUMP_CALLBACK_INFORMATION),
|
||||
GetProcAddress(dbghelp, "MiniDumpWriteDump"));
|
||||
|
||||
if (_MiniDumpWriteDump == NULL) {
|
||||
VMError::report_coredump_status("Failed to find MiniDumpWriteDump() in module dbghelp.dll", false);
|
||||
return;
|
||||
}
|
||||
|
||||
dumpType = (MINIDUMP_TYPE)(MiniDumpWithFullMemory | MiniDumpWithHandleData);
|
||||
|
||||
// Older versions of dbghelp.h doesn't contain all the dumptypes we want, dbghelp.h with
|
||||
// API_VERSION_NUMBER 11 or higher contains the ones we want though
|
||||
#if API_VERSION_NUMBER >= 11
|
||||
dumpType = (MINIDUMP_TYPE)(dumpType | MiniDumpWithFullMemoryInfo | MiniDumpWithThreadInfo |
|
||||
MiniDumpWithUnloadedModules);
|
||||
#endif
|
||||
|
||||
cwd = get_current_directory(NULL, 0);
|
||||
jio_snprintf(buffer, bufferSize, "%s\\hs_err_pid%u.mdmp",cwd, current_process_id());
|
||||
dumpFile = CreateFile(buffer, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
|
||||
if (dumpFile == INVALID_HANDLE_VALUE) {
|
||||
VMError::report_coredump_status("Failed to create file for dumping", false);
|
||||
return;
|
||||
}
|
||||
|
||||
ep.ContextRecord = (PCONTEXT) contextRecord;
|
||||
ep.ExceptionRecord = (PEXCEPTION_RECORD) exceptionRecord;
|
||||
|
||||
mei.ThreadId = GetCurrentThreadId();
|
||||
mei.ExceptionPointers = &ep;
|
||||
|
||||
// Older versions of dbghelp.dll (the one shipped with Win2003 for example) may not support all
|
||||
// the dump types we really want. If first call fails, lets fall back to just use MiniDumpWithFullMemory then.
|
||||
if (_MiniDumpWriteDump(hProcess, processId, dumpFile, dumpType, &mei, NULL, NULL) == false &&
|
||||
_MiniDumpWriteDump(hProcess, processId, dumpFile, (MINIDUMP_TYPE)MiniDumpWithFullMemory, &mei, NULL, NULL) == false) {
|
||||
VMError::report_coredump_status("Call to MiniDumpWriteDump() failed", false);
|
||||
} else {
|
||||
VMError::report_coredump_status(buffer, true);
|
||||
}
|
||||
|
||||
CloseHandle(dumpFile);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void os::abort(bool dump_core)
|
||||
{
|
||||
os::shutdown();
|
||||
@ -3274,7 +3353,7 @@ volatile intx os::win32::_os_thread_count = 0;
|
||||
|
||||
bool os::win32::_is_nt = false;
|
||||
bool os::win32::_is_windows_2003 = false;
|
||||
|
||||
bool os::win32::_is_windows_server = false;
|
||||
|
||||
void os::win32::initialize_system_info() {
|
||||
SYSTEM_INFO si;
|
||||
@ -3293,9 +3372,9 @@ void os::win32::initialize_system_info() {
|
||||
GlobalMemoryStatusEx(&ms);
|
||||
_physical_memory = ms.ullTotalPhys;
|
||||
|
||||
OSVERSIONINFO oi;
|
||||
oi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||
GetVersionEx(&oi);
|
||||
OSVERSIONINFOEX oi;
|
||||
oi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
|
||||
GetVersionEx((OSVERSIONINFO*)&oi);
|
||||
switch(oi.dwPlatformId) {
|
||||
case VER_PLATFORM_WIN32_WINDOWS: _is_nt = false; break;
|
||||
case VER_PLATFORM_WIN32_NT:
|
||||
@ -3305,6 +3384,10 @@ void os::win32::initialize_system_info() {
|
||||
if (os_vers == 5002) {
|
||||
_is_windows_2003 = true;
|
||||
}
|
||||
if (oi.wProductType == VER_NT_DOMAIN_CONTROLLER ||
|
||||
oi.wProductType == VER_NT_SERVER) {
|
||||
_is_windows_server = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default: fatal("Unknown platform");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2011, 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
|
||||
@ -38,6 +38,7 @@ class win32 {
|
||||
static size_t _default_stack_size;
|
||||
static bool _is_nt;
|
||||
static bool _is_windows_2003;
|
||||
static bool _is_windows_server;
|
||||
|
||||
public:
|
||||
// Windows-specific interface:
|
||||
@ -64,6 +65,9 @@ class win32 {
|
||||
// Tells whether the platform is NT or Windown95
|
||||
static bool is_nt() { return _is_nt; }
|
||||
|
||||
// Tells whether this is a server version of Windows
|
||||
static bool is_windows_server() { return _is_windows_server; }
|
||||
|
||||
// Tells whether the platform is Windows 2003
|
||||
static bool is_windows_2003() { return _is_windows_2003; }
|
||||
|
||||
|
@ -542,7 +542,7 @@ inline static bool checkICMiss(sigcontext* uc, address* pc, address* stub) {
|
||||
return false;
|
||||
}
|
||||
|
||||
extern "C" int
|
||||
extern "C" JNIEXPORT int
|
||||
JVM_handle_linux_signal(int sig,
|
||||
siginfo_t* info,
|
||||
void* ucVoid,
|
||||
|
@ -216,7 +216,7 @@ extern "C" void FetchNPFI () ;
|
||||
extern "C" void FetchNResume () ;
|
||||
#endif // AMD64
|
||||
|
||||
extern "C" int
|
||||
extern "C" JNIEXPORT int
|
||||
JVM_handle_linux_signal(int sig,
|
||||
siginfo_t* info,
|
||||
void* ucVoid,
|
||||
|
@ -116,7 +116,7 @@ frame os::fetch_frame_from_context(void* ucVoid) {
|
||||
ShouldNotCallThis();
|
||||
}
|
||||
|
||||
extern "C" int
|
||||
extern "C" JNIEXPORT int
|
||||
JVM_handle_linux_signal(int sig,
|
||||
siginfo_t* info,
|
||||
void* ucVoid,
|
||||
|
@ -317,9 +317,9 @@ extern "C" void Fetch32Resume () ;
|
||||
extern "C" void FetchNPFI () ;
|
||||
extern "C" void FetchNResume () ;
|
||||
|
||||
extern "C" int JVM_handle_solaris_signal(int signo, siginfo_t* siginfo, void* ucontext, int abort_if_unrecognized);
|
||||
|
||||
int JVM_handle_solaris_signal(int sig, siginfo_t* info, void* ucVoid, int abort_if_unrecognized) {
|
||||
extern "C" JNIEXPORT int
|
||||
JVM_handle_solaris_signal(int sig, siginfo_t* info, void* ucVoid,
|
||||
int abort_if_unrecognized) {
|
||||
ucontext_t* uc = (ucontext_t*) ucVoid;
|
||||
|
||||
Thread* t = ThreadLocalStorage::get_thread_slow();
|
||||
|
@ -365,8 +365,6 @@ bool os::is_allocatable(size_t bytes) {
|
||||
|
||||
}
|
||||
|
||||
extern "C" int JVM_handle_solaris_signal(int signo, siginfo_t* siginfo, void* ucontext, int abort_if_unrecognized);
|
||||
|
||||
extern "C" void Fetch32PFI () ;
|
||||
extern "C" void Fetch32Resume () ;
|
||||
#ifdef AMD64
|
||||
@ -374,7 +372,9 @@ extern "C" void FetchNPFI () ;
|
||||
extern "C" void FetchNResume () ;
|
||||
#endif // AMD64
|
||||
|
||||
int JVM_handle_solaris_signal(int sig, siginfo_t* info, void* ucVoid, int abort_if_unrecognized) {
|
||||
extern "C" JNIEXPORT int
|
||||
JVM_handle_solaris_signal(int sig, siginfo_t* info, void* ucVoid,
|
||||
int abort_if_unrecognized) {
|
||||
ucontext_t* uc = (ucontext_t*) ucVoid;
|
||||
|
||||
#ifndef AMD64
|
||||
|
@ -37,6 +37,12 @@
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "assembler_zero.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "assembler_arm.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "assembler_ppc.inline.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
// Implementation of AbstractAssembler
|
||||
|
@ -43,6 +43,14 @@
|
||||
# include "register_zero.hpp"
|
||||
# include "vm_version_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "register_arm.hpp"
|
||||
# include "vm_version_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "register_ppc.hpp"
|
||||
# include "vm_version_ppc.hpp"
|
||||
#endif
|
||||
|
||||
// This file contains platform-independent assembler declarations.
|
||||
|
||||
@ -395,6 +403,12 @@ class AbstractAssembler : public ResourceObj {
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "assembler_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "assembler_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "assembler_ppc.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
#endif // SHARE_VM_ASM_ASSEMBLER_HPP
|
||||
|
@ -566,6 +566,12 @@ class CodeBuffer: public StackObj {
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "codeBuffer_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "codeBuffer_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "codeBuffer_ppc.hpp"
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
@ -35,6 +35,12 @@
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "register_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "register_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "register_ppc.hpp"
|
||||
#endif
|
||||
|
||||
// set frame size and return address offset to these values in blobs
|
||||
// (if the compiled frame uses ebp as link pointer on IA; otherwise,
|
||||
@ -50,6 +56,12 @@ enum {
|
||||
#ifdef TARGET_ARCH_sparc
|
||||
# include "c1_Defs_sparc.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "c1_Defs_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "c1_Defs_ppc.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
// native word offsets from memory address
|
||||
|
@ -38,6 +38,12 @@ class FpuStackSim;
|
||||
#ifdef TARGET_ARCH_sparc
|
||||
# include "c1_FpuStackSim_sparc.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "c1_FpuStackSim_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "c1_FpuStackSim_ppc.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
#endif // SHARE_VM_C1_C1_FPUSTACKSIM_HPP
|
||||
|
@ -35,6 +35,12 @@
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "vmreg_zero.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "vmreg_arm.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "vmreg_ppc.inline.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
@ -87,6 +87,12 @@ class FrameMap : public CompilationResourceObj {
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_sparc
|
||||
# include "c1_FrameMap_sparc.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "c1_FrameMap_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "c1_FrameMap_ppc.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -316,6 +316,8 @@ class Instruction: public CompilationResourceObj {
|
||||
return res;
|
||||
}
|
||||
|
||||
static const int no_bci = -99;
|
||||
|
||||
enum InstructionFlag {
|
||||
NeedsNullCheckFlag = 0,
|
||||
CanTrapFlag,
|
||||
|
@ -42,6 +42,14 @@
|
||||
# include "nativeInst_zero.hpp"
|
||||
# include "vmreg_zero.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "nativeInst_arm.hpp"
|
||||
# include "vmreg_arm.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "nativeInst_ppc.hpp"
|
||||
# include "vmreg_ppc.inline.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
void LIR_Assembler::patching_epilog(PatchingStub* patch, LIR_PatchCode patch_code, Register obj, CodeEmitInfo* info) {
|
||||
|
@ -252,6 +252,12 @@ class LIR_Assembler: public CompilationResourceObj {
|
||||
#ifdef TARGET_ARCH_sparc
|
||||
# include "c1_LIRAssembler_sparc.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "c1_LIRAssembler_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "c1_LIRAssembler_ppc.hpp"
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
@ -41,6 +41,12 @@
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "vmreg_zero.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "vmreg_arm.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "vmreg_ppc.inline.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef PRODUCT
|
||||
|
@ -972,6 +972,12 @@ class LinearScanTimers : public StackObj {
|
||||
#ifdef TARGET_ARCH_sparc
|
||||
# include "c1_LinearScan_sparc.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "c1_LinearScan_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "c1_LinearScan_ppc.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
#endif // SHARE_VM_C1_C1_LINEARSCAN_HPP
|
||||
|
@ -35,6 +35,12 @@
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "assembler_zero.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "assembler_arm.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "assembler_ppc.inline.hpp"
|
||||
#endif
|
||||
|
||||
class CodeEmitInfo;
|
||||
|
||||
@ -61,6 +67,12 @@ class C1_MacroAssembler: public MacroAssembler {
|
||||
#ifdef TARGET_ARCH_sparc
|
||||
# include "c1_MacroAssembler_sparc.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "c1_MacroAssembler_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "c1_MacroAssembler_ppc.hpp"
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
@ -32,6 +32,12 @@
|
||||
#ifdef TARGET_ARCH_sparc
|
||||
# include "c1_globals_sparc.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "c1_globals_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "c1_globals_ppc.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_OS_FAMILY_linux
|
||||
# include "c1_globals_linux.hpp"
|
||||
#endif
|
||||
|
@ -35,6 +35,12 @@
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "bytes_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "bytes_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "bytes_ppc.hpp"
|
||||
#endif
|
||||
|
||||
// Input stream for reading .class file
|
||||
//
|
||||
|
@ -39,6 +39,12 @@
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "bytes_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "bytes_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "bytes_ppc.hpp"
|
||||
#endif
|
||||
|
||||
class StackMapReader;
|
||||
|
||||
|
@ -51,6 +51,12 @@
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "bytes_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "bytes_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "bytes_ppc.hpp"
|
||||
#endif
|
||||
|
||||
#define NOFAILOVER_MAJOR_VERSION 51
|
||||
|
||||
|
@ -108,7 +108,6 @@
|
||||
template(java_lang_AssertionStatusDirectives, "java/lang/AssertionStatusDirectives") \
|
||||
template(sun_jkernel_DownloadManager, "sun/jkernel/DownloadManager") \
|
||||
template(getBootClassPathEntryForClass_name, "getBootClassPathEntryForClass") \
|
||||
template(setBootClassLoaderHook_name, "setBootClassLoaderHook") \
|
||||
template(sun_misc_PostVMInitHook, "sun/misc/PostVMInitHook") \
|
||||
\
|
||||
/* class file format tags */ \
|
||||
|
@ -48,6 +48,12 @@
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "nativeInst_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "nativeInst_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "nativeInst_ppc.hpp"
|
||||
#endif
|
||||
#ifdef COMPILER1
|
||||
#include "c1/c1_Runtime1.hpp"
|
||||
#endif
|
||||
|
@ -38,6 +38,12 @@
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "nativeInst_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "nativeInst_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "nativeInst_ppc.hpp"
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// The CompiledIC represents a compiled inline cache.
|
||||
|
@ -46,6 +46,12 @@
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "assembler_zero.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "assembler_arm.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "assembler_ppc.inline.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
DEF_STUB_INTERFACE(ICStub);
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "interpreter/bytecode.hpp"
|
||||
#include "oops/methodDataOop.hpp"
|
||||
#include "prims/jvmtiRedefineClassesTrace.hpp"
|
||||
#include "prims/jvmtiImpl.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/sweeper.hpp"
|
||||
#include "utilities/dtrace.hpp"
|
||||
@ -1533,7 +1534,10 @@ void nmethod::post_compiled_method_load_event() {
|
||||
}
|
||||
|
||||
if (JvmtiExport::should_post_compiled_method_load()) {
|
||||
JvmtiExport::post_compiled_method_load(this);
|
||||
// Let the Service thread (which is a real Java thread) post the event
|
||||
MutexLockerEx ml(Service_lock, Mutex::_no_safepoint_check_flag);
|
||||
JvmtiDeferredEventQueue::enqueue(
|
||||
JvmtiDeferredEvent::compiled_method_load_event(this));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1566,8 +1570,17 @@ void nmethod::post_compiled_method_unload() {
|
||||
// ref will have been cleared.
|
||||
if (_jmethod_id != NULL && JvmtiExport::should_post_compiled_method_unload()) {
|
||||
assert(!unload_reported(), "already unloaded");
|
||||
HandleMark hm;
|
||||
JvmtiExport::post_compiled_method_unload(_jmethod_id, insts_begin());
|
||||
JvmtiDeferredEvent event =
|
||||
JvmtiDeferredEvent::compiled_method_unload_event(
|
||||
_jmethod_id, insts_begin());
|
||||
if (SafepointSynchronize::is_at_safepoint()) {
|
||||
// Don't want to take the queueing lock. Add it as pending and
|
||||
// it will get enqueued later.
|
||||
JvmtiDeferredEventQueue::add_pending_event(event);
|
||||
} else {
|
||||
MutexLockerEx ml(Service_lock, Mutex::_no_safepoint_check_flag);
|
||||
JvmtiDeferredEventQueue::enqueue(event);
|
||||
}
|
||||
}
|
||||
|
||||
// The JVMTI CompiledMethodUnload event can be enabled or disabled at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2011, 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
|
||||
@ -696,10 +696,11 @@ public:
|
||||
class nmethodLocker : public StackObj {
|
||||
nmethod* _nm;
|
||||
|
||||
public:
|
||||
|
||||
static void lock_nmethod(nmethod* nm); // note: nm can be NULL
|
||||
static void unlock_nmethod(nmethod* nm); // (ditto)
|
||||
|
||||
public:
|
||||
nmethodLocker(address pc); // derive nm from pc
|
||||
nmethodLocker(nmethod *nm) { _nm = nm; lock_nmethod(_nm); }
|
||||
nmethodLocker() { _nm = NULL; }
|
||||
|
@ -41,6 +41,14 @@
|
||||
# include "assembler_zero.inline.hpp"
|
||||
# include "nativeInst_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "assembler_arm.inline.hpp"
|
||||
# include "nativeInst_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "assembler_ppc.inline.hpp"
|
||||
# include "nativeInst_ppc.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
const RelocationHolder RelocationHolder::none; // its type is relocInfo::none
|
||||
|
@ -429,6 +429,12 @@ class relocInfo VALUE_OBJ_CLASS_SPEC {
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "relocInfo_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "relocInfo_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "relocInfo_ppc.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -36,6 +36,12 @@
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "register_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "register_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "register_ppc.hpp"
|
||||
#endif
|
||||
#ifdef COMPILER2
|
||||
#include "opto/adlcVMDeps.hpp"
|
||||
#include "utilities/ostream.hpp"
|
||||
@ -51,6 +57,12 @@
|
||||
#ifdef TARGET_ARCH_MODEL_zero
|
||||
# include "adfiles/adGlobals_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_MODEL_arm
|
||||
# include "adfiles/adGlobals_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_MODEL_ppc
|
||||
# include "adfiles/adGlobals_ppc.hpp"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//------------------------------VMReg------------------------------------------
|
||||
@ -164,6 +176,12 @@ public:
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "vmreg_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "vmreg_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "vmreg_ppc.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2011, 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
|
||||
@ -1210,7 +1210,17 @@ uint CompileBroker::assign_compile_id(methodHandle method, int osr_bci) {
|
||||
// Should the current thread be blocked until this compilation request
|
||||
// has been fulfilled?
|
||||
bool CompileBroker::is_compile_blocking(methodHandle method, int osr_bci) {
|
||||
return !BackgroundCompilation;
|
||||
if (!BackgroundCompilation) {
|
||||
Symbol* class_name = method->method_holder()->klass_part()->name();
|
||||
if (class_name->starts_with("java/lang/ref/Reference", 23)) {
|
||||
// The reference handler thread can dead lock with the GC if compilation is blocking,
|
||||
// so we avoid blocking compiles for anything in the java.lang.ref.Reference class,
|
||||
// including inner classes such as ReferenceHandler.
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
@ -41,6 +41,12 @@
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "depChecker_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "depChecker_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "depChecker_ppc.hpp"
|
||||
#endif
|
||||
#ifdef SHARK
|
||||
#include "shark/sharkEntry.hpp"
|
||||
#endif
|
||||
|
@ -69,6 +69,12 @@ class Disassembler {
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "disassembler_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "disassembler_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "disassembler_ppc.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2011, 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
|
||||
@ -99,7 +99,7 @@ void ConcurrentG1Refine::init() {
|
||||
if (G1ConcRSLogCacheSize > 0) {
|
||||
_g1h = G1CollectedHeap::heap();
|
||||
_max_n_card_counts =
|
||||
(unsigned) (_g1h->g1_reserved_obj_bytes() >> CardTableModRefBS::card_shift);
|
||||
(unsigned) (_g1h->max_capacity() >> CardTableModRefBS::card_shift);
|
||||
|
||||
size_t max_card_num = ((size_t)1 << (sizeof(unsigned)*BitsPerByte-1)) - 1;
|
||||
guarantee(_max_n_card_counts < max_card_num, "card_num representation");
|
||||
|
@ -251,6 +251,14 @@ void ConcurrentMarkThread::run() {
|
||||
|
||||
// Now do the remainder of the cleanup operation.
|
||||
_cm->completeCleanup();
|
||||
// Notify anyone who's waiting that there are no more free
|
||||
// regions coming. We have to do this before we join the STS,
|
||||
// otherwise we might deadlock: a GC worker could be blocked
|
||||
// waiting for the notification whereas this thread will be
|
||||
// blocked for the pause to finish while it's trying to join
|
||||
// the STS, which is conditional on the GC workers finishing.
|
||||
g1h->reset_free_regions_coming();
|
||||
|
||||
_sts.join();
|
||||
g1_policy->record_concurrent_mark_cleanup_completed();
|
||||
_sts.leave();
|
||||
@ -262,9 +270,6 @@ void ConcurrentMarkThread::run() {
|
||||
gclog_or_tty->print_cr("[GC concurrent-cleanup-end, %1.7lf]",
|
||||
cleanup_end_sec - cleanup_start_sec);
|
||||
}
|
||||
|
||||
// We're done: no more free regions coming.
|
||||
g1h->reset_free_regions_coming();
|
||||
}
|
||||
guarantee(cm()->cleanup_list_is_empty(),
|
||||
"at this point there should be no regions on the cleanup list");
|
||||
|
@ -546,8 +546,11 @@ HeapRegion* G1CollectedHeap::new_region_work(size_t word_size,
|
||||
res = new_region_try_secondary_free_list(word_size);
|
||||
}
|
||||
if (res == NULL && do_expand) {
|
||||
expand(word_size * HeapWordSize);
|
||||
res = _free_list.remove_head_or_null();
|
||||
if (expand(word_size * HeapWordSize)) {
|
||||
// The expansion succeeded and so we should have at least one
|
||||
// region on the free list.
|
||||
res = _free_list.remove_head();
|
||||
}
|
||||
}
|
||||
if (res != NULL) {
|
||||
if (G1PrintHeapRegions) {
|
||||
@ -631,9 +634,22 @@ HeapWord* G1CollectedHeap::humongous_obj_allocate(size_t word_size) {
|
||||
if (first == -1) {
|
||||
// The only thing we can do now is attempt expansion.
|
||||
if (fs + x_size >= num_regions) {
|
||||
expand((num_regions - fs) * HeapRegion::GrainBytes);
|
||||
first = humongous_obj_allocate_find_first(num_regions, word_size);
|
||||
assert(first != -1, "this should have worked");
|
||||
// If the number of regions we're trying to allocate for this
|
||||
// object is at most the number of regions in the free suffix,
|
||||
// then the call to humongous_obj_allocate_find_first() above
|
||||
// should have succeeded and we wouldn't be here.
|
||||
//
|
||||
// We should only be trying to expand when the free suffix is
|
||||
// not sufficient for the object _and_ we have some expansion
|
||||
// room available.
|
||||
assert(num_regions > fs, "earlier allocation should have succeeded");
|
||||
|
||||
if (expand((num_regions - fs) * HeapRegion::GrainBytes)) {
|
||||
first = humongous_obj_allocate_find_first(num_regions, word_size);
|
||||
// If the expansion was successful then the allocation
|
||||
// should have been successful.
|
||||
assert(first != -1, "this should have worked");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1647,16 +1663,17 @@ resize_if_necessary_after_full_collection(size_t word_size) {
|
||||
if (capacity_after_gc < minimum_desired_capacity) {
|
||||
// Don't expand unless it's significant
|
||||
size_t expand_bytes = minimum_desired_capacity - capacity_after_gc;
|
||||
expand(expand_bytes);
|
||||
if (PrintGC && Verbose) {
|
||||
gclog_or_tty->print_cr(" "
|
||||
" expanding:"
|
||||
" max_heap_size: %6.1fK"
|
||||
" minimum_desired_capacity: %6.1fK"
|
||||
" expand_bytes: %6.1fK",
|
||||
(double) max_heap_size / (double) K,
|
||||
(double) minimum_desired_capacity / (double) K,
|
||||
(double) expand_bytes / (double) K);
|
||||
if (expand(expand_bytes)) {
|
||||
if (PrintGC && Verbose) {
|
||||
gclog_or_tty->print_cr(" "
|
||||
" expanding:"
|
||||
" max_heap_size: %6.1fK"
|
||||
" minimum_desired_capacity: %6.1fK"
|
||||
" expand_bytes: %6.1fK",
|
||||
(double) max_heap_size / (double) K,
|
||||
(double) minimum_desired_capacity / (double) K,
|
||||
(double) expand_bytes / (double) K);
|
||||
}
|
||||
}
|
||||
|
||||
// No expansion, now see if we want to shrink
|
||||
@ -1757,66 +1774,84 @@ HeapWord* G1CollectedHeap::expand_and_allocate(size_t word_size) {
|
||||
|
||||
verify_region_sets_optional();
|
||||
|
||||
size_t expand_bytes = word_size * HeapWordSize;
|
||||
if (expand_bytes < MinHeapDeltaBytes) {
|
||||
expand_bytes = MinHeapDeltaBytes;
|
||||
size_t expand_bytes = MAX2(word_size * HeapWordSize, MinHeapDeltaBytes);
|
||||
if (expand(expand_bytes)) {
|
||||
verify_region_sets_optional();
|
||||
return attempt_allocation_at_safepoint(word_size,
|
||||
false /* expect_null_cur_alloc_region */);
|
||||
}
|
||||
expand(expand_bytes);
|
||||
|
||||
verify_region_sets_optional();
|
||||
|
||||
return attempt_allocation_at_safepoint(word_size,
|
||||
false /* expect_null_cur_alloc_region */);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// FIXME: both this and shrink could probably be more efficient by
|
||||
// doing one "VirtualSpace::expand_by" call rather than several.
|
||||
void G1CollectedHeap::expand(size_t expand_bytes) {
|
||||
bool G1CollectedHeap::expand(size_t expand_bytes) {
|
||||
size_t old_mem_size = _g1_storage.committed_size();
|
||||
// We expand by a minimum of 1K.
|
||||
expand_bytes = MAX2(expand_bytes, (size_t)K);
|
||||
size_t aligned_expand_bytes =
|
||||
ReservedSpace::page_align_size_up(expand_bytes);
|
||||
size_t aligned_expand_bytes = ReservedSpace::page_align_size_up(expand_bytes);
|
||||
aligned_expand_bytes = align_size_up(aligned_expand_bytes,
|
||||
HeapRegion::GrainBytes);
|
||||
expand_bytes = aligned_expand_bytes;
|
||||
while (expand_bytes > 0) {
|
||||
HeapWord* base = (HeapWord*)_g1_storage.high();
|
||||
// Commit more storage.
|
||||
bool successful = _g1_storage.expand_by(HeapRegion::GrainBytes);
|
||||
if (!successful) {
|
||||
expand_bytes = 0;
|
||||
} else {
|
||||
expand_bytes -= HeapRegion::GrainBytes;
|
||||
// Expand the committed region.
|
||||
HeapWord* high = (HeapWord*) _g1_storage.high();
|
||||
_g1_committed.set_end(high);
|
||||
|
||||
if (Verbose && PrintGC) {
|
||||
gclog_or_tty->print("Expanding garbage-first heap from %ldK by %ldK",
|
||||
old_mem_size/K, aligned_expand_bytes/K);
|
||||
}
|
||||
|
||||
HeapWord* old_end = (HeapWord*)_g1_storage.high();
|
||||
bool successful = _g1_storage.expand_by(aligned_expand_bytes);
|
||||
if (successful) {
|
||||
HeapWord* new_end = (HeapWord*)_g1_storage.high();
|
||||
|
||||
// Expand the committed region.
|
||||
_g1_committed.set_end(new_end);
|
||||
|
||||
// Tell the cardtable about the expansion.
|
||||
Universe::heap()->barrier_set()->resize_covered_region(_g1_committed);
|
||||
|
||||
// And the offset table as well.
|
||||
_bot_shared->resize(_g1_committed.word_size());
|
||||
|
||||
expand_bytes = aligned_expand_bytes;
|
||||
HeapWord* base = old_end;
|
||||
|
||||
// Create the heap regions for [old_end, new_end)
|
||||
while (expand_bytes > 0) {
|
||||
HeapWord* high = base + HeapRegion::GrainWords;
|
||||
|
||||
// Create a new HeapRegion.
|
||||
MemRegion mr(base, high);
|
||||
bool is_zeroed = !_g1_max_committed.contains(base);
|
||||
HeapRegion* hr = new HeapRegion(_bot_shared, mr, is_zeroed);
|
||||
|
||||
// Now update max_committed if necessary.
|
||||
_g1_max_committed.set_end(MAX2(_g1_max_committed.end(), high));
|
||||
|
||||
// Add it to the HeapRegionSeq.
|
||||
_hrs->insert(hr);
|
||||
_free_list.add_as_tail(hr);
|
||||
|
||||
// And we used up an expansion region to create it.
|
||||
_expansion_regions--;
|
||||
// Tell the cardtable about it.
|
||||
Universe::heap()->barrier_set()->resize_covered_region(_g1_committed);
|
||||
// And the offset table as well.
|
||||
_bot_shared->resize(_g1_committed.word_size());
|
||||
|
||||
expand_bytes -= HeapRegion::GrainBytes;
|
||||
base += HeapRegion::GrainWords;
|
||||
}
|
||||
assert(base == new_end, "sanity");
|
||||
|
||||
// Now update max_committed if necessary.
|
||||
_g1_max_committed.set_end(MAX2(_g1_max_committed.end(), new_end));
|
||||
|
||||
} else {
|
||||
// The expansion of the virtual storage space was unsuccessful.
|
||||
// Let's see if it was because we ran out of swap.
|
||||
if (G1ExitOnExpansionFailure &&
|
||||
_g1_storage.uncommitted_size() >= aligned_expand_bytes) {
|
||||
// We had head room...
|
||||
vm_exit_out_of_memory(aligned_expand_bytes, "G1 heap expansion");
|
||||
}
|
||||
}
|
||||
|
||||
if (Verbose && PrintGC) {
|
||||
size_t new_mem_size = _g1_storage.committed_size();
|
||||
gclog_or_tty->print_cr("Expanding garbage-first heap from %ldK by %ldK to %ldK",
|
||||
old_mem_size/K, aligned_expand_bytes/K,
|
||||
gclog_or_tty->print_cr("...%s, expanded to %ldK",
|
||||
(successful ? "Successful" : "Failed"),
|
||||
new_mem_size/K);
|
||||
}
|
||||
return successful;
|
||||
}
|
||||
|
||||
void G1CollectedHeap::shrink_helper(size_t shrink_bytes)
|
||||
@ -2088,7 +2123,10 @@ jint G1CollectedHeap::initialize() {
|
||||
HeapRegionRemSet::init_heap(max_regions());
|
||||
|
||||
// Now expand into the initial heap size.
|
||||
expand(init_byte_size);
|
||||
if (!expand(init_byte_size)) {
|
||||
vm_exit_during_initialization("Failed to allocate initial heap.");
|
||||
return JNI_ENOMEM;
|
||||
}
|
||||
|
||||
// Perform any initialization actions delegated to the policy.
|
||||
g1_policy()->init();
|
||||
@ -2744,7 +2782,7 @@ size_t G1CollectedHeap::large_typearray_limit() {
|
||||
}
|
||||
|
||||
size_t G1CollectedHeap::max_capacity() const {
|
||||
return g1_reserved_obj_bytes();
|
||||
return _g1_reserved.byte_size();
|
||||
}
|
||||
|
||||
jlong G1CollectedHeap::millis_since_last_gc() {
|
||||
@ -3538,7 +3576,12 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) {
|
||||
size_t expand_bytes = g1_policy()->expansion_amount();
|
||||
if (expand_bytes > 0) {
|
||||
size_t bytes_before = capacity();
|
||||
expand(expand_bytes);
|
||||
if (!expand(expand_bytes)) {
|
||||
// We failed to expand the heap so let's verify that
|
||||
// committed/uncommitted amount match the backing store
|
||||
assert(capacity() == _g1_storage.committed_size(), "committed size mismatch");
|
||||
assert(max_capacity() == _g1_storage.reserved_size(), "reserved size mismatch");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3762,7 +3805,7 @@ void G1CollectedHeap::get_gc_alloc_regions() {
|
||||
|
||||
if (alloc_region == NULL) {
|
||||
// we will get a new GC alloc region
|
||||
alloc_region = new_gc_alloc_region(ap, 0);
|
||||
alloc_region = new_gc_alloc_region(ap, HeapRegion::GrainWords);
|
||||
} else {
|
||||
// the region was retained from the last collection
|
||||
++_gc_alloc_region_counts[ap];
|
||||
@ -5311,7 +5354,7 @@ size_t G1CollectedHeap::n_regions() {
|
||||
|
||||
size_t G1CollectedHeap::max_regions() {
|
||||
return
|
||||
(size_t)align_size_up(g1_reserved_obj_bytes(), HeapRegion::GrainBytes) /
|
||||
(size_t)align_size_up(max_capacity(), HeapRegion::GrainBytes) /
|
||||
HeapRegion::GrainBytes;
|
||||
}
|
||||
|
||||
|
@ -619,8 +619,10 @@ protected:
|
||||
|
||||
public:
|
||||
// Expand the garbage-first heap by at least the given size (in bytes!).
|
||||
// Returns true if the heap was expanded by the requested amount;
|
||||
// false otherwise.
|
||||
// (Rounds up to a HeapRegion boundary.)
|
||||
virtual void expand(size_t expand_bytes);
|
||||
bool expand(size_t expand_bytes);
|
||||
|
||||
// Do anything common to GC's.
|
||||
virtual void gc_prologue(bool full);
|
||||
@ -981,9 +983,6 @@ public:
|
||||
// Reference Processing accessor
|
||||
ReferenceProcessor* ref_processor() { return _ref_processor; }
|
||||
|
||||
// Reserved (g1 only; super method includes perm), capacity and the used
|
||||
// portion in bytes.
|
||||
size_t g1_reserved_obj_bytes() const { return _g1_reserved.byte_size(); }
|
||||
virtual size_t capacity() const;
|
||||
virtual size_t used() const;
|
||||
// This should be called when we're not holding the heap lock. The
|
||||
|
@ -2011,7 +2011,7 @@ size_t G1CollectorPolicy::expansion_amount() {
|
||||
// space, whichever is smaller, bounded below by a minimum
|
||||
// expansion (unless that's all that's left.)
|
||||
const size_t min_expand_bytes = 1*M;
|
||||
size_t reserved_bytes = _g1->g1_reserved_obj_bytes();
|
||||
size_t reserved_bytes = _g1->max_capacity();
|
||||
size_t committed_bytes = _g1->capacity();
|
||||
size_t uncommitted_bytes = reserved_bytes - committed_bytes;
|
||||
size_t expand_bytes;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2011, 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
|
||||
@ -735,7 +735,7 @@ bool G1RemSet::concurrentRefineOneCard_impl(jbyte* card_ptr, int worker_i,
|
||||
MemRegion dirtyRegion(start, end);
|
||||
|
||||
#if CARD_REPEAT_HISTO
|
||||
init_ct_freq_table(_g1->g1_reserved_obj_bytes());
|
||||
init_ct_freq_table(_g1->max_capacity());
|
||||
ct_freq_note_card(_ct_bs->index_for(start));
|
||||
#endif
|
||||
|
||||
|
@ -301,9 +301,13 @@
|
||||
develop(uintx, G1StressConcRegionFreeingDelayMillis, 0, \
|
||||
"Artificial delay during concurrent region freeing") \
|
||||
\
|
||||
develop(bool, ReduceInitialCardMarksForG1, false, \
|
||||
develop(bool, ReduceInitialCardMarksForG1, false, \
|
||||
"When ReduceInitialCardMarks is true, this flag setting " \
|
||||
" controls whether G1 allows the RICM optimization")
|
||||
" controls whether G1 allows the RICM optimization") \
|
||||
\
|
||||
develop(bool, G1ExitOnExpansionFailure, false, \
|
||||
"Raise a fatal VM exit out of memory failure in the event " \
|
||||
" that heap expansion fails due to running out of swap.")
|
||||
|
||||
G1_FLAGS(DECLARE_DEVELOPER_FLAG, DECLARE_PD_DEVELOPER_FLAG, DECLARE_PRODUCT_FLAG, DECLARE_PD_PRODUCT_FLAG, DECLARE_DIAGNOSTIC_FLAG, DECLARE_EXPERIMENTAL_FLAG, DECLARE_NOTPRODUCT_FLAG, DECLARE_MANAGEABLE_FLAG, DECLARE_PRODUCT_RW_FLAG)
|
||||
|
||||
|
@ -116,10 +116,8 @@ class AllocationStats VALUE_OBJ_CLASS_SPEC {
|
||||
_demand_rate_estimate.sample(rate);
|
||||
float new_rate = _demand_rate_estimate.padded_average();
|
||||
ssize_t old_desired = _desired;
|
||||
_desired = (ssize_t)(new_rate * (inter_sweep_estimate
|
||||
+ CMSExtrapolateSweep
|
||||
? intra_sweep_estimate
|
||||
: 0.0));
|
||||
float delta_ise = (CMSExtrapolateSweep ? intra_sweep_estimate : 0.0);
|
||||
_desired = (ssize_t)(new_rate * (inter_sweep_estimate + delta_ise));
|
||||
if (PrintFLSStatistics > 1) {
|
||||
gclog_or_tty->print_cr("demand: %d, old_rate: %f, current_rate: %f, new_rate: %f, old_desired: %d, new_desired: %d",
|
||||
demand, old_rate, rate, new_rate, old_desired, _desired);
|
||||
|
@ -106,8 +106,8 @@ void AdaptivePaddedNoZeroDevAverage::sample(float new_sample) {
|
||||
}
|
||||
|
||||
LinearLeastSquareFit::LinearLeastSquareFit(unsigned weight) :
|
||||
_sum_x(0), _sum_y(0), _sum_xy(0),
|
||||
_mean_x(weight), _mean_y(weight) {}
|
||||
_sum_x(0), _sum_x_squared(0), _sum_y(0), _sum_xy(0),
|
||||
_intercept(0), _slope(0), _mean_x(weight), _mean_y(weight) {}
|
||||
|
||||
void LinearLeastSquareFit::update(double x, double y) {
|
||||
_sum_x = _sum_x + x;
|
||||
|
@ -41,6 +41,12 @@
|
||||
#ifdef TARGET_ARCH_MODEL_zero
|
||||
# include "interp_masm_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_MODEL_arm
|
||||
# include "interp_masm_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_MODEL_ppc
|
||||
# include "interp_masm_ppc.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_OS_FAMILY_linux
|
||||
# include "thread_linux.inline.hpp"
|
||||
#endif
|
||||
|
@ -37,6 +37,12 @@
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "bytes_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "bytes_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "bytes_ppc.hpp"
|
||||
#endif
|
||||
|
||||
class ciBytecodeStream;
|
||||
|
||||
|
@ -59,6 +59,12 @@
|
||||
#ifdef TARGET_OS_ARCH_windows_x86
|
||||
# include "orderAccess_windows_x86.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_OS_ARCH_linux_arm
|
||||
# include "orderAccess_linux_arm.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_OS_ARCH_linux_ppc
|
||||
# include "orderAccess_linux_ppc.inline.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
// no precompiled headers
|
||||
|
@ -41,6 +41,12 @@
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "bytes_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "bytes_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "bytes_ppc.hpp"
|
||||
#endif
|
||||
|
||||
#ifdef CC_INTERP
|
||||
|
||||
@ -587,6 +593,12 @@ void print();
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "bytecodeInterpreter_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "bytecodeInterpreter_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "bytecodeInterpreter_ppc.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
}; // BytecodeInterpreter
|
||||
|
@ -52,6 +52,12 @@
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "bytecodeInterpreter_zero.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "bytecodeInterpreter_arm.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "bytecodeInterpreter_ppc.inline.hpp"
|
||||
#endif
|
||||
|
||||
#endif // CC_INTERP
|
||||
|
||||
|
@ -37,6 +37,12 @@
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "bytes_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "bytes_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "bytes_ppc.hpp"
|
||||
#endif
|
||||
|
||||
// A BytecodeStream is used for fast iteration over the bytecodes
|
||||
// of a methodOop.
|
||||
|
@ -35,6 +35,12 @@
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "bytes_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "bytes_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "bytes_ppc.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER < 1600))
|
||||
|
@ -293,6 +293,12 @@ class Bytecodes: AllStatic {
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "bytecodes_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "bytecodes_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "bytecodes_ppc.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -90,6 +90,12 @@ class CppInterpreter: public AbstractInterpreter {
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "cppInterpreter_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "cppInterpreter_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "cppInterpreter_ppc.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
};
|
||||
|
@ -53,6 +53,12 @@ class CppInterpreterGenerator: public AbstractInterpreterGenerator {
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "cppInterpreterGenerator_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "cppInterpreterGenerator_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "cppInterpreterGenerator_ppc.hpp"
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
@ -152,6 +152,12 @@ class Interpreter: public CC_INTERP_ONLY(CppInterpreter) NOT_CC_INTERP(TemplateI
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "interpreter_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "interpreter_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "interpreter_ppc.hpp"
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
@ -50,6 +50,12 @@ InterpreterGenerator(StubQueue* _code);
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "interpreterGenerator_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "interpreterGenerator_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "interpreterGenerator_ppc.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
};
|
||||
|
@ -65,6 +65,12 @@
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "vm_version_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "vm_version_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "vm_version_ppc.hpp"
|
||||
#endif
|
||||
#ifdef COMPILER2
|
||||
#include "opto/runtime.hpp"
|
||||
#endif
|
||||
@ -1178,9 +1184,7 @@ void SignatureHandlerLibrary::add(methodHandle method) {
|
||||
handler_index = _fingerprints->length() - 1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
CHECK_UNHANDLED_OOPS_ONLY(Thread::current()->clear_unhandled_oops());
|
||||
}
|
||||
// Set handler under SignatureHandlerLibrary_lock
|
||||
if (handler_index < 0) {
|
||||
// use generic signature handler
|
||||
method->set_signature_handler(Interpreter::slow_signature_handler());
|
||||
@ -1188,21 +1192,29 @@ void SignatureHandlerLibrary::add(methodHandle method) {
|
||||
// set handler
|
||||
method->set_signature_handler(_handlers->at(handler_index));
|
||||
}
|
||||
} else {
|
||||
CHECK_UNHANDLED_OOPS_ONLY(Thread::current()->clear_unhandled_oops());
|
||||
// use generic signature handler
|
||||
method->set_signature_handler(Interpreter::slow_signature_handler());
|
||||
}
|
||||
}
|
||||
#ifdef ASSERT
|
||||
int handler_index, fingerprint_index;
|
||||
int handler_index = -1;
|
||||
int fingerprint_index = -2;
|
||||
{
|
||||
// '_handlers' and '_fingerprints' are 'GrowableArray's and are NOT synchronized
|
||||
// in any way if accessed from multiple threads. To avoid races with another
|
||||
// thread which may change the arrays in the above, mutex protected block, we
|
||||
// have to protect this read access here with the same mutex as well!
|
||||
MutexLocker mu(SignatureHandlerLibrary_lock);
|
||||
if (_handlers != NULL) {
|
||||
handler_index = _handlers->find(method->signature_handler());
|
||||
fingerprint_index = _fingerprints->find(Fingerprinter(method).fingerprint());
|
||||
}
|
||||
}
|
||||
assert(method->signature_handler() == Interpreter::slow_signature_handler() ||
|
||||
handler_index == fingerprint_index, "sanity check");
|
||||
#endif
|
||||
#endif // ASSERT
|
||||
}
|
||||
|
||||
|
||||
|
@ -156,6 +156,12 @@ class InterpreterRuntime: AllStatic {
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "interpreterRT_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "interpreterRT_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "interpreterRT_ppc.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -192,6 +192,12 @@ class TemplateInterpreter: public AbstractInterpreter {
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "templateInterpreter_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "templateInterpreter_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "templateInterpreter_ppc.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
};
|
||||
|
@ -96,6 +96,12 @@ class TemplateInterpreterGenerator: public AbstractInterpreterGenerator {
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "templateInterpreterGenerator_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "templateInterpreterGenerator_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "templateInterpreterGenerator_ppc.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
};
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user