Merge
This commit is contained in:
commit
61363dfe99
2
.hgtags
2
.hgtags
@ -196,3 +196,5 @@ a41ada2ed4ef735449531c6ebe6cec593d890a1c jdk8-b71
|
||||
6725b3961f987cf40f446d1c11cd324a3bec545f jdk8-b72
|
||||
fe94b40ffd9390f6cffcdf51c0389b0e6dde0c13 jdk8-b73
|
||||
f627eff819628822a0777af8062244352f2a29cf jdk8-b74
|
||||
f1478a6d25fddd311a84dcbfac50824cc1858bdd jdk8-b75
|
||||
f407160c280d1c5b00d314c535441ac26f195fee jdk8-b76
|
||||
|
@ -196,3 +196,5 @@ cdb401a60cea6ad5ef3f498725ed1decf8dda1ea jdk8-b68
|
||||
c1be681d80a1f1c848dc671d664fccb19e046a12 jdk8-b72
|
||||
93b9664f97eeb6f89397a8842318ebacaac9feb9 jdk8-b73
|
||||
b43aa5bd8ca5c8121336495382d35ecfa7a71536 jdk8-b74
|
||||
2a713921952cbd77a1e699626976cb6cdfe3e57e jdk8-b75
|
||||
278af9fc67e7eba2884936b49ec07345f423aabb jdk8-b76
|
||||
|
@ -3723,7 +3723,7 @@ fi
|
||||
#CUSTOM_AUTOCONF_INCLUDE
|
||||
|
||||
# Do not change or remove the following line, it is needed for consistency checks:
|
||||
DATE_WHEN_GENERATED=1359376859
|
||||
DATE_WHEN_GENERATED=1359971740
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
@ -10778,7 +10778,8 @@ if test "x$with_milestone" = xyes; then
|
||||
as_fn_error $? "Milestone must have a value" "$LINENO" 5
|
||||
elif test "x$with_milestone" != x; then
|
||||
MILESTONE="$with_milestone"
|
||||
else
|
||||
fi
|
||||
if test "x$MILESTONE" = x; then
|
||||
MILESTONE=internal
|
||||
fi
|
||||
|
||||
@ -29247,6 +29248,12 @@ fi
|
||||
fi
|
||||
|
||||
|
||||
# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
|
||||
# this doesn't make sense so we remove it.
|
||||
if test "x$COMPILE_TYPE" = xcross; then
|
||||
X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
|
||||
fi
|
||||
|
||||
if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
|
||||
|
||||
# Print a helpful message on how to acquire the necessary build dependency.
|
||||
|
@ -434,6 +434,12 @@ NATIVE2ASCII=@FIXPATH@ $(BOOT_JDK)/bin/native2ascii
|
||||
|
||||
JARSIGNER=@FIXPATH@ $(BOOT_JDK)/bin/jarsigner
|
||||
|
||||
# You run the new javac using the boot jdk with $(BOOT_JDK)/bin/java $(NEW_JAVAC) ...
|
||||
BOOTSTRAP_JAVAC_JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar
|
||||
BOOTSTRAP_JAVAC_ARGS:="-Xbootclasspath/p:$(BOOTSTRAP_JAVAC_JAR)" -cp $(BOOTSTRAP_JAVAC_JAR)
|
||||
NEW_JAVAC = $(BOOTSTRAP_JAVAC_ARGS) com.sun.tools.javac.Main
|
||||
NEW_JAVADOC = $(BOOTSTRAP_JAVAC_ARGS) com.sun.tools.javadoc.Main
|
||||
|
||||
# Base flags for RC
|
||||
# Guarding this against resetting value. Legacy make files include spec multiple
|
||||
# times.
|
||||
|
@ -71,7 +71,7 @@ define add_idl_package
|
||||
$4
|
||||
$(RM) -f $$(addprefix $3/$$($4_TMPDIR)/,$6)
|
||||
$(CP) -rp $3/$$($4_TMPDIR)/* $3
|
||||
($(CD) $3/$$($4_TMPDIR); find . -type f | sed 's!\./!$3/!g' | awk '{ print $$$$1 ": $4" }' > $5)
|
||||
($(CD) $3/$$($4_TMPDIR) && $(FIND) . -type f | $(SED) 's!\./!$3/!g' | $(NAWK) '{ print $$$$1 ": $4" }' > $5)
|
||||
$(RM) -rf $3/$$($4_TMPDIR)
|
||||
endef
|
||||
|
||||
|
@ -42,8 +42,8 @@ endif
|
||||
FALSE_FIND_PATTERN:=-name FILE_NAME_THAT_DOESNT_EXIST
|
||||
|
||||
define SetupJavaCompiler
|
||||
# param 1 is for example BOOT_JAVAC or NEW_JAVAC
|
||||
# This is the name later used to decide which java compiler to use.
|
||||
# param 1 is for example GENERATE_OLD_BYTECODE or GENERATE_NEW_JDKBYTECODE
|
||||
# This is the name of the compiler setup.
|
||||
# param 2-9 are named args.
|
||||
# JVM:=The jvm used to run the javac/javah command
|
||||
# JAVAC:=The javac jar and bootstrap classpath changes, or just bin/javac if JVM is left out
|
||||
@ -143,8 +143,8 @@ define SetupArchive
|
||||
ifneq (,$2)
|
||||
$1_DEPS:=$2
|
||||
else
|
||||
$1_DEPS:=$$(filter $$(addprefix %,$$($1_FIND_PATTERNS)),\
|
||||
$$(call CacheFind $$($1_SRCS)))
|
||||
$1_DEPS:=$$(filter $$(addprefix %,$$($1_SUFFIXES)),\
|
||||
$$(call CacheFind,$$($1_SRCS)))
|
||||
ifneq (,$$($1_GREP_INCLUDE_PATTERNS))
|
||||
$1_DEPS:=$$(filter $$(addsuffix %,$$($1_GREP_INCLUDE_PATTERNS)),$$($1_DEPS))
|
||||
endif
|
||||
@ -487,10 +487,10 @@ define SetupJavaCompilation
|
||||
# Using sjavac to compile.
|
||||
$1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_BIN)/javac_state
|
||||
|
||||
# Create SJAVAC variable,
|
||||
# expects $1_JAVAC to be "bootclasspathprepend -jar ...javac.jar"
|
||||
# and it is rewritten into "bootclasspathprepend com.sun.tools.sjavac.Main"
|
||||
$1_SJAVAC:=$$(word 1,$$($1_JAVAC)) -cp $$(word 3,$$($1_JAVAC)) com.sun.tools.sjavac.Main
|
||||
# Create SJAVAC variable form JAVAC variable. Expects $1_JAVAC to be
|
||||
# "bootclasspathprepend -cp .../javac.jar com.sun.tools.javac.Main"
|
||||
# and javac is simply replaced with sjavac.
|
||||
$1_SJAVAC:=$$(subst com.sun.tools.javac.Main,com.sun.tools.sjavac.Main,$$($1_JAVAC))
|
||||
|
||||
# Set the $1_REMOTE to spawn a background javac server.
|
||||
$1_REMOTE:=--server:portfile=$$($1_SJAVAC_PORTFILE),id=$1,sjavac=$$(subst $$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$($1_SERVER_JVM) $$($1_SJAVAC))))
|
||||
|
@ -179,27 +179,52 @@ jprt_bundle: $(JPRT_ARCHIVE_BUNDLE)
|
||||
$(JPRT_ARCHIVE_BUNDLE): bundles
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
$(CP) $(BUILD_OUTPUT)/bundles/j2sdk-image.zip $@
|
||||
$(CP) $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip $@
|
||||
|
||||
# This target must be called in the context of a SPEC file
|
||||
bundles: all
|
||||
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_BITS),solaris-64)
|
||||
SRC_JDK_IMAGE_DIR := $(JDK_OVERLAY_IMAGE_DIR)
|
||||
SRC_JRE_IMAGE_DIR := $(JRE_OVERLAY_IMAGE_DIR)
|
||||
else
|
||||
SRC_JDK_IMAGE_DIR := $(JDK_IMAGE_DIR)
|
||||
SRC_JRE_IMAGE_DIR := $(JRE_IMAGE_DIR)
|
||||
endif
|
||||
SRC_JDK_BUNDLE_DIR := $(JDK_BUNDLE_DIR)
|
||||
SRC_JRE_BUNDLE_DIR := $(JRE_BUNDLE_DIR)
|
||||
|
||||
# Bundle up the images
|
||||
bundles: all bundles-only
|
||||
bundles-only: start-make
|
||||
@$(call TargetEnter)
|
||||
$(MKDIR) -p $(BUILD_OUTPUT)/bundles
|
||||
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_BITS),solaris-64)
|
||||
$(CD) $(JDK_OVERLAY_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/j2sdk-image.zip .
|
||||
$(CD) $(JRE_OVERLAY_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/j2re-image.zip .
|
||||
else
|
||||
$(CD) $(JDK_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/j2sdk-image.zip .
|
||||
$(CD) $(JRE_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/j2re-image.zip .
|
||||
$(CD) $(SRC_JDK_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip .
|
||||
$(CD) $(SRC_JRE_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/$(JRE_IMAGE_SUBDIR).zip .
|
||||
if [ -d $(BUILD_OUTPUT)/install/bundles ] ; then \
|
||||
$(CD) $(BUILD_OUTPUT)/install/bundles && $(ZIP) -q -r $(JPRT_ARCHIVE_INSTALL_BUNDLE) . ; \
|
||||
fi
|
||||
@$(call TargetExit)
|
||||
|
||||
# Copy images to one unified location regardless of platform etc.
|
||||
final-images: all final-images-only
|
||||
final-images-only: start-make
|
||||
@$(call TargetEnter)
|
||||
$(RM) -r $(BUILD_OUTPUT)/final-images
|
||||
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR)
|
||||
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR)
|
||||
$(CP) -R -P $(SRC_JDK_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR)/
|
||||
$(CP) -R -P $(SRC_JRE_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR)/
|
||||
ifeq ($(OPENJDK_TARGET_OS),macosx)
|
||||
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR)
|
||||
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR)
|
||||
$(CP) -R -P $(SRC_JDK_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR)/
|
||||
$(CP) -R -P $(SRC_JRE_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR)/
|
||||
endif
|
||||
@$(call TargetExit)
|
||||
|
||||
|
||||
# Keep track of phony targets
|
||||
PHONY_LIST += jprt_build_product jprt_build_fastdebug jprt_build_debug \
|
||||
jprt_build_generic bundles jprt_bundle
|
||||
jprt_build_generic bundles jprt_bundle \
|
||||
final-images final-images-only
|
||||
|
||||
###########################################################################
|
||||
# Phony targets
|
||||
|
@ -75,7 +75,14 @@ ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_BITS),solaris-64)
|
||||
all: overlay-images
|
||||
endif
|
||||
|
||||
start-make:
|
||||
# Setup a rule for SPEC file that fails if executed. This check makes sure the configuration
|
||||
# is up to date after changes to configure
|
||||
$(SPEC): $(wildcard $(SRC_ROOT)/common/autoconf/*)
|
||||
@$(ECHO) ERROR: $(SPEC) is not up to date
|
||||
@$(ECHO) Please rerun configure!
|
||||
@if test "x$(IGNORE_OLD_CONFIG)" != "xtrue"; then exit 1; fi
|
||||
|
||||
start-make: $(SPEC)
|
||||
@$(call AtMakeStart)
|
||||
|
||||
langtools: langtools-only
|
||||
|
@ -46,14 +46,11 @@ HOTSPOT_DOCS_IMPORT_PATH=$(HOTSPOT_OUTPUTDIR)/docs
|
||||
|
||||
BUILD_NUMBER=$(JDK_BUILD_NUMBER)
|
||||
|
||||
BOOT_JAVA_CMD=$(JAVA)
|
||||
|
||||
JAVADOC_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/javadoc.jar
|
||||
JAVADOC_CMD = $(BOOT_JAVA_CMD) \
|
||||
JAVADOC_CMD = $(JAVA) \
|
||||
-Xmx1024m \
|
||||
-Djava.awt.headless=true \
|
||||
"-Xbootclasspath/p:$(JAVADOC_JAR)" \
|
||||
-jar $(JAVADOC_JAR) -bootclasspath $(JDK_OUTPUTDIR)/classes
|
||||
$(NEW_JAVADOC) \
|
||||
-bootclasspath $(JDK_OUTPUTDIR)/classes
|
||||
|
||||
# Copyright year for beginning of Java and some of the apis
|
||||
# (Needed when creating the javadocs)
|
||||
|
@ -196,3 +196,5 @@ d54dc53e223ed9ce7d5f4d2cd02ad9d5def3c2db jdk8-b59
|
||||
cb40427f47145b01b7e53c3e02b38ff7625efbda jdk8-b72
|
||||
191afde59e7be0e1a1d76d06f2a32ff17444f0ec jdk8-b73
|
||||
2132845cf5f717ff5c240a2431c0c0e03e66e3a5 jdk8-b74
|
||||
d4e68ce17795601017ac2f952baad7272942c36e jdk8-b75
|
||||
58be6ca3c0603882a1ec478724e337aac85e0da0 jdk8-b76
|
||||
|
@ -35,8 +35,6 @@ include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
include IdlCompilation.gmk
|
||||
|
||||
JAVAC_JARS ?= "-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" \
|
||||
-jar $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar
|
||||
# The Corba sources are old and generates a LOT of warnings.
|
||||
# Disable these using Xlint, until someone cares to fix them.
|
||||
DISABLE_CORBA_WARNINGS:=-Xlint:all,-deprecation,-unchecked,-serial,-fallthrough,-cast,-rawtypes,-static,-dep-ann
|
||||
@ -46,7 +44,7 @@ DISABLE_CORBA_WARNINGS:=-Xlint:all,-deprecation,-unchecked,-serial,-fallthrough,
|
||||
# Thus we force the target bytecode to the boot jdk bytecode.
|
||||
$(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE,\
|
||||
JVM:=$(JAVA),\
|
||||
JAVAC:=$(JAVAC_JARS),\
|
||||
JAVAC:=$(NEW_JAVAC),\
|
||||
FLAGS:=$(BOOT_JDK_SOURCETARGET) -bootclasspath $(BOOT_RTJAR) $(DISABLE_CORBA_WARNINGS),\
|
||||
SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
|
||||
SERVER_JVM:=$(SJAVAC_SERVER_JAVA)))
|
||||
@ -56,7 +54,7 @@ $(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE,\
|
||||
# cannot necessarily be run with the boot jdk.
|
||||
$(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE,\
|
||||
JVM:=$(JAVA),\
|
||||
JAVAC:=$(JAVAC_JARS),\
|
||||
JAVAC:=$(NEW_JAVAC),\
|
||||
FLAGS:=-cp $(BOOT_TOOLSJAR) -XDignore.symbol.file=true $(DISABLE_CORBA_WARNINGS),\
|
||||
SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
|
||||
SERVER_JVM:=$(SJAVAC_SERVER_JAVA)))
|
||||
|
@ -311,3 +311,6 @@ d5cb5830f570d1304ea4b196dde672a291b55f29 jdk8-b72
|
||||
70c89bd6b895a10d25ca70e08093c09ff2005fda hs25-b16
|
||||
1a3e54283c54aaa8b3437813e8507fbdc966e5b6 jdk8-b74
|
||||
b4391649e91ea8d37f66317a03d6d2573a93d10d hs25-b17
|
||||
6778d0b1659323a506ca47600ca29a9d9f8b383d jdk8-b75
|
||||
20b605466ccb1b3725eb25314d9e8782199630c5 jdk8-b76
|
||||
412d722168bc23f8e6d98995202728678561417f hs25-b18
|
||||
|
@ -280,7 +280,7 @@ JNIEXPORT jbyteArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
|
||||
return (err == PS_OK)? array : 0;
|
||||
}
|
||||
|
||||
#if defined(i386) || defined(ia64) || defined(amd64) || defined(sparc) || defined(sparcv9)
|
||||
#if defined(i386) || defined(amd64) || defined(sparc) || defined(sparcv9)
|
||||
JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_getThreadIntegerRegisterSet0
|
||||
(JNIEnv *env, jobject this_obj, jint lwp_id) {
|
||||
|
||||
@ -299,9 +299,6 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
|
||||
#ifdef i386
|
||||
#define NPRGREG sun_jvm_hotspot_debugger_x86_X86ThreadContext_NPRGREG
|
||||
#endif
|
||||
#ifdef ia64
|
||||
#define NPRGREG IA64_REG_COUNT
|
||||
#endif
|
||||
#ifdef amd64
|
||||
#define NPRGREG sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext_NPRGREG
|
||||
#endif
|
||||
@ -336,13 +333,6 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
|
||||
|
||||
#endif /* i386 */
|
||||
|
||||
#if ia64
|
||||
regs = (*env)->GetLongArrayElements(env, array, &isCopy);
|
||||
for (i = 0; i < NPRGREG; i++ ) {
|
||||
regs[i] = 0xDEADDEAD;
|
||||
}
|
||||
#endif /* ia64 */
|
||||
|
||||
#ifdef amd64
|
||||
#define REG_INDEX(reg) sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext_##reg
|
||||
|
||||
|
@ -79,14 +79,6 @@ combination of ptrace and /proc calls.
|
||||
|
||||
*************************************************************************************/
|
||||
|
||||
#ifdef ia64
|
||||
struct user_regs_struct {
|
||||
/* copied from user.h which doesn't define this in a struct */
|
||||
|
||||
#define IA64_REG_COUNT (EF_SIZE/8+32) /* integer and fp regs */
|
||||
unsigned long regs[IA64_REG_COUNT]; /* integer and fp regs */
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(sparc) || defined(sparcv9)
|
||||
#define user_regs_struct pt_regs
|
||||
|
@ -27,10 +27,7 @@
|
||||
|
||||
#include "sun_jvm_hotspot_debugger_windbg_WindbgDebuggerLocal.h"
|
||||
|
||||
#ifdef _M_IA64
|
||||
#include "sun_jvm_hotspot_debugger_ia64_IA64ThreadContext.h"
|
||||
#define NPRGREG sun_jvm_hotspot_debugger_ia64_IA64ThreadContext_NPRGREG
|
||||
#elif _M_IX86
|
||||
#ifdef _M_IX86
|
||||
#include "sun_jvm_hotspot_debugger_x86_X86ThreadContext.h"
|
||||
#define NPRGREG sun_jvm_hotspot_debugger_x86_X86ThreadContext_NPRGREG
|
||||
#elif _M_AMD64
|
||||
@ -491,92 +488,7 @@ static bool addThreads(JNIEnv* env, jobject obj) {
|
||||
memset(&context, 0, sizeof(CONTEXT));
|
||||
|
||||
#undef REG_INDEX
|
||||
#ifdef _M_IA64
|
||||
#define REG_INDEX(x) sun_jvm_hotspot_debugger_ia64_IA64ThreadContext_##x
|
||||
|
||||
context.ContextFlags = CONTEXT_FULL | CONTEXT_DEBUG;
|
||||
ptrIDebugAdvanced->GetThreadContext(&context, sizeof(CONTEXT));
|
||||
|
||||
ptrRegs[REG_INDEX(GR0)] = 0; // always 0
|
||||
ptrRegs[REG_INDEX(GR1)] = context.IntGp; // r1
|
||||
ptrRegs[REG_INDEX(GR2)] = context.IntT0; // r2-r3
|
||||
ptrRegs[REG_INDEX(GR3)] = context.IntT1;
|
||||
ptrRegs[REG_INDEX(GR4)] = context.IntS0; // r4-r7
|
||||
ptrRegs[REG_INDEX(GR5)] = context.IntS1;
|
||||
ptrRegs[REG_INDEX(GR6)] = context.IntS2;
|
||||
ptrRegs[REG_INDEX(GR7)] = context.IntS3;
|
||||
ptrRegs[REG_INDEX(GR8)] = context.IntV0; // r8
|
||||
ptrRegs[REG_INDEX(GR9)] = context.IntT2; // r9-r11
|
||||
ptrRegs[REG_INDEX(GR10)] = context.IntT3;
|
||||
ptrRegs[REG_INDEX(GR11)] = context.IntT4;
|
||||
ptrRegs[REG_INDEX(GR12)] = context.IntSp; // r12 stack pointer
|
||||
ptrRegs[REG_INDEX(GR13)] = context.IntTeb; // r13 teb
|
||||
ptrRegs[REG_INDEX(GR14)] = context.IntT5; // r14-r31
|
||||
ptrRegs[REG_INDEX(GR15)] = context.IntT6;
|
||||
ptrRegs[REG_INDEX(GR16)] = context.IntT7;
|
||||
ptrRegs[REG_INDEX(GR17)] = context.IntT8;
|
||||
ptrRegs[REG_INDEX(GR18)] = context.IntT9;
|
||||
ptrRegs[REG_INDEX(GR19)] = context.IntT10;
|
||||
ptrRegs[REG_INDEX(GR20)] = context.IntT11;
|
||||
ptrRegs[REG_INDEX(GR21)] = context.IntT12;
|
||||
ptrRegs[REG_INDEX(GR22)] = context.IntT13;
|
||||
ptrRegs[REG_INDEX(GR23)] = context.IntT14;
|
||||
ptrRegs[REG_INDEX(GR24)] = context.IntT15;
|
||||
ptrRegs[REG_INDEX(GR25)] = context.IntT16;
|
||||
ptrRegs[REG_INDEX(GR26)] = context.IntT17;
|
||||
ptrRegs[REG_INDEX(GR27)] = context.IntT18;
|
||||
ptrRegs[REG_INDEX(GR28)] = context.IntT19;
|
||||
ptrRegs[REG_INDEX(GR29)] = context.IntT20;
|
||||
ptrRegs[REG_INDEX(GR30)] = context.IntT21;
|
||||
ptrRegs[REG_INDEX(GR31)] = context.IntT22;
|
||||
|
||||
ptrRegs[REG_INDEX(INT_NATS)] = context.IntNats;
|
||||
ptrRegs[REG_INDEX(PREDS)] = context.Preds;
|
||||
|
||||
ptrRegs[REG_INDEX(BR_RP)] = context.BrRp;
|
||||
ptrRegs[REG_INDEX(BR1)] = context.BrS0; // b1-b5
|
||||
ptrRegs[REG_INDEX(BR2)] = context.BrS1;
|
||||
ptrRegs[REG_INDEX(BR3)] = context.BrS2;
|
||||
ptrRegs[REG_INDEX(BR4)] = context.BrS3;
|
||||
ptrRegs[REG_INDEX(BR5)] = context.BrS4;
|
||||
ptrRegs[REG_INDEX(BR6)] = context.BrT0; // b6-b7
|
||||
ptrRegs[REG_INDEX(BR7)] = context.BrT1;
|
||||
|
||||
ptrRegs[REG_INDEX(AP_UNAT)] = context.ApUNAT;
|
||||
ptrRegs[REG_INDEX(AP_LC)] = context.ApLC;
|
||||
ptrRegs[REG_INDEX(AP_EC)] = context.ApEC;
|
||||
ptrRegs[REG_INDEX(AP_CCV)] = context.ApCCV;
|
||||
ptrRegs[REG_INDEX(AP_DCR)] = context.ApDCR;
|
||||
|
||||
ptrRegs[REG_INDEX(RS_PFS)] = context.RsPFS;
|
||||
ptrRegs[REG_INDEX(RS_BSP)] = context.RsBSP;
|
||||
ptrRegs[REG_INDEX(RS_BSPSTORE)] = context.RsBSPSTORE;
|
||||
ptrRegs[REG_INDEX(RS_RSC)] = context.RsRSC;
|
||||
ptrRegs[REG_INDEX(RS_RNAT)] = context.RsRNAT;
|
||||
|
||||
ptrRegs[REG_INDEX(ST_IPSR)] = context.StIPSR;
|
||||
ptrRegs[REG_INDEX(ST_IIP)] = context.StIIP;
|
||||
ptrRegs[REG_INDEX(ST_IFS)] = context.StIFS;
|
||||
|
||||
ptrRegs[REG_INDEX(DB_I0)] = context.DbI0;
|
||||
ptrRegs[REG_INDEX(DB_I1)] = context.DbI1;
|
||||
ptrRegs[REG_INDEX(DB_I2)] = context.DbI2;
|
||||
ptrRegs[REG_INDEX(DB_I3)] = context.DbI3;
|
||||
ptrRegs[REG_INDEX(DB_I4)] = context.DbI4;
|
||||
ptrRegs[REG_INDEX(DB_I5)] = context.DbI5;
|
||||
ptrRegs[REG_INDEX(DB_I6)] = context.DbI6;
|
||||
ptrRegs[REG_INDEX(DB_I7)] = context.DbI7;
|
||||
|
||||
ptrRegs[REG_INDEX(DB_D0)] = context.DbD0;
|
||||
ptrRegs[REG_INDEX(DB_D1)] = context.DbD1;
|
||||
ptrRegs[REG_INDEX(DB_D2)] = context.DbD2;
|
||||
ptrRegs[REG_INDEX(DB_D3)] = context.DbD3;
|
||||
ptrRegs[REG_INDEX(DB_D4)] = context.DbD4;
|
||||
ptrRegs[REG_INDEX(DB_D5)] = context.DbD5;
|
||||
ptrRegs[REG_INDEX(DB_D6)] = context.DbD6;
|
||||
ptrRegs[REG_INDEX(DB_D7)] = context.DbD7;
|
||||
|
||||
#elif _M_IX86
|
||||
#ifdef _M_IX86
|
||||
#define REG_INDEX(x) sun_jvm_hotspot_debugger_x86_X86ThreadContext_##x
|
||||
|
||||
context.ContextFlags = CONTEXT_FULL | CONTEXT_DEBUG_REGISTERS;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2013, 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
|
||||
@ -34,21 +34,11 @@ class WindbgAMD64Thread implements ThreadProxy {
|
||||
private boolean gotID;
|
||||
private long id;
|
||||
|
||||
/** The address argument must be the address of the HANDLE of the
|
||||
desired thread in the target process. */
|
||||
// The address argument must be the address of the OSThread::_thread_id
|
||||
WindbgAMD64Thread(WindbgDebugger debugger, Address addr) {
|
||||
this.debugger = debugger;
|
||||
// FIXME: size of data fetched here should be configurable.
|
||||
// However, making it so would produce a dependency on the "types"
|
||||
// package from the debugger package, which is not desired.
|
||||
|
||||
// another hack here is that we use sys thread id instead of handle.
|
||||
// windbg can't get details based on handles it seems.
|
||||
// I assume that osThread_win32 thread struct has _thread_id (which
|
||||
// sys thread id) just after handle field.
|
||||
|
||||
this.sysId = (int) addr.addOffsetTo(debugger.getAddressSize()).getCIntegerAt(0, 4, true);
|
||||
gotID = false;
|
||||
this.sysId = (long)addr.getCIntegerAt(0, 4, true);
|
||||
gotID = false;
|
||||
}
|
||||
|
||||
WindbgAMD64Thread(WindbgDebugger debugger, long sysId) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2013, 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
|
||||
@ -34,21 +34,11 @@ class WindbgX86Thread implements ThreadProxy {
|
||||
private boolean gotID;
|
||||
private long id;
|
||||
|
||||
/** The address argument must be the address of the HANDLE of the
|
||||
desired thread in the target process. */
|
||||
// The address argument must be the address of OSThread::_thread_id
|
||||
WindbgX86Thread(WindbgDebugger debugger, Address addr) {
|
||||
this.debugger = debugger;
|
||||
// FIXME: size of data fetched here should be configurable.
|
||||
// However, making it so would produce a dependency on the "types"
|
||||
// package from the debugger package, which is not desired.
|
||||
|
||||
// another hack here is that we use sys thread id instead of handle.
|
||||
// windbg can't get details based on handles it seems.
|
||||
// I assume that osThread_win32 thread struct has _thread_id (which
|
||||
// sys thread id) just after handle field.
|
||||
|
||||
this.sysId = (int) addr.addOffsetTo(debugger.getAddressSize()).getCIntegerAt(0, 4, true);
|
||||
gotID = false;
|
||||
this.sysId = (long)addr.getCIntegerAt(0, 4, true);
|
||||
gotID = false;
|
||||
}
|
||||
|
||||
WindbgX86Thread(WindbgDebugger debugger, long sysId) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* @(#)BinaryTreeDictionary.java
|
||||
* Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2013, 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
|
||||
@ -30,7 +30,7 @@ import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
|
||||
public class BinaryTreeDictionary extends VMObject {
|
||||
public class AFLBinaryTreeDictionary extends VMObject {
|
||||
static {
|
||||
VM.registerVMInitializedObserver(new Observer() {
|
||||
public void update(Observable o, Object data) {
|
||||
@ -40,8 +40,8 @@ public class BinaryTreeDictionary extends VMObject {
|
||||
}
|
||||
|
||||
private static synchronized void initialize(TypeDataBase db) {
|
||||
Type type = db.lookupType("BinaryTreeDictionary");
|
||||
totalSizeField = type.getCIntegerField("_totalSize");
|
||||
Type type = db.lookupType("AFLBinaryTreeDictionary");
|
||||
totalSizeField = type.getCIntegerField("_total_size");
|
||||
}
|
||||
|
||||
// Fields
|
||||
@ -53,7 +53,7 @@ public class BinaryTreeDictionary extends VMObject {
|
||||
}
|
||||
|
||||
// Constructor
|
||||
public BinaryTreeDictionary(Address addr) {
|
||||
public AFLBinaryTreeDictionary(Address addr) {
|
||||
super(addr);
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2013, 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
|
||||
@ -117,9 +117,9 @@ public class CompactibleFreeListSpace extends CompactibleSpace {
|
||||
}
|
||||
|
||||
// large block
|
||||
BinaryTreeDictionary bfbd = (BinaryTreeDictionary) VMObjectFactory.newObject(BinaryTreeDictionary.class,
|
||||
AFLBinaryTreeDictionary aflbd = (AFLBinaryTreeDictionary) VMObjectFactory.newObject(AFLBinaryTreeDictionary.class,
|
||||
dictionaryField.getValue(addr));
|
||||
size += bfbd.size();
|
||||
size += aflbd.size();
|
||||
|
||||
|
||||
// linear block in TLAB
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @(#)FreeList.java
|
||||
*
|
||||
* Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2013, 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
|
||||
@ -41,7 +41,7 @@ public class FreeList extends VMObject {
|
||||
}
|
||||
|
||||
private static synchronized void initialize(TypeDataBase db) {
|
||||
Type type = db.lookupType("FreeList");
|
||||
Type type = db.lookupType("FreeList<FreeChunk>");
|
||||
sizeField = type.getCIntegerField("_size");
|
||||
countField = type.getCIntegerField("_count");
|
||||
headerSize = type.getSize();
|
||||
|
@ -467,7 +467,7 @@ public class ObjectHeap {
|
||||
liveRegions.add(tlab.start());
|
||||
liveRegions.add(tlab.start());
|
||||
liveRegions.add(tlab.top());
|
||||
liveRegions.add(tlab.end());
|
||||
liveRegions.add(tlab.hardEnd());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 2013, 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
|
||||
@ -32,6 +32,7 @@ import sun.jvm.hotspot.types.*;
|
||||
// to the sys_thread_t structure of the classic JVM implementation.
|
||||
public class OSThread extends VMObject {
|
||||
private static JIntField interruptedField;
|
||||
private static JIntField threadIdField;
|
||||
static {
|
||||
VM.registerVMInitializedObserver(new Observer() {
|
||||
public void update(Observable o, Object data) {
|
||||
@ -43,6 +44,7 @@ public class OSThread extends VMObject {
|
||||
private static synchronized void initialize(TypeDataBase db) {
|
||||
Type type = db.lookupType("OSThread");
|
||||
interruptedField = type.getJIntField("_interrupted");
|
||||
threadIdField = type.getJIntField("_thread_id");
|
||||
}
|
||||
|
||||
public OSThread(Address addr) {
|
||||
@ -52,4 +54,9 @@ public class OSThread extends VMObject {
|
||||
public boolean interrupted() {
|
||||
return ((int)interruptedField.getValue(addr)) != 0;
|
||||
}
|
||||
|
||||
public int threadId() {
|
||||
return (int)threadIdField.getValue(addr);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ package sun.jvm.hotspot.runtime;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.oops.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
|
||||
/** <P> ThreadLocalAllocBuffer: a descriptor for thread-local storage
|
||||
@ -62,9 +63,22 @@ public class ThreadLocalAllocBuffer extends VMObject {
|
||||
super(addr);
|
||||
}
|
||||
|
||||
public Address start() { return startField.getValue(addr); }
|
||||
public Address end() { return endField.getValue(addr); }
|
||||
public Address top() { return topField.getValue(addr); }
|
||||
public Address start() { return startField.getValue(addr); }
|
||||
public Address end() { return endField.getValue(addr); }
|
||||
public Address top() { return topField.getValue(addr); }
|
||||
public Address hardEnd() { return end().addOffsetTo(alignmentReserve()); }
|
||||
|
||||
private long alignmentReserve() {
|
||||
return Oop.alignObjectSize(endReserve());
|
||||
}
|
||||
|
||||
private long endReserve() {
|
||||
long minFillerArraySize = Array.baseOffsetInBytes(BasicType.T_INT);
|
||||
long reserveForAllocationPrefetch = VM.getVM().getReserveForAllocationPrefetch();
|
||||
long heapWordSize = VM.getVM().getHeapWordSize();
|
||||
|
||||
return Math.max(minFillerArraySize, reserveForAllocationPrefetch * heapWordSize);
|
||||
}
|
||||
|
||||
/** Support for iteration over heap -- not sure how this will
|
||||
interact with GC in reflective system, but necessary for the
|
||||
|
@ -114,6 +114,7 @@ public class VM {
|
||||
private int invalidOSREntryBCI;
|
||||
private ReversePtrs revPtrs;
|
||||
private VMRegImpl vmregImpl;
|
||||
private int reserveForAllocationPrefetch;
|
||||
|
||||
// System.getProperties from debuggee VM
|
||||
private Properties sysProps;
|
||||
@ -293,6 +294,10 @@ public class VM {
|
||||
vmRelease = CStringUtilities.getString(releaseAddr);
|
||||
Address vmInternalInfoAddr = vmVersion.getAddressField("_s_internal_vm_info_string").getValue();
|
||||
vmInternalInfo = CStringUtilities.getString(vmInternalInfoAddr);
|
||||
|
||||
CIntegerType intType = (CIntegerType) db.lookupType("int");
|
||||
CIntegerField reserveForAllocationPrefetchField = vmVersion.getCIntegerField("_reserve_for_allocation_prefetch");
|
||||
reserveForAllocationPrefetch = (int)reserveForAllocationPrefetchField.getCInteger(intType);
|
||||
} catch (Exception exp) {
|
||||
throw new RuntimeException("can't determine target's VM version : " + exp.getMessage());
|
||||
}
|
||||
@ -778,6 +783,10 @@ public class VM {
|
||||
return vmInternalInfo;
|
||||
}
|
||||
|
||||
public int getReserveForAllocationPrefetch() {
|
||||
return reserveForAllocationPrefetch;
|
||||
}
|
||||
|
||||
public boolean isSharingEnabled() {
|
||||
if (sharingEnabled == null) {
|
||||
Flag flag = getCommandLineFlag("UseSharedSpaces");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2013, 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
|
||||
@ -43,7 +43,7 @@ public class Win32AMD64JavaThreadPDAccess implements JavaThreadPDAccess {
|
||||
private static AddressField osThreadField;
|
||||
|
||||
// Field from OSThread
|
||||
private static Field osThreadThreadHandleField;
|
||||
private static Field osThreadThreadIdField;
|
||||
|
||||
// This is currently unneeded but is being kept in case we change
|
||||
// the currentFrameGuess algorithm
|
||||
@ -64,7 +64,7 @@ public class Win32AMD64JavaThreadPDAccess implements JavaThreadPDAccess {
|
||||
osThreadField = type.getAddressField("_osthread");
|
||||
|
||||
type = db.lookupType("OSThread");
|
||||
osThreadThreadHandleField = type.getField("_thread_handle");
|
||||
osThreadThreadIdField = type.getField("_thread_id");
|
||||
}
|
||||
|
||||
public Address getLastJavaFP(Address addr) {
|
||||
@ -128,10 +128,10 @@ public class Win32AMD64JavaThreadPDAccess implements JavaThreadPDAccess {
|
||||
// Fetch the OSThread (for now and for simplicity, not making a
|
||||
// separate "OSThread" class in this package)
|
||||
Address osThreadAddr = osThreadField.getValue(addr);
|
||||
// Get the address of the HANDLE within the OSThread
|
||||
Address threadHandleAddr =
|
||||
osThreadAddr.addOffsetTo(osThreadThreadHandleField.getOffset());
|
||||
// Get the address of the thread_id within the OSThread
|
||||
Address threadIdAddr =
|
||||
osThreadAddr.addOffsetTo(osThreadThreadIdField.getOffset());
|
||||
JVMDebugger debugger = VM.getVM().getDebugger();
|
||||
return debugger.getThreadForIdentifierAddress(threadHandleAddr);
|
||||
return debugger.getThreadForIdentifierAddress(threadIdAddr);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2013, 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
|
||||
@ -42,7 +42,7 @@ public class Win32X86JavaThreadPDAccess implements JavaThreadPDAccess {
|
||||
private static AddressField osThreadField;
|
||||
|
||||
// Field from OSThread
|
||||
private static Field osThreadThreadHandleField;
|
||||
private static Field osThreadThreadIdField;
|
||||
|
||||
// This is currently unneeded but is being kept in case we change
|
||||
// the currentFrameGuess algorithm
|
||||
@ -63,7 +63,7 @@ public class Win32X86JavaThreadPDAccess implements JavaThreadPDAccess {
|
||||
osThreadField = type.getAddressField("_osthread");
|
||||
|
||||
type = db.lookupType("OSThread");
|
||||
osThreadThreadHandleField = type.getField("_thread_handle");
|
||||
osThreadThreadIdField = type.getField("_thread_id");
|
||||
}
|
||||
|
||||
public Address getLastJavaFP(Address addr) {
|
||||
@ -127,10 +127,10 @@ public class Win32X86JavaThreadPDAccess implements JavaThreadPDAccess {
|
||||
// Fetch the OSThread (for now and for simplicity, not making a
|
||||
// separate "OSThread" class in this package)
|
||||
Address osThreadAddr = osThreadField.getValue(addr);
|
||||
// Get the address of the HANDLE within the OSThread
|
||||
Address threadHandleAddr =
|
||||
osThreadAddr.addOffsetTo(osThreadThreadHandleField.getOffset());
|
||||
// Get the address of the thread_id within the OSThread
|
||||
Address threadIdAddr =
|
||||
osThreadAddr.addOffsetTo(osThreadThreadIdField.getOffset());
|
||||
JVMDebugger debugger = VM.getVM().getDebugger();
|
||||
return debugger.getThreadForIdentifierAddress(threadHandleAddr);
|
||||
return debugger.getThreadForIdentifierAddress(threadIdAddr);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2005, 2013, 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
|
||||
@ -87,7 +87,6 @@ endif
|
||||
# Typical C1/C2 targets made available with this Makefile
|
||||
C1_VM_TARGETS=product1 fastdebug1 optimized1 jvmg1
|
||||
C2_VM_TARGETS=product fastdebug optimized jvmg
|
||||
KERNEL_VM_TARGETS=productkernel fastdebugkernel optimizedkernel jvmgkernel
|
||||
ZERO_VM_TARGETS=productzero fastdebugzero optimizedzero jvmgzero
|
||||
SHARK_VM_TARGETS=productshark fastdebugshark optimizedshark jvmgshark
|
||||
MINIMAL1_VM_TARGETS=productminimal1 fastdebugminimal1 jvmgminimal1
|
||||
@ -161,11 +160,6 @@ $(C2_VM_TARGETS):
|
||||
$(CD) $(GAMMADIR)/make; \
|
||||
$(MAKE) BUILD_FLAVOR=$@ VM_TARGET=$@ generic_build2 $(ALT_OUT)
|
||||
|
||||
$(KERNEL_VM_TARGETS):
|
||||
$(CD) $(GAMMADIR)/make; \
|
||||
$(MAKE) BUILD_FLAVOR=$(@:%kernel=%) VM_TARGET=$@ \
|
||||
generic_buildkernel $(ALT_OUT)
|
||||
|
||||
$(ZERO_VM_TARGETS):
|
||||
$(CD) $(GAMMADIR)/make; \
|
||||
$(MAKE) BUILD_FLAVOR=$(@:%zero=%) VM_TARGET=$@ \
|
||||
@ -223,24 +217,6 @@ else
|
||||
$(MAKE_ARGS) $(VM_TARGET)
|
||||
endif
|
||||
|
||||
generic_buildkernel:
|
||||
$(MKDIR) -p $(OUTPUTDIR)
|
||||
ifeq ($(OSNAME),windows)
|
||||
ifeq ($(ARCH_DATA_MODEL), 32)
|
||||
$(CD) $(OUTPUTDIR); \
|
||||
$(NMAKE) -f $(ABS_OS_MAKEFILE) \
|
||||
Variant=kernel \
|
||||
WorkSpace=$(ABS_GAMMADIR) \
|
||||
BootStrapDir=$(ABS_BOOTDIR) \
|
||||
BuildUser=$(USERNAME) \
|
||||
$(MAKE_ARGS) $(VM_TARGET:%kernel=%)
|
||||
else
|
||||
@$(ECHO) "No kernel ($(VM_TARGET)) for ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)"
|
||||
endif
|
||||
else
|
||||
@$(ECHO) "No kernel ($(VM_TARGET)) for OS_NAME=$(OSNAME)"
|
||||
endif
|
||||
|
||||
generic_buildzero:
|
||||
$(MKDIR) -p $(OUTPUTDIR)
|
||||
$(CD) $(OUTPUTDIR); \
|
||||
@ -314,12 +290,10 @@ XUSAGE=$(HS_SRC_DIR)/share/vm/Xusage.txt
|
||||
DOCS_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_docs
|
||||
C1_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler1
|
||||
C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler2
|
||||
KERNEL_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_kernel
|
||||
ZERO_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_zero
|
||||
SHARK_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_shark
|
||||
C1_DIR=$(C1_BASE_DIR)/$(VM_SUBDIR)
|
||||
C2_DIR=$(C2_BASE_DIR)/$(VM_SUBDIR)
|
||||
KERNEL_DIR=$(KERNEL_BASE_DIR)/$(VM_SUBDIR)
|
||||
ZERO_DIR=$(ZERO_BASE_DIR)/$(VM_SUBDIR)
|
||||
SHARK_DIR=$(SHARK_BASE_DIR)/$(VM_SUBDIR)
|
||||
MINIMAL1_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_minimal1
|
||||
@ -333,10 +307,6 @@ ifeq ($(JVM_VARIANT_CLIENT), true)
|
||||
MISC_DIR=$(C1_DIR)
|
||||
GEN_DIR=$(C1_BASE_DIR)/generated
|
||||
endif
|
||||
ifeq ($(JVM_VARIANT_KERNEL), true)
|
||||
MISC_DIR=$(C2_DIR)
|
||||
GEN_DIR=$(C2_BASE_DIR)/generated
|
||||
endif
|
||||
ifeq ($(JVM_VARIANT_ZEROSHARK), true)
|
||||
MISC_DIR=$(SHARK_DIR)
|
||||
GEN_DIR=$(SHARK_BASE_DIR)/generated
|
||||
@ -386,16 +356,6 @@ $(EXPORT_SERVER_DIR)/%.pdb: $(C2_DIR)/%.pdb
|
||||
$(install-file)
|
||||
$(EXPORT_SERVER_DIR)/%.map: $(C2_DIR)/%.map
|
||||
$(install-file)
|
||||
|
||||
# Kernel files always come from kernel area
|
||||
$(EXPORT_KERNEL_DIR)/%.diz: $(KERNEL_DIR)/%.diz
|
||||
$(install-file)
|
||||
$(EXPORT_KERNEL_DIR)/%.dll: $(KERNEL_DIR)/%.dll
|
||||
$(install-file)
|
||||
$(EXPORT_KERNEL_DIR)/%.pdb: $(KERNEL_DIR)/%.pdb
|
||||
$(install-file)
|
||||
$(EXPORT_KERNEL_DIR)/%.map: $(KERNEL_DIR)/%.map
|
||||
$(install-file)
|
||||
endif
|
||||
|
||||
# Minimal JVM files always come from minimal area
|
||||
@ -538,7 +498,7 @@ $(EXPORT_DOCS_DIR)/platform/jvmti/%: $(DOCS_DIR)/%
|
||||
$(install-file)
|
||||
|
||||
# Xusage file
|
||||
$(EXPORT_SERVER_DIR)/Xusage.txt $(EXPORT_CLIENT_DIR)/Xusage.txt $(EXPORT_KERNEL_DIR)/Xusage.txt $(EXPORT_MINIMAL_DIR)/Xusage.txt: $(XUSAGE)
|
||||
$(EXPORT_SERVER_DIR)/Xusage.txt $(EXPORT_CLIENT_DIR)/Xusage.txt $(EXPORT_MINIMAL_DIR)/Xusage.txt: $(XUSAGE)
|
||||
$(prep-target)
|
||||
$(RM) $@.temp
|
||||
$(SED) 's/\(separated by \)[;:]/\1$(PATH_SEP)/g' $< > $@.temp
|
||||
@ -551,7 +511,6 @@ clobber clean: clean_build clean_export clean_jdk
|
||||
clean_build:
|
||||
$(RM) -r $(C1_DIR)
|
||||
$(RM) -r $(C2_DIR)
|
||||
$(RM) -r $(KERNEL_DIR)
|
||||
$(RM) -r $(ZERO_DIR)
|
||||
$(RM) -r $(SHARK_DIR)
|
||||
$(RM) -r $(MINIMAL1_DIR)
|
||||
@ -586,10 +545,6 @@ test_jdk:
|
||||
$(JDK_IMAGE_DIR)/bin/java -d$(ARCH_DATA_MODEL) -server -Xinternalversion
|
||||
$(JDK_IMAGE_DIR)/bin/java -d$(ARCH_DATA_MODEL) -server -version
|
||||
endif
|
||||
ifeq ($(JVM_VARIANT_KERNEL), true)
|
||||
$(JDK_IMAGE_DIR)/bin/java -d$(ARCH_DATA_MODEL) -kernel -Xinternalversion
|
||||
$(JDK_IMAGE_DIR)/bin/java -d$(ARCH_DATA_MODEL) -kernel -version
|
||||
endif
|
||||
|
||||
copy_product_jdk::
|
||||
$(RM) -r $(JDK_IMAGE_DIR)
|
||||
@ -665,7 +620,6 @@ target_help:
|
||||
@$(ECHO) "Other targets are:"
|
||||
@$(ECHO) " $(C1_VM_TARGETS)"
|
||||
@$(ECHO) " $(C2_VM_TARGETS)"
|
||||
@$(ECHO) " $(KERNEL_VM_TARGETS)"
|
||||
@$(ECHO) " $(MINIMAL1_VM_TARGETS)"
|
||||
|
||||
# Variable help (only common ones used by this workspace)
|
||||
@ -761,8 +715,8 @@ endif
|
||||
include $(GAMMADIR)/make/jprt.gmk
|
||||
|
||||
.PHONY: all world clobber clean help $(C1_VM_TARGETS) $(C2_VM_TARGETS) \
|
||||
$(KERNEL_VM_TARGETS) $(MINIMAL1_VM_TARGETS) \
|
||||
generic_build1 generic_build2 generic_buildkernel generic_buildminimal1 generic_export \
|
||||
$(MINIMAL1_VM_TARGETS) \
|
||||
generic_build1 generic_build2 generic_buildminimal1 generic_export \
|
||||
export_product export_fastdebug export_debug export_optimized \
|
||||
export_jdk_product export_jdk_fastdebug export_jdk_debug \
|
||||
create_jdk copy_jdk update_jdk test_jdk \
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2005, 2013, 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
|
||||
@ -25,10 +25,9 @@
|
||||
# Rules to build jvm_db/dtrace, used by vm.make
|
||||
|
||||
# We build libjvm_dtrace/libjvm_db/dtrace for COMPILER1 and COMPILER2
|
||||
# but not for CORE or KERNEL configurations.
|
||||
# but not for CORE configuration.
|
||||
|
||||
ifneq ("${TYPE}", "CORE")
|
||||
ifneq ("${TYPE}", "KERNEL")
|
||||
|
||||
ifeq ($(OS_VENDOR), Darwin)
|
||||
# we build dtrace for macosx using USDT2 probes
|
||||
@ -280,13 +279,6 @@ endif # ifneq ("${dtraceFound}", "")
|
||||
endif # ifeq ($(OS_VENDOR), Darwin)
|
||||
|
||||
|
||||
else # KERNEL build
|
||||
|
||||
dtraceCheck:
|
||||
$(QUIETLY) echo "**NOTICE** Dtrace support disabled for KERNEL builds"
|
||||
|
||||
endif # ifneq ("${TYPE}", "KERNEL")
|
||||
|
||||
else # CORE build
|
||||
|
||||
dtraceCheck:
|
||||
|
@ -188,6 +188,7 @@ SUNWprivate_1.1 {
|
||||
JVM_IsSilentCompiler;
|
||||
JVM_IsSupportedJNIVersion;
|
||||
JVM_IsThreadAlive;
|
||||
JVM_IsVMGeneratedMethodIx;
|
||||
JVM_LatestUserDefinedLoader;
|
||||
JVM_Listen;
|
||||
JVM_LoadClass0;
|
||||
|
@ -188,6 +188,7 @@ SUNWprivate_1.1 {
|
||||
JVM_IsSilentCompiler;
|
||||
JVM_IsSupportedJNIVersion;
|
||||
JVM_IsThreadAlive;
|
||||
JVM_IsVMGeneratedMethodIx;
|
||||
JVM_LatestUserDefinedLoader;
|
||||
JVM_Listen;
|
||||
JVM_LoadClass0;
|
||||
|
@ -30,7 +30,7 @@ INCLUDE_VM_STRUCTS ?= false
|
||||
INCLUDE_JNI_CHECK ?= false
|
||||
INCLUDE_SERVICES ?= false
|
||||
INCLUDE_MANAGEMENT ?= false
|
||||
INCLUDE_ALTERNATE_GCS ?= false
|
||||
INCLUDE_ALL_GCS ?= false
|
||||
INCLUDE_NMT ?= false
|
||||
INCLUDE_CDS ?= false
|
||||
|
||||
|
@ -72,12 +72,10 @@ ifeq ($(INCLUDE_CDS), false)
|
||||
Src_Files_EXCLUDE += metaspaceShared.cpp
|
||||
endif
|
||||
|
||||
ifeq ($(INCLUDE_ALTERNATE_GCS), false)
|
||||
CXXFLAGS += -DINCLUDE_ALTERNATE_GCS=0
|
||||
CFLAGS += -DINCLUDE_ALTERNATE_GCS=0
|
||||
ifeq ($(INCLUDE_ALL_GCS), false)
|
||||
CXXFLAGS += -DINCLUDE_ALL_GCS=0
|
||||
CFLAGS += -DINCLUDE_ALL_GCS=0
|
||||
|
||||
CXXFLAGS += -DSERIALGC
|
||||
CFLAGS += -DSERIALGC
|
||||
Src_Files_EXCLUDE += \
|
||||
cmsAdaptiveSizePolicy.cpp cmsCollectorPolicy.cpp \
|
||||
cmsGCAdaptivePolicyCounters.cpp cmsLockVerifier.cpp cmsPermGen.cpp compactibleFreeListSpace.cpp \
|
||||
|
@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2013
|
||||
|
||||
HS_MAJOR_VER=25
|
||||
HS_MINOR_VER=0
|
||||
HS_BUILD_NUMBER=17
|
||||
HS_BUILD_NUMBER=18
|
||||
|
||||
JDK_MAJOR_VER=1
|
||||
JDK_MINOR_VER=8
|
||||
|
@ -184,6 +184,7 @@ SUNWprivate_1.1 {
|
||||
JVM_IsSilentCompiler;
|
||||
JVM_IsSupportedJNIVersion;
|
||||
JVM_IsThreadAlive;
|
||||
JVM_IsVMGeneratedMethodIx;
|
||||
JVM_LatestUserDefinedLoader;
|
||||
JVM_Listen;
|
||||
JVM_LoadClass0;
|
||||
|
@ -184,6 +184,7 @@ SUNWprivate_1.1 {
|
||||
JVM_IsSilentCompiler;
|
||||
JVM_IsSupportedJNIVersion;
|
||||
JVM_IsThreadAlive;
|
||||
JVM_IsVMGeneratedMethodIx;
|
||||
JVM_LatestUserDefinedLoader;
|
||||
JVM_Listen;
|
||||
JVM_LoadClass0;
|
||||
|
@ -30,7 +30,7 @@ INCLUDE_VM_STRUCTS ?= false
|
||||
INCLUDE_JNI_CHECK ?= false
|
||||
INCLUDE_SERVICES ?= false
|
||||
INCLUDE_MANAGEMENT ?= false
|
||||
INCLUDE_ALTERNATE_GCS ?= false
|
||||
INCLUDE_ALL_GCS ?= false
|
||||
INCLUDE_NMT ?= false
|
||||
INCLUDE_CDS ?= false
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1998, 2013, 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
|
||||
@ -157,13 +157,11 @@ SUBDIRS_C1 = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler1/,$(TARGETS))
|
||||
SUBDIRS_C2 = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler2/,$(TARGETS))
|
||||
SUBDIRS_TIERED = $(addprefix $(OSNAME)_$(BUILDARCH)_tiered/,$(TARGETS))
|
||||
SUBDIRS_CORE = $(addprefix $(OSNAME)_$(BUILDARCH)_core/,$(TARGETS))
|
||||
SUBDIRS_KERNEL = $(addprefix $(OSNAME)_$(BUILDARCH)_kernel/,$(TARGETS))
|
||||
|
||||
TARGETS_C2 = $(TARGETS)
|
||||
TARGETS_C1 = $(addsuffix 1,$(TARGETS))
|
||||
TARGETS_TIERED = $(addsuffix tiered,$(TARGETS))
|
||||
TARGETS_CORE = $(addsuffix core,$(TARGETS))
|
||||
TARGETS_KERNEL = $(addsuffix kernel,$(TARGETS))
|
||||
|
||||
BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make
|
||||
BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) ARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH)
|
||||
@ -229,10 +227,6 @@ $(SUBDIRS_CORE): $(BUILDTREE_MAKE)
|
||||
$(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
|
||||
$(BUILDTREE) VARIANT=core
|
||||
|
||||
$(SUBDIRS_KERNEL): $(BUILDTREE_MAKE)
|
||||
$(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
|
||||
$(BUILDTREE) VARIANT=kernel
|
||||
|
||||
# Define INSTALL=y at command line to automatically copy JVM into JAVA_HOME
|
||||
|
||||
$(TARGETS_C2): $(SUBDIRS_C2)
|
||||
@ -271,20 +265,10 @@ ifdef INSTALL
|
||||
cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) install
|
||||
endif
|
||||
|
||||
$(TARGETS_KERNEL): $(SUBDIRS_KERNEL)
|
||||
cd $(OSNAME)_$(BUILDARCH)_kernel/$(patsubst %kernel,%,$@) && $(MAKE) $(MFLAGS)
|
||||
ifeq ($(TEST_IN_BUILD),true)
|
||||
cd $(OSNAME)_$(BUILDARCH)_kernel/$(patsubst %kernel,%,$@) && ./test_gamma
|
||||
endif
|
||||
ifdef INSTALL
|
||||
cd $(OSNAME)_$(BUILDARCH)_kernel/$(patsubst %kernel,%,$@) && $(MAKE) $(MFLAGS) install
|
||||
endif
|
||||
|
||||
# Just build the tree, and nothing else:
|
||||
tree: $(SUBDIRS_C2)
|
||||
tree1: $(SUBDIRS_C1)
|
||||
treecore: $(SUBDIRS_CORE)
|
||||
treekernel: $(SUBDIRS_KERNEL)
|
||||
|
||||
# Doc target. This is the same for all build options.
|
||||
# Hence create a docs directory beside ...$(ARCH)_[...]
|
||||
@ -304,10 +288,10 @@ core: jvmgcore productcore
|
||||
clean_docs:
|
||||
rm -rf $(SUBDIR_DOCS)
|
||||
|
||||
clean_compiler1 clean_compiler2 clean_core clean_kernel:
|
||||
clean_compiler1 clean_compiler2 clean_core:
|
||||
rm -rf $(OSNAME)_$(BUILDARCH)_$(subst clean_,,$@)
|
||||
|
||||
clean: clean_compiler2 clean_compiler1 clean_core clean_docs clean_kernel
|
||||
clean: clean_compiler2 clean_compiler1 clean_core clean_docs
|
||||
|
||||
include $(GAMMADIR)/make/cscope.make
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2005, 2013, 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
|
||||
@ -25,10 +25,9 @@
|
||||
# Rules to build jvm_db/dtrace, used by vm.make
|
||||
|
||||
# We build libjvm_dtrace/libjvm_db/dtrace for COMPILER1 and COMPILER2
|
||||
# but not for CORE or KERNEL configurations.
|
||||
# but not for CORE configuration.
|
||||
|
||||
ifneq ("${TYPE}", "CORE")
|
||||
ifneq ("${TYPE}", "KERNEL")
|
||||
|
||||
ifdef USE_GCC
|
||||
|
||||
@ -362,13 +361,6 @@ endif # ifneq ("${dtraceFound}", "")
|
||||
|
||||
endif # ifdef USE_GCC
|
||||
|
||||
else # KERNEL build
|
||||
|
||||
dtraceCheck:
|
||||
$(QUIETLY) echo "**NOTICE** Dtrace support disabled for KERNEL builds"
|
||||
|
||||
endif # ifneq ("${TYPE}", "KERNEL")
|
||||
|
||||
else # CORE build
|
||||
|
||||
dtraceCheck:
|
||||
|
@ -1,32 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2007, 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.
|
||||
#
|
||||
#
|
||||
#
|
||||
# Sets make macros for making kernel version of VM.
|
||||
# This target on solaris is just tempoarily for debugging the kernel build.
|
||||
|
||||
TYPE=KERNEL
|
||||
|
||||
VM_SUBDIR = client
|
||||
|
||||
CFLAGS += -DKERNEL
|
@ -184,6 +184,7 @@ SUNWprivate_1.1 {
|
||||
JVM_IsSilentCompiler;
|
||||
JVM_IsSupportedJNIVersion;
|
||||
JVM_IsThreadAlive;
|
||||
JVM_IsVMGeneratedMethodIx;
|
||||
JVM_LatestUserDefinedLoader;
|
||||
JVM_Listen;
|
||||
JVM_LoadClass0;
|
||||
|
@ -1,6 +1,6 @@
|
||||
@echo off
|
||||
REM
|
||||
REM Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
REM Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
REM
|
||||
REM This code is free software; you can redistribute it and/or modify it
|
||||
@ -67,7 +67,6 @@ goto usage
|
||||
|
||||
:test1
|
||||
if "%2" == "core" goto test2
|
||||
if "%2" == "kernel" goto test2
|
||||
if "%2" == "compiler1" goto test2
|
||||
if "%2" == "compiler2" goto test2
|
||||
if "%2" == "tiered" goto test2
|
||||
@ -109,7 +108,7 @@ echo Usage: build flavor version workspace bootstrap_dir [build_id] [windbg_home
|
||||
echo.
|
||||
echo where:
|
||||
echo flavor is "product", "debug" or "fastdebug",
|
||||
echo version is "core", "kernel", "compiler1", "compiler2", or "tiered",
|
||||
echo version is "core", "compiler1", "compiler2", or "tiered",
|
||||
echo workspace is source directory without trailing slash,
|
||||
echo bootstrap_dir is a full path to a JDK in which bin/java
|
||||
echo and bin/javac are present and working, and build_id is an
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2010, 2013, 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,7 +107,6 @@ COMPILER2_PATHS="${COMPILER2_PATHS} ${GENERATED}/adfiles"
|
||||
# Include dirs per type.
|
||||
case "${TYPE}" in
|
||||
"core") Src_Dirs="${CORE_PATHS}" ;;
|
||||
"kernel") Src_Dirs="${BASE_PATHS} ${COMPILER1_PATHS}" ;;
|
||||
"compiler1") Src_Dirs="${CORE_PATHS} ${COMPILER1_PATHS}" ;;
|
||||
"compiler2") Src_Dirs="${CORE_PATHS} ${COMPILER2_PATHS}" ;;
|
||||
"tiered") Src_Dirs="${CORE_PATHS} ${COMPILER1_PATHS} ${COMPILER2_PATHS}" ;;
|
||||
@ -120,16 +119,12 @@ COMPILER1_SPECIFIC_FILES="c1_*"
|
||||
SHARK_SPECIFIC_FILES="shark"
|
||||
ZERO_SPECIFIC_FILES="zero"
|
||||
|
||||
# These files need to be excluded when building the kernel target.
|
||||
KERNEL_EXCLUDED_FILES="attachListener.cpp attachListener_windows.cpp metaspaceShared_${Platform_arch_model}.cpp forte.cpp fprofiler.cpp heapDumper.cpp heapInspection.cpp jniCheck.cpp jvmtiCodeBlobEvents.cpp jvmtiExtensions.cpp jvmtiImpl.cpp jvmtiRawMonitor.cpp jvmtiTagMap.cpp jvmtiTrace.cpp vmStructs.cpp g1MemoryPool.cpp psMemoryPool.cpp gcAdaptivePolicyCounters.cpp concurrentGCThread.cpp metaspaceShared.cpp mutableNUMASpace.cpp allocationStats.cpp gSpaceCounters.cpp immutableSpace.cpp mutableSpace.cpp spaceCounters.cpp yieldingWorkgroup.cpp"
|
||||
|
||||
# Always exclude these.
|
||||
Src_Files_EXCLUDE="jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp"
|
||||
|
||||
# Exclude per type.
|
||||
case "${TYPE}" in
|
||||
"core") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER1_SPECIFIC_FILES} ${COMPILER2_SPECIFIC_FILES} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES} ciTypeFlow.cpp" ;;
|
||||
"kernel") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER2_SPECIFIC_FILES} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES} ${KERNEL_EXCLUDED_FILES} ciTypeFlow.cpp" ;;
|
||||
"compiler1") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER2_SPECIFIC_FILES} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES} ciTypeFlow.cpp" ;;
|
||||
"compiler2") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER1_SPECIFIC_FILES} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES}" ;;
|
||||
"tiered") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES}" ;;
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2006, 2013, 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
|
||||
@ -157,7 +157,7 @@ endif
|
||||
MAKE_ARGS += RM="$(RM)"
|
||||
MAKE_ARGS += ZIPEXE=$(ZIPEXE)
|
||||
|
||||
# On 32 bit windows we build server, client and kernel, on 64 bit just server.
|
||||
# On 32 bit windows we build server and client, on 64 bit just server.
|
||||
ifeq ($(JVM_VARIANTS),)
|
||||
ifeq ($(ARCH_DATA_MODEL), 32)
|
||||
JVM_VARIANTS:=client,server
|
||||
@ -250,7 +250,6 @@ endif
|
||||
|
||||
EXPORT_SERVER_DIR = $(EXPORT_JRE_BIN_DIR)/server
|
||||
EXPORT_CLIENT_DIR = $(EXPORT_JRE_BIN_DIR)/client
|
||||
EXPORT_KERNEL_DIR = $(EXPORT_JRE_BIN_DIR)/kernel
|
||||
|
||||
ifeq ($(JVM_VARIANT_SERVER),true)
|
||||
EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt
|
||||
@ -277,18 +276,6 @@ ifeq ($(JVM_VARIANT_CLIENT),true)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifeq ($(JVM_VARIANT_KERNEL),true)
|
||||
EXPORT_LIST += $(EXPORT_KERNEL_DIR)/Xusage.txt
|
||||
EXPORT_LIST += $(EXPORT_KERNEL_DIR)/jvm.$(LIBRARY_SUFFIX)
|
||||
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||
ifeq ($(ZIP_DEBUGINFO_FILES),1)
|
||||
EXPORT_LIST += $(EXPORT_KERNEL_DIR)/jvm.diz
|
||||
else
|
||||
EXPORT_LIST += $(EXPORT_KERNEL_DIR)/jvm.pdb
|
||||
EXPORT_LIST += $(EXPORT_KERNEL_DIR)/jvm.map
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
EXPORT_LIST += $(EXPORT_JRE_LIB_DIR)/wb.jar
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1999, 2013, 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
|
||||
@ -166,63 +166,6 @@ ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \
|
||||
$(ProjectCreatorIDEOptionsIgnoreCompiler1:TARGET=core) \
|
||||
$(ProjectCreatorIDEOptionsIgnoreCompiler2:TARGET=core)
|
||||
|
||||
##################################################
|
||||
# JKERNEL specific options
|
||||
##################################################
|
||||
ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \
|
||||
-define_kernel KERNEL \
|
||||
$(ProjectCreatorIDEOptionsIgnoreCompiler2:TARGET=kernel) \
|
||||
-ignorePath_kernel src/share/vm/gc_implementation/parallelScavenge \
|
||||
-ignorePath_kernel src/share/vm/gc_implementation/parNew \
|
||||
-ignorePath_kernel src/share/vm/gc_implementation/concurrentMarkSweep \
|
||||
-ignorePath_kernel src/share/vm/gc_implementation/g1 \
|
||||
-ignoreFile_kernel attachListener.cpp \
|
||||
-ignoreFile_kernel attachListener_windows.cpp \
|
||||
-ignoreFile_kernel dump.cpp \
|
||||
-ignoreFile_kernel dump_$(Platform_arch_model).cpp \
|
||||
-ignoreFile_kernel forte.cpp \
|
||||
-ignoreFile_kernel fprofiler.cpp \
|
||||
-ignoreFile_kernel heapDumper.cpp \
|
||||
-ignoreFile_kernel heapInspection.cpp \
|
||||
-ignoreFile_kernel jniCheck.cpp \
|
||||
-ignoreFile_kernel jvmtiCodeBlobEvents.cpp \
|
||||
-ignoreFile_kernel jvmtiExtensions.cpp \
|
||||
-ignoreFile_kernel jvmtiImpl.cpp \
|
||||
-ignoreFile_kernel jvmtiRawMonitor.cpp \
|
||||
-ignoreFile_kernel jvmtiTagMap.cpp \
|
||||
-ignoreFile_kernel jvmtiTrace.cpp \
|
||||
-ignoreFile_kernel jvmtiTrace.hpp \
|
||||
-ignoreFile_kernel restore.cpp \
|
||||
-ignoreFile_kernel serialize.cpp \
|
||||
-ignoreFile_kernel vmStructs.cpp \
|
||||
-ignoreFile_kernel g1MemoryPool.cpp \
|
||||
-ignoreFile_kernel g1MemoryPool.hpp \
|
||||
-ignoreFile_kernel psMemoryPool.cpp \
|
||||
-ignoreFile_kernel psMemoryPool.hpp \
|
||||
-ignoreFile_kernel gcAdaptivePolicyCounters.cpp \
|
||||
-ignoreFile_kernel concurrentGCThread.cpp \
|
||||
-ignoreFile_kernel mutableNUMASpace.cpp \
|
||||
-ignoreFile_kernel ciTypeFlow.cpp \
|
||||
-ignoreFile_kernel ciTypeFlow.hpp \
|
||||
-ignoreFile_kernel oop.pcgc.inline.hpp \
|
||||
-ignoreFile_kernel oop.psgc.inline.hpp \
|
||||
-ignoreFile_kernel allocationStats.cpp \
|
||||
-ignoreFile_kernel allocationStats.hpp \
|
||||
-ignoreFile_kernel concurrentGCThread.hpp \
|
||||
-ignoreFile_kernel gSpaceCounters.cpp \
|
||||
-ignoreFile_kernel gSpaceCounters.hpp \
|
||||
-ignoreFile_kernel gcAdaptivePolicyCounters.hpp \
|
||||
-ignoreFile_kernel immutableSpace.cpp \
|
||||
-ignoreFile_kernel mutableNUMASpace.hpp \
|
||||
-ignoreFile_kernel mutableSpace.cpp \
|
||||
-ignoreFile_kernel spaceCounters.cpp \
|
||||
-ignoreFile_kernel spaceCounters.hpp \
|
||||
-ignoreFile_kernel yieldingWorkgroup.cpp \
|
||||
-ignoreFile_kernel yieldingWorkgroup.hpp \
|
||||
-ignorePath_kernel vmStructs_ \
|
||||
-ignoreFile_kernel $(Platform_arch_model).ad \
|
||||
-additionalFile_kernel gcTaskManager.hpp
|
||||
|
||||
##################################################
|
||||
# Client(C1) compiler specific options
|
||||
##################################################
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1997, 2013, 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
|
||||
@ -44,10 +44,6 @@ CXX_FLAGS=$(CXX_FLAGS) /D "ASSERT"
|
||||
# No need to define anything, CORE is defined as !COMPILER1 && !COMPILER2
|
||||
!endif
|
||||
|
||||
!if "$(Variant)" == "kernel"
|
||||
CXX_FLAGS=$(CXX_FLAGS) /D "KERNEL"
|
||||
!endif
|
||||
|
||||
!if "$(Variant)" == "compiler1"
|
||||
CXX_FLAGS=$(CXX_FLAGS) /D "COMPILER1"
|
||||
!endif
|
||||
|
@ -30,10 +30,11 @@
|
||||
#include "c1/c1_Runtime1.hpp"
|
||||
#include "nativeInst_sparc.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
#include "vmreg_sparc.inline.hpp"
|
||||
#ifndef SERIALGC
|
||||
#if INCLUDE_ALL_GCS
|
||||
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
||||
#endif
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
|
||||
#define __ ce->masm()->
|
||||
|
||||
@ -420,7 +421,7 @@ void ArrayCopyStub::emit_code(LIR_Assembler* ce) {
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef SERIALGC
|
||||
#if INCLUDE_ALL_GCS
|
||||
|
||||
void G1PreBarrierStub::emit_code(LIR_Assembler* ce) {
|
||||
// At this point we know that marking is in progress.
|
||||
@ -483,7 +484,7 @@ void G1PostBarrierStub::emit_code(LIR_Assembler* ce) {
|
||||
__ delayed()->nop();
|
||||
}
|
||||
|
||||
#endif // SERIALGC
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#undef __
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/signature.hpp"
|
||||
#include "runtime/vframeArray.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
#include "vmreg_sparc.inline.hpp"
|
||||
|
||||
// Implementation of StubAssembler
|
||||
@ -822,7 +823,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
||||
}
|
||||
break;
|
||||
|
||||
#ifndef SERIALGC
|
||||
#if INCLUDE_ALL_GCS
|
||||
case g1_pre_barrier_slow_id:
|
||||
{ // G4: previous value of memory
|
||||
BarrierSet* bs = Universe::heap()->barrier_set();
|
||||
@ -984,7 +985,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
||||
__ delayed()->restore();
|
||||
}
|
||||
break;
|
||||
#endif // !SERIALGC
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
|
||||
default:
|
||||
{ __ set_info("unimplemented entry", dont_gc_arguments);
|
||||
|
@ -42,7 +42,7 @@ define_pd_global(bool, ProfileInterpreter, false);
|
||||
#else
|
||||
define_pd_global(bool, ProfileInterpreter, true);
|
||||
#endif // CC_INTERP
|
||||
define_pd_global(bool, TieredCompilation, trueInTiered);
|
||||
define_pd_global(bool, TieredCompilation, false);
|
||||
define_pd_global(intx, CompileThreshold, 10000);
|
||||
define_pd_global(intx, BackEdgeThreshold, 140000);
|
||||
|
||||
|
@ -45,6 +45,7 @@
|
||||
#include "runtime/timer.hpp"
|
||||
#include "runtime/vframeArray.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
#ifdef SHARK
|
||||
#include "shark/shark_globals.hpp"
|
||||
#endif
|
||||
@ -551,7 +552,7 @@ address InterpreterGenerator::generate_accessor_entry(void) {
|
||||
}
|
||||
|
||||
address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||
#ifndef SERIALGC
|
||||
#if INCLUDE_ALL_GCS
|
||||
if (UseG1GC) {
|
||||
// We need to generate have a routine that generates code to:
|
||||
// * load the value in the referent field
|
||||
@ -563,7 +564,7 @@ address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||
// field as live.
|
||||
Unimplemented();
|
||||
}
|
||||
#endif // SERIALGC
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
|
||||
// If G1 is not enabled then attempt to go through the accessor entry point
|
||||
// Reference.get is an accessor
|
||||
|
@ -36,11 +36,12 @@
|
||||
#include "runtime/os.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#ifndef SERIALGC
|
||||
#include "utilities/macros.hpp"
|
||||
#if INCLUDE_ALL_GCS
|
||||
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
||||
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
||||
#include "gc_implementation/g1/heapRegion.hpp"
|
||||
#endif
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
|
||||
#ifdef PRODUCT
|
||||
#define BLOCK_COMMENT(str) /* nothing */
|
||||
@ -3867,7 +3868,7 @@ void MacroAssembler::bang_stack_size(Register Rsize, Register Rtsp,
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef SERIALGC
|
||||
#if INCLUDE_ALL_GCS
|
||||
|
||||
static address satb_log_enqueue_with_frame = NULL;
|
||||
static u_char* satb_log_enqueue_with_frame_end = NULL;
|
||||
@ -4231,7 +4232,7 @@ void MacroAssembler::g1_write_barrier_post(Register store_addr, Register new_val
|
||||
bind(filtered);
|
||||
}
|
||||
|
||||
#endif // SERIALGC
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void MacroAssembler::card_write_barrier_post(Register store_addr, Register new_val, Register tmp) {
|
||||
|
@ -26,6 +26,7 @@
|
||||
#define CPU_SPARC_VM_MACROASSEMBLER_SPARC_HPP
|
||||
|
||||
#include "asm/assembler.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
|
||||
// <sys/trap.h> promises that the system will not use traps 16-31
|
||||
#define ST_RESERVED_FOR_USER_0 0x10
|
||||
@ -1181,13 +1182,13 @@ public:
|
||||
|
||||
void card_write_barrier_post(Register store_addr, Register new_val, Register tmp);
|
||||
|
||||
#ifndef SERIALGC
|
||||
#if INCLUDE_ALL_GCS
|
||||
// General G1 pre-barrier generator.
|
||||
void g1_write_barrier_pre(Register obj, Register index, int offset, Register pre_val, Register tmp, bool preserve_o_regs);
|
||||
|
||||
// General G1 post-barrier generator
|
||||
void g1_write_barrier_post(Register store_addr, Register new_val, Register tmp);
|
||||
#endif // SERIALGC
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
|
||||
// pushes double TOS element of FPU stack on CPU stack; pops from FPU stack
|
||||
void push_fTOS();
|
||||
|
@ -44,6 +44,7 @@
|
||||
#include "runtime/timer.hpp"
|
||||
#include "runtime/vframeArray.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
|
||||
#ifndef CC_INTERP
|
||||
#ifndef FAST_DISPATCH
|
||||
@ -734,7 +735,7 @@ address InterpreterGenerator::generate_accessor_entry(void) {
|
||||
|
||||
// Method entry for java.lang.ref.Reference.get.
|
||||
address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||
#ifndef SERIALGC
|
||||
#if INCLUDE_ALL_GCS
|
||||
// Code: _aload_0, _getfield, _areturn
|
||||
// parameter size = 1
|
||||
//
|
||||
@ -805,7 +806,7 @@ address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||
(void) generate_normal_entry(false);
|
||||
return entry;
|
||||
}
|
||||
#endif // SERIALGC
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
|
||||
// If G1 is not enabled then attempt to go through the accessor entry point
|
||||
// Reference.get is an accessor
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "runtime/synchronizer.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
|
||||
#ifndef CC_INTERP
|
||||
#define __ _masm->
|
||||
@ -53,7 +54,7 @@ static void do_oop_store(InterpreterMacroAssembler* _masm,
|
||||
assert(tmp != val && tmp != base && tmp != index, "register collision");
|
||||
assert(index == noreg || offset == 0, "only one offset");
|
||||
switch (barrier) {
|
||||
#ifndef SERIALGC
|
||||
#if INCLUDE_ALL_GCS
|
||||
case BarrierSet::G1SATBCT:
|
||||
case BarrierSet::G1SATBCTLogging:
|
||||
{
|
||||
@ -82,7 +83,7 @@ static void do_oop_store(InterpreterMacroAssembler* _masm,
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif // SERIALGC
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
case BarrierSet::CardTableModRef:
|
||||
case BarrierSet::CardTableExtension:
|
||||
{
|
||||
|
@ -36,11 +36,12 @@
|
||||
#include "runtime/os.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#ifndef SERIALGC
|
||||
#include "utilities/macros.hpp"
|
||||
#if INCLUDE_ALL_GCS
|
||||
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
||||
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
||||
#include "gc_implementation/g1/heapRegion.hpp"
|
||||
#endif
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
|
||||
#ifdef PRODUCT
|
||||
#define BLOCK_COMMENT(str) /* nothing */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, 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
|
||||
@ -543,7 +543,7 @@ class Assembler : public AbstractAssembler {
|
||||
// of instructions are freely declared without the need for wrapping them an ifdef.
|
||||
// (Some dangerous instructions are ifdef's out of inappropriate jvm's.)
|
||||
// In the .cpp file the implementations are wrapped so that they are dropped out
|
||||
// of the resulting jvm. This is done mostly to keep the footprint of KERNEL
|
||||
// of the resulting jvm. This is done mostly to keep the footprint of MINIMAL
|
||||
// to the size it was prior to merging up the 32bit and 64bit assemblers.
|
||||
//
|
||||
// This does mean you'll get a linker/runtime error if you use a 64bit only instruction
|
||||
|
@ -30,10 +30,11 @@
|
||||
#include "c1/c1_Runtime1.hpp"
|
||||
#include "nativeInst_x86.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
#include "vmreg_x86.inline.hpp"
|
||||
#ifndef SERIALGC
|
||||
#if INCLUDE_ALL_GCS
|
||||
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
||||
#endif
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
|
||||
|
||||
#define __ ce->masm()->
|
||||
@ -482,7 +483,7 @@ void ArrayCopyStub::emit_code(LIR_Assembler* ce) {
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef SERIALGC
|
||||
#if INCLUDE_ALL_GCS
|
||||
|
||||
void G1PreBarrierStub::emit_code(LIR_Assembler* ce) {
|
||||
// At this point we know that marking is in progress.
|
||||
@ -528,7 +529,7 @@ void G1PostBarrierStub::emit_code(LIR_Assembler* ce) {
|
||||
__ jmp(_continuation);
|
||||
}
|
||||
|
||||
#endif // SERIALGC
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#undef __
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/signature.hpp"
|
||||
#include "runtime/vframeArray.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
#include "vmreg_x86.inline.hpp"
|
||||
|
||||
|
||||
@ -1607,7 +1608,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
||||
}
|
||||
break;
|
||||
|
||||
#ifndef SERIALGC
|
||||
#if INCLUDE_ALL_GCS
|
||||
case g1_pre_barrier_slow_id:
|
||||
{
|
||||
StubFrame f(sasm, "g1_pre_barrier", dont_gc_arguments);
|
||||
@ -1804,7 +1805,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
||||
|
||||
}
|
||||
break;
|
||||
#endif // !SERIALGC
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
|
||||
default:
|
||||
{ StubFrame f(sasm, "unimplemented entry", dont_gc_arguments);
|
||||
|
@ -44,7 +44,7 @@ define_pd_global(bool, ProfileInterpreter, false);
|
||||
#else
|
||||
define_pd_global(bool, ProfileInterpreter, true);
|
||||
#endif // CC_INTERP
|
||||
define_pd_global(bool, TieredCompilation, trueInTiered);
|
||||
define_pd_global(bool, TieredCompilation, false);
|
||||
define_pd_global(intx, CompileThreshold, 10000);
|
||||
define_pd_global(intx, BackEdgeThreshold, 100000);
|
||||
|
||||
|
@ -45,6 +45,7 @@
|
||||
#include "runtime/timer.hpp"
|
||||
#include "runtime/vframeArray.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
#ifdef SHARK
|
||||
#include "shark/shark_globals.hpp"
|
||||
#endif
|
||||
@ -938,7 +939,7 @@ address InterpreterGenerator::generate_accessor_entry(void) {
|
||||
}
|
||||
|
||||
address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||
#ifndef SERIALGC
|
||||
#if INCLUDE_ALL_GCS
|
||||
if (UseG1GC) {
|
||||
// We need to generate have a routine that generates code to:
|
||||
// * load the value in the referent field
|
||||
@ -950,7 +951,7 @@ address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||
// field as live.
|
||||
Unimplemented();
|
||||
}
|
||||
#endif // SERIALGC
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
|
||||
// If G1 is not enabled then attempt to go through the accessor entry point
|
||||
// Reference.get is an accessor
|
||||
|
@ -37,11 +37,12 @@
|
||||
#include "runtime/os.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#ifndef SERIALGC
|
||||
#include "utilities/macros.hpp"
|
||||
#if INCLUDE_ALL_GCS
|
||||
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
||||
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
||||
#include "gc_implementation/g1/heapRegion.hpp"
|
||||
#endif
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
|
||||
#ifdef PRODUCT
|
||||
#define BLOCK_COMMENT(str) /* nothing */
|
||||
@ -3207,7 +3208,7 @@ void MacroAssembler::vxorps(XMMRegister dst, XMMRegister nds, AddressLiteral src
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef SERIALGC
|
||||
#if INCLUDE_ALL_GCS
|
||||
|
||||
void MacroAssembler::g1_write_barrier_pre(Register obj,
|
||||
Register pre_val,
|
||||
@ -3417,7 +3418,7 @@ void MacroAssembler::g1_write_barrier_post(Register store_addr,
|
||||
bind(done);
|
||||
}
|
||||
|
||||
#endif // SERIALGC
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
#define CPU_X86_VM_MACROASSEMBLER_X86_HPP
|
||||
|
||||
#include "asm/assembler.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
|
||||
|
||||
// MacroAssembler extends Assembler by frequently used macros.
|
||||
@ -294,7 +295,7 @@ class MacroAssembler: public Assembler {
|
||||
void store_check(Register obj); // store check for obj - register is destroyed afterwards
|
||||
void store_check(Register obj, Address dst); // same as above, dst is exact store location (reg. is destroyed)
|
||||
|
||||
#ifndef SERIALGC
|
||||
#if INCLUDE_ALL_GCS
|
||||
|
||||
void g1_write_barrier_pre(Register obj,
|
||||
Register pre_val,
|
||||
@ -309,7 +310,7 @@ class MacroAssembler: public Assembler {
|
||||
Register tmp,
|
||||
Register tmp2);
|
||||
|
||||
#endif // SERIALGC
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
|
||||
// split store_check(Register obj) to enhance instruction interleaving
|
||||
void store_check_part_1(Register obj);
|
||||
|
@ -44,6 +44,7 @@
|
||||
#include "runtime/timer.hpp"
|
||||
#include "runtime/vframeArray.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
|
||||
#define __ _masm->
|
||||
|
||||
@ -761,7 +762,7 @@ address InterpreterGenerator::generate_accessor_entry(void) {
|
||||
|
||||
// Method entry for java.lang.ref.Reference.get.
|
||||
address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||
#ifndef SERIALGC
|
||||
#if INCLUDE_ALL_GCS
|
||||
// Code: _aload_0, _getfield, _areturn
|
||||
// parameter size = 1
|
||||
//
|
||||
@ -844,7 +845,7 @@ address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||
|
||||
return entry;
|
||||
}
|
||||
#endif // SERIALGC
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
|
||||
// If G1 is not enabled then attempt to go through the accessor entry point
|
||||
// Reference.get is an accessor
|
||||
|
@ -44,6 +44,7 @@
|
||||
#include "runtime/timer.hpp"
|
||||
#include "runtime/vframeArray.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
|
||||
#define __ _masm->
|
||||
|
||||
@ -742,7 +743,7 @@ address InterpreterGenerator::generate_accessor_entry(void) {
|
||||
|
||||
// Method entry for java.lang.ref.Reference.get.
|
||||
address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||
#ifndef SERIALGC
|
||||
#if INCLUDE_ALL_GCS
|
||||
// Code: _aload_0, _getfield, _areturn
|
||||
// parameter size = 1
|
||||
//
|
||||
@ -821,7 +822,7 @@ address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||
|
||||
return entry;
|
||||
}
|
||||
#endif // SERIALGC
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
|
||||
// If G1 is not enabled then attempt to go through the accessor entry point
|
||||
// Reference.get is an accessor
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "runtime/synchronizer.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
|
||||
#ifndef CC_INTERP
|
||||
#define __ _masm->
|
||||
@ -125,7 +126,7 @@ static void do_oop_store(InterpreterMacroAssembler* _masm,
|
||||
bool precise) {
|
||||
assert(val == noreg || val == rax, "parameter is just for looks");
|
||||
switch (barrier) {
|
||||
#ifndef SERIALGC
|
||||
#if INCLUDE_ALL_GCS
|
||||
case BarrierSet::G1SATBCT:
|
||||
case BarrierSet::G1SATBCTLogging:
|
||||
{
|
||||
@ -164,7 +165,7 @@ static void do_oop_store(InterpreterMacroAssembler* _masm,
|
||||
|
||||
}
|
||||
break;
|
||||
#endif // SERIALGC
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
case BarrierSet::CardTableModRef:
|
||||
case BarrierSet::CardTableExtension:
|
||||
{
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "runtime/synchronizer.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
|
||||
#ifndef CC_INTERP
|
||||
|
||||
@ -136,7 +137,7 @@ static void do_oop_store(InterpreterMacroAssembler* _masm,
|
||||
bool precise) {
|
||||
assert(val == noreg || val == rax, "parameter is just for looks");
|
||||
switch (barrier) {
|
||||
#ifndef SERIALGC
|
||||
#if INCLUDE_ALL_GCS
|
||||
case BarrierSet::G1SATBCT:
|
||||
case BarrierSet::G1SATBCTLogging:
|
||||
{
|
||||
@ -167,7 +168,7 @@ static void do_oop_store(InterpreterMacroAssembler* _masm,
|
||||
|
||||
}
|
||||
break;
|
||||
#endif // SERIALGC
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
case BarrierSet::CardTableModRef:
|
||||
case BarrierSet::CardTableExtension:
|
||||
{
|
||||
|
@ -36,11 +36,12 @@
|
||||
#include "runtime/os.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#ifndef SERIALGC
|
||||
#include "utilities/macros.hpp"
|
||||
#if INCLUDE_ALL_GCS
|
||||
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
||||
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
||||
#include "gc_implementation/g1/heapRegion.hpp"
|
||||
#endif
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
|
||||
int AbstractAssembler::code_fill_byte() {
|
||||
return 0;
|
||||
|
@ -47,6 +47,7 @@
|
||||
#include "runtime/vframeArray.hpp"
|
||||
#include "stack_zero.inline.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
#ifdef SHARK
|
||||
#include "shark/shark_globals.hpp"
|
||||
#endif
|
||||
@ -791,7 +792,7 @@ address InterpreterGenerator::generate_accessor_entry() {
|
||||
}
|
||||
|
||||
address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||
#ifndef SERIALGC
|
||||
#if INCLUDE_ALL_GCS
|
||||
if (UseG1GC) {
|
||||
// We need to generate have a routine that generates code to:
|
||||
// * load the value in the referent field
|
||||
@ -803,7 +804,7 @@ address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||
// field as live.
|
||||
Unimplemented();
|
||||
}
|
||||
#endif // SERIALGC
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
|
||||
// If G1 is not enabled then attempt to go through the accessor entry point
|
||||
// Reference.get is an accessor
|
||||
|
@ -1155,13 +1155,9 @@ void os::Linux::capture_initial_stack(size_t max_size) {
|
||||
// for initial thread if its stack size exceeds 6M. Cap it at 2M,
|
||||
// in case other parts in glibc still assumes 2M max stack size.
|
||||
// FIXME: alt signal stack is gone, maybe we can relax this constraint?
|
||||
#ifndef IA64
|
||||
if (stack_size > 2 * K * K) stack_size = 2 * K * K;
|
||||
#else
|
||||
// Problem still exists RH7.2 (IA64 anyway) but 2MB is a little small
|
||||
if (stack_size > 4 * K * K) stack_size = 4 * K * K;
|
||||
#endif
|
||||
|
||||
if (stack_size > 2 * K * K IA64_ONLY(*2))
|
||||
stack_size = 2 * K * K IA64_ONLY(*2);
|
||||
// Try to figure out where the stack base (top) is. This is harder.
|
||||
//
|
||||
// When an application is started, glibc saves the initial stack pointer in
|
||||
@ -4367,16 +4363,12 @@ int os::Linux::safe_cond_timedwait(pthread_cond_t *_cond, pthread_mutex_t *_mute
|
||||
if (is_NPTL()) {
|
||||
return pthread_cond_timedwait(_cond, _mutex, _abstime);
|
||||
} else {
|
||||
#ifndef IA64
|
||||
// 6292965: LinuxThreads pthread_cond_timedwait() resets FPU control
|
||||
// word back to default 64bit precision if condvar is signaled. Java
|
||||
// wants 53bit precision. Save and restore current value.
|
||||
int fpu = get_fpu_control_word();
|
||||
#endif // IA64
|
||||
int status = pthread_cond_timedwait(_cond, _mutex, _abstime);
|
||||
#ifndef IA64
|
||||
set_fpu_control_word(fpu);
|
||||
#endif // IA64
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
@ -349,6 +349,33 @@ address os::current_stack_base() {
|
||||
|
||||
#ifdef _M_IA64
|
||||
// IA64 has memory and register stacks
|
||||
//
|
||||
// This is the stack layout you get on NT/IA64 if you specify 1MB stack limit
|
||||
// at thread creation (1MB backing store growing upwards, 1MB memory stack
|
||||
// growing downwards, 2MB summed up)
|
||||
//
|
||||
// ...
|
||||
// ------- top of stack (high address) -----
|
||||
// |
|
||||
// | 1MB
|
||||
// | Backing Store (Register Stack)
|
||||
// |
|
||||
// | / \
|
||||
// | |
|
||||
// | |
|
||||
// | |
|
||||
// ------------------------ stack base -----
|
||||
// | 1MB
|
||||
// | Memory Stack
|
||||
// |
|
||||
// | |
|
||||
// | |
|
||||
// | |
|
||||
// | \ /
|
||||
// |
|
||||
// ----- bottom of stack (low address) -----
|
||||
// ...
|
||||
|
||||
stack_size = stack_size / 2;
|
||||
#endif
|
||||
return stack_bottom + stack_size;
|
||||
@ -2005,17 +2032,34 @@ LONG Handle_Exception(struct _EXCEPTION_POINTERS* exceptionInfo, address handler
|
||||
JavaThread* thread = JavaThread::current();
|
||||
// Save pc in thread
|
||||
#ifdef _M_IA64
|
||||
thread->set_saved_exception_pc((address)exceptionInfo->ContextRecord->StIIP);
|
||||
// Do not blow up if no thread info available.
|
||||
if (thread) {
|
||||
// Saving PRECISE pc (with slot information) in thread.
|
||||
uint64_t precise_pc = (uint64_t) exceptionInfo->ExceptionRecord->ExceptionAddress;
|
||||
// Convert precise PC into "Unix" format
|
||||
precise_pc = (precise_pc & 0xFFFFFFFFFFFFFFF0) | ((precise_pc & 0xF) >> 2);
|
||||
thread->set_saved_exception_pc((address)precise_pc);
|
||||
}
|
||||
// Set pc to handler
|
||||
exceptionInfo->ContextRecord->StIIP = (DWORD64)handler;
|
||||
// Clear out psr.ri (= Restart Instruction) in order to continue
|
||||
// at the beginning of the target bundle.
|
||||
exceptionInfo->ContextRecord->StIPSR &= 0xFFFFF9FFFFFFFFFF;
|
||||
assert(((DWORD64)handler & 0xF) == 0, "Target address must point to the beginning of a bundle!");
|
||||
#elif _M_AMD64
|
||||
thread->set_saved_exception_pc((address)exceptionInfo->ContextRecord->Rip);
|
||||
// Do not blow up if no thread info available.
|
||||
if (thread) {
|
||||
thread->set_saved_exception_pc((address)(DWORD_PTR)exceptionInfo->ContextRecord->Rip);
|
||||
}
|
||||
// Set pc to handler
|
||||
exceptionInfo->ContextRecord->Rip = (DWORD64)handler;
|
||||
#else
|
||||
thread->set_saved_exception_pc((address)exceptionInfo->ContextRecord->Eip);
|
||||
// Do not blow up if no thread info available.
|
||||
if (thread) {
|
||||
thread->set_saved_exception_pc((address)(DWORD_PTR)exceptionInfo->ContextRecord->Eip);
|
||||
}
|
||||
// Set pc to handler
|
||||
exceptionInfo->ContextRecord->Eip = (LONG)handler;
|
||||
exceptionInfo->ContextRecord->Eip = (DWORD)(DWORD_PTR)handler;
|
||||
#endif
|
||||
|
||||
// Continue the execution
|
||||
@ -2040,6 +2084,14 @@ extern "C" void events();
|
||||
// included or copied here.
|
||||
#define EXCEPTION_INFO_EXEC_VIOLATION 0x08
|
||||
|
||||
// Handle NAT Bit consumption on IA64.
|
||||
#ifdef _M_IA64
|
||||
#define EXCEPTION_REG_NAT_CONSUMPTION STATUS_REG_NAT_CONSUMPTION
|
||||
#endif
|
||||
|
||||
// Windows Vista/2008 heap corruption check
|
||||
#define EXCEPTION_HEAP_CORRUPTION 0xC0000374
|
||||
|
||||
#define def_excpt(val) #val, val
|
||||
|
||||
struct siglabel {
|
||||
@ -2082,6 +2134,10 @@ struct siglabel exceptlabels[] = {
|
||||
def_excpt(EXCEPTION_GUARD_PAGE),
|
||||
def_excpt(EXCEPTION_INVALID_HANDLE),
|
||||
def_excpt(EXCEPTION_UNCAUGHT_CXX_EXCEPTION),
|
||||
def_excpt(EXCEPTION_HEAP_CORRUPTION),
|
||||
#ifdef _M_IA64
|
||||
def_excpt(EXCEPTION_REG_NAT_CONSUMPTION),
|
||||
#endif
|
||||
NULL, 0
|
||||
};
|
||||
|
||||
@ -2206,7 +2262,14 @@ LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) {
|
||||
if (InterceptOSException) return EXCEPTION_CONTINUE_SEARCH;
|
||||
DWORD exception_code = exceptionInfo->ExceptionRecord->ExceptionCode;
|
||||
#ifdef _M_IA64
|
||||
address pc = (address) exceptionInfo->ContextRecord->StIIP;
|
||||
// On Itanium, we need the "precise pc", which has the slot number coded
|
||||
// into the least 4 bits: 0000=slot0, 0100=slot1, 1000=slot2 (Windows format).
|
||||
address pc = (address) exceptionInfo->ExceptionRecord->ExceptionAddress;
|
||||
// Convert the pc to "Unix format", which has the slot number coded
|
||||
// into the least 2 bits: 0000=slot0, 0001=slot1, 0010=slot2
|
||||
// This is needed for IA64 because "relocation" / "implicit null check" / "poll instruction"
|
||||
// information is saved in the Unix format.
|
||||
address pc_unix_format = (address) ((((uint64_t)pc) & 0xFFFFFFFFFFFFFFF0) | ((((uint64_t)pc) & 0xF) >> 2));
|
||||
#elif _M_AMD64
|
||||
address pc = (address) exceptionInfo->ContextRecord->Rip;
|
||||
#else
|
||||
@ -2321,29 +2384,40 @@ LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) {
|
||||
if (exception_code == EXCEPTION_STACK_OVERFLOW) {
|
||||
if (os::uses_stack_guard_pages()) {
|
||||
#ifdef _M_IA64
|
||||
//
|
||||
// If it's a legal stack address continue, Windows will map it in.
|
||||
//
|
||||
// Use guard page for register stack.
|
||||
PEXCEPTION_RECORD exceptionRecord = exceptionInfo->ExceptionRecord;
|
||||
address addr = (address) exceptionRecord->ExceptionInformation[1];
|
||||
if (addr > thread->stack_yellow_zone_base() && addr < thread->stack_base() )
|
||||
return EXCEPTION_CONTINUE_EXECUTION;
|
||||
// Check for a register stack overflow on Itanium
|
||||
if (thread->addr_inside_register_stack_red_zone(addr)) {
|
||||
// Fatal red zone violation happens if the Java program
|
||||
// catches a StackOverflow error and does so much processing
|
||||
// that it runs beyond the unprotected yellow guard zone. As
|
||||
// a result, we are out of here.
|
||||
fatal("ERROR: Unrecoverable stack overflow happened. JVM will exit.");
|
||||
} else if(thread->addr_inside_register_stack(addr)) {
|
||||
// Disable the yellow zone which sets the state that
|
||||
// we've got a stack overflow problem.
|
||||
if (thread->stack_yellow_zone_enabled()) {
|
||||
thread->disable_stack_yellow_zone();
|
||||
}
|
||||
// Give us some room to process the exception.
|
||||
thread->disable_register_stack_guard();
|
||||
// Tracing with +Verbose.
|
||||
if (Verbose) {
|
||||
tty->print_cr("SOF Compiled Register Stack overflow at " INTPTR_FORMAT " (SIGSEGV)", pc);
|
||||
tty->print_cr("Register Stack access at " INTPTR_FORMAT, addr);
|
||||
tty->print_cr("Register Stack base " INTPTR_FORMAT, thread->register_stack_base());
|
||||
tty->print_cr("Register Stack [" INTPTR_FORMAT "," INTPTR_FORMAT "]",
|
||||
thread->register_stack_base(),
|
||||
thread->register_stack_base() + thread->stack_size());
|
||||
}
|
||||
|
||||
// The register save area is the same size as the memory stack
|
||||
// and starts at the page just above the start of the memory stack.
|
||||
// If we get a fault in this area, we've run out of register
|
||||
// stack. If we are in java, try throwing a stack overflow exception.
|
||||
if (addr > thread->stack_base() &&
|
||||
addr <= (thread->stack_base()+thread->stack_size()) ) {
|
||||
char buf[256];
|
||||
jio_snprintf(buf, sizeof(buf),
|
||||
"Register stack overflow, addr:%p, stack_base:%p\n",
|
||||
addr, thread->stack_base() );
|
||||
tty->print_raw_cr(buf);
|
||||
// If not in java code, return and hope for the best.
|
||||
return in_java ? Handle_Exception(exceptionInfo,
|
||||
SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::STACK_OVERFLOW))
|
||||
: EXCEPTION_CONTINUE_EXECUTION;
|
||||
// Reguard the permanent register stack red zone just to be sure.
|
||||
// We saw Windows silently disabling this without telling us.
|
||||
thread->enable_register_stack_red_zone();
|
||||
|
||||
return Handle_Exception(exceptionInfo,
|
||||
SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::STACK_OVERFLOW));
|
||||
}
|
||||
#endif
|
||||
if (thread->stack_yellow_zone_enabled()) {
|
||||
@ -2418,50 +2492,33 @@ LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) {
|
||||
{
|
||||
// Null pointer exception.
|
||||
#ifdef _M_IA64
|
||||
// We catch register stack overflows in compiled code by doing
|
||||
// an explicit compare and executing a st8(G0, G0) if the
|
||||
// BSP enters into our guard area. We test for the overflow
|
||||
// condition and fall into the normal null pointer exception
|
||||
// code if BSP hasn't overflowed.
|
||||
if ( in_java ) {
|
||||
if(thread->register_stack_overflow()) {
|
||||
assert((address)exceptionInfo->ContextRecord->IntS3 ==
|
||||
thread->register_stack_limit(),
|
||||
"GR7 doesn't contain register_stack_limit");
|
||||
// Disable the yellow zone which sets the state that
|
||||
// we've got a stack overflow problem.
|
||||
if (thread->stack_yellow_zone_enabled()) {
|
||||
thread->disable_stack_yellow_zone();
|
||||
// Process implicit null checks in compiled code. Note: Implicit null checks
|
||||
// can happen even if "ImplicitNullChecks" is disabled, e.g. in vtable stubs.
|
||||
if (CodeCache::contains((void*) pc_unix_format) && !MacroAssembler::needs_explicit_null_check((intptr_t) addr)) {
|
||||
CodeBlob *cb = CodeCache::find_blob_unsafe(pc_unix_format);
|
||||
// Handle implicit null check in UEP method entry
|
||||
if (cb && (cb->is_frame_complete_at(pc) ||
|
||||
(cb->is_nmethod() && ((nmethod *)cb)->inlinecache_check_contains(pc)))) {
|
||||
if (Verbose) {
|
||||
intptr_t *bundle_start = (intptr_t*) ((intptr_t) pc_unix_format & 0xFFFFFFFFFFFFFFF0);
|
||||
tty->print_cr("trap: null_check at " INTPTR_FORMAT " (SIGSEGV)", pc_unix_format);
|
||||
tty->print_cr(" to addr " INTPTR_FORMAT, addr);
|
||||
tty->print_cr(" bundle is " INTPTR_FORMAT " (high), " INTPTR_FORMAT " (low)",
|
||||
*(bundle_start + 1), *bundle_start);
|
||||
}
|
||||
// Give us some room to process the exception
|
||||
thread->disable_register_stack_guard();
|
||||
// Update GR7 with the new limit so we can continue running
|
||||
// compiled code.
|
||||
exceptionInfo->ContextRecord->IntS3 =
|
||||
(ULONGLONG)thread->register_stack_limit();
|
||||
return Handle_Exception(exceptionInfo,
|
||||
SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::STACK_OVERFLOW));
|
||||
} else {
|
||||
//
|
||||
// Check for implicit null
|
||||
// We only expect null pointers in the stubs (vtable)
|
||||
// the rest are checked explicitly now.
|
||||
//
|
||||
if (((uintptr_t)addr) < os::vm_page_size() ) {
|
||||
// an access to the first page of VM--assume it is a null pointer
|
||||
address stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
|
||||
if (stub != NULL) return Handle_Exception(exceptionInfo, stub);
|
||||
}
|
||||
SharedRuntime::continuation_for_implicit_exception(thread, pc_unix_format, SharedRuntime::IMPLICIT_NULL));
|
||||
}
|
||||
} // in_java
|
||||
}
|
||||
|
||||
// IA64 doesn't use implicit null checking yet. So we shouldn't
|
||||
// get here.
|
||||
tty->print_raw_cr("Access violation, possible null pointer exception");
|
||||
// Implicit null checks were processed above. Hence, we should not reach
|
||||
// here in the usual case => die!
|
||||
if (Verbose) tty->print_raw_cr("Access violation, possible null pointer exception");
|
||||
report_error(t, exception_code, pc, exceptionInfo->ExceptionRecord,
|
||||
exceptionInfo->ContextRecord);
|
||||
return EXCEPTION_CONTINUE_SEARCH;
|
||||
#else /* !IA64 */
|
||||
|
||||
#else // !IA64
|
||||
|
||||
// Windows 98 reports faulting addresses incorrectly
|
||||
if (!MacroAssembler::needs_explicit_null_check((intptr_t)addr) ||
|
||||
@ -2493,7 +2550,24 @@ LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) {
|
||||
report_error(t, exception_code, pc, exceptionInfo->ExceptionRecord,
|
||||
exceptionInfo->ContextRecord);
|
||||
return EXCEPTION_CONTINUE_SEARCH;
|
||||
}
|
||||
} // /EXCEPTION_ACCESS_VIOLATION
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
#if defined _M_IA64
|
||||
else if ((exception_code == EXCEPTION_ILLEGAL_INSTRUCTION ||
|
||||
exception_code == EXCEPTION_ILLEGAL_INSTRUCTION_2)) {
|
||||
M37 handle_wrong_method_break(0, NativeJump::HANDLE_WRONG_METHOD, PR0);
|
||||
|
||||
// Compiled method patched to be non entrant? Following conditions must apply:
|
||||
// 1. must be first instruction in bundle
|
||||
// 2. must be a break instruction with appropriate code
|
||||
if((((uint64_t) pc & 0x0F) == 0) &&
|
||||
(((IPF_Bundle*) pc)->get_slot0() == handle_wrong_method_break.bits())) {
|
||||
return Handle_Exception(exceptionInfo,
|
||||
(address)SharedRuntime::get_handle_wrong_method_stub());
|
||||
}
|
||||
} // /EXCEPTION_ILLEGAL_INSTRUCTION
|
||||
#endif
|
||||
|
||||
|
||||
if (in_java) {
|
||||
switch (exception_code) {
|
||||
|
@ -372,7 +372,7 @@ frame os::current_frame() {
|
||||
CAST_FROM_FN_PTR(address, os::current_frame));
|
||||
if (os::is_first_C_frame(&myframe)) {
|
||||
// stack is not walkable
|
||||
return frame(NULL, NULL, NULL);
|
||||
return frame();
|
||||
} else {
|
||||
return os::get_sender_for_C_frame(&myframe);
|
||||
}
|
||||
|
@ -189,7 +189,7 @@ frame os::current_frame() {
|
||||
CAST_FROM_FN_PTR(address, os::current_frame));
|
||||
if (os::is_first_C_frame(&myframe)) {
|
||||
// stack is not walkable
|
||||
return frame(NULL, NULL, NULL);
|
||||
return frame();
|
||||
} else {
|
||||
return os::get_sender_for_C_frame(&myframe);
|
||||
}
|
||||
|
@ -399,7 +399,7 @@ frame os::current_frame() {
|
||||
typedef intptr_t* get_fp_func ();
|
||||
get_fp_func* func = CAST_TO_FN_PTR(get_fp_func*,
|
||||
StubRoutines::x86::get_previous_fp_entry());
|
||||
if (func == NULL) return frame(NULL, NULL, NULL);
|
||||
if (func == NULL) return frame();
|
||||
intptr_t* fp = (*func)();
|
||||
#else
|
||||
intptr_t* fp = _get_previous_fp();
|
||||
@ -410,7 +410,7 @@ frame os::current_frame() {
|
||||
CAST_FROM_FN_PTR(address, os::current_frame));
|
||||
if (os::is_first_C_frame(&myframe)) {
|
||||
// stack is not walkable
|
||||
return frame(NULL, NULL, NULL);
|
||||
return frame();
|
||||
} else {
|
||||
return os::get_sender_for_C_frame(&myframe);
|
||||
}
|
||||
|
@ -76,4 +76,9 @@ public class WhiteBox {
|
||||
public native long g1NumFreeRegions();
|
||||
public native int g1RegionSize();
|
||||
public native Object[] parseCommandLine(String commandline, DiagnosticCommand[] args);
|
||||
|
||||
// NMT
|
||||
public native boolean NMTAllocTest();
|
||||
public native boolean NMTFreeTestMemory();
|
||||
public native boolean NMTWaitForDataMerge();
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ void ADLParser::instr_parse(void) {
|
||||
// Check for block delimiter
|
||||
if ( (_curchar != '%')
|
||||
|| ( next_char(), (_curchar != '{')) ) {
|
||||
parse_err(SYNERR, "missing '%{' in instruction definition\n");
|
||||
parse_err(SYNERR, "missing '%%{' in instruction definition\n");
|
||||
return;
|
||||
}
|
||||
next_char(); // Maintain the invariant
|
||||
@ -253,7 +253,7 @@ void ADLParser::instr_parse(void) {
|
||||
} while(_curchar != '%');
|
||||
next_char();
|
||||
if (_curchar != '}') {
|
||||
parse_err(SYNERR, "missing '%}' in instruction definition\n");
|
||||
parse_err(SYNERR, "missing '%%}' in instruction definition\n");
|
||||
return;
|
||||
}
|
||||
// Check for "Set" form of chain rule
|
||||
@ -423,7 +423,7 @@ void ADLParser::oper_parse(void) {
|
||||
skipws();
|
||||
// Check for block delimiter
|
||||
if ((_curchar != '%') || (*(_ptr+1) != '{')) { // If not open block
|
||||
parse_err(SYNERR, "missing '%c{' in operand definition\n","%");
|
||||
parse_err(SYNERR, "missing '%%{' in operand definition\n");
|
||||
return;
|
||||
}
|
||||
next_char(); next_char(); // Skip over "%{" symbol
|
||||
@ -483,7 +483,7 @@ void ADLParser::oper_parse(void) {
|
||||
} while(_curchar != '%');
|
||||
next_char();
|
||||
if (_curchar != '}') {
|
||||
parse_err(SYNERR, "missing '%}' in operand definition\n");
|
||||
parse_err(SYNERR, "missing '%%}' in operand definition\n");
|
||||
return;
|
||||
}
|
||||
// Add operand to tail of operand list
|
||||
@ -1324,7 +1324,7 @@ void ADLParser::pipe_parse(void) {
|
||||
// Check for block delimiter
|
||||
if ( (_curchar != '%')
|
||||
|| ( next_char(), (_curchar != '{')) ) {
|
||||
parse_err(SYNERR, "missing '%{' in pipeline definition\n");
|
||||
parse_err(SYNERR, "missing '%%{' in pipeline definition\n");
|
||||
return;
|
||||
}
|
||||
next_char(); // Maintain the invariant
|
||||
@ -1341,7 +1341,7 @@ void ADLParser::pipe_parse(void) {
|
||||
skipws();
|
||||
if ( (_curchar != '%')
|
||||
|| ( next_char(), (_curchar != '{')) ) {
|
||||
parse_err(SYNERR, "expected '%{'\n");
|
||||
parse_err(SYNERR, "expected '%%{'\n");
|
||||
return;
|
||||
}
|
||||
next_char(); skipws();
|
||||
@ -1397,7 +1397,7 @@ void ADLParser::pipe_parse(void) {
|
||||
skipws();
|
||||
if ( (_curchar != '%')
|
||||
|| ( next_char(), (_curchar != '{')) ) {
|
||||
parse_err(SYNERR, "expected '%{'\n");
|
||||
parse_err(SYNERR, "expected '%%{'\n");
|
||||
return;
|
||||
}
|
||||
next_char(); skipws();
|
||||
@ -1586,7 +1586,7 @@ void ADLParser::pipe_parse(void) {
|
||||
|
||||
if ( (_curchar != '%')
|
||||
|| ( next_char(), (_curchar != '}')) ) {
|
||||
parse_err(SYNERR, "expected '%}', found \"%c\"\n", _curchar);
|
||||
parse_err(SYNERR, "expected '%%}', found \"%c\"\n", _curchar);
|
||||
}
|
||||
next_char(); skipws();
|
||||
|
||||
@ -1612,7 +1612,7 @@ void ADLParser::pipe_parse(void) {
|
||||
|
||||
next_char();
|
||||
if (_curchar != '}') {
|
||||
parse_err(SYNERR, "missing \"%}\" in pipeline definition\n");
|
||||
parse_err(SYNERR, "missing \"%%}\" in pipeline definition\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1775,7 +1775,7 @@ void ADLParser::pipe_class_parse(PipelineForm &pipeline) {
|
||||
// Check for block delimiter
|
||||
if ( (_curchar != '%')
|
||||
|| ( next_char(), (_curchar != '{')) ) {
|
||||
parse_err(SYNERR, "missing \"%{\" in pipe_class definition\n");
|
||||
parse_err(SYNERR, "missing \"%%{\" in pipe_class definition\n");
|
||||
return;
|
||||
}
|
||||
next_char();
|
||||
@ -2062,7 +2062,7 @@ void ADLParser::pipe_class_parse(PipelineForm &pipeline) {
|
||||
|
||||
next_char();
|
||||
if (_curchar != '}') {
|
||||
parse_err(SYNERR, "missing \"%}\" in pipe_class definition\n");
|
||||
parse_err(SYNERR, "missing \"%%}\" in pipe_class definition\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -3341,12 +3341,12 @@ Interface *ADLParser::mem_interface_parse(void) {
|
||||
char *disp = NULL;
|
||||
|
||||
if (_curchar != '%') {
|
||||
parse_err(SYNERR, "Missing '%{' for 'interface' block.\n");
|
||||
parse_err(SYNERR, "Missing '%%{' for 'interface' block.\n");
|
||||
return NULL;
|
||||
}
|
||||
next_char(); // Skip '%'
|
||||
if (_curchar != '{') {
|
||||
parse_err(SYNERR, "Missing '%{' for 'interface' block.\n");
|
||||
parse_err(SYNERR, "Missing '%%{' for 'interface' block.\n");
|
||||
return NULL;
|
||||
}
|
||||
next_char(); // Skip '{'
|
||||
@ -3354,7 +3354,7 @@ Interface *ADLParser::mem_interface_parse(void) {
|
||||
do {
|
||||
char *field = get_ident();
|
||||
if (field == NULL) {
|
||||
parse_err(SYNERR, "Expected keyword, base|index|scale|disp, or '%}' ending interface.\n");
|
||||
parse_err(SYNERR, "Expected keyword, base|index|scale|disp, or '%%}' ending interface.\n");
|
||||
return NULL;
|
||||
}
|
||||
if ( strcmp(field,"base") == 0 ) {
|
||||
@ -3370,13 +3370,13 @@ Interface *ADLParser::mem_interface_parse(void) {
|
||||
disp = interface_field_parse();
|
||||
}
|
||||
else {
|
||||
parse_err(SYNERR, "Expected keyword, base|index|scale|disp, or '%}' ending interface.\n");
|
||||
parse_err(SYNERR, "Expected keyword, base|index|scale|disp, or '%%}' ending interface.\n");
|
||||
return NULL;
|
||||
}
|
||||
} while( _curchar != '%' );
|
||||
next_char(); // Skip '%'
|
||||
if ( _curchar != '}' ) {
|
||||
parse_err(SYNERR, "Missing '%}' for 'interface' block.\n");
|
||||
parse_err(SYNERR, "Missing '%%}' for 'interface' block.\n");
|
||||
return NULL;
|
||||
}
|
||||
next_char(); // Skip '}'
|
||||
@ -3403,12 +3403,12 @@ Interface *ADLParser::cond_interface_parse(void) {
|
||||
const char *greater_format = "gt";
|
||||
|
||||
if (_curchar != '%') {
|
||||
parse_err(SYNERR, "Missing '%{' for 'cond_interface' block.\n");
|
||||
parse_err(SYNERR, "Missing '%%{' for 'cond_interface' block.\n");
|
||||
return NULL;
|
||||
}
|
||||
next_char(); // Skip '%'
|
||||
if (_curchar != '{') {
|
||||
parse_err(SYNERR, "Missing '%{' for 'cond_interface' block.\n");
|
||||
parse_err(SYNERR, "Missing '%%{' for 'cond_interface' block.\n");
|
||||
return NULL;
|
||||
}
|
||||
next_char(); // Skip '{'
|
||||
@ -3416,7 +3416,7 @@ Interface *ADLParser::cond_interface_parse(void) {
|
||||
do {
|
||||
char *field = get_ident();
|
||||
if (field == NULL) {
|
||||
parse_err(SYNERR, "Expected keyword, base|index|scale|disp, or '%}' ending interface.\n");
|
||||
parse_err(SYNERR, "Expected keyword, base|index|scale|disp, or '%%}' ending interface.\n");
|
||||
return NULL;
|
||||
}
|
||||
if ( strcmp(field,"equal") == 0 ) {
|
||||
@ -3438,13 +3438,13 @@ Interface *ADLParser::cond_interface_parse(void) {
|
||||
greater = interface_field_parse(&greater_format);
|
||||
}
|
||||
else {
|
||||
parse_err(SYNERR, "Expected keyword, base|index|scale|disp, or '%}' ending interface.\n");
|
||||
parse_err(SYNERR, "Expected keyword, base|index|scale|disp, or '%%}' ending interface.\n");
|
||||
return NULL;
|
||||
}
|
||||
} while( _curchar != '%' );
|
||||
next_char(); // Skip '%'
|
||||
if ( _curchar != '}' ) {
|
||||
parse_err(SYNERR, "Missing '%}' for 'interface' block.\n");
|
||||
parse_err(SYNERR, "Missing '%%}' for 'interface' block.\n");
|
||||
return NULL;
|
||||
}
|
||||
next_char(); // Skip '}'
|
||||
@ -3543,7 +3543,7 @@ MatchRule *ADLParser::match_parse(FormDict &operands) {
|
||||
}
|
||||
else if ((cnstr = find_cpp_block("match constructor")) == NULL ) {
|
||||
parse_err(SYNERR, "invalid construction of match rule\n"
|
||||
"Missing ';' or invalid '%{' and '%}' constructor\n");
|
||||
"Missing ';' or invalid '%%{' and '%%}' constructor\n");
|
||||
return NULL; // No MatchRule to return
|
||||
}
|
||||
if (_AD._adl_debug > 1)
|
||||
@ -3646,7 +3646,7 @@ FormatRule* ADLParser::format_parse(void) {
|
||||
// Check for closing '"' and '%}' in format description
|
||||
skipws(); // Move to closing '%}'
|
||||
if ( _curchar != '%' ) {
|
||||
parse_err(SYNERR, "non-blank characters between closing '\"' and '%' in format");
|
||||
parse_err(SYNERR, "non-blank characters between closing '\"' and '%%' in format");
|
||||
return NULL;
|
||||
}
|
||||
} // Done with format description inside
|
||||
@ -3654,7 +3654,7 @@ FormatRule* ADLParser::format_parse(void) {
|
||||
skipws();
|
||||
// Past format description, at '%'
|
||||
if ( _curchar != '%' || *(_ptr+1) != '}' ) {
|
||||
parse_err(SYNERR, "missing '%}' at end of format block");
|
||||
parse_err(SYNERR, "missing '%%}' at end of format block");
|
||||
return NULL;
|
||||
}
|
||||
next_char(); // Move past the '%'
|
||||
@ -3785,7 +3785,7 @@ FormatRule* ADLParser::template_parse(void) {
|
||||
skipws();
|
||||
// Past format description, at '%'
|
||||
if ( _curchar != '%' || *(_ptr+1) != '}' ) {
|
||||
parse_err(SYNERR, "missing '%}' at end of format block");
|
||||
parse_err(SYNERR, "missing '%%}' at end of format block");
|
||||
return NULL;
|
||||
}
|
||||
next_char(); // Move past the '%'
|
||||
@ -3834,7 +3834,7 @@ ExpandRule* ADLParser::expand_parse(InstructForm *instr) {
|
||||
skipws(); // Skip leading whitespace
|
||||
if ((_curchar != '%')
|
||||
|| (next_char(), (_curchar != '{')) ) { // If not open block
|
||||
parse_err(SYNERR, "missing '%{' in expand definition\n");
|
||||
parse_err(SYNERR, "missing '%%{' in expand definition\n");
|
||||
return(NULL);
|
||||
}
|
||||
next_char(); // Maintain the invariant
|
||||
@ -3933,7 +3933,7 @@ ExpandRule* ADLParser::expand_parse(InstructForm *instr) {
|
||||
} while(_curchar != '%');
|
||||
next_char();
|
||||
if (_curchar != '}') {
|
||||
parse_err(SYNERR, "missing '%}' in expand rule definition\n");
|
||||
parse_err(SYNERR, "missing '%%}' in expand rule definition\n");
|
||||
return(NULL);
|
||||
}
|
||||
next_char();
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "c1/c1_LIR.hpp"
|
||||
#include "c1/c1_Runtime1.hpp"
|
||||
#include "utilities/array.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
|
||||
class CodeEmitInfo;
|
||||
class LIR_Assembler;
|
||||
@ -515,7 +516,7 @@ class ArrayCopyStub: public CodeStub {
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef SERIALGC
|
||||
#if INCLUDE_ALL_GCS
|
||||
|
||||
// Code stubs for Garbage-First barriers.
|
||||
class G1PreBarrierStub: public CodeStub {
|
||||
@ -608,7 +609,7 @@ class G1PostBarrierStub: public CodeStub {
|
||||
#endif // PRODUCT
|
||||
};
|
||||
|
||||
#endif // SERIALGC
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif // SHARE_VM_C1_C1_CODESTUBS_HPP
|
||||
|
@ -3667,11 +3667,12 @@ bool GraphBuilder::try_inline_full(ciMethod* callee, bool holder_known, Bytecode
|
||||
}
|
||||
|
||||
// now perform tests that are based on flag settings
|
||||
if (callee->force_inline() || callee->should_inline()) {
|
||||
// ignore heuristic controls on inlining
|
||||
if (callee->force_inline())
|
||||
print_inlining(callee, "force inline by annotation");
|
||||
if (callee->force_inline()) {
|
||||
print_inlining(callee, "force inline by annotation");
|
||||
} else if (callee->should_inline()) {
|
||||
print_inlining(callee, "force inline by CompileOracle");
|
||||
} else {
|
||||
// use heuristic controls on inlining
|
||||
if (inline_level() > MaxInlineLevel ) INLINE_BAILOUT("inlining too deep");
|
||||
if (recursive_inline_level(callee) > MaxRecursiveInlineLevel) INLINE_BAILOUT("recursive inlining too deep");
|
||||
if (callee->code_size_for_inlining() > max_inline_size() ) INLINE_BAILOUT("callee is too large");
|
||||
|
@ -188,7 +188,7 @@ ciType* LoadIndexed::exact_type() const {
|
||||
|
||||
ciType* LoadIndexed::declared_type() const {
|
||||
ciType* array_type = array()->declared_type();
|
||||
if (array_type == NULL) {
|
||||
if (array_type == NULL || !array_type->is_loaded()) {
|
||||
return NULL;
|
||||
}
|
||||
assert(array_type->is_array_klass(), "what else?");
|
||||
|
@ -35,9 +35,10 @@
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "utilities/bitMap.inline.hpp"
|
||||
#ifndef SERIALGC
|
||||
#include "utilities/macros.hpp"
|
||||
#if INCLUDE_ALL_GCS
|
||||
#include "gc_implementation/g1/heapRegion.hpp"
|
||||
#endif
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
|
||||
#ifdef ASSERT
|
||||
#define __ gen()->lir(__FILE__, __LINE__)->
|
||||
@ -1417,12 +1418,12 @@ void LIRGenerator::pre_barrier(LIR_Opr addr_opr, LIR_Opr pre_val,
|
||||
bool do_load, bool patch, CodeEmitInfo* info) {
|
||||
// Do the pre-write barrier, if any.
|
||||
switch (_bs->kind()) {
|
||||
#ifndef SERIALGC
|
||||
#if INCLUDE_ALL_GCS
|
||||
case BarrierSet::G1SATBCT:
|
||||
case BarrierSet::G1SATBCTLogging:
|
||||
G1SATBCardTableModRef_pre_barrier(addr_opr, pre_val, do_load, patch, info);
|
||||
break;
|
||||
#endif // SERIALGC
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
case BarrierSet::CardTableModRef:
|
||||
case BarrierSet::CardTableExtension:
|
||||
// No pre barriers
|
||||
@ -1439,12 +1440,12 @@ void LIRGenerator::pre_barrier(LIR_Opr addr_opr, LIR_Opr pre_val,
|
||||
|
||||
void LIRGenerator::post_barrier(LIR_OprDesc* addr, LIR_OprDesc* new_val) {
|
||||
switch (_bs->kind()) {
|
||||
#ifndef SERIALGC
|
||||
#if INCLUDE_ALL_GCS
|
||||
case BarrierSet::G1SATBCT:
|
||||
case BarrierSet::G1SATBCTLogging:
|
||||
G1SATBCardTableModRef_post_barrier(addr, new_val);
|
||||
break;
|
||||
#endif // SERIALGC
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
case BarrierSet::CardTableModRef:
|
||||
case BarrierSet::CardTableExtension:
|
||||
CardTableModRef_post_barrier(addr, new_val);
|
||||
@ -1459,7 +1460,7 @@ void LIRGenerator::post_barrier(LIR_OprDesc* addr, LIR_OprDesc* new_val) {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
#ifndef SERIALGC
|
||||
#if INCLUDE_ALL_GCS
|
||||
|
||||
void LIRGenerator::G1SATBCardTableModRef_pre_barrier(LIR_Opr addr_opr, LIR_Opr pre_val,
|
||||
bool do_load, bool patch, CodeEmitInfo* info) {
|
||||
@ -1575,7 +1576,7 @@ void LIRGenerator::G1SATBCardTableModRef_post_barrier(LIR_OprDesc* addr, LIR_Opr
|
||||
__ branch_destination(slow->continuation());
|
||||
}
|
||||
|
||||
#endif // SERIALGC
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void LIRGenerator::CardTableModRef_post_barrier(LIR_OprDesc* addr, LIR_OprDesc* new_val) {
|
||||
@ -2181,7 +2182,7 @@ void LIRGenerator::do_UnsafeGetObject(UnsafeGetObject* x) {
|
||||
|
||||
get_Object_unsafe(value, src.result(), off.result(), type, x->is_volatile());
|
||||
|
||||
#ifndef SERIALGC
|
||||
#if INCLUDE_ALL_GCS
|
||||
// We might be reading the value of the referent field of a
|
||||
// Reference object in order to attach it back to the live
|
||||
// object graph. If G1 is enabled then we need to record
|
||||
@ -2311,7 +2312,7 @@ void LIRGenerator::do_UnsafeGetObject(UnsafeGetObject* x) {
|
||||
__ branch_destination(Lcont->label());
|
||||
}
|
||||
}
|
||||
#endif // SERIALGC
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
|
||||
if (x->is_volatile() && os::is_MP()) __ membar_acquire();
|
||||
}
|
||||
|
@ -52,6 +52,7 @@
|
||||
#include "runtime/reflection.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "utilities/dtrace.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
#ifdef COMPILER1
|
||||
#include "c1/c1_Runtime1.hpp"
|
||||
#endif
|
||||
@ -1168,7 +1169,7 @@ void ciEnv::dump_replay_data() {
|
||||
|
||||
void ciEnv::dump_replay_data(outputStream* out) {
|
||||
ASSERT_IN_VM;
|
||||
|
||||
ResourceMark rm;
|
||||
#if INCLUDE_JVMTI
|
||||
out->print_cr("JvmtiExport can_access_local_variables %d", _jvmti_can_access_local_variables);
|
||||
out->print_cr("JvmtiExport can_hotswap_or_post_breakpoint %d", _jvmti_can_hotswap_or_post_breakpoint);
|
||||
|
@ -580,6 +580,7 @@ class StaticFinalFieldPrinter : public FieldClosure {
|
||||
}
|
||||
void do_field(fieldDescriptor* fd) {
|
||||
if (fd->is_final() && !fd->has_initial_value()) {
|
||||
ResourceMark rm;
|
||||
oop mirror = fd->field_holder()->java_mirror();
|
||||
_out->print("staticfield %s %s %s ", _holder, fd->name()->as_quoted_ascii(), fd->signature()->as_quoted_ascii());
|
||||
switch (fd->field_type()) {
|
||||
@ -643,6 +644,8 @@ class StaticFinalFieldPrinter : public FieldClosure {
|
||||
|
||||
void ciInstanceKlass::dump_replay_data(outputStream* out) {
|
||||
ASSERT_IN_VM;
|
||||
ResourceMark rm;
|
||||
|
||||
InstanceKlass* ik = get_instanceKlass();
|
||||
ConstantPool* cp = ik->constants();
|
||||
|
||||
|
@ -977,7 +977,7 @@ bool ciMethod::can_be_compiled() {
|
||||
// ciMethod::set_not_compilable
|
||||
//
|
||||
// Tell the VM that this method cannot be compiled at all.
|
||||
void ciMethod::set_not_compilable() {
|
||||
void ciMethod::set_not_compilable(const char* reason) {
|
||||
check_is_loaded();
|
||||
VM_ENTRY_MARK;
|
||||
ciEnv* env = CURRENT_ENV;
|
||||
@ -986,7 +986,7 @@ void ciMethod::set_not_compilable() {
|
||||
} else {
|
||||
_is_c2_compilable = false;
|
||||
}
|
||||
get_Method()->set_not_compilable(env->comp_level());
|
||||
get_Method()->set_not_compilable(env->comp_level(), true, reason);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
@ -1178,6 +1178,7 @@ ciMethodBlocks *ciMethod::get_method_blocks() {
|
||||
|
||||
void ciMethod::dump_replay_data(outputStream* st) {
|
||||
ASSERT_IN_VM;
|
||||
ResourceMark rm;
|
||||
Method* method = get_Method();
|
||||
Klass* holder = method->method_holder();
|
||||
st->print_cr("ciMethod %s %s %s %d %d %d %d %d",
|
||||
|
@ -252,7 +252,7 @@ class ciMethod : public ciMetadata {
|
||||
bool has_option(const char *option);
|
||||
bool can_be_compiled();
|
||||
bool can_be_osr_compiled(int entry_bci);
|
||||
void set_not_compilable();
|
||||
void set_not_compilable(const char* reason = NULL);
|
||||
bool has_compiled_code();
|
||||
void log_nmethod_identity(xmlStream* log);
|
||||
bool is_not_reached(int bci);
|
||||
|
@ -374,6 +374,7 @@ void ciMethodData::print_impl(outputStream* st) {
|
||||
|
||||
void ciMethodData::dump_replay_data(outputStream* out) {
|
||||
ASSERT_IN_VM;
|
||||
ResourceMark rm;
|
||||
MethodData* mdo = get_MethodData();
|
||||
Method* method = mdo->method();
|
||||
Klass* holder = method->method_holder();
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "memory/oopFactory.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "utilities/copy.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
|
||||
#ifndef PRODUCT
|
||||
|
||||
|
@ -1947,6 +1947,8 @@ methodHandle ClassFileParser::parse_method(ClassLoaderData* loader_data,
|
||||
u2** localvariable_type_table_start;
|
||||
u2 method_parameters_length = 0;
|
||||
u1* method_parameters_data = NULL;
|
||||
bool method_parameters_seen = false;
|
||||
bool method_parameters_four_byte_flags;
|
||||
bool parsed_code_attribute = false;
|
||||
bool parsed_checked_exceptions_attribute = false;
|
||||
bool parsed_stackmap_attribute = false;
|
||||
@ -2157,22 +2159,32 @@ methodHandle ClassFileParser::parse_method(ClassLoaderData* loader_data,
|
||||
method_attribute_length,
|
||||
cp, CHECK_(nullHandle));
|
||||
} else if (method_attribute_name == vmSymbols::tag_method_parameters()) {
|
||||
// reject multiple method parameters
|
||||
if (method_parameters_seen) {
|
||||
classfile_parse_error("Multiple MethodParameters attributes in class file %s", CHECK_(nullHandle));
|
||||
}
|
||||
method_parameters_seen = true;
|
||||
method_parameters_length = cfs->get_u1_fast();
|
||||
// Track the actual size (note: this is written for clarity; a
|
||||
// decent compiler will CSE and constant-fold this into a single
|
||||
// expression)
|
||||
u2 actual_size = 1;
|
||||
method_parameters_data = cfs->get_u1_buffer();
|
||||
actual_size += 2 * method_parameters_length;
|
||||
cfs->skip_u2_fast(method_parameters_length);
|
||||
actual_size += 4 * method_parameters_length;
|
||||
cfs->skip_u4_fast(method_parameters_length);
|
||||
// Enforce attribute length
|
||||
if (method_attribute_length != actual_size) {
|
||||
// Use the attribute length to figure out the size of flags
|
||||
if (method_attribute_length == (method_parameters_length * 6u) + 1u) {
|
||||
method_parameters_four_byte_flags = true;
|
||||
} else if (method_attribute_length == (method_parameters_length * 4u) + 1u) {
|
||||
method_parameters_four_byte_flags = false;
|
||||
} else {
|
||||
classfile_parse_error(
|
||||
"Invalid MethodParameters method attribute length %u in class file %s",
|
||||
"Invalid MethodParameters method attribute length %u in class file",
|
||||
method_attribute_length, CHECK_(nullHandle));
|
||||
}
|
||||
method_parameters_data = cfs->get_u1_buffer();
|
||||
cfs->skip_u2_fast(method_parameters_length);
|
||||
if (method_parameters_four_byte_flags) {
|
||||
cfs->skip_u4_fast(method_parameters_length);
|
||||
} else {
|
||||
cfs->skip_u2_fast(method_parameters_length);
|
||||
}
|
||||
// ignore this attribute if it cannot be reflected
|
||||
if (!SystemDictionary::Parameter_klass_loaded())
|
||||
method_parameters_length = 0;
|
||||
@ -2316,15 +2328,16 @@ methodHandle ClassFileParser::parse_method(ClassLoaderData* loader_data,
|
||||
// Copy method parameters
|
||||
if (method_parameters_length > 0) {
|
||||
MethodParametersElement* elem = m->constMethod()->method_parameters_start();
|
||||
for(int i = 0; i < method_parameters_length; i++) {
|
||||
elem[i].name_cp_index =
|
||||
Bytes::get_Java_u2(method_parameters_data);
|
||||
for (int i = 0; i < method_parameters_length; i++) {
|
||||
elem[i].name_cp_index = Bytes::get_Java_u2(method_parameters_data);
|
||||
method_parameters_data += 2;
|
||||
u4 flags = Bytes::get_Java_u4(method_parameters_data);
|
||||
// This caused an alignment fault on Sparc, if flags was a u4
|
||||
elem[i].flags_lo = extract_low_short_from_int(flags);
|
||||
elem[i].flags_hi = extract_high_short_from_int(flags);
|
||||
method_parameters_data += 4;
|
||||
if (method_parameters_four_byte_flags) {
|
||||
elem[i].flags = Bytes::get_Java_u4(method_parameters_data);
|
||||
method_parameters_data += 4;
|
||||
} else {
|
||||
elem[i].flags = Bytes::get_Java_u2(method_parameters_data);
|
||||
method_parameters_data += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2013, 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
|
||||
@ -50,11 +50,12 @@
|
||||
#include "classfile/classLoaderData.hpp"
|
||||
#include "classfile/classLoaderData.inline.hpp"
|
||||
#include "classfile/javaClasses.hpp"
|
||||
#include "classfile/metadataOnStackMark.hpp"
|
||||
#include "classfile/systemDictionary.hpp"
|
||||
#include "code/codeCache.hpp"
|
||||
#include "memory/metadataFactory.hpp"
|
||||
#include "memory/metaspaceShared.hpp"
|
||||
#include "prims/jvmtiRedefineClasses.hpp"
|
||||
#include "memory/oopFactory.hpp"
|
||||
#include "runtime/jniHandles.hpp"
|
||||
#include "runtime/mutex.hpp"
|
||||
#include "runtime/safepoint.hpp"
|
||||
@ -723,13 +724,13 @@ void ClassLoaderDataGraph::dump_on(outputStream * const out) {
|
||||
}
|
||||
MetaspaceAux::dump(out);
|
||||
}
|
||||
#endif // PRODUCT
|
||||
|
||||
void ClassLoaderData::print_value_on(outputStream* out) const {
|
||||
if (class_loader() == NULL) {
|
||||
out->print_cr("NULL class_loader");
|
||||
out->print("NULL class_loader");
|
||||
} else {
|
||||
out->print("class loader "PTR_FORMAT, this);
|
||||
class_loader()->print_value_on(out);
|
||||
}
|
||||
}
|
||||
#endif // PRODUCT
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2013, 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
|
||||
@ -220,7 +220,7 @@ class ClassLoaderData : public CHeapObj<mtClass> {
|
||||
void set_jmethod_ids(JNIMethodBlock* new_block) { _jmethod_ids = new_block; }
|
||||
|
||||
void print_value() { print_value_on(tty); }
|
||||
void print_value_on(outputStream* out) const PRODUCT_RETURN;
|
||||
void print_value_on(outputStream* out) const;
|
||||
void dump(outputStream * const out) PRODUCT_RETURN;
|
||||
void verify();
|
||||
const char* loader_name();
|
||||
|
69
hotspot/src/share/vm/classfile/metadataOnStackMark.cpp
Normal file
69
hotspot/src/share/vm/classfile/metadataOnStackMark.cpp
Normal file
@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 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 "precompiled.hpp"
|
||||
#include "classfile/metadataOnStackMark.hpp"
|
||||
#include "code/codeCache.hpp"
|
||||
#include "compiler/compileBroker.hpp"
|
||||
#include "oops/metadata.hpp"
|
||||
#include "runtime/synchronizer.hpp"
|
||||
#include "runtime/thread.hpp"
|
||||
#include "utilities/growableArray.hpp"
|
||||
|
||||
|
||||
// Keep track of marked on-stack metadata so it can be cleared.
|
||||
GrowableArray<Metadata*>* _marked_objects = NULL;
|
||||
NOT_PRODUCT(bool MetadataOnStackMark::_is_active = false;)
|
||||
|
||||
// Walk metadata on the stack and mark it so that redefinition doesn't delete
|
||||
// it. Class unloading also walks the previous versions and might try to
|
||||
// delete it, so this class is used by class unloading also.
|
||||
MetadataOnStackMark::MetadataOnStackMark() {
|
||||
assert(SafepointSynchronize::is_at_safepoint(), "sanity check");
|
||||
NOT_PRODUCT(_is_active = true;)
|
||||
if (_marked_objects == NULL) {
|
||||
_marked_objects = new (ResourceObj::C_HEAP, mtClass) GrowableArray<Metadata*>(1000, true);
|
||||
}
|
||||
Threads::metadata_do(Metadata::mark_on_stack);
|
||||
CodeCache::alive_nmethods_do(nmethod::mark_on_stack);
|
||||
CompileBroker::mark_on_stack();
|
||||
}
|
||||
|
||||
MetadataOnStackMark::~MetadataOnStackMark() {
|
||||
assert(SafepointSynchronize::is_at_safepoint(), "sanity check");
|
||||
// Unmark everything that was marked. Can't do the same walk because
|
||||
// redefine classes messes up the code cache so the set of methods
|
||||
// might not be the same.
|
||||
for (int i = 0; i< _marked_objects->length(); i++) {
|
||||
_marked_objects->at(i)->set_on_stack(false);
|
||||
}
|
||||
_marked_objects->clear(); // reuse growable array for next time.
|
||||
NOT_PRODUCT(_is_active = false;)
|
||||
}
|
||||
|
||||
// Record which objects are marked so we can unmark the same objects.
|
||||
void MetadataOnStackMark::record(Metadata* m) {
|
||||
assert(_is_active, "metadata on stack marking is active");
|
||||
_marked_objects->push(m);
|
||||
}
|
45
hotspot/src/share/vm/classfile/metadataOnStackMark.hpp
Normal file
45
hotspot/src/share/vm/classfile/metadataOnStackMark.hpp
Normal file
@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SHARE_VM_CLASSFILE_METADATAONSTACKMARK_HPP
|
||||
#define SHARE_VM_CLASSFILE_METADATAONSTACKMARK_HPP
|
||||
|
||||
#include "memory/allocation.hpp"
|
||||
|
||||
class Metadata;
|
||||
|
||||
// Helper class to mark and unmark metadata used on the stack as either handles
|
||||
// or executing methods, so that it can't be deleted during class redefinition
|
||||
// and class unloading.
|
||||
// This is also used for other things that can be deallocated, like class
|
||||
// metadata during parsing, relocated methods, and methods in backtraces.
|
||||
class MetadataOnStackMark : public StackObj {
|
||||
NOT_PRODUCT(static bool _is_active;)
|
||||
public:
|
||||
MetadataOnStackMark();
|
||||
~MetadataOnStackMark();
|
||||
static void record(Metadata* m);
|
||||
};
|
||||
|
||||
#endif // SHARE_VM_CLASSFILE_METADATAONSTACKMARK_HPP
|
@ -178,7 +178,7 @@ class StackMapFrame : public ResourceObj {
|
||||
#ifdef DEBUG
|
||||
// Put bogus type to indicate it's no longer valid.
|
||||
if (_stack_mark != -1) {
|
||||
for (int i = _stack_mark; i >= _stack_size; --i) {
|
||||
for (int i = _stack_mark - 1; i >= _stack_size; --i) {
|
||||
_stack[i] = VerificationType::bogus_type();
|
||||
}
|
||||
}
|
||||
|
@ -1199,66 +1199,6 @@ instanceKlassHandle SystemDictionary::load_shared_class(
|
||||
return ik;
|
||||
}
|
||||
|
||||
#ifdef KERNEL
|
||||
// Some classes on the bootstrap class path haven't been installed on the
|
||||
// system yet. Call the DownloadManager method to make them appear in the
|
||||
// bootstrap class path and try again to load the named class.
|
||||
// Note that with delegation class loaders all classes in another loader will
|
||||
// first try to call this so it'd better be fast!!
|
||||
static instanceKlassHandle download_and_retry_class_load(
|
||||
Symbol* class_name,
|
||||
TRAPS) {
|
||||
|
||||
Klass* dlm = SystemDictionary::DownloadManager_klass();
|
||||
instanceKlassHandle nk;
|
||||
|
||||
// If download manager class isn't loaded just return.
|
||||
if (dlm == NULL) return nk;
|
||||
|
||||
{ HandleMark hm(THREAD);
|
||||
ResourceMark rm(THREAD);
|
||||
Handle s = java_lang_String::create_from_symbol(class_name, CHECK_(nk));
|
||||
Handle class_string = java_lang_String::externalize_classname(s, CHECK_(nk));
|
||||
|
||||
// return value
|
||||
JavaValue result(T_OBJECT);
|
||||
|
||||
// Call the DownloadManager. We assume that it has a lock because
|
||||
// multiple classes could be not found and downloaded at the same time.
|
||||
// class sun.misc.DownloadManager;
|
||||
// public static String getBootClassPathEntryForClass(String className);
|
||||
JavaCalls::call_static(&result,
|
||||
KlassHandle(THREAD, dlm),
|
||||
vmSymbols::getBootClassPathEntryForClass_name(),
|
||||
vmSymbols::string_string_signature(),
|
||||
class_string,
|
||||
CHECK_(nk));
|
||||
|
||||
// Get result.string and add to bootclasspath
|
||||
assert(result.get_type() == T_OBJECT, "just checking");
|
||||
oop obj = (oop) result.get_jobject();
|
||||
if (obj == NULL) { return nk; }
|
||||
|
||||
Handle h_obj(THREAD, obj);
|
||||
char* new_class_name = java_lang_String::as_platform_dependent_str(h_obj,
|
||||
CHECK_(nk));
|
||||
|
||||
// lock the loader
|
||||
// we use this lock because JVMTI does.
|
||||
Handle loader_lock(THREAD, SystemDictionary::system_loader_lock());
|
||||
|
||||
ObjectLocker ol(loader_lock, THREAD);
|
||||
// add the file to the bootclasspath
|
||||
ClassLoader::update_class_path_entry_list(new_class_name, true);
|
||||
} // end HandleMark
|
||||
|
||||
if (TraceClassLoading) {
|
||||
ClassLoader::print_bootclasspath();
|
||||
}
|
||||
return ClassLoader::load_classfile(class_name, CHECK_(nk));
|
||||
}
|
||||
#endif // KERNEL
|
||||
|
||||
|
||||
instanceKlassHandle SystemDictionary::load_instance_class(Symbol* class_name, Handle class_loader, TRAPS) {
|
||||
instanceKlassHandle nh = instanceKlassHandle(); // null Handle
|
||||
@ -1278,15 +1218,6 @@ instanceKlassHandle SystemDictionary::load_instance_class(Symbol* class_name, Ha
|
||||
k = ClassLoader::load_classfile(class_name, CHECK_(nh));
|
||||
}
|
||||
|
||||
#ifdef KERNEL
|
||||
// If the VM class loader has failed to load the class, call the
|
||||
// DownloadManager class to make it magically appear on the classpath
|
||||
// and try again. This is only configured with the Kernel VM.
|
||||
if (k.is_null()) {
|
||||
k = download_and_retry_class_load(class_name, CHECK_(nh));
|
||||
}
|
||||
#endif // KERNEL
|
||||
|
||||
// find_or_define_instance_class may return a different InstanceKlass
|
||||
if (!k.is_null()) {
|
||||
k = find_or_define_instance_class(class_name, class_loader, k, CHECK_(nh));
|
||||
@ -1822,13 +1753,7 @@ bool SystemDictionary::initialize_wk_klass(WKID id, int init_opt, TRAPS) {
|
||||
Symbol* symbol = vmSymbols::symbol_at((vmSymbols::SID)sid);
|
||||
Klass** klassp = &_well_known_klasses[id];
|
||||
bool must_load = (init_opt < SystemDictionary::Opt);
|
||||
bool try_load = true;
|
||||
if (init_opt == SystemDictionary::Opt_Kernel) {
|
||||
#ifndef KERNEL
|
||||
try_load = false;
|
||||
#endif //KERNEL
|
||||
}
|
||||
if ((*klassp) == NULL && try_load) {
|
||||
if ((*klassp) == NULL) {
|
||||
if (must_load) {
|
||||
(*klassp) = resolve_or_fail(symbol, true, CHECK_0); // load required class
|
||||
} else {
|
||||
@ -1918,12 +1843,6 @@ void SystemDictionary::initialize_preloaded_classes(TRAPS) {
|
||||
//_box_klasses[T_OBJECT] = WK_KLASS(object_klass);
|
||||
//_box_klasses[T_ARRAY] = WK_KLASS(object_klass);
|
||||
|
||||
#ifdef KERNEL
|
||||
if (DownloadManager_klass() == NULL) {
|
||||
warning("Cannot find sun/jkernel/DownloadManager");
|
||||
}
|
||||
#endif // KERNEL
|
||||
|
||||
{ // Compute whether we should use loadClass or loadClassInternal when loading classes.
|
||||
Method* method = InstanceKlass::cast(ClassLoader_klass())->find_method(vmSymbols::loadClassInternal_name(), vmSymbols::string_class_signature());
|
||||
_has_loadClassInternal = (method != NULL);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, 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
|
||||
@ -168,8 +168,6 @@ class SymbolPropertyTable;
|
||||
/* It's okay if this turns out to be NULL in non-1.4 JDKs. */ \
|
||||
do_klass(nio_Buffer_klass, java_nio_Buffer, Opt ) \
|
||||
\
|
||||
do_klass(DownloadManager_klass, sun_jkernel_DownloadManager, Opt_Kernel ) \
|
||||
\
|
||||
do_klass(PostVMInitHook_klass, sun_misc_PostVMInitHook, Opt ) \
|
||||
\
|
||||
/* Preload boxing klasses */ \
|
||||
@ -211,7 +209,6 @@ class SystemDictionary : AllStatic {
|
||||
Opt, // preload tried; NULL if not present
|
||||
Opt_Only_JDK14NewRef, // preload tried; use only with NewReflection
|
||||
Opt_Only_JDK15, // preload tried; use only with JDK1.5+
|
||||
Opt_Kernel, // preload tried only #ifdef KERNEL
|
||||
OPTION_LIMIT,
|
||||
CEIL_LG_OPTION_LIMIT = 4 // OPTION_LIMIT <= (1<<CEIL_LG_OPTION_LIMIT)
|
||||
};
|
||||
@ -394,7 +391,6 @@ public:
|
||||
static Klass* check_klass_Pre( Klass* k) { return check_klass(k); }
|
||||
static Klass* check_klass_Pre_JSR292(Klass* k) { return EnableInvokeDynamic ? check_klass(k) : k; }
|
||||
static Klass* check_klass_Opt( Klass* k) { return k; }
|
||||
static Klass* check_klass_Opt_Kernel(Klass* k) { return k; } //== Opt
|
||||
static Klass* check_klass_Opt_Only_JDK15(Klass* k) {
|
||||
assert(JDK_Version::is_gte_jdk15x_version(), "JDK 1.5 only");
|
||||
return k;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, 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
|
||||
@ -108,7 +108,6 @@
|
||||
template(java_lang_Compiler, "java/lang/Compiler") \
|
||||
template(sun_misc_Signal, "sun/misc/Signal") \
|
||||
template(java_lang_AssertionStatusDirectives, "java/lang/AssertionStatusDirectives") \
|
||||
template(sun_jkernel_DownloadManager, "sun/jkernel/DownloadManager") \
|
||||
template(getBootClassPathEntryForClass_name, "getBootClassPathEntryForClass") \
|
||||
template(sun_misc_PostVMInitHook, "sun/misc/PostVMInitHook") \
|
||||
template(sun_misc_Launcher_ExtClassLoader, "sun/misc/Launcher$ExtClassLoader") \
|
||||
|
@ -1398,7 +1398,7 @@ bool CompileBroker::compilation_is_prohibited(methodHandle method, int osr_bci,
|
||||
method->print_short_name(tty);
|
||||
tty->cr();
|
||||
}
|
||||
method->set_not_compilable_quietly();
|
||||
method->set_not_compilable(CompLevel_all, !quietly, "excluded by CompilerOracle");
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -102,7 +102,7 @@ CompactibleFreeListSpace::CompactibleFreeListSpace(BlockOffsetSharedArray* bs,
|
||||
// temporarily disabled).
|
||||
switch (dictionaryChoice) {
|
||||
case FreeBlockDictionary<FreeChunk>::dictionaryBinaryTree:
|
||||
_dictionary = new BinaryTreeDictionary<FreeChunk, AdaptiveFreeList>(mr);
|
||||
_dictionary = new AFLBinaryTreeDictionary(mr);
|
||||
break;
|
||||
case FreeBlockDictionary<FreeChunk>::dictionarySplayTree:
|
||||
case FreeBlockDictionary<FreeChunk>::dictionarySkipList:
|
||||
@ -122,7 +122,8 @@ CompactibleFreeListSpace::CompactibleFreeListSpace(BlockOffsetSharedArray* bs,
|
||||
// moved to its new location before the klass is moved.
|
||||
// Set the _refillSize for the linear allocation blocks
|
||||
if (!use_adaptive_freelists) {
|
||||
FreeChunk* fc = _dictionary->get_chunk(mr.word_size());
|
||||
FreeChunk* fc = _dictionary->get_chunk(mr.word_size(),
|
||||
FreeBlockDictionary<FreeChunk>::atLeast);
|
||||
// The small linAB initially has all the space and will allocate
|
||||
// a chunk of any size.
|
||||
HeapWord* addr = (HeapWord*) fc;
|
||||
@ -1647,7 +1648,8 @@ CompactibleFreeListSpace::getChunkFromIndexedFreeListHelper(size_t size,
|
||||
FreeChunk*
|
||||
CompactibleFreeListSpace::getChunkFromDictionary(size_t size) {
|
||||
assert_locked();
|
||||
FreeChunk* fc = _dictionary->get_chunk(size);
|
||||
FreeChunk* fc = _dictionary->get_chunk(size,
|
||||
FreeBlockDictionary<FreeChunk>::atLeast);
|
||||
if (fc == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
@ -1664,7 +1666,8 @@ CompactibleFreeListSpace::getChunkFromDictionary(size_t size) {
|
||||
FreeChunk*
|
||||
CompactibleFreeListSpace::getChunkFromDictionaryExact(size_t size) {
|
||||
assert_locked();
|
||||
FreeChunk* fc = _dictionary->get_chunk(size);
|
||||
FreeChunk* fc = _dictionary->get_chunk(size,
|
||||
FreeBlockDictionary<FreeChunk>::atLeast);
|
||||
if (fc == NULL) {
|
||||
return fc;
|
||||
}
|
||||
@ -1677,7 +1680,8 @@ CompactibleFreeListSpace::getChunkFromDictionaryExact(size_t size) {
|
||||
if (fc->size() < size + MinChunkSize) {
|
||||
// Return the chunk to the dictionary and go get a bigger one.
|
||||
returnChunkToDictionary(fc);
|
||||
fc = _dictionary->get_chunk(size + MinChunkSize);
|
||||
fc = _dictionary->get_chunk(size + MinChunkSize,
|
||||
FreeBlockDictionary<FreeChunk>::atLeast);
|
||||
if (fc == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ class CompactibleFreeListSpace: public CompactibleSpace {
|
||||
LinearAllocBlock _smallLinearAllocBlock;
|
||||
|
||||
FreeBlockDictionary<FreeChunk>::DictionaryChoice _dictionaryChoice;
|
||||
FreeBlockDictionary<FreeChunk>* _dictionary; // ptr to dictionary for large size blocks
|
||||
AFLBinaryTreeDictionary* _dictionary; // ptr to dictionary for large size blocks
|
||||
|
||||
AdaptiveFreeList<FreeChunk> _indexedFreeList[IndexSetSize];
|
||||
// indexed array for small size blocks
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2007, 2013, 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
|
||||
@ -25,8 +25,6 @@
|
||||
#ifndef SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_VMSTRUCTS_CMS_HPP
|
||||
#define SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_VMSTRUCTS_CMS_HPP
|
||||
|
||||
typedef BinaryTreeDictionary<FreeChunk, AdaptiveFreeList> AFLBinaryTreeDictionary;
|
||||
|
||||
#define VM_STRUCTS_CMS(nonstatic_field, \
|
||||
volatile_nonstatic_field, \
|
||||
static_field) \
|
||||
@ -34,14 +32,15 @@ typedef BinaryTreeDictionary<FreeChunk, AdaptiveFreeList> AFLBinaryTreeDictionar
|
||||
nonstatic_field(CompactibleFreeListSpace, _bt, BlockOffsetArrayNonContigSpace) \
|
||||
\
|
||||
nonstatic_field(CMSBitMap, _bmWordSize, size_t) \
|
||||
nonstatic_field(CMSBitMap, _shifter, const int) \
|
||||
nonstatic_field(CMSBitMap, _bm, BitMap) \
|
||||
nonstatic_field(CMSBitMap, _virtual_space, VirtualSpace) \
|
||||
nonstatic_field(CMSBitMap, _shifter, const int) \
|
||||
nonstatic_field(CMSBitMap, _bm, BitMap) \
|
||||
nonstatic_field(CMSBitMap, _virtual_space, VirtualSpace) \
|
||||
nonstatic_field(CMSCollector, _markBitMap, CMSBitMap) \
|
||||
nonstatic_field(ConcurrentMarkSweepGeneration, _cmsSpace, CompactibleFreeListSpace*) \
|
||||
static_field(ConcurrentMarkSweepThread, _collector, CMSCollector*) \
|
||||
nonstatic_field(LinearAllocBlock, _word_size, size_t) \
|
||||
nonstatic_field(AFLBinaryTreeDictionary, _total_size, size_t) \
|
||||
nonstatic_field(CompactibleFreeListSpace, _dictionary, AFLBinaryTreeDictionary*) \
|
||||
nonstatic_field(CompactibleFreeListSpace, _indexedFreeList[0], FreeList<FreeChunk>) \
|
||||
nonstatic_field(CompactibleFreeListSpace, _smallLinearAllocBlock, LinearAllocBlock)
|
||||
|
||||
@ -62,10 +61,9 @@ typedef BinaryTreeDictionary<FreeChunk, AdaptiveFreeList> AFLBinaryTreeDictionar
|
||||
declare_toplevel_type(SurrogateLockerThread*) \
|
||||
declare_toplevel_type(CompactibleFreeListSpace*) \
|
||||
declare_toplevel_type(CMSCollector*) \
|
||||
declare_toplevel_type(AFLBinaryTreeDictionary*) \
|
||||
declare_toplevel_type(AFLBinaryTreeDictionary) \
|
||||
declare_toplevel_type(LinearAllocBlock) \
|
||||
declare_toplevel_type(FreeBlockDictionary<FreeChunk>) \
|
||||
declare_type(AFLBinaryTreeDictionary, FreeBlockDictionary<FreeChunk>)
|
||||
declare_toplevel_type(FreeBlockDictionary<FreeChunk>)
|
||||
|
||||
#define VM_INT_CONSTANTS_CMS(declare_constant) \
|
||||
declare_constant(Generation::ConcurrentMarkSweep) \
|
||||
|
@ -571,19 +571,14 @@ ConcurrentMark::ConcurrentMark(G1CollectedHeap* g1h, ReservedSpace heap_rs) :
|
||||
_sleep_factor = 0.0;
|
||||
_marking_task_overhead = 1.0;
|
||||
} else {
|
||||
if (ConcGCThreads > 0) {
|
||||
// notice that ConcGCThreads overwrites G1MarkingOverheadPercent
|
||||
if (!FLAG_IS_DEFAULT(ConcGCThreads) && ConcGCThreads > 0) {
|
||||
// Note: ConcGCThreads has precedence over G1MarkingOverheadPercent
|
||||
// if both are set
|
||||
|
||||
_parallel_marking_threads = (uint) ConcGCThreads;
|
||||
_max_parallel_marking_threads = _parallel_marking_threads;
|
||||
_sleep_factor = 0.0;
|
||||
_marking_task_overhead = 1.0;
|
||||
} else if (G1MarkingOverheadPercent > 0) {
|
||||
// we will calculate the number of parallel marking threads
|
||||
// based on a target overhead with respect to the soft real-time
|
||||
// goal
|
||||
|
||||
// We will calculate the number of parallel marking threads based
|
||||
// on a target overhead with respect to the soft real-time goal
|
||||
double marking_overhead = (double) G1MarkingOverheadPercent / 100.0;
|
||||
double overall_cm_overhead =
|
||||
(double) MaxGCPauseMillis * marking_overhead /
|
||||
@ -596,17 +591,22 @@ ConcurrentMark::ConcurrentMark(G1CollectedHeap* g1h, ReservedSpace heap_rs) :
|
||||
double sleep_factor =
|
||||
(1.0 - marking_task_overhead) / marking_task_overhead;
|
||||
|
||||
_parallel_marking_threads = (uint) marking_thread_num;
|
||||
_max_parallel_marking_threads = _parallel_marking_threads;
|
||||
FLAG_SET_ERGO(uintx, ConcGCThreads, (uint) marking_thread_num);
|
||||
_sleep_factor = sleep_factor;
|
||||
_marking_task_overhead = marking_task_overhead;
|
||||
} else {
|
||||
_parallel_marking_threads = scale_parallel_threads((uint)ParallelGCThreads);
|
||||
_max_parallel_marking_threads = _parallel_marking_threads;
|
||||
// Calculate the number of parallel marking threads by scaling
|
||||
// the number of parallel GC threads.
|
||||
uint marking_thread_num = scale_parallel_threads((uint) ParallelGCThreads);
|
||||
FLAG_SET_ERGO(uintx, ConcGCThreads, marking_thread_num);
|
||||
_sleep_factor = 0.0;
|
||||
_marking_task_overhead = 1.0;
|
||||
}
|
||||
|
||||
assert(ConcGCThreads > 0, "Should have been set");
|
||||
_parallel_marking_threads = (uint) ConcGCThreads;
|
||||
_max_parallel_marking_threads = _parallel_marking_threads;
|
||||
|
||||
if (parallel_marking_threads() > 1) {
|
||||
_cleanup_task_overhead = 1.0;
|
||||
} else {
|
||||
@ -1190,7 +1190,7 @@ void ConcurrentMark::scanRootRegions() {
|
||||
uint active_workers = MAX2(1U, parallel_marking_threads());
|
||||
|
||||
CMRootRegionScanTask task(this);
|
||||
if (parallel_marking_threads() > 0) {
|
||||
if (use_parallel_marking_threads()) {
|
||||
_parallel_workers->set_active_workers((int) active_workers);
|
||||
_parallel_workers->run_task(&task);
|
||||
} else {
|
||||
@ -1226,7 +1226,7 @@ void ConcurrentMark::markFromRoots() {
|
||||
set_phase(active_workers, true /* concurrent */);
|
||||
|
||||
CMConcurrentMarkingTask markingTask(this, cmThread());
|
||||
if (parallel_marking_threads() > 0) {
|
||||
if (use_parallel_marking_threads()) {
|
||||
_parallel_workers->set_active_workers((int)active_workers);
|
||||
// Don't set _n_par_threads because it affects MT in proceess_strong_roots()
|
||||
// and the decisions on that MT processing is made elsewhere.
|
||||
@ -2167,7 +2167,8 @@ void ConcurrentMark::completeCleanup() {
|
||||
assert(tmp_free_list.is_empty(), "post-condition");
|
||||
}
|
||||
|
||||
// Support closures for reference procssing in G1
|
||||
// Supporting Object and Oop closures for reference discovery
|
||||
// and processing in during marking
|
||||
|
||||
bool G1CMIsAliveClosure::do_object_b(oop obj) {
|
||||
HeapWord* addr = (HeapWord*)obj;
|
||||
@ -2175,73 +2176,26 @@ bool G1CMIsAliveClosure::do_object_b(oop obj) {
|
||||
(!_g1->is_in_g1_reserved(addr) || !_g1->is_obj_ill(obj));
|
||||
}
|
||||
|
||||
class G1CMKeepAliveClosure: public ExtendedOopClosure {
|
||||
G1CollectedHeap* _g1;
|
||||
ConcurrentMark* _cm;
|
||||
public:
|
||||
G1CMKeepAliveClosure(G1CollectedHeap* g1, ConcurrentMark* cm) :
|
||||
_g1(g1), _cm(cm) {
|
||||
assert(Thread::current()->is_VM_thread(), "otherwise fix worker id");
|
||||
}
|
||||
// 'Keep Alive' oop closure used by both serial parallel reference processing.
|
||||
// Uses the CMTask associated with a worker thread (for serial reference
|
||||
// processing the CMTask for worker 0 is used) to preserve (mark) and
|
||||
// trace referent objects.
|
||||
//
|
||||
// Using the CMTask and embedded local queues avoids having the worker
|
||||
// threads operating on the global mark stack. This reduces the risk
|
||||
// of overflowing the stack - which we would rather avoid at this late
|
||||
// state. Also using the tasks' local queues removes the potential
|
||||
// of the workers interfering with each other that could occur if
|
||||
// operating on the global stack.
|
||||
|
||||
virtual void do_oop(narrowOop* p) { do_oop_work(p); }
|
||||
virtual void do_oop( oop* p) { do_oop_work(p); }
|
||||
|
||||
template <class T> void do_oop_work(T* p) {
|
||||
oop obj = oopDesc::load_decode_heap_oop(p);
|
||||
HeapWord* addr = (HeapWord*)obj;
|
||||
|
||||
if (_cm->verbose_high()) {
|
||||
gclog_or_tty->print_cr("\t[0] we're looking at location "
|
||||
"*"PTR_FORMAT" = "PTR_FORMAT,
|
||||
p, (void*) obj);
|
||||
}
|
||||
|
||||
if (_g1->is_in_g1_reserved(addr) && _g1->is_obj_ill(obj)) {
|
||||
_cm->mark_and_count(obj);
|
||||
_cm->mark_stack_push(obj);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
class G1CMDrainMarkingStackClosure: public VoidClosure {
|
||||
ConcurrentMark* _cm;
|
||||
CMMarkStack* _markStack;
|
||||
G1CMKeepAliveClosure* _oopClosure;
|
||||
public:
|
||||
G1CMDrainMarkingStackClosure(ConcurrentMark* cm, CMMarkStack* markStack,
|
||||
G1CMKeepAliveClosure* oopClosure) :
|
||||
_cm(cm),
|
||||
_markStack(markStack),
|
||||
_oopClosure(oopClosure) { }
|
||||
|
||||
void do_void() {
|
||||
_markStack->drain(_oopClosure, _cm->nextMarkBitMap(), false);
|
||||
}
|
||||
};
|
||||
|
||||
// 'Keep Alive' closure used by parallel reference processing.
|
||||
// An instance of this closure is used in the parallel reference processing
|
||||
// code rather than an instance of G1CMKeepAliveClosure. We could have used
|
||||
// the G1CMKeepAliveClosure as it is MT-safe. Also reference objects are
|
||||
// placed on to discovered ref lists once so we can mark and push with no
|
||||
// need to check whether the object has already been marked. Using the
|
||||
// G1CMKeepAliveClosure would mean, however, having all the worker threads
|
||||
// operating on the global mark stack. This means that an individual
|
||||
// worker would be doing lock-free pushes while it processes its own
|
||||
// discovered ref list followed by drain call. If the discovered ref lists
|
||||
// are unbalanced then this could cause interference with the other
|
||||
// workers. Using a CMTask (and its embedded local data structures)
|
||||
// avoids that potential interference.
|
||||
class G1CMParKeepAliveAndDrainClosure: public OopClosure {
|
||||
class G1CMKeepAliveAndDrainClosure: public OopClosure {
|
||||
ConcurrentMark* _cm;
|
||||
CMTask* _task;
|
||||
int _ref_counter_limit;
|
||||
int _ref_counter;
|
||||
public:
|
||||
G1CMParKeepAliveAndDrainClosure(ConcurrentMark* cm, CMTask* task) :
|
||||
_cm(cm), _task(task),
|
||||
_ref_counter_limit(G1RefProcDrainInterval) {
|
||||
G1CMKeepAliveAndDrainClosure(ConcurrentMark* cm, CMTask* task) :
|
||||
_cm(cm), _task(task), _ref_counter_limit(G1RefProcDrainInterval) {
|
||||
assert(_ref_counter_limit > 0, "sanity");
|
||||
_ref_counter = _ref_counter_limit;
|
||||
}
|
||||
@ -2262,18 +2216,22 @@ class G1CMParKeepAliveAndDrainClosure: public OopClosure {
|
||||
_ref_counter--;
|
||||
|
||||
if (_ref_counter == 0) {
|
||||
// We have dealt with _ref_counter_limit references, pushing them and objects
|
||||
// reachable from them on to the local stack (and possibly the global stack).
|
||||
// Call do_marking_step() to process these entries. We call the routine in a
|
||||
// loop, which we'll exit if there's nothing more to do (i.e. we're done
|
||||
// with the entries that we've pushed as a result of the deal_with_reference
|
||||
// calls above) or we overflow.
|
||||
// Note: CMTask::do_marking_step() can set the CMTask::has_aborted() flag
|
||||
// while there may still be some work to do. (See the comment at the
|
||||
// beginning of CMTask::do_marking_step() for those conditions - one of which
|
||||
// is reaching the specified time target.) It is only when
|
||||
// CMTask::do_marking_step() returns without setting the has_aborted() flag
|
||||
// that the marking has completed.
|
||||
// We have dealt with _ref_counter_limit references, pushing them
|
||||
// and objects reachable from them on to the local stack (and
|
||||
// possibly the global stack). Call CMTask::do_marking_step() to
|
||||
// process these entries.
|
||||
//
|
||||
// We call CMTask::do_marking_step() in a loop, which we'll exit if
|
||||
// there's nothing more to do (i.e. we're done with the entries that
|
||||
// were pushed as a result of the CMTask::deal_with_reference() calls
|
||||
// above) or we overflow.
|
||||
//
|
||||
// Note: CMTask::do_marking_step() can set the CMTask::has_aborted()
|
||||
// flag while there may still be some work to do. (See the comment at
|
||||
// the beginning of CMTask::do_marking_step() for those conditions -
|
||||
// one of which is reaching the specified time target.) It is only
|
||||
// when CMTask::do_marking_step() returns without setting the
|
||||
// has_aborted() flag that the marking step has completed.
|
||||
do {
|
||||
double mark_step_duration_ms = G1ConcMarkStepDurationMillis;
|
||||
_task->do_marking_step(mark_step_duration_ms,
|
||||
@ -2290,36 +2248,59 @@ class G1CMParKeepAliveAndDrainClosure: public OopClosure {
|
||||
}
|
||||
};
|
||||
|
||||
class G1CMParDrainMarkingStackClosure: public VoidClosure {
|
||||
// 'Drain' oop closure used by both serial and parallel reference processing.
|
||||
// Uses the CMTask associated with a given worker thread (for serial
|
||||
// reference processing the CMtask for worker 0 is used). Calls the
|
||||
// do_marking_step routine, with an unbelievably large timeout value,
|
||||
// to drain the marking data structures of the remaining entries
|
||||
// added by the 'keep alive' oop closure above.
|
||||
|
||||
class G1CMDrainMarkingStackClosure: public VoidClosure {
|
||||
ConcurrentMark* _cm;
|
||||
CMTask* _task;
|
||||
CMTask* _task;
|
||||
bool _do_stealing;
|
||||
bool _do_termination;
|
||||
public:
|
||||
G1CMParDrainMarkingStackClosure(ConcurrentMark* cm, CMTask* task) :
|
||||
_cm(cm), _task(task) { }
|
||||
G1CMDrainMarkingStackClosure(ConcurrentMark* cm, CMTask* task, bool is_par) :
|
||||
_cm(cm), _task(task) {
|
||||
assert(is_par || _task->worker_id() == 0,
|
||||
"Only task for worker 0 should be used if ref processing is single threaded");
|
||||
// We only allow stealing and only enter the termination protocol
|
||||
// in CMTask::do_marking_step() if this closure is being instantiated
|
||||
// for parallel reference processing.
|
||||
_do_stealing = _do_termination = is_par;
|
||||
}
|
||||
|
||||
void do_void() {
|
||||
do {
|
||||
if (_cm->verbose_high()) {
|
||||
gclog_or_tty->print_cr("\t[%u] Drain: Calling do marking_step",
|
||||
_task->worker_id());
|
||||
gclog_or_tty->print_cr("\t[%u] Drain: Calling do_marking_step - "
|
||||
"stealing: %s, termination: %s",
|
||||
_task->worker_id(),
|
||||
BOOL_TO_STR(_do_stealing),
|
||||
BOOL_TO_STR(_do_termination));
|
||||
}
|
||||
|
||||
// We call CMTask::do_marking_step() to completely drain the local and
|
||||
// global marking stacks. The routine is called in a loop, which we'll
|
||||
// exit if there's nothing more to do (i.e. we'completely drained the
|
||||
// entries that were pushed as a result of applying the
|
||||
// G1CMParKeepAliveAndDrainClosure to the entries on the discovered ref
|
||||
// lists above) or we overflow the global marking stack.
|
||||
// Note: CMTask::do_marking_step() can set the CMTask::has_aborted() flag
|
||||
// while there may still be some work to do. (See the comment at the
|
||||
// beginning of CMTask::do_marking_step() for those conditions - one of which
|
||||
// is reaching the specified time target.) It is only when
|
||||
// CMTask::do_marking_step() returns without setting the has_aborted() flag
|
||||
// that the marking has completed.
|
||||
// We call CMTask::do_marking_step() to completely drain the local
|
||||
// and global marking stacks of entries pushed by the 'keep alive'
|
||||
// oop closure (an instance of G1CMKeepAliveAndDrainClosure above).
|
||||
//
|
||||
// CMTask::do_marking_step() is called in a loop, which we'll exit
|
||||
// if there's nothing more to do (i.e. we'completely drained the
|
||||
// entries that were pushed as a a result of applying the 'keep alive'
|
||||
// closure to the entries on the discovered ref lists) or we overflow
|
||||
// the global marking stack.
|
||||
//
|
||||
// Note: CMTask::do_marking_step() can set the CMTask::has_aborted()
|
||||
// flag while there may still be some work to do. (See the comment at
|
||||
// the beginning of CMTask::do_marking_step() for those conditions -
|
||||
// one of which is reaching the specified time target.) It is only
|
||||
// when CMTask::do_marking_step() returns without setting the
|
||||
// has_aborted() flag that the marking step has completed.
|
||||
|
||||
_task->do_marking_step(1000000000.0 /* something very large */,
|
||||
true /* do_stealing */,
|
||||
true /* do_termination */);
|
||||
_do_stealing,
|
||||
_do_termination);
|
||||
} while (_task->has_aborted() && !_cm->has_overflown());
|
||||
}
|
||||
};
|
||||
@ -2352,19 +2333,23 @@ class G1CMRefProcTaskProxy: public AbstractGangTask {
|
||||
ProcessTask& _proc_task;
|
||||
G1CollectedHeap* _g1h;
|
||||
ConcurrentMark* _cm;
|
||||
bool _processing_is_mt;
|
||||
|
||||
public:
|
||||
G1CMRefProcTaskProxy(ProcessTask& proc_task,
|
||||
G1CollectedHeap* g1h,
|
||||
ConcurrentMark* cm) :
|
||||
AbstractGangTask("Process reference objects in parallel"),
|
||||
_proc_task(proc_task), _g1h(g1h), _cm(cm) { }
|
||||
_proc_task(proc_task), _g1h(g1h), _cm(cm) {
|
||||
ReferenceProcessor* rp = _g1h->ref_processor_cm();
|
||||
_processing_is_mt = rp->processing_is_mt();
|
||||
}
|
||||
|
||||
virtual void work(uint worker_id) {
|
||||
CMTask* marking_task = _cm->task(worker_id);
|
||||
G1CMIsAliveClosure g1_is_alive(_g1h);
|
||||
G1CMParKeepAliveAndDrainClosure g1_par_keep_alive(_cm, marking_task);
|
||||
G1CMParDrainMarkingStackClosure g1_par_drain(_cm, marking_task);
|
||||
G1CMKeepAliveAndDrainClosure g1_par_keep_alive(_cm, marking_task);
|
||||
G1CMDrainMarkingStackClosure g1_par_drain(_cm, marking_task, _processing_is_mt);
|
||||
|
||||
_proc_task.work(worker_id, g1_is_alive, g1_par_keep_alive, g1_par_drain);
|
||||
}
|
||||
@ -2372,6 +2357,7 @@ public:
|
||||
|
||||
void G1CMRefProcTaskExecutor::execute(ProcessTask& proc_task) {
|
||||
assert(_workers != NULL, "Need parallel worker threads.");
|
||||
assert(_g1h->ref_processor_cm()->processing_is_mt(), "processing is not MT");
|
||||
|
||||
G1CMRefProcTaskProxy proc_task_proxy(proc_task, _g1h, _cm);
|
||||
|
||||
@ -2399,6 +2385,7 @@ public:
|
||||
|
||||
void G1CMRefProcTaskExecutor::execute(EnqueueTask& enq_task) {
|
||||
assert(_workers != NULL, "Need parallel worker threads.");
|
||||
assert(_g1h->ref_processor_cm()->processing_is_mt(), "processing is not MT");
|
||||
|
||||
G1CMRefEnqueueTaskProxy enq_task_proxy(enq_task);
|
||||
|
||||
@ -2429,59 +2416,58 @@ void ConcurrentMark::weakRefsWork(bool clear_all_soft_refs) {
|
||||
// See the comment in G1CollectedHeap::ref_processing_init()
|
||||
// about how reference processing currently works in G1.
|
||||
|
||||
// Process weak references.
|
||||
// Set the soft reference policy
|
||||
rp->setup_policy(clear_all_soft_refs);
|
||||
assert(_markStack.isEmpty(), "mark stack should be empty");
|
||||
|
||||
G1CMKeepAliveClosure g1_keep_alive(g1h, this);
|
||||
G1CMDrainMarkingStackClosure
|
||||
g1_drain_mark_stack(this, &_markStack, &g1_keep_alive);
|
||||
// Non-MT instances 'Keep Alive' and 'Complete GC' oop closures.
|
||||
G1CMKeepAliveAndDrainClosure g1_keep_alive(this, task(0));
|
||||
G1CMDrainMarkingStackClosure g1_drain_mark_stack(this, task(0), false);
|
||||
|
||||
// We need at least one active thread. If reference processing is
|
||||
// not multi-threaded we use the current (ConcurrentMarkThread) thread,
|
||||
// otherwise we use the work gang from the G1CollectedHeap and we
|
||||
// utilize all the worker threads we can.
|
||||
uint active_workers = (rp->processing_is_mt() && g1h->workers() != NULL
|
||||
? g1h->workers()->active_workers()
|
||||
: 1U);
|
||||
|
||||
// We use the work gang from the G1CollectedHeap and we utilize all
|
||||
// the worker threads.
|
||||
uint active_workers = g1h->workers() ? g1h->workers()->active_workers() : 1U;
|
||||
active_workers = MAX2(MIN2(active_workers, _max_worker_id), 1U);
|
||||
|
||||
G1CMRefProcTaskExecutor par_task_executor(g1h, this,
|
||||
g1h->workers(), active_workers);
|
||||
|
||||
if (rp->processing_is_mt()) {
|
||||
// Set the degree of MT here. If the discovery is done MT, there
|
||||
// may have been a different number of threads doing the discovery
|
||||
// and a different number of discovered lists may have Ref objects.
|
||||
// That is OK as long as the Reference lists are balanced (see
|
||||
// balance_all_queues() and balance_queues()).
|
||||
rp->set_active_mt_degree(active_workers);
|
||||
AbstractRefProcTaskExecutor* executor = (rp->processing_is_mt()
|
||||
? &par_task_executor
|
||||
: NULL);
|
||||
|
||||
rp->process_discovered_references(&g1_is_alive,
|
||||
// Set the degree of MT processing here. If the discovery was done MT,
|
||||
// the number of threads involved during discovery could differ from
|
||||
// the number of active workers. This is OK as long as the discovered
|
||||
// Reference lists are balanced (see balance_all_queues() and balance_queues()).
|
||||
rp->set_active_mt_degree(active_workers);
|
||||
|
||||
// Process the weak references.
|
||||
rp->process_discovered_references(&g1_is_alive,
|
||||
&g1_keep_alive,
|
||||
&g1_drain_mark_stack,
|
||||
&par_task_executor);
|
||||
executor);
|
||||
|
||||
// The work routines of the parallel keep_alive and drain_marking_stack
|
||||
// will set the has_overflown flag if we overflow the global marking
|
||||
// stack.
|
||||
} else {
|
||||
rp->process_discovered_references(&g1_is_alive,
|
||||
&g1_keep_alive,
|
||||
&g1_drain_mark_stack,
|
||||
NULL);
|
||||
}
|
||||
// The do_oop work routines of the keep_alive and drain_marking_stack
|
||||
// oop closures will set the has_overflown flag if we overflow the
|
||||
// global marking stack.
|
||||
|
||||
assert(_markStack.overflow() || _markStack.isEmpty(),
|
||||
"mark stack should be empty (unless it overflowed)");
|
||||
if (_markStack.overflow()) {
|
||||
// Should have been done already when we tried to push an
|
||||
// This should have been done already when we tried to push an
|
||||
// entry on to the global mark stack. But let's do it again.
|
||||
set_has_overflown();
|
||||
}
|
||||
|
||||
if (rp->processing_is_mt()) {
|
||||
assert(rp->num_q() == active_workers, "why not");
|
||||
rp->enqueue_discovered_references(&par_task_executor);
|
||||
} else {
|
||||
rp->enqueue_discovered_references();
|
||||
}
|
||||
assert(rp->num_q() == active_workers, "why not");
|
||||
|
||||
rp->enqueue_discovered_references(executor);
|
||||
|
||||
rp->verify_no_references_recorded();
|
||||
assert(!rp->discovery_enabled(), "Post condition");
|
||||
@ -3242,7 +3228,9 @@ void ConcurrentMark::print_summary_info() {
|
||||
}
|
||||
|
||||
void ConcurrentMark::print_worker_threads_on(outputStream* st) const {
|
||||
_parallel_workers->print_worker_threads_on(st);
|
||||
if (use_parallel_marking_threads()) {
|
||||
_parallel_workers->print_worker_threads_on(st);
|
||||
}
|
||||
}
|
||||
|
||||
// We take a break if someone is trying to stop the world.
|
||||
|
@ -371,8 +371,8 @@ class ConcurrentMark: public CHeapObj<mtGC> {
|
||||
friend class CalcLiveObjectsClosure;
|
||||
friend class G1CMRefProcTaskProxy;
|
||||
friend class G1CMRefProcTaskExecutor;
|
||||
friend class G1CMParKeepAliveAndDrainClosure;
|
||||
friend class G1CMParDrainMarkingStackClosure;
|
||||
friend class G1CMKeepAliveAndDrainClosure;
|
||||
friend class G1CMDrainMarkingStackClosure;
|
||||
|
||||
protected:
|
||||
ConcurrentMarkThread* _cmThread; // the thread doing the work
|
||||
@ -499,17 +499,26 @@ protected:
|
||||
}
|
||||
|
||||
// accessor methods
|
||||
uint parallel_marking_threads() { return _parallel_marking_threads; }
|
||||
uint max_parallel_marking_threads() { return _max_parallel_marking_threads;}
|
||||
double sleep_factor() { return _sleep_factor; }
|
||||
double marking_task_overhead() { return _marking_task_overhead;}
|
||||
double cleanup_sleep_factor() { return _cleanup_sleep_factor; }
|
||||
double cleanup_task_overhead() { return _cleanup_task_overhead;}
|
||||
uint parallel_marking_threads() const { return _parallel_marking_threads; }
|
||||
uint max_parallel_marking_threads() const { return _max_parallel_marking_threads;}
|
||||
double sleep_factor() { return _sleep_factor; }
|
||||
double marking_task_overhead() { return _marking_task_overhead;}
|
||||
double cleanup_sleep_factor() { return _cleanup_sleep_factor; }
|
||||
double cleanup_task_overhead() { return _cleanup_task_overhead;}
|
||||
|
||||
HeapWord* finger() { return _finger; }
|
||||
bool concurrent() { return _concurrent; }
|
||||
uint active_tasks() { return _active_tasks; }
|
||||
ParallelTaskTerminator* terminator() { return &_terminator; }
|
||||
bool use_parallel_marking_threads() const {
|
||||
assert(parallel_marking_threads() <=
|
||||
max_parallel_marking_threads(), "sanity");
|
||||
assert((_parallel_workers == NULL && parallel_marking_threads() == 0) ||
|
||||
parallel_marking_threads() > 0,
|
||||
"parallel workers not set up correctly");
|
||||
return _parallel_workers != NULL;
|
||||
}
|
||||
|
||||
HeapWord* finger() { return _finger; }
|
||||
bool concurrent() { return _concurrent; }
|
||||
uint active_tasks() { return _active_tasks; }
|
||||
ParallelTaskTerminator* terminator() { return &_terminator; }
|
||||
|
||||
// It claims the next available region to be scanned by a marking
|
||||
// task/thread. It might return NULL if the next region is empty or
|
||||
|
@ -28,8 +28,9 @@
|
||||
#include "memory/cardTableModRefBS.hpp"
|
||||
#include "memory/memRegion.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
|
||||
#ifndef SERIALGC
|
||||
#if INCLUDE_ALL_GCS
|
||||
|
||||
class DirtyCardQueueSet;
|
||||
|
||||
@ -120,6 +121,6 @@ class G1SATBCardTableLoggingModRefBS: public G1SATBCardTableModRefBS {
|
||||
};
|
||||
|
||||
|
||||
#endif // SERIALGC
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
|
||||
#endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1SATBCARDTABLEMODREFBS_HPP
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user