This commit is contained in:
Lana Steuck 2013-02-13 12:38:28 -08:00
commit 56014d30fc
1168 changed files with 45300 additions and 7709 deletions

View File

@ -195,3 +195,6 @@ adb5171c554e14cd86f618b5584f6e3d693d5889 jdk8-b69
a41ada2ed4ef735449531c6ebe6cec593d890a1c jdk8-b71 a41ada2ed4ef735449531c6ebe6cec593d890a1c jdk8-b71
6725b3961f987cf40f446d1c11cd324a3bec545f jdk8-b72 6725b3961f987cf40f446d1c11cd324a3bec545f jdk8-b72
fe94b40ffd9390f6cffcdf51c0389b0e6dde0c13 jdk8-b73 fe94b40ffd9390f6cffcdf51c0389b0e6dde0c13 jdk8-b73
f627eff819628822a0777af8062244352f2a29cf jdk8-b74
f1478a6d25fddd311a84dcbfac50824cc1858bdd jdk8-b75
f407160c280d1c5b00d314c535441ac26f195fee jdk8-b76

View File

@ -195,3 +195,6 @@ cdb401a60cea6ad5ef3f498725ed1decf8dda1ea jdk8-b68
51ad2a34342055333eb5f36e2fb514b027895708 jdk8-b71 51ad2a34342055333eb5f36e2fb514b027895708 jdk8-b71
c1be681d80a1f1c848dc671d664fccb19e046a12 jdk8-b72 c1be681d80a1f1c848dc671d664fccb19e046a12 jdk8-b72
93b9664f97eeb6f89397a8842318ebacaac9feb9 jdk8-b73 93b9664f97eeb6f89397a8842318ebacaac9feb9 jdk8-b73
b43aa5bd8ca5c8121336495382d35ecfa7a71536 jdk8-b74
2a713921952cbd77a1e699626976cb6cdfe3e57e jdk8-b75
278af9fc67e7eba2884936b49ec07345f423aabb jdk8-b76

View File

@ -3723,7 +3723,7 @@ fi
#CUSTOM_AUTOCONF_INCLUDE #CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks: # Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1358499442 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 as_fn_error $? "Milestone must have a value" "$LINENO" 5
elif test "x$with_milestone" != x; then elif test "x$with_milestone" != x; then
MILESTONE="$with_milestone" MILESTONE="$with_milestone"
else fi
if test "x$MILESTONE" = x; then
MILESTONE=internal MILESTONE=internal
fi fi
@ -29247,6 +29248,12 @@ fi
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 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. # Print a helpful message on how to acquire the necessary build dependency.

View File

@ -389,7 +389,8 @@ if test "x$with_milestone" = xyes; then
AC_MSG_ERROR([Milestone must have a value]) AC_MSG_ERROR([Milestone must have a value])
elif test "x$with_milestone" != x; then elif test "x$with_milestone" != x; then
MILESTONE="$with_milestone" MILESTONE="$with_milestone"
else fi
if test "x$MILESTONE" = x; then
MILESTONE=internal MILESTONE=internal
fi fi

View File

@ -136,6 +136,12 @@ fi
AC_PATH_X AC_PATH_X
AC_PATH_XTRA AC_PATH_XTRA
# 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 if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
HELP_MSG_MISSING_DEPENDENCY([x11]) HELP_MSG_MISSING_DEPENDENCY([x11])
AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG]) AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG])

View File

@ -434,6 +434,12 @@ NATIVE2ASCII=@FIXPATH@ $(BOOT_JDK)/bin/native2ascii
JARSIGNER=@FIXPATH@ $(BOOT_JDK)/bin/jarsigner 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 # Base flags for RC
# Guarding this against resetting value. Legacy make files include spec multiple # Guarding this against resetting value. Legacy make files include spec multiple
# times. # times.

View File

@ -350,9 +350,15 @@ compare_zip_file() {
OTHER_DIR=$2 OTHER_DIR=$2
WORK_DIR=$3 WORK_DIR=$3
ZIP_FILE=$4 ZIP_FILE=$4
# Optionally provide different name for other zipfile
OTHER_ZIP_FILE=$5
THIS_ZIP=$THIS_DIR/$ZIP_FILE THIS_ZIP=$THIS_DIR/$ZIP_FILE
if [ -n "$OTHER_ZIP_FILE" ]; then
OTHER_ZIP=$OTHER_DIR/$OTHER_ZIP_FILE
else
OTHER_ZIP=$OTHER_DIR/$ZIP_FILE OTHER_ZIP=$OTHER_DIR/$ZIP_FILE
fi
THIS_SUFFIX="${THIS_ZIP##*.}" THIS_SUFFIX="${THIS_ZIP##*.}"
OTHER_SUFFIX="${OTHER_ZIP##*.}" OTHER_SUFFIX="${OTHER_ZIP##*.}"
@ -962,6 +968,9 @@ if [ -z "$1" ] || [ "$1" = "-h" ] || [ "$1" = "-?" ] || [ "$1" = "/h" ] || [ "$1
echo "[FILTER] List filenames in the image to compare, works for jars, zips, libs and execs" echo "[FILTER] List filenames in the image to compare, works for jars, zips, libs and execs"
echo "Example:" echo "Example:"
echo "bash ./common/bin/compareimages.sh CodePointIM.jar" echo "bash ./common/bin/compareimages.sh CodePointIM.jar"
echo ""
echo "-2zips <file1> <file2> Compare two zip files only"
echo ""
exit 10 exit 10
fi fi
@ -1023,6 +1032,13 @@ while [ -n "$1" ]; do
-execs) -execs)
CMP_EXECS=true CMP_EXECS=true
;; ;;
-2zips)
CMP_2_ZIPS=true
THIS_FILE=$2
OTHER_FILE=$3
shift
shift
;;
*) *)
CMP_NAMES=false CMP_NAMES=false
CMP_PERMS=false CMP_PERMS=false
@ -1041,6 +1057,18 @@ while [ -n "$1" ]; do
shift shift
done done
if [ "$CMP_2_ZIPS" = "true" ]; then
THIS_DIR="$(dirname $THIS_FILE)"
THIS_DIR="$(cd "$THIS_DIR" && pwd )"
OTHER_DIR="$(dirname $OTHER_FILE)"
OTHER_DIR="$(cd "$OTHER_DIR" && pwd )"
THIS_FILE_NAME="$(basename $THIS_FILE)"
OTHER_FILE_NAME="$(basename $OTHER_FILE)"
echo Comparing $THIS_DIR/$THIS_FILE_NAME and $OTHER_DIR/$OTHER_FILE_NAME
compare_zip_file $THIS_DIR $OTHER_DIR $COMPARE_ROOT/2zips $THIS_FILE_NAME $OTHER_FILE_NAME
exit
fi
if [ "$CMP_NAMES" = "false" ] && [ "$CMP_TYPES" = "false" ] && [ "$CMP_PERMS" = "false" ] && [ "$CMP_GENERAL" = "false" ] && [ "$CMP_ZIPS" = "false" ] && [ "$CMP_JARS" = "false" ] && [ "$CMP_LIBS" = "false" ] && [ "$CMP_EXECS" = "false" ]; then if [ "$CMP_NAMES" = "false" ] && [ "$CMP_TYPES" = "false" ] && [ "$CMP_PERMS" = "false" ] && [ "$CMP_GENERAL" = "false" ] && [ "$CMP_ZIPS" = "false" ] && [ "$CMP_JARS" = "false" ] && [ "$CMP_LIBS" = "false" ] && [ "$CMP_EXECS" = "false" ]; then
CMP_NAMES=true CMP_NAMES=true
CMP_PERMS=true CMP_PERMS=true

View File

@ -887,6 +887,17 @@ ACCEPTED_SMALL_SIZE_DIFF="
./jre/bin/unpack200.exe ./jre/bin/unpack200.exe
" "
# jabswitch.exe is compiled and linked with incremental turned on in the old
# build. This makes no sense, so it's turned off in the new build.
ACCEPTED_SIZE_DIFF="
./bin/jabswitch.exe
./jre/bin/jabswitch.exe
"
ACCEPTED_DIS_DIFF="
./bin/jabswitch.exe
./jre/bin/jabswitch.exe
"
# On windows, there are unavoidable allignment issues making # On windows, there are unavoidable allignment issues making
# a perfect disasm diff impossible. Filter out the following: # a perfect disasm diff impossible. Filter out the following:
# * Random parts of C++ symbols (this is a bit greedy, but does the trick) # * Random parts of C++ symbols (this is a bit greedy, but does the trick)

View File

@ -71,7 +71,7 @@ define add_idl_package
$4 $4
$(RM) -f $$(addprefix $3/$$($4_TMPDIR)/,$6) $(RM) -f $$(addprefix $3/$$($4_TMPDIR)/,$6)
$(CP) -rp $3/$$($4_TMPDIR)/* $3 $(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) $(RM) -rf $3/$$($4_TMPDIR)
endef endef

View File

@ -42,8 +42,8 @@ endif
FALSE_FIND_PATTERN:=-name FILE_NAME_THAT_DOESNT_EXIST FALSE_FIND_PATTERN:=-name FILE_NAME_THAT_DOESNT_EXIST
define SetupJavaCompiler define SetupJavaCompiler
# param 1 is for example BOOT_JAVAC or NEW_JAVAC # param 1 is for example GENERATE_OLD_BYTECODE or GENERATE_NEW_JDKBYTECODE
# This is the name later used to decide which java compiler to use. # This is the name of the compiler setup.
# param 2-9 are named args. # param 2-9 are named args.
# JVM:=The jvm used to run the javac/javah command # 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 # 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) ifneq (,$2)
$1_DEPS:=$2 $1_DEPS:=$2
else else
$1_DEPS:=$$(filter $$(addprefix %,$$($1_FIND_PATTERNS)),\ $1_DEPS:=$$(filter $$(addprefix %,$$($1_SUFFIXES)),\
$$(call CacheFind $$($1_SRCS))) $$(call CacheFind,$$($1_SRCS)))
ifneq (,$$($1_GREP_INCLUDE_PATTERNS)) ifneq (,$$($1_GREP_INCLUDE_PATTERNS))
$1_DEPS:=$$(filter $$(addsuffix %,$$($1_GREP_INCLUDE_PATTERNS)),$$($1_DEPS)) $1_DEPS:=$$(filter $$(addsuffix %,$$($1_GREP_INCLUDE_PATTERNS)),$$($1_DEPS))
endif endif
@ -487,10 +487,10 @@ define SetupJavaCompilation
# Using sjavac to compile. # Using sjavac to compile.
$1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_BIN)/javac_state $1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_BIN)/javac_state
# Create SJAVAC variable, # Create SJAVAC variable form JAVAC variable. Expects $1_JAVAC to be
# expects $1_JAVAC to be "bootclasspathprepend -jar ...javac.jar" # "bootclasspathprepend -cp .../javac.jar com.sun.tools.javac.Main"
# and it is rewritten into "bootclasspathprepend com.sun.tools.sjavac.Main" # and javac is simply replaced with sjavac.
$1_SJAVAC:=$$(word 1,$$($1_JAVAC)) -cp $$(word 3,$$($1_JAVAC)) com.sun.tools.sjavac.Main $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. # 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)))) $1_REMOTE:=--server:portfile=$$($1_SJAVAC_PORTFILE),id=$1,sjavac=$$(subst $$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$($1_SERVER_JVM) $$($1_SJAVAC))))

View File

@ -179,27 +179,52 @@ jprt_bundle: $(JPRT_ARCHIVE_BUNDLE)
$(JPRT_ARCHIVE_BUNDLE): bundles $(JPRT_ARCHIVE_BUNDLE): bundles
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
$(RM) $@ $(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 ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_BITS),solaris-64)
bundles: all 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) @$(call TargetEnter)
$(MKDIR) -p $(BUILD_OUTPUT)/bundles $(MKDIR) -p $(BUILD_OUTPUT)/bundles
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_BITS),solaris-64) $(CD) $(SRC_JDK_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip .
$(CD) $(JDK_OVERLAY_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/j2sdk-image.zip . $(CD) $(SRC_JRE_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/$(JRE_IMAGE_SUBDIR).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 .
if [ -d $(BUILD_OUTPUT)/install/bundles ] ; then \ if [ -d $(BUILD_OUTPUT)/install/bundles ] ; then \
$(CD) $(BUILD_OUTPUT)/install/bundles && $(ZIP) -q -r $(JPRT_ARCHIVE_INSTALL_BUNDLE) . ; \ $(CD) $(BUILD_OUTPUT)/install/bundles && $(ZIP) -q -r $(JPRT_ARCHIVE_INSTALL_BUNDLE) . ; \
fi 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 endif
@$(call TargetExit) @$(call TargetExit)
# Keep track of phony targets # Keep track of phony targets
PHONY_LIST += jprt_build_product jprt_build_fastdebug jprt_build_debug \ 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 # Phony targets

View File

@ -75,7 +75,14 @@ ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_BITS),solaris-64)
all: overlay-images all: overlay-images
endif 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) @$(call AtMakeStart)
langtools: langtools-only langtools: langtools-only

View File

@ -127,6 +127,11 @@ CORE_PKGS = \
java.sql \ java.sql \
java.text \ java.text \
java.text.spi \ java.text.spi \
java.time \
java.time.temporal \
java.time.calendar \
java.time.format \
java.time.zone \
java.util \ java.util \
java.util.concurrent \ java.util.concurrent \
java.util.concurrent.atomic \ java.util.concurrent.atomic \

View File

@ -1,4 +1,4 @@
# 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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -46,14 +46,11 @@ HOTSPOT_DOCS_IMPORT_PATH=$(HOTSPOT_OUTPUTDIR)/docs
BUILD_NUMBER=$(JDK_BUILD_NUMBER) BUILD_NUMBER=$(JDK_BUILD_NUMBER)
BOOT_JAVA_CMD=$(JAVA) JAVADOC_CMD = $(JAVA) \
JAVADOC_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/javadoc.jar
JAVADOC_CMD = $(BOOT_JAVA_CMD) \
-Xmx1024m \ -Xmx1024m \
-Djava.awt.headless=true \ -Djava.awt.headless=true \
"-Xbootclasspath/p:$(JAVADOC_JAR)" \ $(NEW_JAVADOC) \
-jar $(JAVADOC_JAR) -bootclasspath $(JDK_OUTPUTDIR)/classes -bootclasspath $(JDK_OUTPUTDIR)/classes
# Copyright year for beginning of Java and some of the apis # Copyright year for beginning of Java and some of the apis
# (Needed when creating the javadocs) # (Needed when creating the javadocs)
@ -269,6 +266,7 @@ COMMON_JAVADOCFLAGS = \
-quiet \ -quiet \
-use \ -use \
-keywords \ -keywords \
-Xdoclint:none \
$(ADDITIONAL_JAVADOCFLAGS) $(ADDITIONAL_JAVADOCFLAGS)
ifdef OPENJDK ifdef OPENJDK

View File

@ -195,3 +195,6 @@ d54dc53e223ed9ce7d5f4d2cd02ad9d5def3c2db jdk8-b59
8171d23e914d758836527b80b06debcfdb718f2d jdk8-b71 8171d23e914d758836527b80b06debcfdb718f2d jdk8-b71
cb40427f47145b01b7e53c3e02b38ff7625efbda jdk8-b72 cb40427f47145b01b7e53c3e02b38ff7625efbda jdk8-b72
191afde59e7be0e1a1d76d06f2a32ff17444f0ec jdk8-b73 191afde59e7be0e1a1d76d06f2a32ff17444f0ec jdk8-b73
2132845cf5f717ff5c240a2431c0c0e03e66e3a5 jdk8-b74
d4e68ce17795601017ac2f952baad7272942c36e jdk8-b75
58be6ca3c0603882a1ec478724e337aac85e0da0 jdk8-b76

View File

@ -35,8 +35,6 @@ include MakeBase.gmk
include JavaCompilation.gmk include JavaCompilation.gmk
include IdlCompilation.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. # The Corba sources are old and generates a LOT of warnings.
# Disable these using Xlint, until someone cares to fix them. # Disable these using Xlint, until someone cares to fix them.
DISABLE_CORBA_WARNINGS:=-Xlint:all,-deprecation,-unchecked,-serial,-fallthrough,-cast,-rawtypes,-static,-dep-ann 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. # Thus we force the target bytecode to the boot jdk bytecode.
$(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE,\ $(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE,\
JVM:=$(JAVA),\ JVM:=$(JAVA),\
JAVAC:=$(JAVAC_JARS),\ JAVAC:=$(NEW_JAVAC),\
FLAGS:=$(BOOT_JDK_SOURCETARGET) -bootclasspath $(BOOT_RTJAR) $(DISABLE_CORBA_WARNINGS),\ FLAGS:=$(BOOT_JDK_SOURCETARGET) -bootclasspath $(BOOT_RTJAR) $(DISABLE_CORBA_WARNINGS),\
SERVER_DIR:=$(SJAVAC_SERVER_DIR),\ SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
SERVER_JVM:=$(SJAVAC_SERVER_JAVA))) SERVER_JVM:=$(SJAVAC_SERVER_JAVA)))
@ -56,7 +54,7 @@ $(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE,\
# cannot necessarily be run with the boot jdk. # cannot necessarily be run with the boot jdk.
$(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE,\ $(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE,\
JVM:=$(JAVA),\ JVM:=$(JAVA),\
JAVAC:=$(JAVAC_JARS),\ JAVAC:=$(NEW_JAVAC),\
FLAGS:=-cp $(BOOT_TOOLSJAR) -XDignore.symbol.file=true $(DISABLE_CORBA_WARNINGS),\ FLAGS:=-cp $(BOOT_TOOLSJAR) -XDignore.symbol.file=true $(DISABLE_CORBA_WARNINGS),\
SERVER_DIR:=$(SJAVAC_SERVER_DIR),\ SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
SERVER_JVM:=$(SJAVAC_SERVER_JAVA))) SERVER_JVM:=$(SJAVAC_SERVER_JAVA)))

View File

@ -308,3 +308,9 @@ e94068d4ff52849c8aa0786a53a59b63d1312a39 jdk8-b70
d5cb5830f570d1304ea4b196dde672a291b55f29 jdk8-b72 d5cb5830f570d1304ea4b196dde672a291b55f29 jdk8-b72
1e129851479e4f5df439109fca2c7be1f1613522 hs25-b15 1e129851479e4f5df439109fca2c7be1f1613522 hs25-b15
11619f33cd683c2f1d6ef72f1c6ff3dacf5a9f1c jdk8-b73 11619f33cd683c2f1d6ef72f1c6ff3dacf5a9f1c jdk8-b73
70c89bd6b895a10d25ca70e08093c09ff2005fda hs25-b16
1a3e54283c54aaa8b3437813e8507fbdc966e5b6 jdk8-b74
b4391649e91ea8d37f66317a03d6d2573a93d10d hs25-b17
6778d0b1659323a506ca47600ca29a9d9f8b383d jdk8-b75
20b605466ccb1b3725eb25314d9e8782199630c5 jdk8-b76
412d722168bc23f8e6d98995202728678561417f hs25-b18

View File

@ -280,7 +280,7 @@ JNIEXPORT jbyteArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
return (err == PS_OK)? array : 0; 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 JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_getThreadIntegerRegisterSet0
(JNIEnv *env, jobject this_obj, jint lwp_id) { (JNIEnv *env, jobject this_obj, jint lwp_id) {
@ -299,9 +299,6 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
#ifdef i386 #ifdef i386
#define NPRGREG sun_jvm_hotspot_debugger_x86_X86ThreadContext_NPRGREG #define NPRGREG sun_jvm_hotspot_debugger_x86_X86ThreadContext_NPRGREG
#endif #endif
#ifdef ia64
#define NPRGREG IA64_REG_COUNT
#endif
#ifdef amd64 #ifdef amd64
#define NPRGREG sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext_NPRGREG #define NPRGREG sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext_NPRGREG
#endif #endif
@ -336,13 +333,6 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
#endif /* i386 */ #endif /* i386 */
#if ia64
regs = (*env)->GetLongArrayElements(env, array, &isCopy);
for (i = 0; i < NPRGREG; i++ ) {
regs[i] = 0xDEADDEAD;
}
#endif /* ia64 */
#ifdef amd64 #ifdef amd64
#define REG_INDEX(reg) sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext_##reg #define REG_INDEX(reg) sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext_##reg

View File

@ -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) #if defined(sparc) || defined(sparcv9)
#define user_regs_struct pt_regs #define user_regs_struct pt_regs

View File

@ -27,10 +27,7 @@
#include "sun_jvm_hotspot_debugger_windbg_WindbgDebuggerLocal.h" #include "sun_jvm_hotspot_debugger_windbg_WindbgDebuggerLocal.h"
#ifdef _M_IA64 #ifdef _M_IX86
#include "sun_jvm_hotspot_debugger_ia64_IA64ThreadContext.h"
#define NPRGREG sun_jvm_hotspot_debugger_ia64_IA64ThreadContext_NPRGREG
#elif _M_IX86
#include "sun_jvm_hotspot_debugger_x86_X86ThreadContext.h" #include "sun_jvm_hotspot_debugger_x86_X86ThreadContext.h"
#define NPRGREG sun_jvm_hotspot_debugger_x86_X86ThreadContext_NPRGREG #define NPRGREG sun_jvm_hotspot_debugger_x86_X86ThreadContext_NPRGREG
#elif _M_AMD64 #elif _M_AMD64
@ -491,92 +488,7 @@ static bool addThreads(JNIEnv* env, jobject obj) {
memset(&context, 0, sizeof(CONTEXT)); memset(&context, 0, sizeof(CONTEXT));
#undef REG_INDEX #undef REG_INDEX
#ifdef _M_IA64 #ifdef _M_IX86
#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
#define REG_INDEX(x) sun_jvm_hotspot_debugger_x86_X86ThreadContext_##x #define REG_INDEX(x) sun_jvm_hotspot_debugger_x86_X86ThreadContext_##x
context.ContextFlags = CONTEXT_FULL | CONTEXT_DEBUG_REGISTERS; context.ContextFlags = CONTEXT_FULL | CONTEXT_DEBUG_REGISTERS;

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -34,20 +34,10 @@ class WindbgAMD64Thread implements ThreadProxy {
private boolean gotID; private boolean gotID;
private long id; private long id;
/** The address argument must be the address of the HANDLE of the // The address argument must be the address of the OSThread::_thread_id
desired thread in the target process. */
WindbgAMD64Thread(WindbgDebugger debugger, Address addr) { WindbgAMD64Thread(WindbgDebugger debugger, Address addr) {
this.debugger = debugger; this.debugger = debugger;
// FIXME: size of data fetched here should be configurable. this.sysId = (long)addr.getCIntegerAt(0, 4, true);
// 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; gotID = false;
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -34,20 +34,10 @@ class WindbgX86Thread implements ThreadProxy {
private boolean gotID; private boolean gotID;
private long id; private long id;
/** The address argument must be the address of the HANDLE of the // The address argument must be the address of OSThread::_thread_id
desired thread in the target process. */
WindbgX86Thread(WindbgDebugger debugger, Address addr) { WindbgX86Thread(WindbgDebugger debugger, Address addr) {
this.debugger = debugger; this.debugger = debugger;
// FIXME: size of data fetched here should be configurable. this.sysId = (long)addr.getCIntegerAt(0, 4, true);
// 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; gotID = false;
} }

View File

@ -1,6 +1,6 @@
/* /*
* @(#)BinaryTreeDictionary.java * @(#)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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * 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.types.*;
import sun.jvm.hotspot.runtime.*; import sun.jvm.hotspot.runtime.*;
public class BinaryTreeDictionary extends VMObject { public class AFLBinaryTreeDictionary extends VMObject {
static { static {
VM.registerVMInitializedObserver(new Observer() { VM.registerVMInitializedObserver(new Observer() {
public void update(Observable o, Object data) { public void update(Observable o, Object data) {
@ -40,8 +40,8 @@ public class BinaryTreeDictionary extends VMObject {
} }
private static synchronized void initialize(TypeDataBase db) { private static synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("BinaryTreeDictionary"); Type type = db.lookupType("AFLBinaryTreeDictionary");
totalSizeField = type.getCIntegerField("_totalSize"); totalSizeField = type.getCIntegerField("_total_size");
} }
// Fields // Fields
@ -53,7 +53,7 @@ public class BinaryTreeDictionary extends VMObject {
} }
// Constructor // Constructor
public BinaryTreeDictionary(Address addr) { public AFLBinaryTreeDictionary(Address addr) {
super(addr); super(addr);
} }
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -117,9 +117,9 @@ public class CompactibleFreeListSpace extends CompactibleSpace {
} }
// large block // large block
BinaryTreeDictionary bfbd = (BinaryTreeDictionary) VMObjectFactory.newObject(BinaryTreeDictionary.class, AFLBinaryTreeDictionary aflbd = (AFLBinaryTreeDictionary) VMObjectFactory.newObject(AFLBinaryTreeDictionary.class,
dictionaryField.getValue(addr)); dictionaryField.getValue(addr));
size += bfbd.size(); size += aflbd.size();
// linear block in TLAB // linear block in TLAB

View File

@ -1,7 +1,7 @@
/* /*
* @(#)FreeList.java * @(#)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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * 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) { private static synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("FreeList"); Type type = db.lookupType("FreeList<FreeChunk>");
sizeField = type.getCIntegerField("_size"); sizeField = type.getCIntegerField("_size");
countField = type.getCIntegerField("_count"); countField = type.getCIntegerField("_count");
headerSize = type.getSize(); headerSize = type.getSize();

View File

@ -52,6 +52,9 @@ public class InstanceKlass extends Klass {
private static int LOW_OFFSET; private static int LOW_OFFSET;
private static int HIGH_OFFSET; private static int HIGH_OFFSET;
private static int FIELD_SLOTS; private static int FIELD_SLOTS;
private static short FIELDINFO_TAG_SIZE;
private static short FIELDINFO_TAG_MASK;
private static short FIELDINFO_TAG_OFFSET;
// ClassState constants // ClassState constants
private static int CLASS_STATE_ALLOCATED; private static int CLASS_STATE_ALLOCATED;
@ -96,9 +99,13 @@ public class InstanceKlass extends Klass {
NAME_INDEX_OFFSET = db.lookupIntConstant("FieldInfo::name_index_offset").intValue(); NAME_INDEX_OFFSET = db.lookupIntConstant("FieldInfo::name_index_offset").intValue();
SIGNATURE_INDEX_OFFSET = db.lookupIntConstant("FieldInfo::signature_index_offset").intValue(); SIGNATURE_INDEX_OFFSET = db.lookupIntConstant("FieldInfo::signature_index_offset").intValue();
INITVAL_INDEX_OFFSET = db.lookupIntConstant("FieldInfo::initval_index_offset").intValue(); INITVAL_INDEX_OFFSET = db.lookupIntConstant("FieldInfo::initval_index_offset").intValue();
LOW_OFFSET = db.lookupIntConstant("FieldInfo::low_offset").intValue(); LOW_OFFSET = db.lookupIntConstant("FieldInfo::low_packed_offset").intValue();
HIGH_OFFSET = db.lookupIntConstant("FieldInfo::high_offset").intValue(); HIGH_OFFSET = db.lookupIntConstant("FieldInfo::high_packed_offset").intValue();
FIELD_SLOTS = db.lookupIntConstant("FieldInfo::field_slots").intValue(); FIELD_SLOTS = db.lookupIntConstant("FieldInfo::field_slots").intValue();
FIELDINFO_TAG_SIZE = db.lookupIntConstant("FIELDINFO_TAG_SIZE").shortValue();
FIELDINFO_TAG_MASK = db.lookupIntConstant("FIELDINFO_TAG_MASK").shortValue();
FIELDINFO_TAG_OFFSET = db.lookupIntConstant("FIELDINFO_TAG_OFFSET").shortValue();
// read ClassState constants // read ClassState constants
CLASS_STATE_ALLOCATED = db.lookupIntConstant("InstanceKlass::allocated").intValue(); CLASS_STATE_ALLOCATED = db.lookupIntConstant("InstanceKlass::allocated").intValue();
CLASS_STATE_LOADED = db.lookupIntConstant("InstanceKlass::loaded").intValue(); CLASS_STATE_LOADED = db.lookupIntConstant("InstanceKlass::loaded").intValue();
@ -314,8 +321,12 @@ public class InstanceKlass extends Klass {
public int getFieldOffset(int index) { public int getFieldOffset(int index) {
U2Array fields = getFields(); U2Array fields = getFields();
return VM.getVM().buildIntFromShorts(fields.at(index * FIELD_SLOTS + LOW_OFFSET), short lo = fields.at(index * FIELD_SLOTS + LOW_OFFSET);
fields.at(index * FIELD_SLOTS + HIGH_OFFSET)); short hi = fields.at(index * FIELD_SLOTS + HIGH_OFFSET);
if ((lo & FIELDINFO_TAG_MASK) == FIELDINFO_TAG_OFFSET) {
return VM.getVM().buildIntFromShorts(lo, hi) >> FIELDINFO_TAG_SIZE;
}
throw new RuntimeException("should not reach here");
} }
// Accessors for declared fields // Accessors for declared fields

View File

@ -467,7 +467,7 @@ public class ObjectHeap {
liveRegions.add(tlab.start()); liveRegions.add(tlab.start());
liveRegions.add(tlab.start()); liveRegions.add(tlab.start());
liveRegions.add(tlab.top()); liveRegions.add(tlab.top());
liveRegions.add(tlab.end()); liveRegions.add(tlab.hardEnd());
} }
} }
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * 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. // to the sys_thread_t structure of the classic JVM implementation.
public class OSThread extends VMObject { public class OSThread extends VMObject {
private static JIntField interruptedField; private static JIntField interruptedField;
private static JIntField threadIdField;
static { static {
VM.registerVMInitializedObserver(new Observer() { VM.registerVMInitializedObserver(new Observer() {
public void update(Observable o, Object data) { public void update(Observable o, Object data) {
@ -43,6 +44,7 @@ public class OSThread extends VMObject {
private static synchronized void initialize(TypeDataBase db) { private static synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("OSThread"); Type type = db.lookupType("OSThread");
interruptedField = type.getJIntField("_interrupted"); interruptedField = type.getJIntField("_interrupted");
threadIdField = type.getJIntField("_thread_id");
} }
public OSThread(Address addr) { public OSThread(Address addr) {
@ -52,4 +54,9 @@ public class OSThread extends VMObject {
public boolean interrupted() { public boolean interrupted() {
return ((int)interruptedField.getValue(addr)) != 0; return ((int)interruptedField.getValue(addr)) != 0;
} }
public int threadId() {
return (int)threadIdField.getValue(addr);
}
} }

View File

@ -27,6 +27,7 @@ package sun.jvm.hotspot.runtime;
import java.io.*; import java.io.*;
import java.util.*; import java.util.*;
import sun.jvm.hotspot.debugger.*; import sun.jvm.hotspot.debugger.*;
import sun.jvm.hotspot.oops.*;
import sun.jvm.hotspot.types.*; import sun.jvm.hotspot.types.*;
/** <P> ThreadLocalAllocBuffer: a descriptor for thread-local storage /** <P> ThreadLocalAllocBuffer: a descriptor for thread-local storage
@ -65,6 +66,19 @@ public class ThreadLocalAllocBuffer extends VMObject {
public Address start() { return startField.getValue(addr); } public Address start() { return startField.getValue(addr); }
public Address end() { return endField.getValue(addr); } public Address end() { return endField.getValue(addr); }
public Address top() { return topField.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 /** Support for iteration over heap -- not sure how this will
interact with GC in reflective system, but necessary for the interact with GC in reflective system, but necessary for the

View File

@ -114,6 +114,7 @@ public class VM {
private int invalidOSREntryBCI; private int invalidOSREntryBCI;
private ReversePtrs revPtrs; private ReversePtrs revPtrs;
private VMRegImpl vmregImpl; private VMRegImpl vmregImpl;
private int reserveForAllocationPrefetch;
// System.getProperties from debuggee VM // System.getProperties from debuggee VM
private Properties sysProps; private Properties sysProps;
@ -293,6 +294,10 @@ public class VM {
vmRelease = CStringUtilities.getString(releaseAddr); vmRelease = CStringUtilities.getString(releaseAddr);
Address vmInternalInfoAddr = vmVersion.getAddressField("_s_internal_vm_info_string").getValue(); Address vmInternalInfoAddr = vmVersion.getAddressField("_s_internal_vm_info_string").getValue();
vmInternalInfo = CStringUtilities.getString(vmInternalInfoAddr); 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) { } catch (Exception exp) {
throw new RuntimeException("can't determine target's VM version : " + exp.getMessage()); throw new RuntimeException("can't determine target's VM version : " + exp.getMessage());
} }
@ -778,6 +783,10 @@ public class VM {
return vmInternalInfo; return vmInternalInfo;
} }
public int getReserveForAllocationPrefetch() {
return reserveForAllocationPrefetch;
}
public boolean isSharingEnabled() { public boolean isSharingEnabled() {
if (sharingEnabled == null) { if (sharingEnabled == null) {
Flag flag = getCommandLineFlag("UseSharedSpaces"); Flag flag = getCommandLineFlag("UseSharedSpaces");

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * 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; private static AddressField osThreadField;
// Field from OSThread // Field from OSThread
private static Field osThreadThreadHandleField; private static Field osThreadThreadIdField;
// This is currently unneeded but is being kept in case we change // This is currently unneeded but is being kept in case we change
// the currentFrameGuess algorithm // the currentFrameGuess algorithm
@ -64,7 +64,7 @@ public class Win32AMD64JavaThreadPDAccess implements JavaThreadPDAccess {
osThreadField = type.getAddressField("_osthread"); osThreadField = type.getAddressField("_osthread");
type = db.lookupType("OSThread"); type = db.lookupType("OSThread");
osThreadThreadHandleField = type.getField("_thread_handle"); osThreadThreadIdField = type.getField("_thread_id");
} }
public Address getLastJavaFP(Address addr) { 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 // Fetch the OSThread (for now and for simplicity, not making a
// separate "OSThread" class in this package) // separate "OSThread" class in this package)
Address osThreadAddr = osThreadField.getValue(addr); Address osThreadAddr = osThreadField.getValue(addr);
// Get the address of the HANDLE within the OSThread // Get the address of the thread_id within the OSThread
Address threadHandleAddr = Address threadIdAddr =
osThreadAddr.addOffsetTo(osThreadThreadHandleField.getOffset()); osThreadAddr.addOffsetTo(osThreadThreadIdField.getOffset());
JVMDebugger debugger = VM.getVM().getDebugger(); JVMDebugger debugger = VM.getVM().getDebugger();
return debugger.getThreadForIdentifierAddress(threadHandleAddr); return debugger.getThreadForIdentifierAddress(threadIdAddr);
} }
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * 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; private static AddressField osThreadField;
// Field from OSThread // Field from OSThread
private static Field osThreadThreadHandleField; private static Field osThreadThreadIdField;
// This is currently unneeded but is being kept in case we change // This is currently unneeded but is being kept in case we change
// the currentFrameGuess algorithm // the currentFrameGuess algorithm
@ -63,7 +63,7 @@ public class Win32X86JavaThreadPDAccess implements JavaThreadPDAccess {
osThreadField = type.getAddressField("_osthread"); osThreadField = type.getAddressField("_osthread");
type = db.lookupType("OSThread"); type = db.lookupType("OSThread");
osThreadThreadHandleField = type.getField("_thread_handle"); osThreadThreadIdField = type.getField("_thread_id");
} }
public Address getLastJavaFP(Address addr) { 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 // Fetch the OSThread (for now and for simplicity, not making a
// separate "OSThread" class in this package) // separate "OSThread" class in this package)
Address osThreadAddr = osThreadField.getValue(addr); Address osThreadAddr = osThreadField.getValue(addr);
// Get the address of the HANDLE within the OSThread // Get the address of the thread_id within the OSThread
Address threadHandleAddr = Address threadIdAddr =
osThreadAddr.addOffsetTo(osThreadThreadHandleField.getOffset()); osThreadAddr.addOffsetTo(osThreadThreadIdField.getOffset());
JVMDebugger debugger = VM.getVM().getDebugger(); JVMDebugger debugger = VM.getVM().getDebugger();
return debugger.getThreadForIdentifierAddress(threadHandleAddr); return debugger.getThreadForIdentifierAddress(threadIdAddr);
} }
} }

View File

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # 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 # Typical C1/C2 targets made available with this Makefile
C1_VM_TARGETS=product1 fastdebug1 optimized1 jvmg1 C1_VM_TARGETS=product1 fastdebug1 optimized1 jvmg1
C2_VM_TARGETS=product fastdebug optimized jvmg C2_VM_TARGETS=product fastdebug optimized jvmg
KERNEL_VM_TARGETS=productkernel fastdebugkernel optimizedkernel jvmgkernel
ZERO_VM_TARGETS=productzero fastdebugzero optimizedzero jvmgzero ZERO_VM_TARGETS=productzero fastdebugzero optimizedzero jvmgzero
SHARK_VM_TARGETS=productshark fastdebugshark optimizedshark jvmgshark SHARK_VM_TARGETS=productshark fastdebugshark optimizedshark jvmgshark
MINIMAL1_VM_TARGETS=productminimal1 fastdebugminimal1 jvmgminimal1 MINIMAL1_VM_TARGETS=productminimal1 fastdebugminimal1 jvmgminimal1
@ -161,11 +160,6 @@ $(C2_VM_TARGETS):
$(CD) $(GAMMADIR)/make; \ $(CD) $(GAMMADIR)/make; \
$(MAKE) BUILD_FLAVOR=$@ VM_TARGET=$@ generic_build2 $(ALT_OUT) $(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): $(ZERO_VM_TARGETS):
$(CD) $(GAMMADIR)/make; \ $(CD) $(GAMMADIR)/make; \
$(MAKE) BUILD_FLAVOR=$(@:%zero=%) VM_TARGET=$@ \ $(MAKE) BUILD_FLAVOR=$(@:%zero=%) VM_TARGET=$@ \
@ -223,24 +217,6 @@ else
$(MAKE_ARGS) $(VM_TARGET) $(MAKE_ARGS) $(VM_TARGET)
endif 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: generic_buildzero:
$(MKDIR) -p $(OUTPUTDIR) $(MKDIR) -p $(OUTPUTDIR)
$(CD) $(OUTPUTDIR); \ $(CD) $(OUTPUTDIR); \
@ -314,12 +290,10 @@ XUSAGE=$(HS_SRC_DIR)/share/vm/Xusage.txt
DOCS_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_docs DOCS_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_docs
C1_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler1 C1_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler1
C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler2 C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler2
KERNEL_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_kernel
ZERO_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_zero ZERO_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_zero
SHARK_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_shark SHARK_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_shark
C1_DIR=$(C1_BASE_DIR)/$(VM_SUBDIR) C1_DIR=$(C1_BASE_DIR)/$(VM_SUBDIR)
C2_DIR=$(C2_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) ZERO_DIR=$(ZERO_BASE_DIR)/$(VM_SUBDIR)
SHARK_DIR=$(SHARK_BASE_DIR)/$(VM_SUBDIR) SHARK_DIR=$(SHARK_BASE_DIR)/$(VM_SUBDIR)
MINIMAL1_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_minimal1 MINIMAL1_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_minimal1
@ -333,10 +307,6 @@ ifeq ($(JVM_VARIANT_CLIENT), true)
MISC_DIR=$(C1_DIR) MISC_DIR=$(C1_DIR)
GEN_DIR=$(C1_BASE_DIR)/generated GEN_DIR=$(C1_BASE_DIR)/generated
endif endif
ifeq ($(JVM_VARIANT_KERNEL), true)
MISC_DIR=$(C2_DIR)
GEN_DIR=$(C2_BASE_DIR)/generated
endif
ifeq ($(JVM_VARIANT_ZEROSHARK), true) ifeq ($(JVM_VARIANT_ZEROSHARK), true)
MISC_DIR=$(SHARK_DIR) MISC_DIR=$(SHARK_DIR)
GEN_DIR=$(SHARK_BASE_DIR)/generated GEN_DIR=$(SHARK_BASE_DIR)/generated
@ -386,16 +356,6 @@ $(EXPORT_SERVER_DIR)/%.pdb: $(C2_DIR)/%.pdb
$(install-file) $(install-file)
$(EXPORT_SERVER_DIR)/%.map: $(C2_DIR)/%.map $(EXPORT_SERVER_DIR)/%.map: $(C2_DIR)/%.map
$(install-file) $(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 endif
# Minimal JVM files always come from minimal area # Minimal JVM files always come from minimal area
@ -538,7 +498,7 @@ $(EXPORT_DOCS_DIR)/platform/jvmti/%: $(DOCS_DIR)/%
$(install-file) $(install-file)
# Xusage 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) $(prep-target)
$(RM) $@.temp $(RM) $@.temp
$(SED) 's/\(separated by \)[;:]/\1$(PATH_SEP)/g' $< > $@.temp $(SED) 's/\(separated by \)[;:]/\1$(PATH_SEP)/g' $< > $@.temp
@ -551,7 +511,6 @@ clobber clean: clean_build clean_export clean_jdk
clean_build: clean_build:
$(RM) -r $(C1_DIR) $(RM) -r $(C1_DIR)
$(RM) -r $(C2_DIR) $(RM) -r $(C2_DIR)
$(RM) -r $(KERNEL_DIR)
$(RM) -r $(ZERO_DIR) $(RM) -r $(ZERO_DIR)
$(RM) -r $(SHARK_DIR) $(RM) -r $(SHARK_DIR)
$(RM) -r $(MINIMAL1_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 -Xinternalversion
$(JDK_IMAGE_DIR)/bin/java -d$(ARCH_DATA_MODEL) -server -version $(JDK_IMAGE_DIR)/bin/java -d$(ARCH_DATA_MODEL) -server -version
endif 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:: copy_product_jdk::
$(RM) -r $(JDK_IMAGE_DIR) $(RM) -r $(JDK_IMAGE_DIR)
@ -665,7 +620,6 @@ target_help:
@$(ECHO) "Other targets are:" @$(ECHO) "Other targets are:"
@$(ECHO) " $(C1_VM_TARGETS)" @$(ECHO) " $(C1_VM_TARGETS)"
@$(ECHO) " $(C2_VM_TARGETS)" @$(ECHO) " $(C2_VM_TARGETS)"
@$(ECHO) " $(KERNEL_VM_TARGETS)"
@$(ECHO) " $(MINIMAL1_VM_TARGETS)" @$(ECHO) " $(MINIMAL1_VM_TARGETS)"
# Variable help (only common ones used by this workspace) # Variable help (only common ones used by this workspace)
@ -761,8 +715,8 @@ endif
include $(GAMMADIR)/make/jprt.gmk include $(GAMMADIR)/make/jprt.gmk
.PHONY: all world clobber clean help $(C1_VM_TARGETS) $(C2_VM_TARGETS) \ .PHONY: all world clobber clean help $(C1_VM_TARGETS) $(C2_VM_TARGETS) \
$(KERNEL_VM_TARGETS) $(MINIMAL1_VM_TARGETS) \ $(MINIMAL1_VM_TARGETS) \
generic_build1 generic_build2 generic_buildkernel generic_buildminimal1 generic_export \ generic_build1 generic_build2 generic_buildminimal1 generic_export \
export_product export_fastdebug export_debug export_optimized \ export_product export_fastdebug export_debug export_optimized \
export_jdk_product export_jdk_fastdebug export_jdk_debug \ export_jdk_product export_jdk_fastdebug export_jdk_debug \
create_jdk copy_jdk update_jdk test_jdk \ create_jdk copy_jdk update_jdk test_jdk \

View File

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # 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 # Rules to build jvm_db/dtrace, used by vm.make
# We build libjvm_dtrace/libjvm_db/dtrace for COMPILER1 and COMPILER2 # 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}", "CORE")
ifneq ("${TYPE}", "KERNEL")
ifeq ($(OS_VENDOR), Darwin) ifeq ($(OS_VENDOR), Darwin)
# we build dtrace for macosx using USDT2 probes # we build dtrace for macosx using USDT2 probes
@ -280,13 +279,6 @@ endif # ifneq ("${dtraceFound}", "")
endif # ifeq ($(OS_VENDOR), Darwin) 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 else # CORE build
dtraceCheck: dtraceCheck:

View File

@ -3,7 +3,7 @@
# #
# #
# Copyright (c) 2002, 2011, 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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -188,6 +188,7 @@ SUNWprivate_1.1 {
JVM_IsSilentCompiler; JVM_IsSilentCompiler;
JVM_IsSupportedJNIVersion; JVM_IsSupportedJNIVersion;
JVM_IsThreadAlive; JVM_IsThreadAlive;
JVM_IsVMGeneratedMethodIx;
JVM_LatestUserDefinedLoader; JVM_LatestUserDefinedLoader;
JVM_Listen; JVM_Listen;
JVM_LoadClass0; JVM_LoadClass0;
@ -205,7 +206,6 @@ SUNWprivate_1.1 {
JVM_NewMultiArray; JVM_NewMultiArray;
JVM_OnExit; JVM_OnExit;
JVM_Open; JVM_Open;
JVM_PrintStackTrace;
JVM_RaiseSignal; JVM_RaiseSignal;
JVM_RawMonitorCreate; JVM_RawMonitorCreate;
JVM_RawMonitorDestroy; JVM_RawMonitorDestroy;

View File

@ -3,7 +3,7 @@
# #
# #
# Copyright (c) 2002, 2011, 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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -188,6 +188,7 @@ SUNWprivate_1.1 {
JVM_IsSilentCompiler; JVM_IsSilentCompiler;
JVM_IsSupportedJNIVersion; JVM_IsSupportedJNIVersion;
JVM_IsThreadAlive; JVM_IsThreadAlive;
JVM_IsVMGeneratedMethodIx;
JVM_LatestUserDefinedLoader; JVM_LatestUserDefinedLoader;
JVM_Listen; JVM_Listen;
JVM_LoadClass0; JVM_LoadClass0;
@ -205,7 +206,6 @@ SUNWprivate_1.1 {
JVM_NewMultiArray; JVM_NewMultiArray;
JVM_OnExit; JVM_OnExit;
JVM_Open; JVM_Open;
JVM_PrintStackTrace;
JVM_RaiseSignal; JVM_RaiseSignal;
JVM_RawMonitorCreate; JVM_RawMonitorCreate;
JVM_RawMonitorDestroy; JVM_RawMonitorDestroy;

View File

@ -30,7 +30,7 @@ INCLUDE_VM_STRUCTS ?= false
INCLUDE_JNI_CHECK ?= false INCLUDE_JNI_CHECK ?= false
INCLUDE_SERVICES ?= false INCLUDE_SERVICES ?= false
INCLUDE_MANAGEMENT ?= false INCLUDE_MANAGEMENT ?= false
INCLUDE_ALTERNATE_GCS ?= false INCLUDE_ALL_GCS ?= false
INCLUDE_NMT ?= false INCLUDE_NMT ?= false
INCLUDE_CDS ?= false INCLUDE_CDS ?= false

View File

@ -72,12 +72,10 @@ ifeq ($(INCLUDE_CDS), false)
Src_Files_EXCLUDE += metaspaceShared.cpp Src_Files_EXCLUDE += metaspaceShared.cpp
endif endif
ifeq ($(INCLUDE_ALTERNATE_GCS), false) ifeq ($(INCLUDE_ALL_GCS), false)
CXXFLAGS += -DINCLUDE_ALTERNATE_GCS=0 CXXFLAGS += -DINCLUDE_ALL_GCS=0
CFLAGS += -DINCLUDE_ALTERNATE_GCS=0 CFLAGS += -DINCLUDE_ALL_GCS=0
CXXFLAGS += -DSERIALGC
CFLAGS += -DSERIALGC
Src_Files_EXCLUDE += \ Src_Files_EXCLUDE += \
cmsAdaptiveSizePolicy.cpp cmsCollectorPolicy.cpp \ cmsAdaptiveSizePolicy.cpp cmsCollectorPolicy.cpp \
cmsGCAdaptivePolicyCounters.cpp cmsLockVerifier.cpp cmsPermGen.cpp compactibleFreeListSpace.cpp \ cmsGCAdaptivePolicyCounters.cpp cmsLockVerifier.cpp cmsPermGen.cpp compactibleFreeListSpace.cpp \

View File

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -31,11 +31,11 @@
# #
# Don't put quotes (fail windows build). # Don't put quotes (fail windows build).
HOTSPOT_VM_COPYRIGHT=Copyright 2012 HOTSPOT_VM_COPYRIGHT=Copyright 2013
HS_MAJOR_VER=25 HS_MAJOR_VER=25
HS_MINOR_VER=0 HS_MINOR_VER=0
HS_BUILD_NUMBER=15 HS_BUILD_NUMBER=18
JDK_MAJOR_VER=1 JDK_MAJOR_VER=1
JDK_MINOR_VER=8 JDK_MINOR_VER=8

View File

@ -1,5 +1,5 @@
# #
# Copyright (c) 2002, 2011, 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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -184,6 +184,7 @@ SUNWprivate_1.1 {
JVM_IsSilentCompiler; JVM_IsSilentCompiler;
JVM_IsSupportedJNIVersion; JVM_IsSupportedJNIVersion;
JVM_IsThreadAlive; JVM_IsThreadAlive;
JVM_IsVMGeneratedMethodIx;
JVM_LatestUserDefinedLoader; JVM_LatestUserDefinedLoader;
JVM_Listen; JVM_Listen;
JVM_LoadClass0; JVM_LoadClass0;
@ -201,7 +202,6 @@ SUNWprivate_1.1 {
JVM_NewMultiArray; JVM_NewMultiArray;
JVM_OnExit; JVM_OnExit;
JVM_Open; JVM_Open;
JVM_PrintStackTrace;
JVM_RaiseSignal; JVM_RaiseSignal;
JVM_RawMonitorCreate; JVM_RawMonitorCreate;
JVM_RawMonitorDestroy; JVM_RawMonitorDestroy;

View File

@ -1,5 +1,5 @@
# #
# Copyright (c) 2002, 2011, 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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -184,6 +184,7 @@ SUNWprivate_1.1 {
JVM_IsSilentCompiler; JVM_IsSilentCompiler;
JVM_IsSupportedJNIVersion; JVM_IsSupportedJNIVersion;
JVM_IsThreadAlive; JVM_IsThreadAlive;
JVM_IsVMGeneratedMethodIx;
JVM_LatestUserDefinedLoader; JVM_LatestUserDefinedLoader;
JVM_Listen; JVM_Listen;
JVM_LoadClass0; JVM_LoadClass0;
@ -201,7 +202,6 @@ SUNWprivate_1.1 {
JVM_NewMultiArray; JVM_NewMultiArray;
JVM_OnExit; JVM_OnExit;
JVM_Open; JVM_Open;
JVM_PrintStackTrace;
JVM_RaiseSignal; JVM_RaiseSignal;
JVM_RawMonitorCreate; JVM_RawMonitorCreate;
JVM_RawMonitorDestroy; JVM_RawMonitorDestroy;

View File

@ -30,7 +30,7 @@ INCLUDE_VM_STRUCTS ?= false
INCLUDE_JNI_CHECK ?= false INCLUDE_JNI_CHECK ?= false
INCLUDE_SERVICES ?= false INCLUDE_SERVICES ?= false
INCLUDE_MANAGEMENT ?= false INCLUDE_MANAGEMENT ?= false
INCLUDE_ALTERNATE_GCS ?= false INCLUDE_ALL_GCS ?= false
INCLUDE_NMT ?= false INCLUDE_NMT ?= false
INCLUDE_CDS ?= false INCLUDE_CDS ?= false

View File

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # 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_C2 = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler2/,$(TARGETS))
SUBDIRS_TIERED = $(addprefix $(OSNAME)_$(BUILDARCH)_tiered/,$(TARGETS)) SUBDIRS_TIERED = $(addprefix $(OSNAME)_$(BUILDARCH)_tiered/,$(TARGETS))
SUBDIRS_CORE = $(addprefix $(OSNAME)_$(BUILDARCH)_core/,$(TARGETS)) SUBDIRS_CORE = $(addprefix $(OSNAME)_$(BUILDARCH)_core/,$(TARGETS))
SUBDIRS_KERNEL = $(addprefix $(OSNAME)_$(BUILDARCH)_kernel/,$(TARGETS))
TARGETS_C2 = $(TARGETS) TARGETS_C2 = $(TARGETS)
TARGETS_C1 = $(addsuffix 1,$(TARGETS)) TARGETS_C1 = $(addsuffix 1,$(TARGETS))
TARGETS_TIERED = $(addsuffix tiered,$(TARGETS)) TARGETS_TIERED = $(addsuffix tiered,$(TARGETS))
TARGETS_CORE = $(addsuffix core,$(TARGETS)) TARGETS_CORE = $(addsuffix core,$(TARGETS))
TARGETS_KERNEL = $(addsuffix kernel,$(TARGETS))
BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make
BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) ARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) ARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH)
@ -229,10 +227,6 @@ $(SUBDIRS_CORE): $(BUILDTREE_MAKE)
$(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
$(BUILDTREE) VARIANT=core $(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 # Define INSTALL=y at command line to automatically copy JVM into JAVA_HOME
$(TARGETS_C2): $(SUBDIRS_C2) $(TARGETS_C2): $(SUBDIRS_C2)
@ -271,20 +265,10 @@ ifdef INSTALL
cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) install cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) install
endif 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: # Just build the tree, and nothing else:
tree: $(SUBDIRS_C2) tree: $(SUBDIRS_C2)
tree1: $(SUBDIRS_C1) tree1: $(SUBDIRS_C1)
treecore: $(SUBDIRS_CORE) treecore: $(SUBDIRS_CORE)
treekernel: $(SUBDIRS_KERNEL)
# Doc target. This is the same for all build options. # Doc target. This is the same for all build options.
# Hence create a docs directory beside ...$(ARCH)_[...] # Hence create a docs directory beside ...$(ARCH)_[...]
@ -304,10 +288,10 @@ core: jvmgcore productcore
clean_docs: clean_docs:
rm -rf $(SUBDIR_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_,,$@) 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 include $(GAMMADIR)/make/cscope.make

View File

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # 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 # Rules to build jvm_db/dtrace, used by vm.make
# We build libjvm_dtrace/libjvm_db/dtrace for COMPILER1 and COMPILER2 # 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}", "CORE")
ifneq ("${TYPE}", "KERNEL")
ifdef USE_GCC ifdef USE_GCC
@ -362,13 +361,6 @@ endif # ifneq ("${dtraceFound}", "")
endif # ifdef USE_GCC endif # ifdef USE_GCC
else # KERNEL build
dtraceCheck:
$(QUIETLY) echo "**NOTICE** Dtrace support disabled for KERNEL builds"
endif # ifneq ("${TYPE}", "KERNEL")
else # CORE build else # CORE build
dtraceCheck: dtraceCheck:

View File

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

View File

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -184,6 +184,7 @@ SUNWprivate_1.1 {
JVM_IsSilentCompiler; JVM_IsSilentCompiler;
JVM_IsSupportedJNIVersion; JVM_IsSupportedJNIVersion;
JVM_IsThreadAlive; JVM_IsThreadAlive;
JVM_IsVMGeneratedMethodIx;
JVM_LatestUserDefinedLoader; JVM_LatestUserDefinedLoader;
JVM_Listen; JVM_Listen;
JVM_LoadClass0; JVM_LoadClass0;
@ -201,7 +202,6 @@ SUNWprivate_1.1 {
JVM_NewMultiArray; JVM_NewMultiArray;
JVM_OnExit; JVM_OnExit;
JVM_Open; JVM_Open;
JVM_PrintStackTrace;
JVM_RaiseSignal; JVM_RaiseSignal;
JVM_RawMonitorCreate; JVM_RawMonitorCreate;
JVM_RawMonitorDestroy; JVM_RawMonitorDestroy;

View File

@ -1,6 +1,6 @@
@echo off @echo off
REM 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 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
REM REM
REM This code is free software; you can redistribute it and/or modify it REM This code is free software; you can redistribute it and/or modify it
@ -67,7 +67,6 @@ goto usage
:test1 :test1
if "%2" == "core" goto test2 if "%2" == "core" goto test2
if "%2" == "kernel" goto test2
if "%2" == "compiler1" goto test2 if "%2" == "compiler1" goto test2
if "%2" == "compiler2" goto test2 if "%2" == "compiler2" goto test2
if "%2" == "tiered" 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.
echo where: echo where:
echo flavor is "product", "debug" or "fastdebug", 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 workspace is source directory without trailing slash,
echo bootstrap_dir is a full path to a JDK in which bin/java 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 echo and bin/javac are present and working, and build_id is an

View File

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # 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. # Include dirs per type.
case "${TYPE}" in case "${TYPE}" in
"core") Src_Dirs="${CORE_PATHS}" ;; "core") Src_Dirs="${CORE_PATHS}" ;;
"kernel") Src_Dirs="${BASE_PATHS} ${COMPILER1_PATHS}" ;;
"compiler1") Src_Dirs="${CORE_PATHS} ${COMPILER1_PATHS}" ;; "compiler1") Src_Dirs="${CORE_PATHS} ${COMPILER1_PATHS}" ;;
"compiler2") Src_Dirs="${CORE_PATHS} ${COMPILER2_PATHS}" ;; "compiler2") Src_Dirs="${CORE_PATHS} ${COMPILER2_PATHS}" ;;
"tiered") Src_Dirs="${CORE_PATHS} ${COMPILER1_PATHS} ${COMPILER2_PATHS}" ;; "tiered") Src_Dirs="${CORE_PATHS} ${COMPILER1_PATHS} ${COMPILER2_PATHS}" ;;
@ -120,16 +119,12 @@ COMPILER1_SPECIFIC_FILES="c1_*"
SHARK_SPECIFIC_FILES="shark" SHARK_SPECIFIC_FILES="shark"
ZERO_SPECIFIC_FILES="zero" 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. # Always exclude these.
Src_Files_EXCLUDE="jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp" Src_Files_EXCLUDE="jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp"
# Exclude per type. # Exclude per type.
case "${TYPE}" in case "${TYPE}" in
"core") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER1_SPECIFIC_FILES} ${COMPILER2_SPECIFIC_FILES} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES} ciTypeFlow.cpp" ;; "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" ;; "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}" ;; "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}" ;; "tiered") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES}" ;;

View File

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -157,7 +157,7 @@ endif
MAKE_ARGS += RM="$(RM)" MAKE_ARGS += RM="$(RM)"
MAKE_ARGS += ZIPEXE=$(ZIPEXE) 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 ($(JVM_VARIANTS),)
ifeq ($(ARCH_DATA_MODEL), 32) ifeq ($(ARCH_DATA_MODEL), 32)
JVM_VARIANTS:=client,server JVM_VARIANTS:=client,server
@ -250,7 +250,6 @@ endif
EXPORT_SERVER_DIR = $(EXPORT_JRE_BIN_DIR)/server EXPORT_SERVER_DIR = $(EXPORT_JRE_BIN_DIR)/server
EXPORT_CLIENT_DIR = $(EXPORT_JRE_BIN_DIR)/client EXPORT_CLIENT_DIR = $(EXPORT_JRE_BIN_DIR)/client
EXPORT_KERNEL_DIR = $(EXPORT_JRE_BIN_DIR)/kernel
ifeq ($(JVM_VARIANT_SERVER),true) ifeq ($(JVM_VARIANT_SERVER),true)
EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt
@ -277,18 +276,6 @@ ifeq ($(JVM_VARIANT_CLIENT),true)
endif endif
endif 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 EXPORT_LIST += $(EXPORT_JRE_LIB_DIR)/wb.jar

View File

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -166,63 +166,6 @@ ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \
$(ProjectCreatorIDEOptionsIgnoreCompiler1:TARGET=core) \ $(ProjectCreatorIDEOptionsIgnoreCompiler1:TARGET=core) \
$(ProjectCreatorIDEOptionsIgnoreCompiler2: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 # Client(C1) compiler specific options
################################################## ##################################################

View File

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # 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 # No need to define anything, CORE is defined as !COMPILER1 && !COMPILER2
!endif !endif
!if "$(Variant)" == "kernel"
CXX_FLAGS=$(CXX_FLAGS) /D "KERNEL"
!endif
!if "$(Variant)" == "compiler1" !if "$(Variant)" == "compiler1"
CXX_FLAGS=$(CXX_FLAGS) /D "COMPILER1" CXX_FLAGS=$(CXX_FLAGS) /D "COMPILER1"
!endif !endif

View File

@ -30,10 +30,11 @@
#include "c1/c1_Runtime1.hpp" #include "c1/c1_Runtime1.hpp"
#include "nativeInst_sparc.hpp" #include "nativeInst_sparc.hpp"
#include "runtime/sharedRuntime.hpp" #include "runtime/sharedRuntime.hpp"
#include "utilities/macros.hpp"
#include "vmreg_sparc.inline.hpp" #include "vmreg_sparc.inline.hpp"
#ifndef SERIALGC #if INCLUDE_ALL_GCS
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp" #include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
#endif #endif // INCLUDE_ALL_GCS
#define __ ce->masm()-> #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) { void G1PreBarrierStub::emit_code(LIR_Assembler* ce) {
// At this point we know that marking is in progress. // At this point we know that marking is in progress.
@ -483,7 +484,7 @@ void G1PostBarrierStub::emit_code(LIR_Assembler* ce) {
__ delayed()->nop(); __ delayed()->nop();
} }
#endif // SERIALGC #endif // INCLUDE_ALL_GCS
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#undef __ #undef __

View File

@ -35,6 +35,7 @@
#include "runtime/sharedRuntime.hpp" #include "runtime/sharedRuntime.hpp"
#include "runtime/signature.hpp" #include "runtime/signature.hpp"
#include "runtime/vframeArray.hpp" #include "runtime/vframeArray.hpp"
#include "utilities/macros.hpp"
#include "vmreg_sparc.inline.hpp" #include "vmreg_sparc.inline.hpp"
// Implementation of StubAssembler // Implementation of StubAssembler
@ -822,7 +823,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
} }
break; break;
#ifndef SERIALGC #if INCLUDE_ALL_GCS
case g1_pre_barrier_slow_id: case g1_pre_barrier_slow_id:
{ // G4: previous value of memory { // G4: previous value of memory
BarrierSet* bs = Universe::heap()->barrier_set(); BarrierSet* bs = Universe::heap()->barrier_set();
@ -984,7 +985,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
__ delayed()->restore(); __ delayed()->restore();
} }
break; break;
#endif // !SERIALGC #endif // INCLUDE_ALL_GCS
default: default:
{ __ set_info("unimplemented entry", dont_gc_arguments); { __ set_info("unimplemented entry", dont_gc_arguments);

View File

@ -42,7 +42,7 @@ define_pd_global(bool, ProfileInterpreter, false);
#else #else
define_pd_global(bool, ProfileInterpreter, true); define_pd_global(bool, ProfileInterpreter, true);
#endif // CC_INTERP #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, CompileThreshold, 10000);
define_pd_global(intx, BackEdgeThreshold, 140000); define_pd_global(intx, BackEdgeThreshold, 140000);

View File

@ -45,6 +45,7 @@
#include "runtime/timer.hpp" #include "runtime/timer.hpp"
#include "runtime/vframeArray.hpp" #include "runtime/vframeArray.hpp"
#include "utilities/debug.hpp" #include "utilities/debug.hpp"
#include "utilities/macros.hpp"
#ifdef SHARK #ifdef SHARK
#include "shark/shark_globals.hpp" #include "shark/shark_globals.hpp"
#endif #endif
@ -551,7 +552,7 @@ address InterpreterGenerator::generate_accessor_entry(void) {
} }
address InterpreterGenerator::generate_Reference_get_entry(void) { address InterpreterGenerator::generate_Reference_get_entry(void) {
#ifndef SERIALGC #if INCLUDE_ALL_GCS
if (UseG1GC) { if (UseG1GC) {
// We need to generate have a routine that generates code to: // We need to generate have a routine that generates code to:
// * load the value in the referent field // * load the value in the referent field
@ -563,7 +564,7 @@ address InterpreterGenerator::generate_Reference_get_entry(void) {
// field as live. // field as live.
Unimplemented(); Unimplemented();
} }
#endif // SERIALGC #endif // INCLUDE_ALL_GCS
// If G1 is not enabled then attempt to go through the accessor entry point // If G1 is not enabled then attempt to go through the accessor entry point
// Reference.get is an accessor // Reference.get is an accessor

View File

@ -36,11 +36,12 @@
#include "runtime/os.hpp" #include "runtime/os.hpp"
#include "runtime/sharedRuntime.hpp" #include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.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/g1CollectedHeap.inline.hpp"
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp" #include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
#include "gc_implementation/g1/heapRegion.hpp" #include "gc_implementation/g1/heapRegion.hpp"
#endif #endif // INCLUDE_ALL_GCS
#ifdef PRODUCT #ifdef PRODUCT
#define BLOCK_COMMENT(str) /* nothing */ #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 address satb_log_enqueue_with_frame = NULL;
static u_char* satb_log_enqueue_with_frame_end = 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); bind(filtered);
} }
#endif // SERIALGC #endif // INCLUDE_ALL_GCS
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
void MacroAssembler::card_write_barrier_post(Register store_addr, Register new_val, Register tmp) { void MacroAssembler::card_write_barrier_post(Register store_addr, Register new_val, Register tmp) {

View File

@ -26,6 +26,7 @@
#define CPU_SPARC_VM_MACROASSEMBLER_SPARC_HPP #define CPU_SPARC_VM_MACROASSEMBLER_SPARC_HPP
#include "asm/assembler.hpp" #include "asm/assembler.hpp"
#include "utilities/macros.hpp"
// <sys/trap.h> promises that the system will not use traps 16-31 // <sys/trap.h> promises that the system will not use traps 16-31
#define ST_RESERVED_FOR_USER_0 0x10 #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); void card_write_barrier_post(Register store_addr, Register new_val, Register tmp);
#ifndef SERIALGC #if INCLUDE_ALL_GCS
// General G1 pre-barrier generator. // 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); 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 // General G1 post-barrier generator
void g1_write_barrier_post(Register store_addr, Register new_val, Register tmp); 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 // pushes double TOS element of FPU stack on CPU stack; pops from FPU stack
void push_fTOS(); void push_fTOS();

View File

@ -44,6 +44,7 @@
#include "runtime/timer.hpp" #include "runtime/timer.hpp"
#include "runtime/vframeArray.hpp" #include "runtime/vframeArray.hpp"
#include "utilities/debug.hpp" #include "utilities/debug.hpp"
#include "utilities/macros.hpp"
#ifndef CC_INTERP #ifndef CC_INTERP
#ifndef FAST_DISPATCH #ifndef FAST_DISPATCH
@ -734,7 +735,7 @@ address InterpreterGenerator::generate_accessor_entry(void) {
// Method entry for java.lang.ref.Reference.get. // Method entry for java.lang.ref.Reference.get.
address InterpreterGenerator::generate_Reference_get_entry(void) { address InterpreterGenerator::generate_Reference_get_entry(void) {
#ifndef SERIALGC #if INCLUDE_ALL_GCS
// Code: _aload_0, _getfield, _areturn // Code: _aload_0, _getfield, _areturn
// parameter size = 1 // parameter size = 1
// //
@ -805,7 +806,7 @@ address InterpreterGenerator::generate_Reference_get_entry(void) {
(void) generate_normal_entry(false); (void) generate_normal_entry(false);
return entry; return entry;
} }
#endif // SERIALGC #endif // INCLUDE_ALL_GCS
// If G1 is not enabled then attempt to go through the accessor entry point // If G1 is not enabled then attempt to go through the accessor entry point
// Reference.get is an accessor // Reference.get is an accessor

View File

@ -34,6 +34,7 @@
#include "runtime/sharedRuntime.hpp" #include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.hpp" #include "runtime/stubRoutines.hpp"
#include "runtime/synchronizer.hpp" #include "runtime/synchronizer.hpp"
#include "utilities/macros.hpp"
#ifndef CC_INTERP #ifndef CC_INTERP
#define __ _masm-> #define __ _masm->
@ -53,7 +54,7 @@ static void do_oop_store(InterpreterMacroAssembler* _masm,
assert(tmp != val && tmp != base && tmp != index, "register collision"); assert(tmp != val && tmp != base && tmp != index, "register collision");
assert(index == noreg || offset == 0, "only one offset"); assert(index == noreg || offset == 0, "only one offset");
switch (barrier) { switch (barrier) {
#ifndef SERIALGC #if INCLUDE_ALL_GCS
case BarrierSet::G1SATBCT: case BarrierSet::G1SATBCT:
case BarrierSet::G1SATBCTLogging: case BarrierSet::G1SATBCTLogging:
{ {
@ -82,7 +83,7 @@ static void do_oop_store(InterpreterMacroAssembler* _masm,
} }
} }
break; break;
#endif // SERIALGC #endif // INCLUDE_ALL_GCS
case BarrierSet::CardTableModRef: case BarrierSet::CardTableModRef:
case BarrierSet::CardTableExtension: case BarrierSet::CardTableExtension:
{ {

View File

@ -29,7 +29,7 @@
// constants required by the Serviceability Agent. This file is // constants required by the Serviceability Agent. This file is
// referenced by vmStructs.cpp. // referenced by vmStructs.cpp.
#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field, last_entry) \ #define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) \
\ \
/******************************/ \ /******************************/ \
/* JavaCallWrapper */ \ /* JavaCallWrapper */ \
@ -37,22 +37,12 @@
/******************************/ \ /******************************/ \
/* JavaFrameAnchor */ \ /* JavaFrameAnchor */ \
/******************************/ \ /******************************/ \
volatile_nonstatic_field(JavaFrameAnchor, _flags, int) \ volatile_nonstatic_field(JavaFrameAnchor, _flags, int)
\
/* NOTE that we do not use the last_entry() macro here; it is used */ #define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type)
/* in vmStructs_<os>_<cpu>.hpp's VM_STRUCTS_OS_CPU macro (and must */
/* be present there) */
#define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type, last_entry) \ #define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) \
/* NOTE that we do not use the last_entry() macro here; it is used */
/* in vmStructs_<os>_<cpu>.hpp's VM_TYPES_OS_CPU macro (and must */
/* be present there) */
#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant, last_entry) \
/******************************/ \ /******************************/ \
/* Register numbers (C2 only) */ \ /* Register numbers (C2 only) */ \
/******************************/ \ /******************************/ \
@ -90,15 +80,6 @@
declare_c2_constant(R_G6_num) \ declare_c2_constant(R_G6_num) \
declare_c2_constant(R_G7_num) declare_c2_constant(R_G7_num)
#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant)
/* NOTE that we do not use the last_entry() macro here; it is used */
/* in vmStructs_<os>_<cpu>.hpp's VM_INT_CONSTANTS_OS_CPU macro (and must */
/* be present there) */
#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant, last_entry) \
/* NOTE that we do not use the last_entry() macro here; it is used */
/* in vmStructs_<os>_<cpu>.hpp's VM_LONG_CONSTANTS_OS_CPU macro (and must */
/* be present there) */
#endif // CPU_SPARC_VM_VMSTRUCTS_SPARC_HPP #endif // CPU_SPARC_VM_VMSTRUCTS_SPARC_HPP

View File

@ -259,6 +259,10 @@ void VM_Version::initialize() {
if (!has_vis1()) // Drop to 0 if no VIS1 support if (!has_vis1()) // Drop to 0 if no VIS1 support
UseVIS = 0; UseVIS = 0;
if (FLAG_IS_DEFAULT(ContendedPaddingWidth) &&
(cache_line_size > ContendedPaddingWidth))
ContendedPaddingWidth = cache_line_size;
#ifndef PRODUCT #ifndef PRODUCT
if (PrintMiscellaneous && Verbose) { if (PrintMiscellaneous && Verbose) {
tty->print("Allocation"); tty->print("Allocation");
@ -286,6 +290,9 @@ void VM_Version::initialize() {
if (PrefetchFieldsAhead > 0) { if (PrefetchFieldsAhead > 0) {
tty->print_cr("PrefetchFieldsAhead %d", PrefetchFieldsAhead); tty->print_cr("PrefetchFieldsAhead %d", PrefetchFieldsAhead);
} }
if (ContendedPaddingWidth > 0) {
tty->print_cr("ContendedPaddingWidth %d", ContendedPaddingWidth);
}
} }
#endif // PRODUCT #endif // PRODUCT
} }

View File

@ -36,11 +36,12 @@
#include "runtime/os.hpp" #include "runtime/os.hpp"
#include "runtime/sharedRuntime.hpp" #include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.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/g1CollectedHeap.inline.hpp"
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp" #include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
#include "gc_implementation/g1/heapRegion.hpp" #include "gc_implementation/g1/heapRegion.hpp"
#endif #endif // INCLUDE_ALL_GCS
#ifdef PRODUCT #ifdef PRODUCT
#define BLOCK_COMMENT(str) /* nothing */ #define BLOCK_COMMENT(str) /* nothing */
@ -2263,6 +2264,18 @@ void Assembler::packuswb(XMMRegister dst, XMMRegister src) {
emit_simd_arith(0x67, dst, src, VEX_SIMD_66); emit_simd_arith(0x67, dst, src, VEX_SIMD_66);
} }
void Assembler::vpackuswb(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256) {
assert(VM_Version::supports_avx() && !vector256 || VM_Version::supports_avx2(), "256 bit integer vectors requires AVX2");
emit_vex_arith(0x67, dst, nds, src, VEX_SIMD_66, vector256);
}
void Assembler::vpermq(XMMRegister dst, XMMRegister src, int imm8, bool vector256) {
int encode = simd_prefix_and_encode(dst, xnoreg, src, VEX_SIMD_66, VEX_OPCODE_0F_3A, true, vector256);
emit_int8(0x00);
emit_int8(0xC0 | encode);
emit_int8(imm8);
}
void Assembler::pcmpestri(XMMRegister dst, Address src, int imm8) { void Assembler::pcmpestri(XMMRegister dst, Address src, int imm8) {
assert(VM_Version::supports_sse4_2(), ""); assert(VM_Version::supports_sse4_2(), "");
InstructionMark im(this); InstructionMark im(this);
@ -2475,7 +2488,7 @@ void Assembler::vptest(XMMRegister dst, Address src) {
assert(dst != xnoreg, "sanity"); assert(dst != xnoreg, "sanity");
int dst_enc = dst->encoding(); int dst_enc = dst->encoding();
// swap src<->dst for encoding // swap src<->dst for encoding
vex_prefix(src, dst_enc, dst_enc, VEX_SIMD_66, VEX_OPCODE_0F_38, false, vector256); vex_prefix(src, 0, dst_enc, VEX_SIMD_66, VEX_OPCODE_0F_38, false, vector256);
emit_int8(0x17); emit_int8(0x17);
emit_operand(dst, src); emit_operand(dst, src);
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * 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. // of instructions are freely declared without the need for wrapping them an ifdef.
// (Some dangerous instructions are ifdef's out of inappropriate jvm's.) // (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 // 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. // 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 // This does mean you'll get a linker/runtime error if you use a 64bit only instruction
@ -1395,6 +1395,10 @@ private:
// Pack with unsigned saturation // Pack with unsigned saturation
void packuswb(XMMRegister dst, XMMRegister src); void packuswb(XMMRegister dst, XMMRegister src);
void packuswb(XMMRegister dst, Address src); void packuswb(XMMRegister dst, Address src);
void vpackuswb(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256);
// Pemutation of 64bit words
void vpermq(XMMRegister dst, XMMRegister src, int imm8, bool vector256);
// SSE4.2 string instructions // SSE4.2 string instructions
void pcmpestri(XMMRegister xmm1, XMMRegister xmm2, int imm8); void pcmpestri(XMMRegister xmm1, XMMRegister xmm2, int imm8);

View File

@ -30,10 +30,11 @@
#include "c1/c1_Runtime1.hpp" #include "c1/c1_Runtime1.hpp"
#include "nativeInst_x86.hpp" #include "nativeInst_x86.hpp"
#include "runtime/sharedRuntime.hpp" #include "runtime/sharedRuntime.hpp"
#include "utilities/macros.hpp"
#include "vmreg_x86.inline.hpp" #include "vmreg_x86.inline.hpp"
#ifndef SERIALGC #if INCLUDE_ALL_GCS
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp" #include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
#endif #endif // INCLUDE_ALL_GCS
#define __ ce->masm()-> #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) { void G1PreBarrierStub::emit_code(LIR_Assembler* ce) {
// At this point we know that marking is in progress. // At this point we know that marking is in progress.
@ -528,7 +529,7 @@ void G1PostBarrierStub::emit_code(LIR_Assembler* ce) {
__ jmp(_continuation); __ jmp(_continuation);
} }
#endif // SERIALGC #endif // INCLUDE_ALL_GCS
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#undef __ #undef __

View File

@ -36,6 +36,7 @@
#include "runtime/sharedRuntime.hpp" #include "runtime/sharedRuntime.hpp"
#include "runtime/signature.hpp" #include "runtime/signature.hpp"
#include "runtime/vframeArray.hpp" #include "runtime/vframeArray.hpp"
#include "utilities/macros.hpp"
#include "vmreg_x86.inline.hpp" #include "vmreg_x86.inline.hpp"
@ -1607,7 +1608,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
} }
break; break;
#ifndef SERIALGC #if INCLUDE_ALL_GCS
case g1_pre_barrier_slow_id: case g1_pre_barrier_slow_id:
{ {
StubFrame f(sasm, "g1_pre_barrier", dont_gc_arguments); StubFrame f(sasm, "g1_pre_barrier", dont_gc_arguments);
@ -1804,7 +1805,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
} }
break; break;
#endif // !SERIALGC #endif // INCLUDE_ALL_GCS
default: default:
{ StubFrame f(sasm, "unimplemented entry", dont_gc_arguments); { StubFrame f(sasm, "unimplemented entry", dont_gc_arguments);

View File

@ -44,7 +44,7 @@ define_pd_global(bool, ProfileInterpreter, false);
#else #else
define_pd_global(bool, ProfileInterpreter, true); define_pd_global(bool, ProfileInterpreter, true);
#endif // CC_INTERP #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, CompileThreshold, 10000);
define_pd_global(intx, BackEdgeThreshold, 100000); define_pd_global(intx, BackEdgeThreshold, 100000);

View File

@ -45,6 +45,7 @@
#include "runtime/timer.hpp" #include "runtime/timer.hpp"
#include "runtime/vframeArray.hpp" #include "runtime/vframeArray.hpp"
#include "utilities/debug.hpp" #include "utilities/debug.hpp"
#include "utilities/macros.hpp"
#ifdef SHARK #ifdef SHARK
#include "shark/shark_globals.hpp" #include "shark/shark_globals.hpp"
#endif #endif
@ -938,7 +939,7 @@ address InterpreterGenerator::generate_accessor_entry(void) {
} }
address InterpreterGenerator::generate_Reference_get_entry(void) { address InterpreterGenerator::generate_Reference_get_entry(void) {
#ifndef SERIALGC #if INCLUDE_ALL_GCS
if (UseG1GC) { if (UseG1GC) {
// We need to generate have a routine that generates code to: // We need to generate have a routine that generates code to:
// * load the value in the referent field // * load the value in the referent field
@ -950,7 +951,7 @@ address InterpreterGenerator::generate_Reference_get_entry(void) {
// field as live. // field as live.
Unimplemented(); Unimplemented();
} }
#endif // SERIALGC #endif // INCLUDE_ALL_GCS
// If G1 is not enabled then attempt to go through the accessor entry point // If G1 is not enabled then attempt to go through the accessor entry point
// Reference.get is an accessor // Reference.get is an accessor

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2011, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -38,14 +38,9 @@
#define JNICALL #define JNICALL
typedef int jint; typedef int jint;
#if defined(_LP64) && !defined(__APPLE__) #if defined(_LP64)
typedef long jlong; typedef long jlong;
#else #else
/*
* On _LP64 __APPLE__ "long" and "long long" are both 64 bits,
* but we use the "long long" typedef to avoid complaints from
* the __APPLE__ compiler about fprintf formats.
*/
typedef long long jlong; typedef long long jlong;
#endif #endif

View File

@ -37,11 +37,12 @@
#include "runtime/os.hpp" #include "runtime/os.hpp"
#include "runtime/sharedRuntime.hpp" #include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.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/g1CollectedHeap.inline.hpp"
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp" #include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
#include "gc_implementation/g1/heapRegion.hpp" #include "gc_implementation/g1/heapRegion.hpp"
#endif #endif // INCLUDE_ALL_GCS
#ifdef PRODUCT #ifdef PRODUCT
#define BLOCK_COMMENT(str) /* nothing */ #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, void MacroAssembler::g1_write_barrier_pre(Register obj,
Register pre_val, Register pre_val,
@ -3417,7 +3418,7 @@ void MacroAssembler::g1_write_barrier_post(Register store_addr,
bind(done); bind(done);
} }
#endif // SERIALGC #endif // INCLUDE_ALL_GCS
////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////
@ -6209,6 +6210,128 @@ void MacroAssembler::generate_fill(BasicType t, bool aligned,
} }
BIND(L_exit); BIND(L_exit);
} }
// encode char[] to byte[] in ISO_8859_1
void MacroAssembler::encode_iso_array(Register src, Register dst, Register len,
XMMRegister tmp1Reg, XMMRegister tmp2Reg,
XMMRegister tmp3Reg, XMMRegister tmp4Reg,
Register tmp5, Register result) {
// rsi: src
// rdi: dst
// rdx: len
// rcx: tmp5
// rax: result
ShortBranchVerifier sbv(this);
assert_different_registers(src, dst, len, tmp5, result);
Label L_done, L_copy_1_char, L_copy_1_char_exit;
// set result
xorl(result, result);
// check for zero length
testl(len, len);
jcc(Assembler::zero, L_done);
movl(result, len);
// Setup pointers
lea(src, Address(src, len, Address::times_2)); // char[]
lea(dst, Address(dst, len, Address::times_1)); // byte[]
negptr(len);
if (UseSSE42Intrinsics || UseAVX >= 2) {
Label L_chars_8_check, L_copy_8_chars, L_copy_8_chars_exit;
Label L_chars_16_check, L_copy_16_chars, L_copy_16_chars_exit;
if (UseAVX >= 2) {
Label L_chars_32_check, L_copy_32_chars, L_copy_32_chars_exit;
movl(tmp5, 0xff00ff00); // create mask to test for Unicode chars in vector
movdl(tmp1Reg, tmp5);
vpbroadcastd(tmp1Reg, tmp1Reg);
jmpb(L_chars_32_check);
bind(L_copy_32_chars);
vmovdqu(tmp3Reg, Address(src, len, Address::times_2, -64));
vmovdqu(tmp4Reg, Address(src, len, Address::times_2, -32));
vpor(tmp2Reg, tmp3Reg, tmp4Reg, /* vector256 */ true);
vptest(tmp2Reg, tmp1Reg); // check for Unicode chars in vector
jccb(Assembler::notZero, L_copy_32_chars_exit);
vpackuswb(tmp3Reg, tmp3Reg, tmp4Reg, /* vector256 */ true);
vpermq(tmp4Reg, tmp3Reg, 0xD8, /* vector256 */ true);
vmovdqu(Address(dst, len, Address::times_1, -32), tmp4Reg);
bind(L_chars_32_check);
addptr(len, 32);
jccb(Assembler::lessEqual, L_copy_32_chars);
bind(L_copy_32_chars_exit);
subptr(len, 16);
jccb(Assembler::greater, L_copy_16_chars_exit);
} else if (UseSSE42Intrinsics) {
movl(tmp5, 0xff00ff00); // create mask to test for Unicode chars in vector
movdl(tmp1Reg, tmp5);
pshufd(tmp1Reg, tmp1Reg, 0);
jmpb(L_chars_16_check);
}
bind(L_copy_16_chars);
if (UseAVX >= 2) {
vmovdqu(tmp2Reg, Address(src, len, Address::times_2, -32));
vptest(tmp2Reg, tmp1Reg);
jccb(Assembler::notZero, L_copy_16_chars_exit);
vpackuswb(tmp2Reg, tmp2Reg, tmp1Reg, /* vector256 */ true);
vpermq(tmp3Reg, tmp2Reg, 0xD8, /* vector256 */ true);
} else {
if (UseAVX > 0) {
movdqu(tmp3Reg, Address(src, len, Address::times_2, -32));
movdqu(tmp4Reg, Address(src, len, Address::times_2, -16));
vpor(tmp2Reg, tmp3Reg, tmp4Reg, /* vector256 */ false);
} else {
movdqu(tmp3Reg, Address(src, len, Address::times_2, -32));
por(tmp2Reg, tmp3Reg);
movdqu(tmp4Reg, Address(src, len, Address::times_2, -16));
por(tmp2Reg, tmp4Reg);
}
ptest(tmp2Reg, tmp1Reg); // check for Unicode chars in vector
jccb(Assembler::notZero, L_copy_16_chars_exit);
packuswb(tmp3Reg, tmp4Reg);
}
movdqu(Address(dst, len, Address::times_1, -16), tmp3Reg);
bind(L_chars_16_check);
addptr(len, 16);
jccb(Assembler::lessEqual, L_copy_16_chars);
bind(L_copy_16_chars_exit);
subptr(len, 8);
jccb(Assembler::greater, L_copy_8_chars_exit);
bind(L_copy_8_chars);
movdqu(tmp3Reg, Address(src, len, Address::times_2, -16));
ptest(tmp3Reg, tmp1Reg);
jccb(Assembler::notZero, L_copy_8_chars_exit);
packuswb(tmp3Reg, tmp1Reg);
movq(Address(dst, len, Address::times_1, -8), tmp3Reg);
addptr(len, 8);
jccb(Assembler::lessEqual, L_copy_8_chars);
bind(L_copy_8_chars_exit);
subptr(len, 8);
jccb(Assembler::zero, L_done);
}
bind(L_copy_1_char);
load_unsigned_short(tmp5, Address(src, len, Address::times_2, 0));
testl(tmp5, 0xff00); // check if Unicode char
jccb(Assembler::notZero, L_copy_1_char_exit);
movb(Address(dst, len, Address::times_1, 0), tmp5);
addptr(len, 1);
jccb(Assembler::less, L_copy_1_char);
bind(L_copy_1_char_exit);
addptr(result, len); // len is negative count of not processed elements
bind(L_done);
}
#undef BIND #undef BIND
#undef BLOCK_COMMENT #undef BLOCK_COMMENT

View File

@ -26,6 +26,7 @@
#define CPU_X86_VM_MACROASSEMBLER_X86_HPP #define CPU_X86_VM_MACROASSEMBLER_X86_HPP
#include "asm/assembler.hpp" #include "asm/assembler.hpp"
#include "utilities/macros.hpp"
// MacroAssembler extends Assembler by frequently used macros. // 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); // 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) 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, void g1_write_barrier_pre(Register obj,
Register pre_val, Register pre_val,
@ -309,7 +310,7 @@ class MacroAssembler: public Assembler {
Register tmp, Register tmp,
Register tmp2); Register tmp2);
#endif // SERIALGC #endif // INCLUDE_ALL_GCS
// split store_check(Register obj) to enhance instruction interleaving // split store_check(Register obj) to enhance instruction interleaving
void store_check_part_1(Register obj); void store_check_part_1(Register obj);
@ -1135,6 +1136,10 @@ public:
Register to, Register value, Register count, Register to, Register value, Register count,
Register rtmp, XMMRegister xtmp); Register rtmp, XMMRegister xtmp);
void encode_iso_array(Register src, Register dst, Register len,
XMMRegister tmp1, XMMRegister tmp2, XMMRegister tmp3,
XMMRegister tmp4, Register tmp5, Register result);
#undef VIRTUAL #undef VIRTUAL
}; };

View File

@ -44,6 +44,7 @@
#include "runtime/timer.hpp" #include "runtime/timer.hpp"
#include "runtime/vframeArray.hpp" #include "runtime/vframeArray.hpp"
#include "utilities/debug.hpp" #include "utilities/debug.hpp"
#include "utilities/macros.hpp"
#define __ _masm-> #define __ _masm->
@ -761,7 +762,7 @@ address InterpreterGenerator::generate_accessor_entry(void) {
// Method entry for java.lang.ref.Reference.get. // Method entry for java.lang.ref.Reference.get.
address InterpreterGenerator::generate_Reference_get_entry(void) { address InterpreterGenerator::generate_Reference_get_entry(void) {
#ifndef SERIALGC #if INCLUDE_ALL_GCS
// Code: _aload_0, _getfield, _areturn // Code: _aload_0, _getfield, _areturn
// parameter size = 1 // parameter size = 1
// //
@ -844,7 +845,7 @@ address InterpreterGenerator::generate_Reference_get_entry(void) {
return entry; return entry;
} }
#endif // SERIALGC #endif // INCLUDE_ALL_GCS
// If G1 is not enabled then attempt to go through the accessor entry point // If G1 is not enabled then attempt to go through the accessor entry point
// Reference.get is an accessor // Reference.get is an accessor

View File

@ -44,6 +44,7 @@
#include "runtime/timer.hpp" #include "runtime/timer.hpp"
#include "runtime/vframeArray.hpp" #include "runtime/vframeArray.hpp"
#include "utilities/debug.hpp" #include "utilities/debug.hpp"
#include "utilities/macros.hpp"
#define __ _masm-> #define __ _masm->
@ -742,7 +743,7 @@ address InterpreterGenerator::generate_accessor_entry(void) {
// Method entry for java.lang.ref.Reference.get. // Method entry for java.lang.ref.Reference.get.
address InterpreterGenerator::generate_Reference_get_entry(void) { address InterpreterGenerator::generate_Reference_get_entry(void) {
#ifndef SERIALGC #if INCLUDE_ALL_GCS
// Code: _aload_0, _getfield, _areturn // Code: _aload_0, _getfield, _areturn
// parameter size = 1 // parameter size = 1
// //
@ -821,7 +822,7 @@ address InterpreterGenerator::generate_Reference_get_entry(void) {
return entry; return entry;
} }
#endif // SERIALGC #endif // INCLUDE_ALL_GCS
// If G1 is not enabled then attempt to go through the accessor entry point // If G1 is not enabled then attempt to go through the accessor entry point
// Reference.get is an accessor // Reference.get is an accessor

View File

@ -35,6 +35,7 @@
#include "runtime/sharedRuntime.hpp" #include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.hpp" #include "runtime/stubRoutines.hpp"
#include "runtime/synchronizer.hpp" #include "runtime/synchronizer.hpp"
#include "utilities/macros.hpp"
#ifndef CC_INTERP #ifndef CC_INTERP
#define __ _masm-> #define __ _masm->
@ -125,7 +126,7 @@ static void do_oop_store(InterpreterMacroAssembler* _masm,
bool precise) { bool precise) {
assert(val == noreg || val == rax, "parameter is just for looks"); assert(val == noreg || val == rax, "parameter is just for looks");
switch (barrier) { switch (barrier) {
#ifndef SERIALGC #if INCLUDE_ALL_GCS
case BarrierSet::G1SATBCT: case BarrierSet::G1SATBCT:
case BarrierSet::G1SATBCTLogging: case BarrierSet::G1SATBCTLogging:
{ {
@ -164,7 +165,7 @@ static void do_oop_store(InterpreterMacroAssembler* _masm,
} }
break; break;
#endif // SERIALGC #endif // INCLUDE_ALL_GCS
case BarrierSet::CardTableModRef: case BarrierSet::CardTableModRef:
case BarrierSet::CardTableExtension: case BarrierSet::CardTableExtension:
{ {

View File

@ -35,6 +35,7 @@
#include "runtime/sharedRuntime.hpp" #include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.hpp" #include "runtime/stubRoutines.hpp"
#include "runtime/synchronizer.hpp" #include "runtime/synchronizer.hpp"
#include "utilities/macros.hpp"
#ifndef CC_INTERP #ifndef CC_INTERP
@ -136,7 +137,7 @@ static void do_oop_store(InterpreterMacroAssembler* _masm,
bool precise) { bool precise) {
assert(val == noreg || val == rax, "parameter is just for looks"); assert(val == noreg || val == rax, "parameter is just for looks");
switch (barrier) { switch (barrier) {
#ifndef SERIALGC #if INCLUDE_ALL_GCS
case BarrierSet::G1SATBCT: case BarrierSet::G1SATBCT:
case BarrierSet::G1SATBCTLogging: case BarrierSet::G1SATBCTLogging:
{ {
@ -167,7 +168,7 @@ static void do_oop_store(InterpreterMacroAssembler* _masm,
} }
break; break;
#endif // SERIALGC #endif // INCLUDE_ALL_GCS
case BarrierSet::CardTableModRef: case BarrierSet::CardTableModRef:
case BarrierSet::CardTableExtension: case BarrierSet::CardTableExtension:
{ {

View File

@ -29,7 +29,7 @@
// constants required by the Serviceability Agent. This file is // constants required by the Serviceability Agent. This file is
// referenced by vmStructs.cpp. // referenced by vmStructs.cpp.
#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field, last_entry) \ #define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) \
\ \
/******************************/ \ /******************************/ \
/* JavaCallWrapper */ \ /* JavaCallWrapper */ \
@ -37,31 +37,14 @@
/******************************/ \ /******************************/ \
/* JavaFrameAnchor */ \ /* JavaFrameAnchor */ \
/******************************/ \ /******************************/ \
volatile_nonstatic_field(JavaFrameAnchor, _last_Java_fp, intptr_t*) \ volatile_nonstatic_field(JavaFrameAnchor, _last_Java_fp, intptr_t*)
\
/* NOTE that we do not use the last_entry() macro here; it is used */
/* in vmStructs_<os>_<cpu>.hpp's VM_STRUCTS_OS_CPU macro (and must */
/* be present there) */
#define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type, last_entry) \
/* NOTE that we do not use the last_entry() macro here; it is used */ #define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type)
/* in vmStructs_<os>_<cpu>.hpp's VM_TYPES_OS_CPU macro (and must */
/* be present there) */
#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant)
#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant, last_entry) \ #define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant)
/* NOTE that we do not use the last_entry() macro here; it is used */
/* in vmStructs_<os>_<cpu>.hpp's VM_INT_CONSTANTS_OS_CPU macro (and must */
/* be present there) */
#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant, last_entry) \
/* NOTE that we do not use the last_entry() macro here; it is used */
/* in vmStructs_<os>_<cpu>.hpp's VM_LONG_CONSTANTS_OS_CPU macro (and must */
/* be present there) */
#endif // CPU_X86_VM_VMSTRUCTS_X86_HPP #endif // CPU_X86_VM_VMSTRUCTS_X86_HPP

View File

@ -661,6 +661,14 @@ void VM_Version::get_processor_features() {
} }
} }
} }
#if defined(COMPILER2) && defined(_ALLBSD_SOURCE)
if (MaxVectorSize > 16) {
// Limit vectors size to 16 bytes on BSD until it fixes
// restoring upper 128bit of YMM registers on return
// from signal handler.
FLAG_SET_DEFAULT(MaxVectorSize, 16);
}
#endif // COMPILER2
// Use population count instruction if available. // Use population count instruction if available.
if (supports_popcnt()) { if (supports_popcnt()) {
@ -745,6 +753,10 @@ void VM_Version::get_processor_features() {
PrefetchFieldsAhead = prefetch_fields_ahead(); PrefetchFieldsAhead = prefetch_fields_ahead();
#endif #endif
if (FLAG_IS_DEFAULT(ContendedPaddingWidth) &&
(cache_line_size > ContendedPaddingWidth))
ContendedPaddingWidth = cache_line_size;
#ifndef PRODUCT #ifndef PRODUCT
if (PrintMiscellaneous && Verbose) { if (PrintMiscellaneous && Verbose) {
tty->print_cr("Logical CPUs per core: %u", tty->print_cr("Logical CPUs per core: %u",
@ -791,6 +803,9 @@ void VM_Version::get_processor_features() {
if (PrefetchFieldsAhead > 0) { if (PrefetchFieldsAhead > 0) {
tty->print_cr("PrefetchFieldsAhead %d", PrefetchFieldsAhead); tty->print_cr("PrefetchFieldsAhead %d", PrefetchFieldsAhead);
} }
if (ContendedPaddingWidth > 0) {
tty->print_cr("ContendedPaddingWidth %d", ContendedPaddingWidth);
}
} }
#endif // !PRODUCT #endif // !PRODUCT
} }

View File

@ -11687,6 +11687,23 @@ instruct array_equals(eDIRegP ary1, eSIRegP ary2, eAXRegI result,
ins_pipe( pipe_slow ); ins_pipe( pipe_slow );
%} %}
// encode char[] to byte[] in ISO_8859_1
instruct encode_iso_array(eSIRegP src, eDIRegP dst, eDXRegI len,
regD tmp1, regD tmp2, regD tmp3, regD tmp4,
eCXRegI tmp5, eAXRegI result, eFlagsReg cr) %{
match(Set result (EncodeISOArray src (Binary dst len)));
effect(TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, USE_KILL src, USE_KILL dst, USE_KILL len, KILL tmp5, KILL cr);
format %{ "Encode array $src,$dst,$len -> $result // KILL ECX, EDX, $tmp1, $tmp2, $tmp3, $tmp4, ESI, EDI " %}
ins_encode %{
__ encode_iso_array($src$$Register, $dst$$Register, $len$$Register,
$tmp1$$XMMRegister, $tmp2$$XMMRegister, $tmp3$$XMMRegister,
$tmp4$$XMMRegister, $tmp5$$Register, $result$$Register);
%}
ins_pipe( pipe_slow );
%}
//----------Control Flow Instructions------------------------------------------ //----------Control Flow Instructions------------------------------------------
// Signed compare Instructions // Signed compare Instructions
instruct compI_eReg(eFlagsReg cr, rRegI op1, rRegI op2) %{ instruct compI_eReg(eFlagsReg cr, rRegI op1, rRegI op2) %{

View File

@ -10495,6 +10495,23 @@ instruct array_equals(rdi_RegP ary1, rsi_RegP ary2, rax_RegI result,
ins_pipe( pipe_slow ); ins_pipe( pipe_slow );
%} %}
// encode char[] to byte[] in ISO_8859_1
instruct encode_iso_array(rsi_RegP src, rdi_RegP dst, rdx_RegI len,
regD tmp1, regD tmp2, regD tmp3, regD tmp4,
rcx_RegI tmp5, rax_RegI result, rFlagsReg cr) %{
match(Set result (EncodeISOArray src (Binary dst len)));
effect(TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, USE_KILL src, USE_KILL dst, USE_KILL len, KILL tmp5, KILL cr);
format %{ "Encode array $src,$dst,$len -> $result // KILL RCX, RDX, $tmp1, $tmp2, $tmp3, $tmp4, RSI, RDI " %}
ins_encode %{
__ encode_iso_array($src$$Register, $dst$$Register, $len$$Register,
$tmp1$$XMMRegister, $tmp2$$XMMRegister, $tmp3$$XMMRegister,
$tmp4$$XMMRegister, $tmp5$$Register, $result$$Register);
%}
ins_pipe( pipe_slow );
%}
//----------Control Flow Instructions------------------------------------------ //----------Control Flow Instructions------------------------------------------
// Signed compare Instructions // Signed compare Instructions

View File

@ -36,11 +36,12 @@
#include "runtime/os.hpp" #include "runtime/os.hpp"
#include "runtime/sharedRuntime.hpp" #include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.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/g1CollectedHeap.inline.hpp"
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp" #include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
#include "gc_implementation/g1/heapRegion.hpp" #include "gc_implementation/g1/heapRegion.hpp"
#endif #endif // INCLUDE_ALL_GCS
int AbstractAssembler::code_fill_byte() { int AbstractAssembler::code_fill_byte() {
return 0; return 0;

View File

@ -47,6 +47,7 @@
#include "runtime/vframeArray.hpp" #include "runtime/vframeArray.hpp"
#include "stack_zero.inline.hpp" #include "stack_zero.inline.hpp"
#include "utilities/debug.hpp" #include "utilities/debug.hpp"
#include "utilities/macros.hpp"
#ifdef SHARK #ifdef SHARK
#include "shark/shark_globals.hpp" #include "shark/shark_globals.hpp"
#endif #endif
@ -791,7 +792,7 @@ address InterpreterGenerator::generate_accessor_entry() {
} }
address InterpreterGenerator::generate_Reference_get_entry(void) { address InterpreterGenerator::generate_Reference_get_entry(void) {
#ifndef SERIALGC #if INCLUDE_ALL_GCS
if (UseG1GC) { if (UseG1GC) {
// We need to generate have a routine that generates code to: // We need to generate have a routine that generates code to:
// * load the value in the referent field // * load the value in the referent field
@ -803,7 +804,7 @@ address InterpreterGenerator::generate_Reference_get_entry(void) {
// field as live. // field as live.
Unimplemented(); Unimplemented();
} }
#endif // SERIALGC #endif // INCLUDE_ALL_GCS
// If G1 is not enabled then attempt to go through the accessor entry point // If G1 is not enabled then attempt to go through the accessor entry point
// Reference.get is an accessor // Reference.get is an accessor

View File

@ -98,10 +98,20 @@ BasicObjectLock* frame::interpreter_frame_monitor_end() const {
#endif // CC_INTERP #endif // CC_INTERP
void frame::patch_pc(Thread* thread, address pc) { void frame::patch_pc(Thread* thread, address pc) {
if (pc != NULL) {
_cb = CodeCache::find_blob(pc);
SharkFrame* sharkframe = zeroframe()->as_shark_frame();
sharkframe->set_pc(pc);
_pc = pc;
_deopt_state = is_deoptimized;
} else {
// We borrow this call to set the thread pointer in the interpreter // We borrow this call to set the thread pointer in the interpreter
// state; the hook to set up deoptimized frames isn't supplied it. // state; the hook to set up deoptimized frames isn't supplied it.
assert(pc == NULL, "should be"); assert(pc == NULL, "should be");
get_interpreterState()->set_thread((JavaThread *) thread); get_interpreterState()->set_thread((JavaThread *) thread);
}
} }
bool frame::safe_for_sender(JavaThread *thread) { bool frame::safe_for_sender(JavaThread *thread) {

View File

@ -45,27 +45,36 @@ inline frame::frame(ZeroFrame* zf, intptr_t* sp) {
case ZeroFrame::ENTRY_FRAME: case ZeroFrame::ENTRY_FRAME:
_pc = StubRoutines::call_stub_return_pc(); _pc = StubRoutines::call_stub_return_pc();
_cb = NULL; _cb = NULL;
_deopt_state = not_deoptimized;
break; break;
case ZeroFrame::INTERPRETER_FRAME: case ZeroFrame::INTERPRETER_FRAME:
_pc = NULL; _pc = NULL;
_cb = NULL; _cb = NULL;
_deopt_state = not_deoptimized;
break; break;
case ZeroFrame::SHARK_FRAME: case ZeroFrame::SHARK_FRAME: {
_pc = zero_sharkframe()->pc(); _pc = zero_sharkframe()->pc();
_cb = CodeCache::find_blob_unsafe(pc()); _cb = CodeCache::find_blob_unsafe(pc());
address original_pc = nmethod::get_deopt_original_pc(this);
if (original_pc != NULL) {
_pc = original_pc;
_deopt_state = is_deoptimized;
} else {
_deopt_state = not_deoptimized;
}
break; break;
}
case ZeroFrame::FAKE_STUB_FRAME: case ZeroFrame::FAKE_STUB_FRAME:
_pc = NULL; _pc = NULL;
_cb = NULL; _cb = NULL;
_deopt_state = not_deoptimized;
break; break;
default: default:
ShouldNotReachHere(); ShouldNotReachHere();
} }
_deopt_state = not_deoptimized;
} }
// Accessors // Accessors

View File

@ -68,6 +68,10 @@ class SharkFrame : public ZeroFrame {
return (address) value_of_word(pc_off); return (address) value_of_word(pc_off);
} }
void set_pc(address pc) const {
*((address*) addr_of_word(pc_off)) = pc;
}
intptr_t* unextended_sp() const { intptr_t* unextended_sp() const {
return (intptr_t *) value_of_word(unextended_sp_off); return (intptr_t *) value_of_word(unextended_sp_off);
} }

View File

@ -30,28 +30,12 @@
// constants required by the Serviceability Agent. This file is // constants required by the Serviceability Agent. This file is
// referenced by vmStructs.cpp. // referenced by vmStructs.cpp.
#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field, last_entry) \ #define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field)
/* NOTE that we do not use the last_entry() macro here; it is used */ #define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type)
/* in vmStructs_<os>_<cpu>.hpp's VM_STRUCTS_OS_CPU macro (and must */
/* be present there) */
#define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type, last_entry) \ #define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant)
/* NOTE that we do not use the last_entry() macro here; it is used */ #define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant)
/* in vmStructs_<os>_<cpu>.hpp's VM_TYPES_OS_CPU macro (and must */
/* be present there) */
#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant, last_entry) \
/* NOTE that we do not use the last_entry() macro here; it is used */
/* in vmStructs_<os>_<cpu>.hpp's VM_INT_CONSTANTS_OS_CPU macro (and must */
/* be present there) */
#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant, last_entry) \
/* NOTE that we do not use the last_entry() macro here; it is used */
/* in vmStructs_<os>_<cpu>.hpp's VM_LONG_CONSTANTS_OS_CPU macro (and must */
/* be present there) */
#endif // CPU_ZERO_VM_VMSTRUCTS_ZERO_HPP #endif // CPU_ZERO_VM_VMSTRUCTS_ZERO_HPP

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -243,29 +243,32 @@ void os::Bsd::initialize_system_info() {
int mib[2]; int mib[2];
size_t len; size_t len;
int cpu_val; int cpu_val;
u_long mem_val; julong mem_val;
/* get processors count via hw.ncpus sysctl */ /* get processors count via hw.ncpus sysctl */
mib[0] = CTL_HW; mib[0] = CTL_HW;
mib[1] = HW_NCPU; mib[1] = HW_NCPU;
len = sizeof(cpu_val); len = sizeof(cpu_val);
if (sysctl(mib, 2, &cpu_val, &len, NULL, 0) != -1 && cpu_val >= 1) { if (sysctl(mib, 2, &cpu_val, &len, NULL, 0) != -1 && cpu_val >= 1) {
assert(len == sizeof(cpu_val), "unexpected data size");
set_processor_count(cpu_val); set_processor_count(cpu_val);
} }
else { else {
set_processor_count(1); // fallback set_processor_count(1); // fallback
} }
/* get physical memory via hw.usermem sysctl (hw.usermem is used /* get physical memory via hw.memsize sysctl (hw.memsize is used
* instead of hw.physmem because we need size of allocatable memory * since it returns a 64 bit value)
*/ */
mib[0] = CTL_HW; mib[0] = CTL_HW;
mib[1] = HW_USERMEM; mib[1] = HW_MEMSIZE;
len = sizeof(mem_val); len = sizeof(mem_val);
if (sysctl(mib, 2, &mem_val, &len, NULL, 0) != -1) if (sysctl(mib, 2, &mem_val, &len, NULL, 0) != -1) {
assert(len == sizeof(mem_val), "unexpected data size");
_physical_memory = mem_val; _physical_memory = mem_val;
else } else {
_physical_memory = 256*1024*1024; // fallback (XXXBSD?) _physical_memory = 256*1024*1024; // fallback (XXXBSD?)
}
#ifdef __OpenBSD__ #ifdef __OpenBSD__
{ {
@ -4091,11 +4094,12 @@ void os::PlatformEvent::park() { // AKA "down()"
} }
-- _nParked ; -- _nParked ;
// In theory we could move the ST of 0 into _Event past the unlock(),
// but then we'd need a MEMBAR after the ST.
_Event = 0 ; _Event = 0 ;
status = pthread_mutex_unlock(_mutex); status = pthread_mutex_unlock(_mutex);
assert_status(status == 0, status, "mutex_unlock"); assert_status(status == 0, status, "mutex_unlock");
// Paranoia to ensure our locked and lock-free paths interact
// correctly with each other.
OrderAccess::fence();
} }
guarantee (_Event >= 0, "invariant") ; guarantee (_Event >= 0, "invariant") ;
} }
@ -4158,33 +4162,38 @@ int os::PlatformEvent::park(jlong millis) {
status = pthread_mutex_unlock(_mutex); status = pthread_mutex_unlock(_mutex);
assert_status(status == 0, status, "mutex_unlock"); assert_status(status == 0, status, "mutex_unlock");
assert (_nParked == 0, "invariant") ; assert (_nParked == 0, "invariant") ;
// Paranoia to ensure our locked and lock-free paths interact
// correctly with each other.
OrderAccess::fence();
return ret; return ret;
} }
void os::PlatformEvent::unpark() { void os::PlatformEvent::unpark() {
int v, AnyWaiters ; // Transitions for _Event:
for (;;) { // 0 :=> 1
v = _Event ; // 1 :=> 1
if (v > 0) { // -1 :=> either 0 or 1; must signal target thread
// The LD of _Event could have reordered or be satisfied // That is, we can safely transition _Event from -1 to either
// by a read-aside from this processor's write buffer. // 0 or 1. Forcing 1 is slightly more efficient for back-to-back
// To avoid problems execute a barrier and then // unpark() calls.
// ratify the value. // See also: "Semaphores in Plan 9" by Mullender & Cox
OrderAccess::fence() ; //
if (_Event == v) return ; // Note: Forcing a transition from "-1" to "1" on an unpark() means
continue ; // that it will take two back-to-back park() calls for the owning
} // thread to block. This has the benefit of forcing a spurious return
if (Atomic::cmpxchg (v+1, &_Event, v) == v) break ; // from the first park() call after an unpark() call which will help
} // shake out uses of park() and unpark() without condition variables.
if (v < 0) {
if (Atomic::xchg(1, &_Event) >= 0) return;
// Wait for the thread associated with the event to vacate // Wait for the thread associated with the event to vacate
int status = pthread_mutex_lock(_mutex); int status = pthread_mutex_lock(_mutex);
assert_status(status == 0, status, "mutex_lock"); assert_status(status == 0, status, "mutex_lock");
AnyWaiters = _nParked ; int AnyWaiters = _nParked;
assert (AnyWaiters == 0 || AnyWaiters == 1, "invariant") ; assert(AnyWaiters == 0 || AnyWaiters == 1, "invariant");
if (AnyWaiters != 0 && WorkAroundNPTLTimedWaitHang) { if (AnyWaiters != 0 && WorkAroundNPTLTimedWaitHang) {
AnyWaiters = 0 ; AnyWaiters = 0;
pthread_cond_signal (_cond); pthread_cond_signal(_cond);
} }
status = pthread_mutex_unlock(_mutex); status = pthread_mutex_unlock(_mutex);
assert_status(status == 0, status, "mutex_unlock"); assert_status(status == 0, status, "mutex_unlock");
@ -4192,7 +4201,6 @@ void os::PlatformEvent::unpark() {
status = pthread_cond_signal(_cond); status = pthread_cond_signal(_cond);
assert_status(status == 0, status, "cond_signal"); assert_status(status == 0, status, "cond_signal");
} }
}
// Note that we signal() _after dropping the lock for "immortal" Events. // Note that we signal() _after dropping the lock for "immortal" Events.
// This is safe and avoids a common class of futile wakeups. In rare // This is safe and avoids a common class of futile wakeups. In rare
@ -4277,13 +4285,14 @@ static void unpackTime(struct timespec* absTime, bool isAbsolute, jlong time) {
} }
void Parker::park(bool isAbsolute, jlong time) { void Parker::park(bool isAbsolute, jlong time) {
// Ideally we'd do something useful while spinning, such
// as calling unpackTime().
// Optional fast-path check: // Optional fast-path check:
// Return immediately if a permit is available. // Return immediately if a permit is available.
if (_counter > 0) { // We depend on Atomic::xchg() having full barrier semantics
_counter = 0 ; // since we are doing a lock-free update to _counter.
OrderAccess::fence(); if (Atomic::xchg(0, &_counter) > 0) return;
return ;
}
Thread* thread = Thread::current(); Thread* thread = Thread::current();
assert(thread->is_Java_thread(), "Must be JavaThread"); assert(thread->is_Java_thread(), "Must be JavaThread");
@ -4324,6 +4333,8 @@ void Parker::park(bool isAbsolute, jlong time) {
_counter = 0; _counter = 0;
status = pthread_mutex_unlock(_mutex); status = pthread_mutex_unlock(_mutex);
assert (status == 0, "invariant") ; assert (status == 0, "invariant") ;
// Paranoia to ensure our locked and lock-free paths interact
// correctly with each other and Java-level accesses.
OrderAccess::fence(); OrderAccess::fence();
return; return;
} }
@ -4360,12 +4371,14 @@ void Parker::park(bool isAbsolute, jlong time) {
_counter = 0 ; _counter = 0 ;
status = pthread_mutex_unlock(_mutex) ; status = pthread_mutex_unlock(_mutex) ;
assert_status(status == 0, status, "invariant") ; assert_status(status == 0, status, "invariant") ;
// Paranoia to ensure our locked and lock-free paths interact
// correctly with each other and Java-level accesses.
OrderAccess::fence();
// If externally suspended while waiting, re-suspend // If externally suspended while waiting, re-suspend
if (jt->handle_special_suspend_equivalent_condition()) { if (jt->handle_special_suspend_equivalent_condition()) {
jt->java_suspend_self(); jt->java_suspend_self();
} }
OrderAccess::fence();
} }
void Parker::unpark() { void Parker::unpark() {

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -59,14 +59,6 @@ inline const char* os::path_separator() {
return ":"; return ":";
} }
inline const char* os::jlong_format_specifier() {
return "%lld";
}
inline const char* os::julong_format_specifier() {
return "%llu";
}
// File names are case-sensitive on windows only // File names are case-sensitive on windows only
inline int os::file_name_strcmp(const char* s1, const char* s2) { inline int os::file_name_strcmp(const char* s1, const char* s2) {
return strcmp(s1, s2); return strcmp(s1, s2);

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -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, // 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. // in case other parts in glibc still assumes 2M max stack size.
// FIXME: alt signal stack is gone, maybe we can relax this constraint? // 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 // Problem still exists RH7.2 (IA64 anyway) but 2MB is a little small
if (stack_size > 4 * K * K) stack_size = 4 * K * K; if (stack_size > 2 * K * K IA64_ONLY(*2))
#endif stack_size = 2 * K * K IA64_ONLY(*2);
// Try to figure out where the stack base (top) is. This is harder. // 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 // 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()) { if (is_NPTL()) {
return pthread_cond_timedwait(_cond, _mutex, _abstime); return pthread_cond_timedwait(_cond, _mutex, _abstime);
} else { } else {
#ifndef IA64
// 6292965: LinuxThreads pthread_cond_timedwait() resets FPU control // 6292965: LinuxThreads pthread_cond_timedwait() resets FPU control
// word back to default 64bit precision if condvar is signaled. Java // word back to default 64bit precision if condvar is signaled. Java
// wants 53bit precision. Save and restore current value. // wants 53bit precision. Save and restore current value.
int fpu = get_fpu_control_word(); int fpu = get_fpu_control_word();
#endif // IA64
int status = pthread_cond_timedwait(_cond, _mutex, _abstime); int status = pthread_cond_timedwait(_cond, _mutex, _abstime);
#ifndef IA64
set_fpu_control_word(fpu); set_fpu_control_word(fpu);
#endif // IA64
return status; return status;
} }
} }
@ -5001,11 +4993,12 @@ void os::PlatformEvent::park() { // AKA "down()"
} }
-- _nParked ; -- _nParked ;
// In theory we could move the ST of 0 into _Event past the unlock(),
// but then we'd need a MEMBAR after the ST.
_Event = 0 ; _Event = 0 ;
status = pthread_mutex_unlock(_mutex); status = pthread_mutex_unlock(_mutex);
assert_status(status == 0, status, "mutex_unlock"); assert_status(status == 0, status, "mutex_unlock");
// Paranoia to ensure our locked and lock-free paths interact
// correctly with each other.
OrderAccess::fence();
} }
guarantee (_Event >= 0, "invariant") ; guarantee (_Event >= 0, "invariant") ;
} }
@ -5068,33 +5061,38 @@ int os::PlatformEvent::park(jlong millis) {
status = pthread_mutex_unlock(_mutex); status = pthread_mutex_unlock(_mutex);
assert_status(status == 0, status, "mutex_unlock"); assert_status(status == 0, status, "mutex_unlock");
assert (_nParked == 0, "invariant") ; assert (_nParked == 0, "invariant") ;
// Paranoia to ensure our locked and lock-free paths interact
// correctly with each other.
OrderAccess::fence();
return ret; return ret;
} }
void os::PlatformEvent::unpark() { void os::PlatformEvent::unpark() {
int v, AnyWaiters ; // Transitions for _Event:
for (;;) { // 0 :=> 1
v = _Event ; // 1 :=> 1
if (v > 0) { // -1 :=> either 0 or 1; must signal target thread
// The LD of _Event could have reordered or be satisfied // That is, we can safely transition _Event from -1 to either
// by a read-aside from this processor's write buffer. // 0 or 1. Forcing 1 is slightly more efficient for back-to-back
// To avoid problems execute a barrier and then // unpark() calls.
// ratify the value. // See also: "Semaphores in Plan 9" by Mullender & Cox
OrderAccess::fence() ; //
if (_Event == v) return ; // Note: Forcing a transition from "-1" to "1" on an unpark() means
continue ; // that it will take two back-to-back park() calls for the owning
} // thread to block. This has the benefit of forcing a spurious return
if (Atomic::cmpxchg (v+1, &_Event, v) == v) break ; // from the first park() call after an unpark() call which will help
} // shake out uses of park() and unpark() without condition variables.
if (v < 0) {
if (Atomic::xchg(1, &_Event) >= 0) return;
// Wait for the thread associated with the event to vacate // Wait for the thread associated with the event to vacate
int status = pthread_mutex_lock(_mutex); int status = pthread_mutex_lock(_mutex);
assert_status(status == 0, status, "mutex_lock"); assert_status(status == 0, status, "mutex_lock");
AnyWaiters = _nParked ; int AnyWaiters = _nParked;
assert (AnyWaiters == 0 || AnyWaiters == 1, "invariant") ; assert(AnyWaiters == 0 || AnyWaiters == 1, "invariant");
if (AnyWaiters != 0 && WorkAroundNPTLTimedWaitHang) { if (AnyWaiters != 0 && WorkAroundNPTLTimedWaitHang) {
AnyWaiters = 0 ; AnyWaiters = 0;
pthread_cond_signal (_cond); pthread_cond_signal(_cond);
} }
status = pthread_mutex_unlock(_mutex); status = pthread_mutex_unlock(_mutex);
assert_status(status == 0, status, "mutex_unlock"); assert_status(status == 0, status, "mutex_unlock");
@ -5102,7 +5100,6 @@ void os::PlatformEvent::unpark() {
status = pthread_cond_signal(_cond); status = pthread_cond_signal(_cond);
assert_status(status == 0, status, "cond_signal"); assert_status(status == 0, status, "cond_signal");
} }
}
// Note that we signal() _after dropping the lock for "immortal" Events. // Note that we signal() _after dropping the lock for "immortal" Events.
// This is safe and avoids a common class of futile wakeups. In rare // This is safe and avoids a common class of futile wakeups. In rare
@ -5187,13 +5184,14 @@ static void unpackTime(timespec* absTime, bool isAbsolute, jlong time) {
} }
void Parker::park(bool isAbsolute, jlong time) { void Parker::park(bool isAbsolute, jlong time) {
// Ideally we'd do something useful while spinning, such
// as calling unpackTime().
// Optional fast-path check: // Optional fast-path check:
// Return immediately if a permit is available. // Return immediately if a permit is available.
if (_counter > 0) { // We depend on Atomic::xchg() having full barrier semantics
_counter = 0 ; // since we are doing a lock-free update to _counter.
OrderAccess::fence(); if (Atomic::xchg(0, &_counter) > 0) return;
return ;
}
Thread* thread = Thread::current(); Thread* thread = Thread::current();
assert(thread->is_Java_thread(), "Must be JavaThread"); assert(thread->is_Java_thread(), "Must be JavaThread");
@ -5234,6 +5232,8 @@ void Parker::park(bool isAbsolute, jlong time) {
_counter = 0; _counter = 0;
status = pthread_mutex_unlock(_mutex); status = pthread_mutex_unlock(_mutex);
assert (status == 0, "invariant") ; assert (status == 0, "invariant") ;
// Paranoia to ensure our locked and lock-free paths interact
// correctly with each other and Java-level accesses.
OrderAccess::fence(); OrderAccess::fence();
return; return;
} }
@ -5270,12 +5270,14 @@ void Parker::park(bool isAbsolute, jlong time) {
_counter = 0 ; _counter = 0 ;
status = pthread_mutex_unlock(_mutex) ; status = pthread_mutex_unlock(_mutex) ;
assert_status(status == 0, status, "invariant") ; assert_status(status == 0, status, "invariant") ;
// Paranoia to ensure our locked and lock-free paths interact
// correctly with each other and Java-level accesses.
OrderAccess::fence();
// If externally suspended while waiting, re-suspend // If externally suspended while waiting, re-suspend
if (jt->handle_special_suspend_equivalent_condition()) { if (jt->handle_special_suspend_equivalent_condition()) {
jt->java_suspend_self(); jt->java_suspend_self();
} }
OrderAccess::fence();
} }
void Parker::unpark() { void Parker::unpark() {

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -68,14 +68,6 @@ inline const char* os::path_separator() {
return ":"; return ":";
} }
inline const char* os::jlong_format_specifier() {
return "%lld";
}
inline const char* os::julong_format_specifier() {
return "%llu";
}
// File names are case-sensitive on windows only // File names are case-sensitive on windows only
inline int os::file_name_strcmp(const char* s1, const char* s2) { inline int os::file_name_strcmp(const char* s1, const char* s2) {
return strcmp(s1, s2); return strcmp(s1, s2);

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -1876,11 +1876,6 @@ void SplashFreeLibrary() {
} }
} }
const char *
jlong_format_specifier() {
return "%lld";
}
/* /*
* Block current thread and continue execution in a new thread * Block current thread and continue execution in a new thread
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1999, 2010, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -64,6 +64,12 @@
#define Counter2Micros(counts) (1) #define Counter2Micros(counts) (1)
#endif /* HAVE_GETHRTIME */ #endif /* HAVE_GETHRTIME */
#ifdef _LP64
#define JLONG_FORMAT "%ld"
#else
#define JLONG_FORMAT "%lld"
#endif
/* /*
* Function prototypes. * Function prototypes.
*/ */

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -6014,6 +6014,9 @@ void os::PlatformEvent::park() { // AKA: down()
_Event = 0 ; _Event = 0 ;
status = os::Solaris::mutex_unlock(_mutex); status = os::Solaris::mutex_unlock(_mutex);
assert_status(status == 0, status, "mutex_unlock"); assert_status(status == 0, status, "mutex_unlock");
// Paranoia to ensure our locked and lock-free paths interact
// correctly with each other.
OrderAccess::fence();
} }
} }
@ -6055,52 +6058,44 @@ int os::PlatformEvent::park(jlong millis) {
_Event = 0 ; _Event = 0 ;
status = os::Solaris::mutex_unlock(_mutex); status = os::Solaris::mutex_unlock(_mutex);
assert_status(status == 0, status, "mutex_unlock"); assert_status(status == 0, status, "mutex_unlock");
// Paranoia to ensure our locked and lock-free paths interact
// correctly with each other.
OrderAccess::fence();
return ret; return ret;
} }
void os::PlatformEvent::unpark() { void os::PlatformEvent::unpark() {
int v, AnyWaiters; // Transitions for _Event:
// 0 :=> 1
// 1 :=> 1
// -1 :=> either 0 or 1; must signal target thread
// That is, we can safely transition _Event from -1 to either
// 0 or 1. Forcing 1 is slightly more efficient for back-to-back
// unpark() calls.
// See also: "Semaphores in Plan 9" by Mullender & Cox
//
// Note: Forcing a transition from "-1" to "1" on an unpark() means
// that it will take two back-to-back park() calls for the owning
// thread to block. This has the benefit of forcing a spurious return
// from the first park() call after an unpark() call which will help
// shake out uses of park() and unpark() without condition variables.
// Increment _Event. if (Atomic::xchg(1, &_Event) >= 0) return;
// Another acceptable implementation would be to simply swap 1
// into _Event:
// if (Swap (&_Event, 1) < 0) {
// mutex_lock (_mutex) ; AnyWaiters = nParked; mutex_unlock (_mutex) ;
// if (AnyWaiters) cond_signal (_cond) ;
// }
for (;;) {
v = _Event ;
if (v > 0) {
// The LD of _Event could have reordered or be satisfied
// by a read-aside from this processor's write buffer.
// To avoid problems execute a barrier and then
// ratify the value. A degenerate CAS() would also work.
// Viz., CAS (v+0, &_Event, v) == v).
OrderAccess::fence() ;
if (_Event == v) return ;
continue ;
}
if (Atomic::cmpxchg (v+1, &_Event, v) == v) break ;
}
// If the thread associated with the event was parked, wake it. // If the thread associated with the event was parked, wake it.
if (v < 0) {
int status ;
// Wait for the thread assoc with the PlatformEvent to vacate. // Wait for the thread assoc with the PlatformEvent to vacate.
status = os::Solaris::mutex_lock(_mutex); int status = os::Solaris::mutex_lock(_mutex);
assert_status(status == 0, status, "mutex_lock"); assert_status(status == 0, status, "mutex_lock");
AnyWaiters = _nParked ; int AnyWaiters = _nParked;
status = os::Solaris::mutex_unlock(_mutex); status = os::Solaris::mutex_unlock(_mutex);
assert_status(status == 0, status, "mutex_unlock"); assert_status(status == 0, status, "mutex_unlock");
guarantee (AnyWaiters == 0 || AnyWaiters == 1, "invariant") ; guarantee(AnyWaiters == 0 || AnyWaiters == 1, "invariant");
if (AnyWaiters != 0) { if (AnyWaiters != 0) {
// We intentional signal *after* dropping the lock // We intentional signal *after* dropping the lock
// to avoid a common class of futile wakeups. // to avoid a common class of futile wakeups.
status = os::Solaris::cond_signal(_cond); status = os::Solaris::cond_signal(_cond);
assert_status(status == 0, status, "cond_signal"); assert_status(status == 0, status, "cond_signal");
} }
}
} }
// JSR166 // JSR166
@ -6177,14 +6172,14 @@ static void unpackTime(timespec* absTime, bool isAbsolute, jlong time) {
} }
void Parker::park(bool isAbsolute, jlong time) { void Parker::park(bool isAbsolute, jlong time) {
// Ideally we'd do something useful while spinning, such
// as calling unpackTime().
// Optional fast-path check: // Optional fast-path check:
// Return immediately if a permit is available. // Return immediately if a permit is available.
if (_counter > 0) { // We depend on Atomic::xchg() having full barrier semantics
_counter = 0 ; // since we are doing a lock-free update to _counter.
OrderAccess::fence(); if (Atomic::xchg(0, &_counter) > 0) return;
return ;
}
// Optional fast-exit: Check interrupt before trying to wait // Optional fast-exit: Check interrupt before trying to wait
Thread* thread = Thread::current(); Thread* thread = Thread::current();
@ -6226,6 +6221,8 @@ void Parker::park(bool isAbsolute, jlong time) {
_counter = 0; _counter = 0;
status = os::Solaris::mutex_unlock(_mutex); status = os::Solaris::mutex_unlock(_mutex);
assert (status == 0, "invariant") ; assert (status == 0, "invariant") ;
// Paranoia to ensure our locked and lock-free paths interact
// correctly with each other and Java-level accesses.
OrderAccess::fence(); OrderAccess::fence();
return; return;
} }
@ -6267,12 +6264,14 @@ void Parker::park(bool isAbsolute, jlong time) {
_counter = 0 ; _counter = 0 ;
status = os::Solaris::mutex_unlock(_mutex); status = os::Solaris::mutex_unlock(_mutex);
assert_status(status == 0, status, "mutex_unlock") ; assert_status(status == 0, status, "mutex_unlock") ;
// Paranoia to ensure our locked and lock-free paths interact
// correctly with each other and Java-level accesses.
OrderAccess::fence();
// If externally suspended while waiting, re-suspend // If externally suspended while waiting, re-suspend
if (jt->handle_special_suspend_equivalent_condition()) { if (jt->handle_special_suspend_equivalent_condition()) {
jt->java_suspend_self(); jt->java_suspend_self();
} }
OrderAccess::fence();
} }
void Parker::unpark() { void Parker::unpark() {

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -50,9 +50,6 @@ inline const char* os::file_separator() { return "/"; }
inline const char* os::line_separator() { return "\n"; } inline const char* os::line_separator() { return "\n"; }
inline const char* os::path_separator() { return ":"; } inline const char* os::path_separator() { return ":"; }
inline const char* os::jlong_format_specifier() { return "%lld"; }
inline const char* os::julong_format_specifier() { return "%llu"; }
// File names are case-sensitive on windows only // File names are case-sensitive on windows only
inline int os::file_name_strcmp(const char* s1, const char* s2) { inline int os::file_name_strcmp(const char* s1, const char* s2) {
return strcmp(s1, s2); return strcmp(s1, s2);

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1999, 2010, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -1323,11 +1323,6 @@ void SplashFreeLibrary() {
} }
} }
const char *
jlong_format_specifier() {
return "%I64d";
}
/* /*
* Block current thread and continue execution in a new thread * Block current thread and continue execution in a new thread
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1999, 2010, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -69,6 +69,8 @@ extern jlong Counter2Micros(jlong counts);
extern int _main(int argc, char **argv); extern int _main(int argc, char **argv);
#endif #endif
#define JLONG_FORMAT "%I64d"
/* /*
* Function prototypes. * Function prototypes.
*/ */

View File

@ -49,7 +49,7 @@ void WindowsDecoder::initialize() {
pfn_SymSetOptions _pfnSymSetOptions = (pfn_SymSetOptions)::GetProcAddress(handle, "SymSetOptions"); pfn_SymSetOptions _pfnSymSetOptions = (pfn_SymSetOptions)::GetProcAddress(handle, "SymSetOptions");
pfn_SymInitialize _pfnSymInitialize = (pfn_SymInitialize)::GetProcAddress(handle, "SymInitialize"); pfn_SymInitialize _pfnSymInitialize = (pfn_SymInitialize)::GetProcAddress(handle, "SymInitialize");
_pfnSymGetSymFromAddr64 = (pfn_SymGetSymFromAddr64)::GetProcAddress(handle, "SymGetSymFromAddr64"); _pfnSymGetSymFromAddr64 = (pfn_SymGetSymFromAddr64)::GetProcAddress(handle, "SymGetSymFromAddr64");
_pfnUndecorateSymbolName = (pfn_UndecorateSymbolName)GetProcAddress(handle, "UnDecorateSymbolName"); _pfnUndecorateSymbolName = (pfn_UndecorateSymbolName)::GetProcAddress(handle, "UnDecorateSymbolName");
if (_pfnSymSetOptions == NULL || _pfnSymInitialize == NULL || _pfnSymGetSymFromAddr64 == NULL) { if (_pfnSymSetOptions == NULL || _pfnSymInitialize == NULL || _pfnSymGetSymFromAddr64 == NULL) {
_pfnSymGetSymFromAddr64 = NULL; _pfnSymGetSymFromAddr64 = NULL;
@ -60,8 +60,9 @@ void WindowsDecoder::initialize() {
return; return;
} }
_pfnSymSetOptions(SYMOPT_UNDNAME | SYMOPT_DEFERRED_LOADS); HANDLE hProcess = ::GetCurrentProcess();
if (!_pfnSymInitialize(GetCurrentProcess(), NULL, TRUE)) { _pfnSymSetOptions(SYMOPT_UNDNAME | SYMOPT_DEFERRED_LOADS | SYMOPT_EXACT_SYMBOLS);
if (!_pfnSymInitialize(hProcess, NULL, TRUE)) {
_pfnSymGetSymFromAddr64 = NULL; _pfnSymGetSymFromAddr64 = NULL;
_pfnUndecorateSymbolName = NULL; _pfnUndecorateSymbolName = NULL;
::FreeLibrary(handle); ::FreeLibrary(handle);
@ -70,6 +71,77 @@ void WindowsDecoder::initialize() {
return; return;
} }
// set pdb search paths
pfn_SymSetSearchPath _pfn_SymSetSearchPath =
(pfn_SymSetSearchPath)::GetProcAddress(handle, "SymSetSearchPath");
pfn_SymGetSearchPath _pfn_SymGetSearchPath =
(pfn_SymGetSearchPath)::GetProcAddress(handle, "SymGetSearchPath");
if (_pfn_SymSetSearchPath != NULL && _pfn_SymGetSearchPath != NULL) {
char paths[MAX_PATH];
int len = sizeof(paths);
if (!_pfn_SymGetSearchPath(hProcess, paths, len)) {
paths[0] = '\0';
} else {
// available spaces in path buffer
len -= (int)strlen(paths);
}
char tmp_path[MAX_PATH];
DWORD dwSize;
HMODULE hJVM = ::GetModuleHandle("jvm.dll");
tmp_path[0] = '\0';
// append the path where jvm.dll is located
if (hJVM != NULL && (dwSize = ::GetModuleFileName(hJVM, tmp_path, sizeof(tmp_path))) > 0) {
while (dwSize > 0 && tmp_path[dwSize] != '\\') {
dwSize --;
}
tmp_path[dwSize] = '\0';
if (dwSize > 0 && len > (int)dwSize + 1) {
strncat(paths, os::path_separator(), 1);
strncat(paths, tmp_path, dwSize);
len -= dwSize + 1;
}
}
// append $JRE/bin. Arguments::get_java_home actually returns $JRE
// path
char *p = Arguments::get_java_home();
assert(p != NULL, "empty java home");
size_t java_home_len = strlen(p);
if (len > (int)java_home_len + 5) {
strncat(paths, os::path_separator(), 1);
strncat(paths, p, java_home_len);
strncat(paths, "\\bin", 4);
len -= (int)(java_home_len + 5);
}
// append $JDK/bin path if it exists
assert(java_home_len < MAX_PATH, "Invalid path length");
// assume $JRE is under $JDK, construct $JDK/bin path and
// see if it exists or not
if (strncmp(&p[java_home_len - 3], "jre", 3) == 0) {
strncpy(tmp_path, p, java_home_len - 3);
tmp_path[java_home_len - 3] = '\0';
strncat(tmp_path, "bin", 3);
// if the directory exists
DWORD dwAttrib = GetFileAttributes(tmp_path);
if (dwAttrib != INVALID_FILE_ATTRIBUTES &&
(dwAttrib & FILE_ATTRIBUTE_DIRECTORY)) {
// tmp_path should have the same length as java_home_len, since we only
// replaced 'jre' with 'bin'
if (len > (int)java_home_len + 1) {
strncat(paths, os::path_separator(), 1);
strncat(paths, tmp_path, java_home_len);
}
}
}
_pfn_SymSetSearchPath(hProcess, paths);
}
// find out if jvm.dll contains private symbols, by decoding // find out if jvm.dll contains private symbols, by decoding
// current function and comparing the result // current function and comparing the result
address addr = (address)Decoder::demangle; address addr = (address)Decoder::demangle;

View File

@ -35,6 +35,8 @@ typedef DWORD (WINAPI *pfn_SymSetOptions)(DWORD);
typedef BOOL (WINAPI *pfn_SymInitialize)(HANDLE, PCTSTR, BOOL); typedef BOOL (WINAPI *pfn_SymInitialize)(HANDLE, PCTSTR, BOOL);
typedef BOOL (WINAPI *pfn_SymGetSymFromAddr64)(HANDLE, DWORD64, PDWORD64, PIMAGEHLP_SYMBOL64); typedef BOOL (WINAPI *pfn_SymGetSymFromAddr64)(HANDLE, DWORD64, PDWORD64, PIMAGEHLP_SYMBOL64);
typedef DWORD (WINAPI *pfn_UndecorateSymbolName)(const char*, char*, DWORD, DWORD); typedef DWORD (WINAPI *pfn_UndecorateSymbolName)(const char*, char*, DWORD, DWORD);
typedef BOOL (WINAPI *pfn_SymSetSearchPath)(HANDLE, PCTSTR);
typedef BOOL (WINAPI *pfn_SymGetSearchPath)(HANDLE, PTSTR, int);
class WindowsDecoder : public AbstractDecoder { class WindowsDecoder : public AbstractDecoder {

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -349,6 +349,33 @@ address os::current_stack_base() {
#ifdef _M_IA64 #ifdef _M_IA64
// IA64 has memory and register stacks // 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; stack_size = stack_size / 2;
#endif #endif
return stack_bottom + stack_size; return stack_bottom + stack_size;
@ -1874,8 +1901,22 @@ static BOOL WINAPI consoleHandler(DWORD event) {
} }
return TRUE; return TRUE;
break; break;
case CTRL_LOGOFF_EVENT: {
// Don't terminate JVM if it is running in a non-interactive session,
// such as a service process.
USEROBJECTFLAGS flags;
HANDLE handle = GetProcessWindowStation();
if (handle != NULL &&
GetUserObjectInformation(handle, UOI_FLAGS, &flags,
sizeof( USEROBJECTFLAGS), NULL)) {
// If it is a non-interactive session, let next handler to deal
// with it.
if ((flags.dwFlags & WSF_VISIBLE) == 0) {
return FALSE;
}
}
}
case CTRL_CLOSE_EVENT: case CTRL_CLOSE_EVENT:
case CTRL_LOGOFF_EVENT:
case CTRL_SHUTDOWN_EVENT: case CTRL_SHUTDOWN_EVENT:
os::signal_raise(SIGTERM); os::signal_raise(SIGTERM);
return TRUE; return TRUE;
@ -1991,17 +2032,34 @@ LONG Handle_Exception(struct _EXCEPTION_POINTERS* exceptionInfo, address handler
JavaThread* thread = JavaThread::current(); JavaThread* thread = JavaThread::current();
// Save pc in thread // Save pc in thread
#ifdef _M_IA64 #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 // Set pc to handler
exceptionInfo->ContextRecord->StIIP = (DWORD64)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 #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 // Set pc to handler
exceptionInfo->ContextRecord->Rip = (DWORD64)handler; exceptionInfo->ContextRecord->Rip = (DWORD64)handler;
#else #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 // Set pc to handler
exceptionInfo->ContextRecord->Eip = (LONG)handler; exceptionInfo->ContextRecord->Eip = (DWORD)(DWORD_PTR)handler;
#endif #endif
// Continue the execution // Continue the execution
@ -2026,6 +2084,14 @@ extern "C" void events();
// included or copied here. // included or copied here.
#define EXCEPTION_INFO_EXEC_VIOLATION 0x08 #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 #define def_excpt(val) #val, val
struct siglabel { struct siglabel {
@ -2068,6 +2134,10 @@ struct siglabel exceptlabels[] = {
def_excpt(EXCEPTION_GUARD_PAGE), def_excpt(EXCEPTION_GUARD_PAGE),
def_excpt(EXCEPTION_INVALID_HANDLE), def_excpt(EXCEPTION_INVALID_HANDLE),
def_excpt(EXCEPTION_UNCAUGHT_CXX_EXCEPTION), def_excpt(EXCEPTION_UNCAUGHT_CXX_EXCEPTION),
def_excpt(EXCEPTION_HEAP_CORRUPTION),
#ifdef _M_IA64
def_excpt(EXCEPTION_REG_NAT_CONSUMPTION),
#endif
NULL, 0 NULL, 0
}; };
@ -2192,7 +2262,14 @@ LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) {
if (InterceptOSException) return EXCEPTION_CONTINUE_SEARCH; if (InterceptOSException) return EXCEPTION_CONTINUE_SEARCH;
DWORD exception_code = exceptionInfo->ExceptionRecord->ExceptionCode; DWORD exception_code = exceptionInfo->ExceptionRecord->ExceptionCode;
#ifdef _M_IA64 #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 #elif _M_AMD64
address pc = (address) exceptionInfo->ContextRecord->Rip; address pc = (address) exceptionInfo->ContextRecord->Rip;
#else #else
@ -2307,29 +2384,40 @@ LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) {
if (exception_code == EXCEPTION_STACK_OVERFLOW) { if (exception_code == EXCEPTION_STACK_OVERFLOW) {
if (os::uses_stack_guard_pages()) { if (os::uses_stack_guard_pages()) {
#ifdef _M_IA64 #ifdef _M_IA64
// // Use guard page for register stack.
// If it's a legal stack address continue, Windows will map it in.
//
PEXCEPTION_RECORD exceptionRecord = exceptionInfo->ExceptionRecord; PEXCEPTION_RECORD exceptionRecord = exceptionInfo->ExceptionRecord;
address addr = (address) exceptionRecord->ExceptionInformation[1]; address addr = (address) exceptionRecord->ExceptionInformation[1];
if (addr > thread->stack_yellow_zone_base() && addr < thread->stack_base() ) // Check for a register stack overflow on Itanium
return EXCEPTION_CONTINUE_EXECUTION; 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 // Reguard the permanent register stack red zone just to be sure.
// and starts at the page just above the start of the memory stack. // We saw Windows silently disabling this without telling us.
// If we get a fault in this area, we've run out of register thread->enable_register_stack_red_zone();
// stack. If we are in java, try throwing a stack overflow exception.
if (addr > thread->stack_base() && return Handle_Exception(exceptionInfo,
addr <= (thread->stack_base()+thread->stack_size()) ) { SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::STACK_OVERFLOW));
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;
} }
#endif #endif
if (thread->stack_yellow_zone_enabled()) { if (thread->stack_yellow_zone_enabled()) {
@ -2404,50 +2492,33 @@ LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) {
{ {
// Null pointer exception. // Null pointer exception.
#ifdef _M_IA64 #ifdef _M_IA64
// We catch register stack overflows in compiled code by doing // Process implicit null checks in compiled code. Note: Implicit null checks
// an explicit compare and executing a st8(G0, G0) if the // can happen even if "ImplicitNullChecks" is disabled, e.g. in vtable stubs.
// BSP enters into our guard area. We test for the overflow if (CodeCache::contains((void*) pc_unix_format) && !MacroAssembler::needs_explicit_null_check((intptr_t) addr)) {
// condition and fall into the normal null pointer exception CodeBlob *cb = CodeCache::find_blob_unsafe(pc_unix_format);
// code if BSP hasn't overflowed. // Handle implicit null check in UEP method entry
if ( in_java ) { if (cb && (cb->is_frame_complete_at(pc) ||
if(thread->register_stack_overflow()) { (cb->is_nmethod() && ((nmethod *)cb)->inlinecache_check_contains(pc)))) {
assert((address)exceptionInfo->ContextRecord->IntS3 == if (Verbose) {
thread->register_stack_limit(), intptr_t *bundle_start = (intptr_t*) ((intptr_t) pc_unix_format & 0xFFFFFFFFFFFFFFF0);
"GR7 doesn't contain register_stack_limit"); tty->print_cr("trap: null_check at " INTPTR_FORMAT " (SIGSEGV)", pc_unix_format);
// Disable the yellow zone which sets the state that tty->print_cr(" to addr " INTPTR_FORMAT, addr);
// we've got a stack overflow problem. tty->print_cr(" bundle is " INTPTR_FORMAT " (high), " INTPTR_FORMAT " (low)",
if (thread->stack_yellow_zone_enabled()) { *(bundle_start + 1), *bundle_start);
thread->disable_stack_yellow_zone();
} }
// 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, return Handle_Exception(exceptionInfo,
SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::STACK_OVERFLOW)); SharedRuntime::continuation_for_implicit_exception(thread, pc_unix_format, SharedRuntime::IMPLICIT_NULL));
} 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);
} }
} }
} // in_java
// IA64 doesn't use implicit null checking yet. So we shouldn't // Implicit null checks were processed above. Hence, we should not reach
// get here. // here in the usual case => die!
tty->print_raw_cr("Access violation, possible null pointer exception"); if (Verbose) tty->print_raw_cr("Access violation, possible null pointer exception");
report_error(t, exception_code, pc, exceptionInfo->ExceptionRecord, report_error(t, exception_code, pc, exceptionInfo->ExceptionRecord,
exceptionInfo->ContextRecord); exceptionInfo->ContextRecord);
return EXCEPTION_CONTINUE_SEARCH; return EXCEPTION_CONTINUE_SEARCH;
#else /* !IA64 */
#else // !IA64
// Windows 98 reports faulting addresses incorrectly // Windows 98 reports faulting addresses incorrectly
if (!MacroAssembler::needs_explicit_null_check((intptr_t)addr) || if (!MacroAssembler::needs_explicit_null_check((intptr_t)addr) ||
@ -2479,7 +2550,24 @@ LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) {
report_error(t, exception_code, pc, exceptionInfo->ExceptionRecord, report_error(t, exception_code, pc, exceptionInfo->ExceptionRecord,
exceptionInfo->ContextRecord); exceptionInfo->ContextRecord);
return EXCEPTION_CONTINUE_SEARCH; 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) { if (in_java) {
switch (exception_code) { switch (exception_code) {
@ -2946,7 +3034,7 @@ char* os::pd_reserve_memory(size_t bytes, char* addr, size_t alignment_hint) {
} }
if( Verbose && PrintMiscellaneous ) { if( Verbose && PrintMiscellaneous ) {
reserveTimer.stop(); reserveTimer.stop();
tty->print_cr("reserve_memory of %Ix bytes took %ld ms (%ld ticks)", bytes, tty->print_cr("reserve_memory of %Ix bytes took " JLONG_FORMAT " ms (" JLONG_FORMAT " ticks)", bytes,
reserveTimer.milliseconds(), reserveTimer.ticks()); reserveTimer.milliseconds(), reserveTimer.ticks());
} }
} }
@ -4305,7 +4393,7 @@ char* os::pd_map_memory(int fd, const char* file_name, size_t file_offset,
if (hFile == NULL) { if (hFile == NULL) {
if (PrintMiscellaneous && Verbose) { if (PrintMiscellaneous && Verbose) {
DWORD err = GetLastError(); DWORD err = GetLastError();
tty->print_cr("CreateFile() failed: GetLastError->%ld."); tty->print_cr("CreateFile() failed: GetLastError->%ld.", err);
} }
return NULL; return NULL;
} }
@ -4355,7 +4443,7 @@ char* os::pd_map_memory(int fd, const char* file_name, size_t file_offset,
if (hMap == NULL) { if (hMap == NULL) {
if (PrintMiscellaneous && Verbose) { if (PrintMiscellaneous && Verbose) {
DWORD err = GetLastError(); DWORD err = GetLastError();
tty->print_cr("CreateFileMapping() failed: GetLastError->%ld."); tty->print_cr("CreateFileMapping() failed: GetLastError->%ld.", err);
} }
CloseHandle(hFile); CloseHandle(hFile);
return NULL; return NULL;
@ -4565,6 +4653,7 @@ int os::PlatformEvent::park (jlong Millis) {
} }
v = _Event ; v = _Event ;
_Event = 0 ; _Event = 0 ;
// see comment at end of os::PlatformEvent::park() below:
OrderAccess::fence() ; OrderAccess::fence() ;
// If we encounter a nearly simultanous timeout expiry and unpark() // If we encounter a nearly simultanous timeout expiry and unpark()
// we return OS_OK indicating we awoke via unpark(). // we return OS_OK indicating we awoke via unpark().
@ -4602,25 +4691,25 @@ void os::PlatformEvent::park () {
void os::PlatformEvent::unpark() { void os::PlatformEvent::unpark() {
guarantee (_ParkHandle != NULL, "Invariant") ; guarantee (_ParkHandle != NULL, "Invariant") ;
int v ;
for (;;) { // Transitions for _Event:
v = _Event ; // Increment _Event if it's < 1. // 0 :=> 1
if (v > 0) { // 1 :=> 1
// If it's already signaled just return. // -1 :=> either 0 or 1; must signal target thread
// The LD of _Event could have reordered or be satisfied // That is, we can safely transition _Event from -1 to either
// by a read-aside from this processor's write buffer. // 0 or 1. Forcing 1 is slightly more efficient for back-to-back
// To avoid problems execute a barrier and then // unpark() calls.
// ratify the value. A degenerate CAS() would also work. // See also: "Semaphores in Plan 9" by Mullender & Cox
// Viz., CAS (v+0, &_Event, v) == v). //
OrderAccess::fence() ; // Note: Forcing a transition from "-1" to "1" on an unpark() means
if (_Event == v) return ; // that it will take two back-to-back park() calls for the owning
continue ; // thread to block. This has the benefit of forcing a spurious return
} // from the first park() call after an unpark() call which will help
if (Atomic::cmpxchg (v+1, &_Event, v) == v) break ; // shake out uses of park() and unpark() without condition variables.
}
if (v < 0) { if (Atomic::xchg(1, &_Event) >= 0) return;
::SetEvent (_ParkHandle) ;
} ::SetEvent(_ParkHandle);
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2010, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -38,9 +38,6 @@ inline const char* os::line_separator() { return "\r\n"; }
inline const char* os::path_separator() { return ";"; } inline const char* os::path_separator() { return ";"; }
inline const char* os::dll_file_extension() { return ".dll"; } inline const char* os::dll_file_extension() { return ".dll"; }
inline const char* os::jlong_format_specifier() { return "%I64d"; }
inline const char* os::julong_format_specifier() { return "%I64u"; }
inline const int os::default_file_open_flags() { return O_BINARY | O_NOINHERIT;} inline const int os::default_file_open_flags() { return O_BINARY | O_NOINHERIT;}
// File names are case-insensitive on windows only // File names are case-insensitive on windows only

View File

@ -372,7 +372,7 @@ frame os::current_frame() {
CAST_FROM_FN_PTR(address, os::current_frame)); CAST_FROM_FN_PTR(address, os::current_frame));
if (os::is_first_C_frame(&myframe)) { if (os::is_first_C_frame(&myframe)) {
// stack is not walkable // stack is not walkable
return frame(NULL, NULL, NULL); return frame();
} else { } else {
return os::get_sender_for_C_frame(&myframe); return os::get_sender_for_C_frame(&myframe);
} }

View File

@ -29,37 +29,26 @@
// constants required by the Serviceability Agent. This file is // constants required by the Serviceability Agent. This file is
// referenced by vmStructs.cpp. // referenced by vmStructs.cpp.
#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field, last_entry) \ #define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) \
\ \
/******************************/ \ /******************************/ \
/* Threads (NOTE: incomplete) */ \ /* Threads (NOTE: incomplete) */ \
/******************************/ \ /******************************/ \
nonstatic_field(OSThread, _thread_id, OSThread::thread_id_t) \ nonstatic_field(OSThread, _thread_id, OSThread::thread_id_t) \
nonstatic_field(OSThread, _pthread_id, pthread_t) \ nonstatic_field(OSThread, _pthread_id, pthread_t)
/* This must be the last entry, and must be present */ \
last_entry()
#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type, last_entry) \ #define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) \
\ \
/**********************/ \ /**********************/ \
/* Posix Thread IDs */ \ /* Posix Thread IDs */ \
/**********************/ \ /**********************/ \
\ \
declare_unsigned_integer_type(OSThread::thread_id_t) \ declare_unsigned_integer_type(OSThread::thread_id_t) \
declare_unsigned_integer_type(pthread_t) \ declare_unsigned_integer_type(pthread_t)
\
/* This must be the last entry, and must be present */ \
last_entry()
#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant, last_entry) \ #define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant)
\
/* This must be the last entry, and must be present */ \
last_entry()
#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant, last_entry) \ #define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant)
\
/* This must be the last entry, and must be present */ \
last_entry()
#endif // OS_CPU_BSD_X86_VM_VMSTRUCTS_BSD_X86_HPP #endif // OS_CPU_BSD_X86_VM_VMSTRUCTS_BSD_X86_HPP

Some files were not shown because too many files have changed in this diff Show More