mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
Merge
This commit is contained in:
commit
7cadb57785
1384 changed files with 155699 additions and 6264 deletions
1
.hgtags
1
.hgtags
|
@ -195,3 +195,4 @@ adb5171c554e14cd86f618b5584f6e3d693d5889 jdk8-b69
|
||||||
a41ada2ed4ef735449531c6ebe6cec593d890a1c jdk8-b71
|
a41ada2ed4ef735449531c6ebe6cec593d890a1c jdk8-b71
|
||||||
6725b3961f987cf40f446d1c11cd324a3bec545f jdk8-b72
|
6725b3961f987cf40f446d1c11cd324a3bec545f jdk8-b72
|
||||||
fe94b40ffd9390f6cffcdf51c0389b0e6dde0c13 jdk8-b73
|
fe94b40ffd9390f6cffcdf51c0389b0e6dde0c13 jdk8-b73
|
||||||
|
f627eff819628822a0777af8062244352f2a29cf jdk8-b74
|
||||||
|
|
|
@ -195,3 +195,4 @@ cdb401a60cea6ad5ef3f498725ed1decf8dda1ea jdk8-b68
|
||||||
51ad2a34342055333eb5f36e2fb514b027895708 jdk8-b71
|
51ad2a34342055333eb5f36e2fb514b027895708 jdk8-b71
|
||||||
c1be681d80a1f1c848dc671d664fccb19e046a12 jdk8-b72
|
c1be681d80a1f1c848dc671d664fccb19e046a12 jdk8-b72
|
||||||
93b9664f97eeb6f89397a8842318ebacaac9feb9 jdk8-b73
|
93b9664f97eeb6f89397a8842318ebacaac9feb9 jdk8-b73
|
||||||
|
b43aa5bd8ca5c8121336495382d35ecfa7a71536 jdk8-b74
|
||||||
|
|
|
@ -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=1359376859
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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])
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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 \
|
||||||
|
|
|
@ -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
|
||||||
|
@ -269,6 +269,7 @@ COMMON_JAVADOCFLAGS = \
|
||||||
-quiet \
|
-quiet \
|
||||||
-use \
|
-use \
|
||||||
-keywords \
|
-keywords \
|
||||||
|
-Xdoclint:none \
|
||||||
$(ADDITIONAL_JAVADOCFLAGS)
|
$(ADDITIONAL_JAVADOCFLAGS)
|
||||||
|
|
||||||
ifdef OPENJDK
|
ifdef OPENJDK
|
||||||
|
|
|
@ -195,3 +195,4 @@ d54dc53e223ed9ce7d5f4d2cd02ad9d5def3c2db jdk8-b59
|
||||||
8171d23e914d758836527b80b06debcfdb718f2d jdk8-b71
|
8171d23e914d758836527b80b06debcfdb718f2d jdk8-b71
|
||||||
cb40427f47145b01b7e53c3e02b38ff7625efbda jdk8-b72
|
cb40427f47145b01b7e53c3e02b38ff7625efbda jdk8-b72
|
||||||
191afde59e7be0e1a1d76d06f2a32ff17444f0ec jdk8-b73
|
191afde59e7be0e1a1d76d06f2a32ff17444f0ec jdk8-b73
|
||||||
|
2132845cf5f717ff5c240a2431c0c0e03e66e3a5 jdk8-b74
|
||||||
|
|
|
@ -309,3 +309,5 @@ d5cb5830f570d1304ea4b196dde672a291b55f29 jdk8-b72
|
||||||
1e129851479e4f5df439109fca2c7be1f1613522 hs25-b15
|
1e129851479e4f5df439109fca2c7be1f1613522 hs25-b15
|
||||||
11619f33cd683c2f1d6ef72f1c6ff3dacf5a9f1c jdk8-b73
|
11619f33cd683c2f1d6ef72f1c6ff3dacf5a9f1c jdk8-b73
|
||||||
70c89bd6b895a10d25ca70e08093c09ff2005fda hs25-b16
|
70c89bd6b895a10d25ca70e08093c09ff2005fda hs25-b16
|
||||||
|
1a3e54283c54aaa8b3437813e8507fbdc966e5b6 jdk8-b74
|
||||||
|
b4391649e91ea8d37f66317a03d6d2573a93d10d hs25-b17
|
||||||
|
|
|
@ -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 \
|
||||||
|
|
|
@ -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:
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2013
|
||||||
|
|
||||||
HS_MAJOR_VER=25
|
HS_MAJOR_VER=25
|
||||||
HS_MINOR_VER=0
|
HS_MINOR_VER=0
|
||||||
HS_BUILD_NUMBER=17
|
HS_BUILD_NUMBER=18
|
||||||
|
|
||||||
JDK_MAJOR_VER=1
|
JDK_MAJOR_VER=1
|
||||||
JDK_MINOR_VER=8
|
JDK_MINOR_VER=8
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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:
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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}" ;;
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
##################################################
|
##################################################
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -2263,6 +2263,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 +2487,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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -6209,6 +6209,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
|
||||||
|
|
||||||
|
|
|
@ -1135,6 +1135,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
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -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()) {
|
||||||
|
|
|
@ -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) %{
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -862,8 +862,10 @@ uint InstructForm::oper_input_base(FormDict &globals) {
|
||||||
( strcmp(_matrule->_rChild->_opType,"AryEq" )==0 ||
|
( strcmp(_matrule->_rChild->_opType,"AryEq" )==0 ||
|
||||||
strcmp(_matrule->_rChild->_opType,"StrComp" )==0 ||
|
strcmp(_matrule->_rChild->_opType,"StrComp" )==0 ||
|
||||||
strcmp(_matrule->_rChild->_opType,"StrEquals" )==0 ||
|
strcmp(_matrule->_rChild->_opType,"StrEquals" )==0 ||
|
||||||
strcmp(_matrule->_rChild->_opType,"StrIndexOf")==0 )) {
|
strcmp(_matrule->_rChild->_opType,"StrIndexOf")==0 ||
|
||||||
|
strcmp(_matrule->_rChild->_opType,"EncodeISOArray")==0)) {
|
||||||
// String.(compareTo/equals/indexOf) and Arrays.equals
|
// String.(compareTo/equals/indexOf) and Arrays.equals
|
||||||
|
// and sun.nio.cs.iso8859_1$Encoder.EncodeISOArray
|
||||||
// take 1 control and 1 memory edges.
|
// take 1 control and 1 memory edges.
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1802,11 +1802,9 @@ ClassFileParser::AnnotationCollector::ID
|
||||||
ClassFileParser::AnnotationCollector::annotation_index(ClassLoaderData* loader_data,
|
ClassFileParser::AnnotationCollector::annotation_index(ClassLoaderData* loader_data,
|
||||||
Symbol* name) {
|
Symbol* name) {
|
||||||
vmSymbols::SID sid = vmSymbols::find_sid(name);
|
vmSymbols::SID sid = vmSymbols::find_sid(name);
|
||||||
bool privileged = false;
|
|
||||||
if (loader_data->is_the_null_class_loader_data()) {
|
|
||||||
// Privileged code can use all annotations. Other code silently drops some.
|
// Privileged code can use all annotations. Other code silently drops some.
|
||||||
privileged = true;
|
bool privileged = loader_data->is_the_null_class_loader_data() ||
|
||||||
}
|
loader_data->is_anonymous();
|
||||||
switch (sid) {
|
switch (sid) {
|
||||||
case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_ForceInline_signature):
|
case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_ForceInline_signature):
|
||||||
if (_location != _in_method) break; // only allow for methods
|
if (_location != _in_method) break; // only allow for methods
|
||||||
|
|
|
@ -724,13 +724,13 @@ void ClassLoaderDataGraph::dump_on(outputStream * const out) {
|
||||||
}
|
}
|
||||||
MetaspaceAux::dump(out);
|
MetaspaceAux::dump(out);
|
||||||
}
|
}
|
||||||
|
#endif // PRODUCT
|
||||||
|
|
||||||
void ClassLoaderData::print_value_on(outputStream* out) const {
|
void ClassLoaderData::print_value_on(outputStream* out) const {
|
||||||
if (class_loader() == NULL) {
|
if (class_loader() == NULL) {
|
||||||
out->print_cr("NULL class_loader");
|
out->print("NULL class_loader");
|
||||||
} else {
|
} else {
|
||||||
out->print("class loader "PTR_FORMAT, this);
|
out->print("class loader "PTR_FORMAT, this);
|
||||||
class_loader()->print_value_on(out);
|
class_loader()->print_value_on(out);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // PRODUCT
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* 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
|
||||||
|
@ -220,7 +220,7 @@ class ClassLoaderData : public CHeapObj<mtClass> {
|
||||||
void set_jmethod_ids(JNIMethodBlock* new_block) { _jmethod_ids = new_block; }
|
void set_jmethod_ids(JNIMethodBlock* new_block) { _jmethod_ids = new_block; }
|
||||||
|
|
||||||
void print_value() { print_value_on(tty); }
|
void print_value() { print_value_on(tty); }
|
||||||
void print_value_on(outputStream* out) const PRODUCT_RETURN;
|
void print_value_on(outputStream* out) const;
|
||||||
void dump(outputStream * const out) PRODUCT_RETURN;
|
void dump(outputStream * const out) PRODUCT_RETURN;
|
||||||
void verify();
|
void verify();
|
||||||
const char* loader_name();
|
const char* loader_name();
|
||||||
|
|
|
@ -1199,66 +1199,6 @@ instanceKlassHandle SystemDictionary::load_shared_class(
|
||||||
return ik;
|
return ik;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef KERNEL
|
|
||||||
// Some classes on the bootstrap class path haven't been installed on the
|
|
||||||
// system yet. Call the DownloadManager method to make them appear in the
|
|
||||||
// bootstrap class path and try again to load the named class.
|
|
||||||
// Note that with delegation class loaders all classes in another loader will
|
|
||||||
// first try to call this so it'd better be fast!!
|
|
||||||
static instanceKlassHandle download_and_retry_class_load(
|
|
||||||
Symbol* class_name,
|
|
||||||
TRAPS) {
|
|
||||||
|
|
||||||
Klass* dlm = SystemDictionary::DownloadManager_klass();
|
|
||||||
instanceKlassHandle nk;
|
|
||||||
|
|
||||||
// If download manager class isn't loaded just return.
|
|
||||||
if (dlm == NULL) return nk;
|
|
||||||
|
|
||||||
{ HandleMark hm(THREAD);
|
|
||||||
ResourceMark rm(THREAD);
|
|
||||||
Handle s = java_lang_String::create_from_symbol(class_name, CHECK_(nk));
|
|
||||||
Handle class_string = java_lang_String::externalize_classname(s, CHECK_(nk));
|
|
||||||
|
|
||||||
// return value
|
|
||||||
JavaValue result(T_OBJECT);
|
|
||||||
|
|
||||||
// Call the DownloadManager. We assume that it has a lock because
|
|
||||||
// multiple classes could be not found and downloaded at the same time.
|
|
||||||
// class sun.misc.DownloadManager;
|
|
||||||
// public static String getBootClassPathEntryForClass(String className);
|
|
||||||
JavaCalls::call_static(&result,
|
|
||||||
KlassHandle(THREAD, dlm),
|
|
||||||
vmSymbols::getBootClassPathEntryForClass_name(),
|
|
||||||
vmSymbols::string_string_signature(),
|
|
||||||
class_string,
|
|
||||||
CHECK_(nk));
|
|
||||||
|
|
||||||
// Get result.string and add to bootclasspath
|
|
||||||
assert(result.get_type() == T_OBJECT, "just checking");
|
|
||||||
oop obj = (oop) result.get_jobject();
|
|
||||||
if (obj == NULL) { return nk; }
|
|
||||||
|
|
||||||
Handle h_obj(THREAD, obj);
|
|
||||||
char* new_class_name = java_lang_String::as_platform_dependent_str(h_obj,
|
|
||||||
CHECK_(nk));
|
|
||||||
|
|
||||||
// lock the loader
|
|
||||||
// we use this lock because JVMTI does.
|
|
||||||
Handle loader_lock(THREAD, SystemDictionary::system_loader_lock());
|
|
||||||
|
|
||||||
ObjectLocker ol(loader_lock, THREAD);
|
|
||||||
// add the file to the bootclasspath
|
|
||||||
ClassLoader::update_class_path_entry_list(new_class_name, true);
|
|
||||||
} // end HandleMark
|
|
||||||
|
|
||||||
if (TraceClassLoading) {
|
|
||||||
ClassLoader::print_bootclasspath();
|
|
||||||
}
|
|
||||||
return ClassLoader::load_classfile(class_name, CHECK_(nk));
|
|
||||||
}
|
|
||||||
#endif // KERNEL
|
|
||||||
|
|
||||||
|
|
||||||
instanceKlassHandle SystemDictionary::load_instance_class(Symbol* class_name, Handle class_loader, TRAPS) {
|
instanceKlassHandle SystemDictionary::load_instance_class(Symbol* class_name, Handle class_loader, TRAPS) {
|
||||||
instanceKlassHandle nh = instanceKlassHandle(); // null Handle
|
instanceKlassHandle nh = instanceKlassHandle(); // null Handle
|
||||||
|
@ -1278,15 +1218,6 @@ instanceKlassHandle SystemDictionary::load_instance_class(Symbol* class_name, Ha
|
||||||
k = ClassLoader::load_classfile(class_name, CHECK_(nh));
|
k = ClassLoader::load_classfile(class_name, CHECK_(nh));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef KERNEL
|
|
||||||
// If the VM class loader has failed to load the class, call the
|
|
||||||
// DownloadManager class to make it magically appear on the classpath
|
|
||||||
// and try again. This is only configured with the Kernel VM.
|
|
||||||
if (k.is_null()) {
|
|
||||||
k = download_and_retry_class_load(class_name, CHECK_(nh));
|
|
||||||
}
|
|
||||||
#endif // KERNEL
|
|
||||||
|
|
||||||
// find_or_define_instance_class may return a different InstanceKlass
|
// find_or_define_instance_class may return a different InstanceKlass
|
||||||
if (!k.is_null()) {
|
if (!k.is_null()) {
|
||||||
k = find_or_define_instance_class(class_name, class_loader, k, CHECK_(nh));
|
k = find_or_define_instance_class(class_name, class_loader, k, CHECK_(nh));
|
||||||
|
@ -1822,13 +1753,7 @@ bool SystemDictionary::initialize_wk_klass(WKID id, int init_opt, TRAPS) {
|
||||||
Symbol* symbol = vmSymbols::symbol_at((vmSymbols::SID)sid);
|
Symbol* symbol = vmSymbols::symbol_at((vmSymbols::SID)sid);
|
||||||
Klass** klassp = &_well_known_klasses[id];
|
Klass** klassp = &_well_known_klasses[id];
|
||||||
bool must_load = (init_opt < SystemDictionary::Opt);
|
bool must_load = (init_opt < SystemDictionary::Opt);
|
||||||
bool try_load = true;
|
if ((*klassp) == NULL) {
|
||||||
if (init_opt == SystemDictionary::Opt_Kernel) {
|
|
||||||
#ifndef KERNEL
|
|
||||||
try_load = false;
|
|
||||||
#endif //KERNEL
|
|
||||||
}
|
|
||||||
if ((*klassp) == NULL && try_load) {
|
|
||||||
if (must_load) {
|
if (must_load) {
|
||||||
(*klassp) = resolve_or_fail(symbol, true, CHECK_0); // load required class
|
(*klassp) = resolve_or_fail(symbol, true, CHECK_0); // load required class
|
||||||
} else {
|
} else {
|
||||||
|
@ -1918,12 +1843,6 @@ void SystemDictionary::initialize_preloaded_classes(TRAPS) {
|
||||||
//_box_klasses[T_OBJECT] = WK_KLASS(object_klass);
|
//_box_klasses[T_OBJECT] = WK_KLASS(object_klass);
|
||||||
//_box_klasses[T_ARRAY] = WK_KLASS(object_klass);
|
//_box_klasses[T_ARRAY] = WK_KLASS(object_klass);
|
||||||
|
|
||||||
#ifdef KERNEL
|
|
||||||
if (DownloadManager_klass() == NULL) {
|
|
||||||
warning("Cannot find sun/jkernel/DownloadManager");
|
|
||||||
}
|
|
||||||
#endif // KERNEL
|
|
||||||
|
|
||||||
{ // Compute whether we should use loadClass or loadClassInternal when loading classes.
|
{ // Compute whether we should use loadClass or loadClassInternal when loading classes.
|
||||||
Method* method = InstanceKlass::cast(ClassLoader_klass())->find_method(vmSymbols::loadClassInternal_name(), vmSymbols::string_class_signature());
|
Method* method = InstanceKlass::cast(ClassLoader_klass())->find_method(vmSymbols::loadClassInternal_name(), vmSymbols::string_class_signature());
|
||||||
_has_loadClassInternal = (method != NULL);
|
_has_loadClassInternal = (method != NULL);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* 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
|
||||||
|
@ -168,8 +168,6 @@ class SymbolPropertyTable;
|
||||||
/* It's okay if this turns out to be NULL in non-1.4 JDKs. */ \
|
/* It's okay if this turns out to be NULL in non-1.4 JDKs. */ \
|
||||||
do_klass(nio_Buffer_klass, java_nio_Buffer, Opt ) \
|
do_klass(nio_Buffer_klass, java_nio_Buffer, Opt ) \
|
||||||
\
|
\
|
||||||
do_klass(DownloadManager_klass, sun_jkernel_DownloadManager, Opt_Kernel ) \
|
|
||||||
\
|
|
||||||
do_klass(PostVMInitHook_klass, sun_misc_PostVMInitHook, Opt ) \
|
do_klass(PostVMInitHook_klass, sun_misc_PostVMInitHook, Opt ) \
|
||||||
\
|
\
|
||||||
/* Preload boxing klasses */ \
|
/* Preload boxing klasses */ \
|
||||||
|
@ -211,7 +209,6 @@ class SystemDictionary : AllStatic {
|
||||||
Opt, // preload tried; NULL if not present
|
Opt, // preload tried; NULL if not present
|
||||||
Opt_Only_JDK14NewRef, // preload tried; use only with NewReflection
|
Opt_Only_JDK14NewRef, // preload tried; use only with NewReflection
|
||||||
Opt_Only_JDK15, // preload tried; use only with JDK1.5+
|
Opt_Only_JDK15, // preload tried; use only with JDK1.5+
|
||||||
Opt_Kernel, // preload tried only #ifdef KERNEL
|
|
||||||
OPTION_LIMIT,
|
OPTION_LIMIT,
|
||||||
CEIL_LG_OPTION_LIMIT = 4 // OPTION_LIMIT <= (1<<CEIL_LG_OPTION_LIMIT)
|
CEIL_LG_OPTION_LIMIT = 4 // OPTION_LIMIT <= (1<<CEIL_LG_OPTION_LIMIT)
|
||||||
};
|
};
|
||||||
|
@ -394,7 +391,6 @@ public:
|
||||||
static Klass* check_klass_Pre( Klass* k) { return check_klass(k); }
|
static Klass* check_klass_Pre( Klass* k) { return check_klass(k); }
|
||||||
static Klass* check_klass_Pre_JSR292(Klass* k) { return EnableInvokeDynamic ? check_klass(k) : k; }
|
static Klass* check_klass_Pre_JSR292(Klass* k) { return EnableInvokeDynamic ? check_klass(k) : k; }
|
||||||
static Klass* check_klass_Opt( Klass* k) { return k; }
|
static Klass* check_klass_Opt( Klass* k) { return k; }
|
||||||
static Klass* check_klass_Opt_Kernel(Klass* k) { return k; } //== Opt
|
|
||||||
static Klass* check_klass_Opt_Only_JDK15(Klass* k) {
|
static Klass* check_klass_Opt_Only_JDK15(Klass* k) {
|
||||||
assert(JDK_Version::is_gte_jdk15x_version(), "JDK 1.5 only");
|
assert(JDK_Version::is_gte_jdk15x_version(), "JDK 1.5 only");
|
||||||
return k;
|
return k;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* 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
|
||||||
|
@ -108,7 +108,6 @@
|
||||||
template(java_lang_Compiler, "java/lang/Compiler") \
|
template(java_lang_Compiler, "java/lang/Compiler") \
|
||||||
template(sun_misc_Signal, "sun/misc/Signal") \
|
template(sun_misc_Signal, "sun/misc/Signal") \
|
||||||
template(java_lang_AssertionStatusDirectives, "java/lang/AssertionStatusDirectives") \
|
template(java_lang_AssertionStatusDirectives, "java/lang/AssertionStatusDirectives") \
|
||||||
template(sun_jkernel_DownloadManager, "sun/jkernel/DownloadManager") \
|
|
||||||
template(getBootClassPathEntryForClass_name, "getBootClassPathEntryForClass") \
|
template(getBootClassPathEntryForClass_name, "getBootClassPathEntryForClass") \
|
||||||
template(sun_misc_PostVMInitHook, "sun/misc/PostVMInitHook") \
|
template(sun_misc_PostVMInitHook, "sun/misc/PostVMInitHook") \
|
||||||
template(sun_misc_Launcher_ExtClassLoader, "sun/misc/Launcher$ExtClassLoader") \
|
template(sun_misc_Launcher_ExtClassLoader, "sun/misc/Launcher$ExtClassLoader") \
|
||||||
|
@ -735,6 +734,11 @@
|
||||||
do_intrinsic(_checkIndex, java_nio_Buffer, checkIndex_name, int_int_signature, F_R) \
|
do_intrinsic(_checkIndex, java_nio_Buffer, checkIndex_name, int_int_signature, F_R) \
|
||||||
do_name( checkIndex_name, "checkIndex") \
|
do_name( checkIndex_name, "checkIndex") \
|
||||||
\
|
\
|
||||||
|
do_class(sun_nio_cs_iso8859_1_Encoder, "sun/nio/cs/ISO_8859_1$Encoder") \
|
||||||
|
do_intrinsic(_encodeISOArray, sun_nio_cs_iso8859_1_Encoder, encodeISOArray_name, encodeISOArray_signature, F_S) \
|
||||||
|
do_name( encodeISOArray_name, "encodeISOArray") \
|
||||||
|
do_signature(encodeISOArray_signature, "([CI[BII)I") \
|
||||||
|
\
|
||||||
/* java/lang/ref/Reference */ \
|
/* java/lang/ref/Reference */ \
|
||||||
do_intrinsic(_Reference_get, java_lang_ref_Reference, get_name, void_object_signature, F_R) \
|
do_intrinsic(_Reference_get, java_lang_ref_Reference, get_name, void_object_signature, F_R) \
|
||||||
\
|
\
|
||||||
|
|
|
@ -542,17 +542,17 @@ void print_register_type(OopMapValue::oop_types x, VMReg optional,
|
||||||
st->print("Oop");
|
st->print("Oop");
|
||||||
break;
|
break;
|
||||||
case OopMapValue::value_value:
|
case OopMapValue::value_value:
|
||||||
st->print("Value" );
|
st->print("Value");
|
||||||
break;
|
break;
|
||||||
case OopMapValue::narrowoop_value:
|
case OopMapValue::narrowoop_value:
|
||||||
tty->print("NarrowOop" );
|
st->print("NarrowOop");
|
||||||
break;
|
break;
|
||||||
case OopMapValue::callee_saved_value:
|
case OopMapValue::callee_saved_value:
|
||||||
st->print("Callers_" );
|
st->print("Callers_");
|
||||||
optional->print_on(st);
|
optional->print_on(st);
|
||||||
break;
|
break;
|
||||||
case OopMapValue::derived_oop_value:
|
case OopMapValue::derived_oop_value:
|
||||||
st->print("Derived_oop_" );
|
st->print("Derived_oop_");
|
||||||
optional->print_on(st);
|
optional->print_on(st);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -131,17 +131,23 @@ void WorkerDataArray<T>::print(int level, const char* title) {
|
||||||
|
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
|
|
||||||
|
template <> const int WorkerDataArray<int>::_uninitialized = -1;
|
||||||
|
template <> const double WorkerDataArray<double>::_uninitialized = -1.0;
|
||||||
|
template <> const size_t WorkerDataArray<size_t>::_uninitialized = (size_t)-1;
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
void WorkerDataArray<T>::reset() {
|
void WorkerDataArray<T>::reset() {
|
||||||
for (uint i = 0; i < _length; i++) {
|
for (uint i = 0; i < _length; i++) {
|
||||||
_data[i] = (T)-1;
|
_data[i] = (T)_uninitialized;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
void WorkerDataArray<T>::verify() {
|
void WorkerDataArray<T>::verify() {
|
||||||
for (uint i = 0; i < _length; i++) {
|
for (uint i = 0; i < _length; i++) {
|
||||||
assert(_data[i] >= (T)0, err_msg("Invalid data for worker %d", i));
|
assert(_data[i] != _uninitialized,
|
||||||
|
err_msg("Invalid data for worker " UINT32_FORMAT ", data: %lf, uninitialized: %lf",
|
||||||
|
i, (double)_data[i], (double)_uninitialized));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,8 @@ class WorkerDataArray : public CHeapObj<mtGC> {
|
||||||
const char* _print_format;
|
const char* _print_format;
|
||||||
bool _print_sum;
|
bool _print_sum;
|
||||||
|
|
||||||
|
NOT_PRODUCT(static const T _uninitialized;)
|
||||||
|
|
||||||
// We are caching the sum and average to only have to calculate them once.
|
// We are caching the sum and average to only have to calculate them once.
|
||||||
// This is not done in an MT-safe way. It is intetened to allow single
|
// This is not done in an MT-safe way. It is intetened to allow single
|
||||||
// threaded code to call sum() and average() multiple times in any order
|
// threaded code to call sum() and average() multiple times in any order
|
||||||
|
|
|
@ -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
|
||||||
|
@ -167,7 +167,9 @@ void VM_GC_HeapInspection::doit() {
|
||||||
ch->collect_as_vm_thread(GCCause::_heap_inspection);
|
ch->collect_as_vm_thread(GCCause::_heap_inspection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
HeapInspection::heap_inspection(_out, _need_prologue /* need_prologue */);
|
HeapInspection inspect(_csv_format, _print_help, _print_class_stats,
|
||||||
|
_columns);
|
||||||
|
inspect.heap_inspection(_out, _need_prologue /* need_prologue */);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
@ -130,6 +130,10 @@ class VM_GC_HeapInspection: public VM_GC_Operation {
|
||||||
outputStream* _out;
|
outputStream* _out;
|
||||||
bool _full_gc;
|
bool _full_gc;
|
||||||
bool _need_prologue;
|
bool _need_prologue;
|
||||||
|
bool _csv_format; // "comma separated values" format for spreadsheet.
|
||||||
|
bool _print_help;
|
||||||
|
bool _print_class_stats;
|
||||||
|
const char* _columns;
|
||||||
public:
|
public:
|
||||||
VM_GC_HeapInspection(outputStream* out, bool request_full_gc,
|
VM_GC_HeapInspection(outputStream* out, bool request_full_gc,
|
||||||
bool need_prologue) :
|
bool need_prologue) :
|
||||||
|
@ -140,6 +144,10 @@ class VM_GC_HeapInspection: public VM_GC_Operation {
|
||||||
_out = out;
|
_out = out;
|
||||||
_full_gc = request_full_gc;
|
_full_gc = request_full_gc;
|
||||||
_need_prologue = need_prologue;
|
_need_prologue = need_prologue;
|
||||||
|
_csv_format = false;
|
||||||
|
_print_help = false;
|
||||||
|
_print_class_stats = false;
|
||||||
|
_columns = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
~VM_GC_HeapInspection() {}
|
~VM_GC_HeapInspection() {}
|
||||||
|
@ -147,6 +155,10 @@ class VM_GC_HeapInspection: public VM_GC_Operation {
|
||||||
virtual bool skip_operation() const;
|
virtual bool skip_operation() const;
|
||||||
virtual bool doit_prologue();
|
virtual bool doit_prologue();
|
||||||
virtual void doit();
|
virtual void doit();
|
||||||
|
void set_csv_format(bool value) {_csv_format = value;}
|
||||||
|
void set_print_help(bool value) {_print_help = value;}
|
||||||
|
void set_print_class_stats(bool value) {_print_class_stats = value;}
|
||||||
|
void set_columns(const char* value) {_columns = value;}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2002, 2012, 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
|
||||||
|
@ -23,6 +23,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
|
#include "classfile/classLoaderData.hpp"
|
||||||
#include "gc_interface/collectedHeap.hpp"
|
#include "gc_interface/collectedHeap.hpp"
|
||||||
#include "memory/genCollectedHeap.hpp"
|
#include "memory/genCollectedHeap.hpp"
|
||||||
#include "memory/heapInspection.hpp"
|
#include "memory/heapInspection.hpp"
|
||||||
|
@ -41,12 +42,24 @@ int KlassInfoEntry::compare(KlassInfoEntry* e1, KlassInfoEntry* e2) {
|
||||||
} else if(e1->_instance_words < e2->_instance_words) {
|
} else if(e1->_instance_words < e2->_instance_words) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
// Sort alphabetically, note 'Z' < '[' < 'a', but it's better to group
|
||||||
|
// the array classes before all the instance classes.
|
||||||
|
ResourceMark rm;
|
||||||
|
const char* name1 = e1->klass()->external_name();
|
||||||
|
const char* name2 = e2->klass()->external_name();
|
||||||
|
bool d1 = (name1[0] == '[');
|
||||||
|
bool d2 = (name2[0] == '[');
|
||||||
|
if (d1 && !d2) {
|
||||||
|
return -1;
|
||||||
|
} else if (d2 && !d1) {
|
||||||
|
return 1;
|
||||||
|
} else {
|
||||||
|
return strcmp(name1, name2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void KlassInfoEntry::print_on(outputStream* st) const {
|
const char* KlassInfoEntry::name() const {
|
||||||
ResourceMark rm;
|
const char* name;
|
||||||
const char* name;;
|
|
||||||
if (_klass->name() != NULL) {
|
if (_klass->name() != NULL) {
|
||||||
name = _klass->external_name();
|
name = _klass->external_name();
|
||||||
} else {
|
} else {
|
||||||
|
@ -60,11 +73,17 @@ void KlassInfoEntry::print_on(outputStream* st) const {
|
||||||
if (_klass == Universe::longArrayKlassObj()) name = "<longArrayKlass>"; else
|
if (_klass == Universe::longArrayKlassObj()) name = "<longArrayKlass>"; else
|
||||||
name = "<no name>";
|
name = "<no name>";
|
||||||
}
|
}
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
void KlassInfoEntry::print_on(outputStream* st) const {
|
||||||
|
ResourceMark rm;
|
||||||
|
|
||||||
// simplify the formatting (ILP32 vs LP64) - always cast the numbers to 64-bit
|
// simplify the formatting (ILP32 vs LP64) - always cast the numbers to 64-bit
|
||||||
st->print_cr(INT64_FORMAT_W(13) " " UINT64_FORMAT_W(13) " %s",
|
st->print_cr(INT64_FORMAT_W(13) " " UINT64_FORMAT_W(13) " %s",
|
||||||
(jlong) _instance_count,
|
(jlong) _instance_count,
|
||||||
(julong) _instance_words * HeapWordSize,
|
(julong) _instance_words * HeapWordSize,
|
||||||
name);
|
name());
|
||||||
}
|
}
|
||||||
|
|
||||||
KlassInfoEntry* KlassInfoBucket::lookup(Klass* const k) {
|
KlassInfoEntry* KlassInfoBucket::lookup(Klass* const k) {
|
||||||
|
@ -101,7 +120,14 @@ void KlassInfoBucket::empty() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
KlassInfoTable::KlassInfoTable(int size, HeapWord* ref) {
|
void KlassInfoTable::AllClassesFinder::do_klass(Klass* k) {
|
||||||
|
// This has the SIDE EFFECT of creating a KlassInfoEntry
|
||||||
|
// for <k>, if one doesn't exist yet.
|
||||||
|
_table->lookup(k);
|
||||||
|
}
|
||||||
|
|
||||||
|
KlassInfoTable::KlassInfoTable(int size, HeapWord* ref,
|
||||||
|
bool need_class_stats) {
|
||||||
_size = 0;
|
_size = 0;
|
||||||
_ref = ref;
|
_ref = ref;
|
||||||
_buckets = NEW_C_HEAP_ARRAY(KlassInfoBucket, size, mtInternal);
|
_buckets = NEW_C_HEAP_ARRAY(KlassInfoBucket, size, mtInternal);
|
||||||
|
@ -110,6 +136,10 @@ KlassInfoTable::KlassInfoTable(int size, HeapWord* ref) {
|
||||||
for (int index = 0; index < _size; index++) {
|
for (int index = 0; index < _size; index++) {
|
||||||
_buckets[index].initialize();
|
_buckets[index].initialize();
|
||||||
}
|
}
|
||||||
|
if (need_class_stats) {
|
||||||
|
AllClassesFinder finder(this);
|
||||||
|
ClassLoaderDataGraph::classes_do(&finder);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +195,8 @@ int KlassInfoHisto::sort_helper(KlassInfoEntry** e1, KlassInfoEntry** e2) {
|
||||||
return (*e1)->compare(*e1,*e2);
|
return (*e1)->compare(*e1,*e2);
|
||||||
}
|
}
|
||||||
|
|
||||||
KlassInfoHisto::KlassInfoHisto(const char* title, int estimatedCount) :
|
KlassInfoHisto::KlassInfoHisto(KlassInfoTable* cit, const char* title, int estimatedCount) :
|
||||||
|
_cit(cit),
|
||||||
_title(title) {
|
_title(title) {
|
||||||
_elements = new (ResourceObj::C_HEAP, mtInternal) GrowableArray<KlassInfoEntry*>(estimatedCount,true);
|
_elements = new (ResourceObj::C_HEAP, mtInternal) GrowableArray<KlassInfoEntry*>(estimatedCount,true);
|
||||||
}
|
}
|
||||||
|
@ -196,9 +227,205 @@ void KlassInfoHisto::print_elements(outputStream* st) const {
|
||||||
total, totalw * HeapWordSize);
|
total, totalw * HeapWordSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KlassInfoHisto::print_on(outputStream* st) const {
|
#define MAKE_COL_NAME(field, name, help) #name,
|
||||||
|
#define MAKE_COL_HELP(field, name, help) help,
|
||||||
|
|
||||||
|
static const char *name_table[] = {
|
||||||
|
HEAP_INSPECTION_COLUMNS_DO(MAKE_COL_NAME)
|
||||||
|
};
|
||||||
|
|
||||||
|
static const char *help_table[] = {
|
||||||
|
HEAP_INSPECTION_COLUMNS_DO(MAKE_COL_HELP)
|
||||||
|
};
|
||||||
|
|
||||||
|
bool KlassInfoHisto::is_selected(const char *col_name) {
|
||||||
|
if (_selected_columns == NULL) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (strcmp(_selected_columns, col_name) == 0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *start = strstr(_selected_columns, col_name);
|
||||||
|
if (start == NULL) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The following must be true, because _selected_columns != col_name
|
||||||
|
if (start > _selected_columns && start[-1] != ',') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
char x = start[strlen(col_name)];
|
||||||
|
if (x != ',' && x != '\0') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void KlassInfoHisto::print_title(outputStream* st, bool csv_format,
|
||||||
|
bool selected[], int width_table[],
|
||||||
|
const char *name_table[]) {
|
||||||
|
if (csv_format) {
|
||||||
|
st->print("Index,Super");
|
||||||
|
for (int c=0; c<KlassSizeStats::_num_columns; c++) {
|
||||||
|
if (selected[c]) {st->print(",%s", name_table[c]);}
|
||||||
|
}
|
||||||
|
st->print(",ClassName");
|
||||||
|
} else {
|
||||||
|
st->print("Index Super");
|
||||||
|
for (int c=0; c<KlassSizeStats::_num_columns; c++) {
|
||||||
|
if (selected[c]) {st->print(str_fmt(width_table[c]), name_table[c]);}
|
||||||
|
}
|
||||||
|
st->print(" ClassName");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_selected("ClassLoader")) {
|
||||||
|
st->print(",ClassLoader");
|
||||||
|
}
|
||||||
|
st->cr();
|
||||||
|
}
|
||||||
|
|
||||||
|
void KlassInfoHisto::print_class_stats(outputStream* st,
|
||||||
|
bool csv_format, const char *columns) {
|
||||||
|
ResourceMark rm;
|
||||||
|
KlassSizeStats sz, sz_sum;
|
||||||
|
int i;
|
||||||
|
julong *col_table = (julong*)(&sz);
|
||||||
|
julong *colsum_table = (julong*)(&sz_sum);
|
||||||
|
int width_table[KlassSizeStats::_num_columns];
|
||||||
|
bool selected[KlassSizeStats::_num_columns];
|
||||||
|
|
||||||
|
_selected_columns = columns;
|
||||||
|
|
||||||
|
memset(&sz_sum, 0, sizeof(sz_sum));
|
||||||
|
for (int c=0; c<KlassSizeStats::_num_columns; c++) {
|
||||||
|
selected[c] = is_selected(name_table[c]);
|
||||||
|
}
|
||||||
|
|
||||||
|
for(i=0; i < elements()->length(); i++) {
|
||||||
|
elements()->at(i)->set_index(i+1);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int pass=1; pass<=2; pass++) {
|
||||||
|
if (pass == 2) {
|
||||||
|
print_title(st, csv_format, selected, width_table, name_table);
|
||||||
|
}
|
||||||
|
for(i=0; i < elements()->length(); i++) {
|
||||||
|
KlassInfoEntry* e = (KlassInfoEntry*)elements()->at(i);
|
||||||
|
const Klass* k = e->klass();
|
||||||
|
|
||||||
|
memset(&sz, 0, sizeof(sz));
|
||||||
|
sz._inst_count = e->count();
|
||||||
|
sz._inst_bytes = HeapWordSize * e->words();
|
||||||
|
k->collect_statistics(&sz);
|
||||||
|
sz._total_bytes = sz._ro_bytes + sz._rw_bytes;
|
||||||
|
|
||||||
|
if (pass == 1) {
|
||||||
|
for (int c=0; c<KlassSizeStats::_num_columns; c++) {
|
||||||
|
colsum_table[c] += col_table[c];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
int super_index = -1;
|
||||||
|
if (k->oop_is_instance()) {
|
||||||
|
Klass* super = ((InstanceKlass*)k)->java_super();
|
||||||
|
if (super) {
|
||||||
|
KlassInfoEntry* super_e = _cit->lookup(super);
|
||||||
|
if (super_e) {
|
||||||
|
super_index = super_e->index();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (csv_format) {
|
||||||
|
st->print("%d,%d", e->index(), super_index);
|
||||||
|
for (int c=0; c<KlassSizeStats::_num_columns; c++) {
|
||||||
|
if (selected[c]) {st->print("," JULONG_FORMAT, col_table[c]);}
|
||||||
|
}
|
||||||
|
st->print(",%s",e->name());
|
||||||
|
} else {
|
||||||
|
st->print("%5d %5d", e->index(), super_index);
|
||||||
|
for (int c=0; c<KlassSizeStats::_num_columns; c++) {
|
||||||
|
if (selected[c]) {print_julong(st, width_table[c], col_table[c]);}
|
||||||
|
}
|
||||||
|
st->print(" %s", e->name());
|
||||||
|
}
|
||||||
|
if (is_selected("ClassLoader")) {
|
||||||
|
ClassLoaderData* loader_data = k->class_loader_data();
|
||||||
|
st->print(",");
|
||||||
|
loader_data->print_value_on(st);
|
||||||
|
}
|
||||||
|
st->cr();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pass == 1) {
|
||||||
|
for (int c=0; c<KlassSizeStats::_num_columns; c++) {
|
||||||
|
width_table[c] = col_width(colsum_table[c], name_table[c]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sz_sum._inst_size = 0;
|
||||||
|
|
||||||
|
if (csv_format) {
|
||||||
|
st->print(",");
|
||||||
|
for (int c=0; c<KlassSizeStats::_num_columns; c++) {
|
||||||
|
if (selected[c]) {st->print("," JULONG_FORMAT, colsum_table[c]);}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
st->print(" ");
|
||||||
|
for (int c=0; c<KlassSizeStats::_num_columns; c++) {
|
||||||
|
if (selected[c]) {print_julong(st, width_table[c], colsum_table[c]);}
|
||||||
|
}
|
||||||
|
st->print(" Total");
|
||||||
|
if (sz_sum._total_bytes > 0) {
|
||||||
|
st->cr();
|
||||||
|
st->print(" ");
|
||||||
|
for (int c=0; c<KlassSizeStats::_num_columns; c++) {
|
||||||
|
if (selected[c]) {
|
||||||
|
switch (c) {
|
||||||
|
case KlassSizeStats::_index_inst_size:
|
||||||
|
case KlassSizeStats::_index_inst_count:
|
||||||
|
case KlassSizeStats::_index_method_count:
|
||||||
|
st->print(str_fmt(width_table[c]), "-");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
double perc = (double)(100) * (double)(colsum_table[c]) / (double)sz_sum._total_bytes;
|
||||||
|
st->print(perc_fmt(width_table[c]), perc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
st->cr();
|
||||||
|
|
||||||
|
if (!csv_format) {
|
||||||
|
print_title(st, csv_format, selected, width_table, name_table);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
julong KlassInfoHisto::annotations_bytes(Array<AnnotationArray*>* p) const {
|
||||||
|
julong bytes = 0;
|
||||||
|
if (p != NULL) {
|
||||||
|
for (int i = 0; i < p->length(); i++) {
|
||||||
|
bytes += count_bytes_array(p->at(i));
|
||||||
|
}
|
||||||
|
bytes += count_bytes_array(p);
|
||||||
|
}
|
||||||
|
return bytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
void KlassInfoHisto::print_histo_on(outputStream* st, bool print_stats,
|
||||||
|
bool csv_format, const char *columns) {
|
||||||
|
if (print_stats) {
|
||||||
|
print_class_stats(st, csv_format, columns);
|
||||||
|
} else {
|
||||||
st->print_cr("%s",title());
|
st->print_cr("%s",title());
|
||||||
print_elements(st);
|
print_elements(st);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class HistoClosure : public KlassInfoClosure {
|
class HistoClosure : public KlassInfoClosure {
|
||||||
|
@ -236,8 +463,26 @@ void HeapInspection::heap_inspection(outputStream* st, bool need_prologue) {
|
||||||
CollectedHeap* heap = Universe::heap();
|
CollectedHeap* heap = Universe::heap();
|
||||||
bool is_shared_heap = false;
|
bool is_shared_heap = false;
|
||||||
|
|
||||||
|
if (_print_help) {
|
||||||
|
for (int c=0; c<KlassSizeStats::_num_columns; c++) {
|
||||||
|
st->print("%s:\n\t", name_table[c]);
|
||||||
|
const int max_col = 60;
|
||||||
|
int col = 0;
|
||||||
|
for (const char *p = help_table[c]; *p; p++,col++) {
|
||||||
|
if (col >= max_col && *p == ' ') {
|
||||||
|
st->print("\n\t");
|
||||||
|
col = 0;
|
||||||
|
} else {
|
||||||
|
st->print("%c", *p);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
st->print_cr(".\n");
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Collect klass instance info
|
// Collect klass instance info
|
||||||
KlassInfoTable cit(KlassInfoTable::cit_size, ref);
|
KlassInfoTable cit(KlassInfoTable::cit_size, ref, _print_class_stats);
|
||||||
if (!cit.allocation_failed()) {
|
if (!cit.allocation_failed()) {
|
||||||
// Iterate over objects in the heap
|
// Iterate over objects in the heap
|
||||||
RecordInstanceClosure ric(&cit);
|
RecordInstanceClosure ric(&cit);
|
||||||
|
@ -252,14 +497,14 @@ void HeapInspection::heap_inspection(outputStream* st, bool need_prologue) {
|
||||||
missed_count);
|
missed_count);
|
||||||
}
|
}
|
||||||
// Sort and print klass instance info
|
// Sort and print klass instance info
|
||||||
KlassInfoHisto histo("\n"
|
const char *title = "\n"
|
||||||
" num #instances #bytes class name\n"
|
" num #instances #bytes class name\n"
|
||||||
"----------------------------------------------",
|
"----------------------------------------------";
|
||||||
KlassInfoHisto::histo_initial_size);
|
KlassInfoHisto histo(&cit, title, KlassInfoHisto::histo_initial_size);
|
||||||
HistoClosure hc(&histo);
|
HistoClosure hc(&histo);
|
||||||
cit.iterate(&hc);
|
cit.iterate(&hc);
|
||||||
histo.sort();
|
histo.sort();
|
||||||
histo.print_on(st);
|
histo.print_histo_on(st, _print_class_stats, _csv_format, _columns);
|
||||||
} else {
|
} else {
|
||||||
st->print_cr("WARNING: Ran out of C-heap; histogram not generated");
|
st->print_cr("WARNING: Ran out of C-heap; histogram not generated");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2002, 2010, 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
|
||||||
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
#include "memory/allocation.inline.hpp"
|
#include "memory/allocation.inline.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
|
#include "oops/annotations.hpp"
|
||||||
|
|
||||||
#if INCLUDE_SERVICES
|
#if INCLUDE_SERVICES
|
||||||
|
|
||||||
|
@ -44,16 +45,144 @@
|
||||||
// to KlassInfoEntry's and is used to sort
|
// to KlassInfoEntry's and is used to sort
|
||||||
// the entries.
|
// the entries.
|
||||||
|
|
||||||
|
#define HEAP_INSPECTION_COLUMNS_DO(f) \
|
||||||
|
f(inst_size, InstSize, \
|
||||||
|
"Size of each object instance of the Java class") \
|
||||||
|
f(inst_count, InstCount, \
|
||||||
|
"Number of object instances of the Java class") \
|
||||||
|
f(inst_bytes, InstBytes, \
|
||||||
|
"This is usually (InstSize * InstNum). The only exception is " \
|
||||||
|
"java.lang.Class, whose InstBytes also includes the slots " \
|
||||||
|
"used to store static fields. InstBytes is not counted in " \
|
||||||
|
"ROAll, RWAll or Total") \
|
||||||
|
f(mirror_bytes, Mirror, \
|
||||||
|
"Size of the Klass::java_mirror() object") \
|
||||||
|
f(klass_bytes, KlassBytes, \
|
||||||
|
"Size of the InstanceKlass or ArrayKlass for this class. " \
|
||||||
|
"Note that this includes VTab, ITab, OopMap") \
|
||||||
|
f(secondary_supers_bytes, K_secondary_supers, \
|
||||||
|
"Number of bytes used by the Klass::secondary_supers() array") \
|
||||||
|
f(vtab_bytes, VTab, \
|
||||||
|
"Size of the embedded vtable in InstanceKlass") \
|
||||||
|
f(itab_bytes, ITab, \
|
||||||
|
"Size of the embedded itable in InstanceKlass") \
|
||||||
|
f(nonstatic_oopmap_bytes, OopMap, \
|
||||||
|
"Size of the embedded nonstatic_oop_map in InstanceKlass") \
|
||||||
|
f(methods_array_bytes, IK_methods, \
|
||||||
|
"Number of bytes used by the InstanceKlass::methods() array") \
|
||||||
|
f(method_ordering_bytes, IK_method_ordering, \
|
||||||
|
"Number of bytes used by the InstanceKlass::method_ordering() array") \
|
||||||
|
f(local_interfaces_bytes, IK_local_interfaces, \
|
||||||
|
"Number of bytes used by the InstanceKlass::local_interfaces() array") \
|
||||||
|
f(transitive_interfaces_bytes, IK_transitive_interfaces, \
|
||||||
|
"Number of bytes used by the InstanceKlass::transitive_interfaces() array") \
|
||||||
|
f(fields_bytes, IK_fields, \
|
||||||
|
"Number of bytes used by the InstanceKlass::fields() array") \
|
||||||
|
f(inner_classes_bytes, IK_inner_classes, \
|
||||||
|
"Number of bytes used by the InstanceKlass::inner_classes() array") \
|
||||||
|
f(signers_bytes, IK_signers, \
|
||||||
|
"Number of bytes used by the InstanceKlass::singers() array") \
|
||||||
|
f(class_annotations_bytes, class_annotations, \
|
||||||
|
"Size of class annotations") \
|
||||||
|
f(fields_annotations_bytes, fields_annotations, \
|
||||||
|
"Size of field annotations") \
|
||||||
|
f(methods_annotations_bytes, methods_annotations, \
|
||||||
|
"Size of method annotations") \
|
||||||
|
f(methods_parameter_annotations_bytes, methods_parameter_annotations, \
|
||||||
|
"Size of method parameter annotations") \
|
||||||
|
f(methods_default_annotations_bytes, methods_default_annotations, \
|
||||||
|
"Size of methods default annotations") \
|
||||||
|
f(type_annotations_bytes, type_annotations, \
|
||||||
|
"Size of type annotations") \
|
||||||
|
f(annotations_bytes, annotations, \
|
||||||
|
"Size of all annotations") \
|
||||||
|
f(cp_bytes, Cp, \
|
||||||
|
"Size of InstanceKlass::constants()") \
|
||||||
|
f(cp_tags_bytes, CpTags, \
|
||||||
|
"Size of InstanceKlass::constants()->tags()") \
|
||||||
|
f(cp_cache_bytes, CpCache, \
|
||||||
|
"Size of InstanceKlass::constants()->cache()") \
|
||||||
|
f(cp_operands_bytes, CpOperands, \
|
||||||
|
"Size of InstanceKlass::constants()->operands()") \
|
||||||
|
f(cp_refmap_bytes, CpRefMap, \
|
||||||
|
"Size of InstanceKlass::constants()->reference_map()") \
|
||||||
|
f(cp_all_bytes, CpAll, \
|
||||||
|
"Sum of Cp + CpTags + CpCache + CpOperands + CpRefMap") \
|
||||||
|
f(method_count, MethodCount, \
|
||||||
|
"Number of methods in this class") \
|
||||||
|
f(method_bytes, MethodBytes, \
|
||||||
|
"Size of the Method object") \
|
||||||
|
f(const_method_bytes, ConstMethod, \
|
||||||
|
"Size of the ConstMethod object") \
|
||||||
|
f(method_data_bytes, MethodData, \
|
||||||
|
"Size of the MethodData object") \
|
||||||
|
f(stackmap_bytes, StackMap, \
|
||||||
|
"Size of the stackmap_data") \
|
||||||
|
f(bytecode_bytes, Bytecodes, \
|
||||||
|
"Of the MethodBytes column, how much are the space taken up by bytecodes") \
|
||||||
|
f(method_all_bytes, MethodAll, \
|
||||||
|
"Sum of MethodBytes + Constmethod + Stackmap + Methoddata") \
|
||||||
|
f(ro_bytes, ROAll, \
|
||||||
|
"Size of all class meta data that could (potentially) be placed " \
|
||||||
|
"in read-only memory. (This could change with CDS design)") \
|
||||||
|
f(rw_bytes, RWAll, \
|
||||||
|
"Size of all class meta data that must be placed in read/write " \
|
||||||
|
"memory. (This could change with CDS design) ") \
|
||||||
|
f(total_bytes, Total, \
|
||||||
|
"ROAll + RWAll. Note that this does NOT include InstBytes.")
|
||||||
|
|
||||||
|
// Size statistics for a Klass - filled in by Klass::collect_statistics()
|
||||||
|
class KlassSizeStats {
|
||||||
|
public:
|
||||||
|
#define COUNT_KLASS_SIZE_STATS_FIELD(field, name, help) _index_ ## field,
|
||||||
|
#define DECLARE_KLASS_SIZE_STATS_FIELD(field, name, help) julong _ ## field;
|
||||||
|
|
||||||
|
enum {
|
||||||
|
HEAP_INSPECTION_COLUMNS_DO(COUNT_KLASS_SIZE_STATS_FIELD)
|
||||||
|
_num_columns
|
||||||
|
};
|
||||||
|
|
||||||
|
HEAP_INSPECTION_COLUMNS_DO(DECLARE_KLASS_SIZE_STATS_FIELD)
|
||||||
|
|
||||||
|
static int count(oop x) {
|
||||||
|
return (HeapWordSize * ((x) ? (x)->size() : 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
static int count_array(objArrayOop x) {
|
||||||
|
return (HeapWordSize * ((x) ? (x)->size() : 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class T> static int count(T* x) {
|
||||||
|
return (HeapWordSize * ((x) ? (x)->size() : 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class T> static int count_array(T* x) {
|
||||||
|
if (x == NULL) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (x->length() == 0) {
|
||||||
|
// This is a shared array, e.g., Universe::the_empty_int_array(). Don't
|
||||||
|
// count it to avoid double-counting.
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return HeapWordSize * x->size();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class KlassInfoEntry: public CHeapObj<mtInternal> {
|
class KlassInfoEntry: public CHeapObj<mtInternal> {
|
||||||
private:
|
private:
|
||||||
KlassInfoEntry* _next;
|
KlassInfoEntry* _next;
|
||||||
Klass* _klass;
|
Klass* _klass;
|
||||||
long _instance_count;
|
long _instance_count;
|
||||||
size_t _instance_words;
|
size_t _instance_words;
|
||||||
|
long _index;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
KlassInfoEntry(Klass* k, KlassInfoEntry* next) :
|
KlassInfoEntry(Klass* k, KlassInfoEntry* next) :
|
||||||
_klass(k), _instance_count(0), _instance_words(0), _next(next)
|
_klass(k), _instance_count(0), _instance_words(0), _next(next), _index(-1)
|
||||||
{}
|
{}
|
||||||
KlassInfoEntry* next() { return _next; }
|
KlassInfoEntry* next() { return _next; }
|
||||||
bool is_equal(Klass* k) { return k == _klass; }
|
bool is_equal(Klass* k) { return k == _klass; }
|
||||||
|
@ -62,8 +191,11 @@ class KlassInfoEntry: public CHeapObj<mtInternal> {
|
||||||
void set_count(long ct) { _instance_count = ct; }
|
void set_count(long ct) { _instance_count = ct; }
|
||||||
size_t words() { return _instance_words; }
|
size_t words() { return _instance_words; }
|
||||||
void set_words(size_t wds) { _instance_words = wds; }
|
void set_words(size_t wds) { _instance_words = wds; }
|
||||||
|
void set_index(long index) { _index = index; }
|
||||||
|
long index() { return _index; }
|
||||||
int compare(KlassInfoEntry* e1, KlassInfoEntry* e2);
|
int compare(KlassInfoEntry* e1, KlassInfoEntry* e2);
|
||||||
void print_on(outputStream* st) const;
|
void print_on(outputStream* st) const;
|
||||||
|
const char* name() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
class KlassInfoClosure: public StackObj {
|
class KlassInfoClosure: public StackObj {
|
||||||
|
@ -95,45 +227,132 @@ class KlassInfoTable: public StackObj {
|
||||||
|
|
||||||
KlassInfoBucket* _buckets;
|
KlassInfoBucket* _buckets;
|
||||||
uint hash(Klass* p);
|
uint hash(Klass* p);
|
||||||
KlassInfoEntry* lookup(Klass* const k);
|
KlassInfoEntry* lookup(Klass* const k); // allocates if not found!
|
||||||
|
|
||||||
|
class AllClassesFinder : public KlassClosure {
|
||||||
|
KlassInfoTable *_table;
|
||||||
|
public:
|
||||||
|
AllClassesFinder(KlassInfoTable* table) : _table(table) {}
|
||||||
|
virtual void do_klass(Klass* k);
|
||||||
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Table size
|
// Table size
|
||||||
enum {
|
enum {
|
||||||
cit_size = 20011
|
cit_size = 20011
|
||||||
};
|
};
|
||||||
KlassInfoTable(int size, HeapWord* ref);
|
KlassInfoTable(int size, HeapWord* ref, bool need_class_stats);
|
||||||
~KlassInfoTable();
|
~KlassInfoTable();
|
||||||
bool record_instance(const oop obj);
|
bool record_instance(const oop obj);
|
||||||
void iterate(KlassInfoClosure* cic);
|
void iterate(KlassInfoClosure* cic);
|
||||||
bool allocation_failed() { return _buckets == NULL; }
|
bool allocation_failed() { return _buckets == NULL; }
|
||||||
|
|
||||||
|
friend class KlassInfoHisto;
|
||||||
};
|
};
|
||||||
|
|
||||||
class KlassInfoHisto : public StackObj {
|
class KlassInfoHisto : public StackObj {
|
||||||
private:
|
private:
|
||||||
|
KlassInfoTable *_cit;
|
||||||
GrowableArray<KlassInfoEntry*>* _elements;
|
GrowableArray<KlassInfoEntry*>* _elements;
|
||||||
GrowableArray<KlassInfoEntry*>* elements() const { return _elements; }
|
GrowableArray<KlassInfoEntry*>* elements() const { return _elements; }
|
||||||
const char* _title;
|
const char* _title;
|
||||||
const char* title() const { return _title; }
|
const char* title() const { return _title; }
|
||||||
static int sort_helper(KlassInfoEntry** e1, KlassInfoEntry** e2);
|
static int sort_helper(KlassInfoEntry** e1, KlassInfoEntry** e2);
|
||||||
void print_elements(outputStream* st) const;
|
void print_elements(outputStream* st) const;
|
||||||
|
void print_class_stats(outputStream* st, bool csv_format, const char *columns);
|
||||||
|
julong annotations_bytes(Array<AnnotationArray*>* p) const;
|
||||||
|
const char *_selected_columns;
|
||||||
|
bool is_selected(const char *col_name);
|
||||||
|
void print_title(outputStream* st, bool csv_format,
|
||||||
|
bool selected_columns_table[], int width_table[],
|
||||||
|
const char *name_table[]);
|
||||||
|
|
||||||
|
template <class T> static int count_bytes(T* x) {
|
||||||
|
return (HeapWordSize * ((x) ? (x)->size() : 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class T> static int count_bytes_array(T* x) {
|
||||||
|
if (x == NULL) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (x->length() == 0) {
|
||||||
|
// This is a shared array, e.g., Universe::the_empty_int_array(). Don't
|
||||||
|
// count it to avoid double-counting.
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return HeapWordSize * x->size();
|
||||||
|
}
|
||||||
|
|
||||||
|
// returns a format string to print a julong with the given width. E.g,
|
||||||
|
// printf(num_fmt(6), julong(10)) would print out the number 10 with 4
|
||||||
|
// leading spaces.
|
||||||
|
static void print_julong(outputStream* st, int width, julong n) {
|
||||||
|
int num_spaces = width - julong_width(n);
|
||||||
|
if (num_spaces > 0) {
|
||||||
|
st->print(str_fmt(num_spaces), "");
|
||||||
|
}
|
||||||
|
st->print(JULONG_FORMAT, n);
|
||||||
|
}
|
||||||
|
|
||||||
|
static char* perc_fmt(int width) {
|
||||||
|
static char buf[32];
|
||||||
|
jio_snprintf(buf, sizeof(buf), "%%%d.1f%%%%", width-1);
|
||||||
|
return buf;
|
||||||
|
}
|
||||||
|
|
||||||
|
static char* str_fmt(int width) {
|
||||||
|
static char buf[32];
|
||||||
|
jio_snprintf(buf, sizeof(buf), "%%%ds", width);
|
||||||
|
return buf;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int julong_width(julong n) {
|
||||||
|
if (n == 0) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
int w = 0;
|
||||||
|
while (n > 0) {
|
||||||
|
n /= 10;
|
||||||
|
w += 1;
|
||||||
|
}
|
||||||
|
return w;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int col_width(julong n, const char *name) {
|
||||||
|
int w = julong_width(n);
|
||||||
|
int min = (int)(strlen(name));
|
||||||
|
if (w < min) {
|
||||||
|
w = min;
|
||||||
|
}
|
||||||
|
// add a leading space for separation.
|
||||||
|
return w + 1;
|
||||||
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum {
|
enum {
|
||||||
histo_initial_size = 1000
|
histo_initial_size = 1000
|
||||||
};
|
};
|
||||||
KlassInfoHisto(const char* title,
|
KlassInfoHisto(KlassInfoTable* cit, const char* title,
|
||||||
int estimatedCount);
|
int estimatedCount);
|
||||||
~KlassInfoHisto();
|
~KlassInfoHisto();
|
||||||
void add(KlassInfoEntry* cie);
|
void add(KlassInfoEntry* cie);
|
||||||
void print_on(outputStream* st) const;
|
void print_histo_on(outputStream* st, bool print_class_stats, bool csv_format, const char *columns);
|
||||||
void sort();
|
void sort();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDE_SERVICES
|
#endif // INCLUDE_SERVICES
|
||||||
|
|
||||||
class HeapInspection : public AllStatic {
|
class HeapInspection : public StackObj {
|
||||||
|
bool _csv_format; // "comma separated values" format for spreadsheet.
|
||||||
|
bool _print_help;
|
||||||
|
bool _print_class_stats;
|
||||||
|
const char* _columns;
|
||||||
public:
|
public:
|
||||||
static void heap_inspection(outputStream* st, bool need_prologue) NOT_SERVICES_RETURN;
|
HeapInspection(bool csv_format, bool print_help,
|
||||||
|
bool print_class_stats, const char *columns) :
|
||||||
|
_csv_format(csv_format), _print_help(print_help),
|
||||||
|
_print_class_stats(print_class_stats), _columns(columns) {}
|
||||||
|
void heap_inspection(outputStream* st, bool need_prologue) NOT_SERVICES_RETURN;
|
||||||
static void find_instances_at_safepoint(Klass* k, GrowableArray<oop>* result) NOT_SERVICES_RETURN;
|
static void find_instances_at_safepoint(Klass* k, GrowableArray<oop>* result) NOT_SERVICES_RETURN;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* 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
|
||||||
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "classfile/classLoaderData.hpp"
|
#include "classfile/classLoaderData.hpp"
|
||||||
|
#include "memory/heapInspection.hpp"
|
||||||
#include "memory/metadataFactory.hpp"
|
#include "memory/metadataFactory.hpp"
|
||||||
#include "memory/oopFactory.hpp"
|
#include "memory/oopFactory.hpp"
|
||||||
#include "oops/annotations.hpp"
|
#include "oops/annotations.hpp"
|
||||||
|
@ -114,6 +115,50 @@ void Annotations::print_value_on(outputStream* st) const {
|
||||||
st->print("Anotations(" INTPTR_FORMAT ")", this);
|
st->print("Anotations(" INTPTR_FORMAT ")", this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if INCLUDE_SERVICES
|
||||||
|
// Size Statistics
|
||||||
|
|
||||||
|
julong Annotations::count_bytes(Array<AnnotationArray*>* p) {
|
||||||
|
julong bytes = 0;
|
||||||
|
if (p != NULL) {
|
||||||
|
for (int i = 0; i < p->length(); i++) {
|
||||||
|
bytes += KlassSizeStats::count_array(p->at(i));
|
||||||
|
}
|
||||||
|
bytes += KlassSizeStats::count_array(p);
|
||||||
|
}
|
||||||
|
return bytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Annotations::collect_statistics(KlassSizeStats *sz) const {
|
||||||
|
sz->_annotations_bytes = sz->count(this);
|
||||||
|
sz->_class_annotations_bytes = sz->count(class_annotations());
|
||||||
|
sz->_fields_annotations_bytes = count_bytes(fields_annotations());
|
||||||
|
sz->_methods_annotations_bytes = count_bytes(methods_annotations());
|
||||||
|
sz->_methods_parameter_annotations_bytes =
|
||||||
|
count_bytes(methods_parameter_annotations());
|
||||||
|
sz->_methods_default_annotations_bytes =
|
||||||
|
count_bytes(methods_default_annotations());
|
||||||
|
|
||||||
|
const Annotations* type_anno = type_annotations();
|
||||||
|
if (type_anno != NULL) {
|
||||||
|
sz->_type_annotations_bytes = sz->count(type_anno);
|
||||||
|
sz->_type_annotations_bytes += sz->count(type_anno->class_annotations());
|
||||||
|
sz->_type_annotations_bytes += count_bytes(type_anno->fields_annotations());
|
||||||
|
sz->_type_annotations_bytes += count_bytes(type_anno->methods_annotations());
|
||||||
|
}
|
||||||
|
|
||||||
|
sz->_annotations_bytes +=
|
||||||
|
sz->_class_annotations_bytes +
|
||||||
|
sz->_fields_annotations_bytes +
|
||||||
|
sz->_methods_annotations_bytes +
|
||||||
|
sz->_methods_parameter_annotations_bytes +
|
||||||
|
sz->_methods_default_annotations_bytes +
|
||||||
|
sz->_type_annotations_bytes;
|
||||||
|
|
||||||
|
sz->_ro_bytes += sz->_annotations_bytes;
|
||||||
|
}
|
||||||
|
#endif // INCLUDE_SERVICES
|
||||||
|
|
||||||
#define BULLET " - "
|
#define BULLET " - "
|
||||||
|
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* 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,6 +34,7 @@
|
||||||
|
|
||||||
class ClassLoaderData;
|
class ClassLoaderData;
|
||||||
class outputStream;
|
class outputStream;
|
||||||
|
class KlassSizeStats;
|
||||||
|
|
||||||
typedef Array<u1> AnnotationArray;
|
typedef Array<u1> AnnotationArray;
|
||||||
|
|
||||||
|
@ -82,7 +83,12 @@ class Annotations: public MetaspaceObj {
|
||||||
Array<AnnotationArray*>* mda, TRAPS);
|
Array<AnnotationArray*>* mda, TRAPS);
|
||||||
void deallocate_contents(ClassLoaderData* loader_data);
|
void deallocate_contents(ClassLoaderData* loader_data);
|
||||||
DEBUG_ONLY(bool on_stack() { return false; }) // for template
|
DEBUG_ONLY(bool on_stack() { return false; }) // for template
|
||||||
|
|
||||||
|
// Sizing (in words)
|
||||||
static int size() { return sizeof(Annotations) / wordSize; }
|
static int size() { return sizeof(Annotations) / wordSize; }
|
||||||
|
#if INCLUDE_SERVICES
|
||||||
|
void collect_statistics(KlassSizeStats *sz) const;
|
||||||
|
#endif
|
||||||
|
|
||||||
// Constructor to initialize to null
|
// Constructor to initialize to null
|
||||||
Annotations() : _class_annotations(NULL),
|
Annotations() : _class_annotations(NULL),
|
||||||
|
@ -142,7 +148,7 @@ class Annotations: public MetaspaceObj {
|
||||||
void set_methods_annotations_of(instanceKlassHandle ik,
|
void set_methods_annotations_of(instanceKlassHandle ik,
|
||||||
int idnum, AnnotationArray* anno,
|
int idnum, AnnotationArray* anno,
|
||||||
Array<AnnotationArray*>** md_p, TRAPS);
|
Array<AnnotationArray*>** md_p, TRAPS);
|
||||||
|
static julong count_bytes(Array<AnnotationArray*>* p);
|
||||||
public:
|
public:
|
||||||
const char* internal_name() const { return "{constant pool}"; }
|
const char* internal_name() const { return "{constant pool}"; }
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
|
|
|
@ -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
|
||||||
|
@ -106,6 +106,14 @@ class ArrayKlass: public Klass {
|
||||||
static int header_size() { return sizeof(ArrayKlass)/HeapWordSize; }
|
static int header_size() { return sizeof(ArrayKlass)/HeapWordSize; }
|
||||||
static int static_size(int header_size);
|
static int static_size(int header_size);
|
||||||
|
|
||||||
|
#if INCLUDE_SERVICES
|
||||||
|
virtual void collect_statistics(KlassSizeStats *sz) const {
|
||||||
|
Klass::collect_statistics(sz);
|
||||||
|
// Do nothing for now, but remember to modify if you add new
|
||||||
|
// stuff to ArrayKlass.
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Java vtable
|
// Java vtable
|
||||||
klassVtable* vtable() const; // return new klassVtable
|
klassVtable* vtable() const; // return new klassVtable
|
||||||
int vtable_length() const { return _vtable_len; }
|
int vtable_length() const { return _vtable_len; }
|
||||||
|
|
|
@ -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
|
||||||
|
@ -25,6 +25,7 @@
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "interpreter/interpreter.hpp"
|
#include "interpreter/interpreter.hpp"
|
||||||
#include "memory/gcLocker.hpp"
|
#include "memory/gcLocker.hpp"
|
||||||
|
#include "memory/heapInspection.hpp"
|
||||||
#include "memory/metadataFactory.hpp"
|
#include "memory/metadataFactory.hpp"
|
||||||
#include "oops/constMethod.hpp"
|
#include "oops/constMethod.hpp"
|
||||||
#include "oops/method.hpp"
|
#include "oops/method.hpp"
|
||||||
|
@ -330,6 +331,18 @@ void ConstMethod::print_value_on(outputStream* st) const {
|
||||||
method()->print_value_on(st);
|
method()->print_value_on(st);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if INCLUDE_SERVICES
|
||||||
|
// Size Statistics
|
||||||
|
void ConstMethod::collect_statistics(KlassSizeStats *sz) const {
|
||||||
|
int n1, n2, n3;
|
||||||
|
sz->_const_method_bytes += (n1 = sz->count(this));
|
||||||
|
sz->_bytecode_bytes += (n2 = code_size());
|
||||||
|
sz->_stackmap_bytes += (n3 = sz->count_array(stackmap_data()));
|
||||||
|
|
||||||
|
sz->_method_all_bytes += n1 + n3; // note: n2 is part of n3
|
||||||
|
sz->_ro_bytes += n1 + n3;
|
||||||
|
}
|
||||||
|
#endif // INCLUDE_SERVICES
|
||||||
|
|
||||||
// Verification
|
// Verification
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
@ -130,6 +130,7 @@ class MethodParametersElement VALUE_OBJ_CLASS_SPEC {
|
||||||
u2 flags_lo;
|
u2 flags_lo;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class KlassSizeStats;
|
||||||
|
|
||||||
class ConstMethod : public MetaspaceObj {
|
class ConstMethod : public MetaspaceObj {
|
||||||
friend class VMStructs;
|
friend class VMStructs;
|
||||||
|
@ -320,6 +321,9 @@ public:
|
||||||
|
|
||||||
int size() const { return _constMethod_size;}
|
int size() const { return _constMethod_size;}
|
||||||
void set_constMethod_size(int size) { _constMethod_size = size; }
|
void set_constMethod_size(int size) { _constMethod_size = size; }
|
||||||
|
#if INCLUDE_SERVICES
|
||||||
|
void collect_statistics(KlassSizeStats *sz) const;
|
||||||
|
#endif
|
||||||
|
|
||||||
// code size
|
// code size
|
||||||
int code_size() const { return _code_size; }
|
int code_size() const { return _code_size; }
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#include "classfile/systemDictionary.hpp"
|
#include "classfile/systemDictionary.hpp"
|
||||||
#include "classfile/vmSymbols.hpp"
|
#include "classfile/vmSymbols.hpp"
|
||||||
#include "interpreter/linkResolver.hpp"
|
#include "interpreter/linkResolver.hpp"
|
||||||
|
#include "memory/heapInspection.hpp"
|
||||||
#include "memory/metadataFactory.hpp"
|
#include "memory/metadataFactory.hpp"
|
||||||
#include "memory/oopFactory.hpp"
|
#include "memory/oopFactory.hpp"
|
||||||
#include "oops/constantPool.hpp"
|
#include "oops/constantPool.hpp"
|
||||||
|
@ -1098,32 +1099,9 @@ bool ConstantPool::compare_entry_to(int index1, constantPoolHandle cp2,
|
||||||
} // end compare_entry_to()
|
} // end compare_entry_to()
|
||||||
|
|
||||||
|
|
||||||
// Copy this constant pool's entries at start_i to end_i (inclusive)
|
void ConstantPool::copy_operands(constantPoolHandle from_cp,
|
||||||
// to the constant pool to_cp's entries starting at to_i. A total of
|
constantPoolHandle to_cp,
|
||||||
// (end_i - start_i) + 1 entries are copied.
|
TRAPS) {
|
||||||
void ConstantPool::copy_cp_to_impl(constantPoolHandle from_cp, int start_i, int end_i,
|
|
||||||
constantPoolHandle to_cp, int to_i, TRAPS) {
|
|
||||||
|
|
||||||
int dest_i = to_i; // leave original alone for debug purposes
|
|
||||||
|
|
||||||
for (int src_i = start_i; src_i <= end_i; /* see loop bottom */ ) {
|
|
||||||
copy_entry_to(from_cp, src_i, to_cp, dest_i, CHECK);
|
|
||||||
|
|
||||||
switch (from_cp->tag_at(src_i).value()) {
|
|
||||||
case JVM_CONSTANT_Double:
|
|
||||||
case JVM_CONSTANT_Long:
|
|
||||||
// double and long take two constant pool entries
|
|
||||||
src_i += 2;
|
|
||||||
dest_i += 2;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
// all others take one constant pool entry
|
|
||||||
src_i++;
|
|
||||||
dest_i++;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int from_oplen = operand_array_length(from_cp->operands());
|
int from_oplen = operand_array_length(from_cp->operands());
|
||||||
int old_oplen = operand_array_length(to_cp->operands());
|
int old_oplen = operand_array_length(to_cp->operands());
|
||||||
|
@ -1179,8 +1157,39 @@ void ConstantPool::copy_cp_to_impl(constantPoolHandle from_cp, int start_i, int
|
||||||
to_cp->set_operands(new_operands);
|
to_cp->set_operands(new_operands);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} // end copy_operands()
|
||||||
|
|
||||||
} // end copy_cp_to()
|
|
||||||
|
// Copy this constant pool's entries at start_i to end_i (inclusive)
|
||||||
|
// to the constant pool to_cp's entries starting at to_i. A total of
|
||||||
|
// (end_i - start_i) + 1 entries are copied.
|
||||||
|
void ConstantPool::copy_cp_to_impl(constantPoolHandle from_cp, int start_i, int end_i,
|
||||||
|
constantPoolHandle to_cp, int to_i, TRAPS) {
|
||||||
|
|
||||||
|
|
||||||
|
int dest_i = to_i; // leave original alone for debug purposes
|
||||||
|
|
||||||
|
for (int src_i = start_i; src_i <= end_i; /* see loop bottom */ ) {
|
||||||
|
copy_entry_to(from_cp, src_i, to_cp, dest_i, CHECK);
|
||||||
|
|
||||||
|
switch (from_cp->tag_at(src_i).value()) {
|
||||||
|
case JVM_CONSTANT_Double:
|
||||||
|
case JVM_CONSTANT_Long:
|
||||||
|
// double and long take two constant pool entries
|
||||||
|
src_i += 2;
|
||||||
|
dest_i += 2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// all others take one constant pool entry
|
||||||
|
src_i++;
|
||||||
|
dest_i++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
copy_operands(from_cp, to_cp, CHECK);
|
||||||
|
|
||||||
|
} // end copy_cp_to_impl()
|
||||||
|
|
||||||
|
|
||||||
// Copy this constant pool's entry at from_i to the constant pool
|
// Copy this constant pool's entry at from_i to the constant pool
|
||||||
|
@ -1946,6 +1955,20 @@ void ConstantPool::print_value_on(outputStream* st) const {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if INCLUDE_SERVICES
|
||||||
|
// Size Statistics
|
||||||
|
void ConstantPool::collect_statistics(KlassSizeStats *sz) const {
|
||||||
|
sz->_cp_all_bytes += (sz->_cp_bytes = sz->count(this));
|
||||||
|
sz->_cp_all_bytes += (sz->_cp_tags_bytes = sz->count_array(tags()));
|
||||||
|
sz->_cp_all_bytes += (sz->_cp_cache_bytes = sz->count(cache()));
|
||||||
|
sz->_cp_all_bytes += (sz->_cp_operands_bytes = sz->count_array(operands()));
|
||||||
|
sz->_cp_all_bytes += (sz->_cp_refmap_bytes = sz->count_array(reference_map()));
|
||||||
|
|
||||||
|
sz->_ro_bytes += sz->_cp_operands_bytes + sz->_cp_tags_bytes +
|
||||||
|
sz->_cp_refmap_bytes;
|
||||||
|
sz->_rw_bytes += sz->_cp_bytes + sz->_cp_cache_bytes;
|
||||||
|
}
|
||||||
|
#endif // INCLUDE_SERVICES
|
||||||
|
|
||||||
// Verification
|
// Verification
|
||||||
|
|
||||||
|
|
|
@ -80,6 +80,7 @@ class CPSlot VALUE_OBJ_CLASS_SPEC {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class KlassSizeStats;
|
||||||
class ConstantPool : public Metadata {
|
class ConstantPool : public Metadata {
|
||||||
friend class VMStructs;
|
friend class VMStructs;
|
||||||
friend class BytecodeInterpreter; // Directly extracts an oop in the pool for fast instanceof/checkcast
|
friend class BytecodeInterpreter; // Directly extracts an oop in the pool for fast instanceof/checkcast
|
||||||
|
@ -684,9 +685,13 @@ class ConstantPool : public Metadata {
|
||||||
return 0 <= index && index < length();
|
return 0 <= index && index < length();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sizing (in words)
|
||||||
static int header_size() { return sizeof(ConstantPool)/HeapWordSize; }
|
static int header_size() { return sizeof(ConstantPool)/HeapWordSize; }
|
||||||
static int size(int length) { return align_object_size(header_size() + length); }
|
static int size(int length) { return align_object_size(header_size() + length); }
|
||||||
int size() const { return size(length()); }
|
int size() const { return size(length()); }
|
||||||
|
#if INCLUDE_SERVICES
|
||||||
|
void collect_statistics(KlassSizeStats *sz) const;
|
||||||
|
#endif
|
||||||
|
|
||||||
friend class ClassFileParser;
|
friend class ClassFileParser;
|
||||||
friend class SystemDictionary;
|
friend class SystemDictionary;
|
||||||
|
@ -781,6 +786,7 @@ class ConstantPool : public Metadata {
|
||||||
}
|
}
|
||||||
static void copy_cp_to_impl(constantPoolHandle from_cp, int start_i, int end_i, constantPoolHandle to_cp, int to_i, TRAPS);
|
static void copy_cp_to_impl(constantPoolHandle from_cp, int start_i, int end_i, constantPoolHandle to_cp, int to_i, TRAPS);
|
||||||
static void copy_entry_to(constantPoolHandle from_cp, int from_i, constantPoolHandle to_cp, int to_i, TRAPS);
|
static void copy_entry_to(constantPoolHandle from_cp, int from_i, constantPoolHandle to_cp, int to_i, TRAPS);
|
||||||
|
static void copy_operands(constantPoolHandle from_cp, constantPoolHandle to_cp, TRAPS);
|
||||||
int find_matching_entry(int pattern_i, constantPoolHandle search_cp, TRAPS);
|
int find_matching_entry(int pattern_i, constantPoolHandle search_cp, TRAPS);
|
||||||
int version() const { return _saved._version; }
|
int version() const { return _saved._version; }
|
||||||
void set_version(int version) { _saved._version = version; }
|
void set_version(int version) { _saved._version = version; }
|
||||||
|
|
|
@ -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
|
||||||
|
@ -34,6 +34,7 @@
|
||||||
#include "interpreter/rewriter.hpp"
|
#include "interpreter/rewriter.hpp"
|
||||||
#include "jvmtifiles/jvmti.h"
|
#include "jvmtifiles/jvmti.h"
|
||||||
#include "memory/genOopClosures.inline.hpp"
|
#include "memory/genOopClosures.inline.hpp"
|
||||||
|
#include "memory/heapInspection.hpp"
|
||||||
#include "memory/metadataFactory.hpp"
|
#include "memory/metadataFactory.hpp"
|
||||||
#include "memory/oopFactory.hpp"
|
#include "memory/oopFactory.hpp"
|
||||||
#include "oops/fieldStreams.hpp"
|
#include "oops/fieldStreams.hpp"
|
||||||
|
@ -2960,6 +2961,52 @@ const char* InstanceKlass::internal_name() const {
|
||||||
return external_name();
|
return external_name();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if INCLUDE_SERVICES
|
||||||
|
// Size Statistics
|
||||||
|
void InstanceKlass::collect_statistics(KlassSizeStats *sz) const {
|
||||||
|
Klass::collect_statistics(sz);
|
||||||
|
|
||||||
|
sz->_inst_size = HeapWordSize * size_helper();
|
||||||
|
sz->_vtab_bytes = HeapWordSize * align_object_offset(vtable_length());
|
||||||
|
sz->_itab_bytes = HeapWordSize * align_object_offset(itable_length());
|
||||||
|
sz->_nonstatic_oopmap_bytes = HeapWordSize *
|
||||||
|
((is_interface() || is_anonymous()) ?
|
||||||
|
align_object_offset(nonstatic_oop_map_size()) :
|
||||||
|
nonstatic_oop_map_size());
|
||||||
|
|
||||||
|
int n = 0;
|
||||||
|
n += (sz->_methods_array_bytes = sz->count_array(methods()));
|
||||||
|
n += (sz->_method_ordering_bytes = sz->count_array(method_ordering()));
|
||||||
|
n += (sz->_local_interfaces_bytes = sz->count_array(local_interfaces()));
|
||||||
|
n += (sz->_transitive_interfaces_bytes = sz->count_array(transitive_interfaces()));
|
||||||
|
n += (sz->_signers_bytes = sz->count_array(signers()));
|
||||||
|
n += (sz->_fields_bytes = sz->count_array(fields()));
|
||||||
|
n += (sz->_inner_classes_bytes = sz->count_array(inner_classes()));
|
||||||
|
sz->_ro_bytes += n;
|
||||||
|
|
||||||
|
const ConstantPool* cp = constants();
|
||||||
|
if (cp) {
|
||||||
|
cp->collect_statistics(sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
const Annotations* anno = annotations();
|
||||||
|
if (anno) {
|
||||||
|
anno->collect_statistics(sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
const Array<Method*>* methods_array = methods();
|
||||||
|
if (methods()) {
|
||||||
|
for (int i = 0; i < methods_array->length(); i++) {
|
||||||
|
Method* method = methods_array->at(i);
|
||||||
|
if (method) {
|
||||||
|
sz->_method_count ++;
|
||||||
|
method->collect_statistics(sz);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // INCLUDE_SERVICES
|
||||||
|
|
||||||
// Verification
|
// Verification
|
||||||
|
|
||||||
class VerifyFieldClosure: public OopClosure {
|
class VerifyFieldClosure: public OopClosure {
|
||||||
|
|
|
@ -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
|
||||||
|
@ -827,6 +827,9 @@ class InstanceKlass: public Klass {
|
||||||
is_interface(),
|
is_interface(),
|
||||||
is_anonymous());
|
is_anonymous());
|
||||||
}
|
}
|
||||||
|
#if INCLUDE_SERVICES
|
||||||
|
virtual void collect_statistics(KlassSizeStats *sz) const;
|
||||||
|
#endif
|
||||||
|
|
||||||
static int vtable_start_offset() { return header_size(); }
|
static int vtable_start_offset() { return header_size(); }
|
||||||
static int vtable_length_offset() { return offset_of(InstanceKlass, _vtable_len) / HeapWordSize; }
|
static int vtable_length_offset() { return offset_of(InstanceKlass, _vtable_len) / HeapWordSize; }
|
||||||
|
|
|
@ -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
|
||||||
|
@ -29,6 +29,7 @@
|
||||||
#include "classfile/vmSymbols.hpp"
|
#include "classfile/vmSymbols.hpp"
|
||||||
#include "gc_implementation/shared/markSweep.inline.hpp"
|
#include "gc_implementation/shared/markSweep.inline.hpp"
|
||||||
#include "gc_interface/collectedHeap.inline.hpp"
|
#include "gc_interface/collectedHeap.inline.hpp"
|
||||||
|
#include "memory/heapInspection.hpp"
|
||||||
#include "memory/metadataFactory.hpp"
|
#include "memory/metadataFactory.hpp"
|
||||||
#include "memory/oopFactory.hpp"
|
#include "memory/oopFactory.hpp"
|
||||||
#include "memory/resourceArea.hpp"
|
#include "memory/resourceArea.hpp"
|
||||||
|
@ -624,6 +625,17 @@ void Klass::oop_print_value_on(oop obj, outputStream* st) {
|
||||||
obj->print_address_on(st);
|
obj->print_address_on(st);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if INCLUDE_SERVICES
|
||||||
|
// Size Statistics
|
||||||
|
void Klass::collect_statistics(KlassSizeStats *sz) const {
|
||||||
|
sz->_klass_bytes = sz->count(this);
|
||||||
|
sz->_mirror_bytes = sz->count(java_mirror());
|
||||||
|
sz->_secondary_supers_bytes = sz->count_array(secondary_supers());
|
||||||
|
|
||||||
|
sz->_ro_bytes += sz->_secondary_supers_bytes;
|
||||||
|
sz->_rw_bytes += sz->_klass_bytes + sz->_mirror_bytes;
|
||||||
|
}
|
||||||
|
#endif // INCLUDE_SERVICES
|
||||||
|
|
||||||
// Verification
|
// Verification
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
@ -91,6 +91,7 @@ template <class T> class GrowableArray;
|
||||||
class ClassLoaderData;
|
class ClassLoaderData;
|
||||||
class klassVtable;
|
class klassVtable;
|
||||||
class ParCompactionManager;
|
class ParCompactionManager;
|
||||||
|
class KlassSizeStats;
|
||||||
|
|
||||||
class Klass : public Metadata {
|
class Klass : public Metadata {
|
||||||
friend class VMStructs;
|
friend class VMStructs;
|
||||||
|
@ -477,6 +478,9 @@ class Klass : public Metadata {
|
||||||
|
|
||||||
// Size of klass in word size.
|
// Size of klass in word size.
|
||||||
virtual int size() const = 0;
|
virtual int size() const = 0;
|
||||||
|
#if INCLUDE_SERVICES
|
||||||
|
virtual void collect_statistics(KlassSizeStats *sz) const;
|
||||||
|
#endif
|
||||||
|
|
||||||
// Returns the Java name for a class (Resource allocated)
|
// Returns the Java name for a class (Resource allocated)
|
||||||
// For arrays, this returns the name of the element with a leading '['.
|
// For arrays, this returns the name of the element with a leading '['.
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#include "interpreter/oopMapCache.hpp"
|
#include "interpreter/oopMapCache.hpp"
|
||||||
#include "memory/gcLocker.hpp"
|
#include "memory/gcLocker.hpp"
|
||||||
#include "memory/generation.hpp"
|
#include "memory/generation.hpp"
|
||||||
|
#include "memory/heapInspection.hpp"
|
||||||
#include "memory/metadataFactory.hpp"
|
#include "memory/metadataFactory.hpp"
|
||||||
#include "memory/oopFactory.hpp"
|
#include "memory/oopFactory.hpp"
|
||||||
#include "oops/constMethod.hpp"
|
#include "oops/constMethod.hpp"
|
||||||
|
@ -1954,6 +1955,22 @@ void Method::print_value_on(outputStream* st) const {
|
||||||
if (WizardMode && code() != NULL) st->print(" ((nmethod*)%p)", code());
|
if (WizardMode && code() != NULL) st->print(" ((nmethod*)%p)", code());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if INCLUDE_SERVICES
|
||||||
|
// Size Statistics
|
||||||
|
void Method::collect_statistics(KlassSizeStats *sz) const {
|
||||||
|
int mysize = sz->count(this);
|
||||||
|
sz->_method_bytes += mysize;
|
||||||
|
sz->_method_all_bytes += mysize;
|
||||||
|
sz->_rw_bytes += mysize;
|
||||||
|
|
||||||
|
if (constMethod()) {
|
||||||
|
constMethod()->collect_statistics(sz);
|
||||||
|
}
|
||||||
|
if (method_data()) {
|
||||||
|
method_data()->collect_statistics(sz);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // INCLUDE_SERVICES
|
||||||
|
|
||||||
// Verification
|
// Verification
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
@ -101,6 +101,7 @@ class LocalVariableTableElement;
|
||||||
class AdapterHandlerEntry;
|
class AdapterHandlerEntry;
|
||||||
class MethodData;
|
class MethodData;
|
||||||
class ConstMethod;
|
class ConstMethod;
|
||||||
|
class KlassSizeStats;
|
||||||
|
|
||||||
class Method : public Metadata {
|
class Method : public Metadata {
|
||||||
friend class VMStructs;
|
friend class VMStructs;
|
||||||
|
@ -593,6 +594,9 @@ class Method : public Metadata {
|
||||||
static int header_size() { return sizeof(Method)/HeapWordSize; }
|
static int header_size() { return sizeof(Method)/HeapWordSize; }
|
||||||
static int size(bool is_native);
|
static int size(bool is_native);
|
||||||
int size() const { return method_size(); }
|
int size() const { return method_size(); }
|
||||||
|
#if INCLUDE_SERVICES
|
||||||
|
void collect_statistics(KlassSizeStats *sz) const;
|
||||||
|
#endif
|
||||||
|
|
||||||
// interpreter support
|
// interpreter support
|
||||||
static ByteSize const_offset() { return byte_offset_of(Method, _constMethod ); }
|
static ByteSize const_offset() { return byte_offset_of(Method, _constMethod ); }
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2012, 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
|
||||||
|
@ -27,6 +27,7 @@
|
||||||
#include "interpreter/bytecode.hpp"
|
#include "interpreter/bytecode.hpp"
|
||||||
#include "interpreter/bytecodeStream.hpp"
|
#include "interpreter/bytecodeStream.hpp"
|
||||||
#include "interpreter/linkResolver.hpp"
|
#include "interpreter/linkResolver.hpp"
|
||||||
|
#include "memory/heapInspection.hpp"
|
||||||
#include "oops/methodData.hpp"
|
#include "oops/methodData.hpp"
|
||||||
#include "prims/jvmtiRedefineClasses.hpp"
|
#include "prims/jvmtiRedefineClasses.hpp"
|
||||||
#include "runtime/compilationPolicy.hpp"
|
#include "runtime/compilationPolicy.hpp"
|
||||||
|
@ -859,6 +860,15 @@ void MethodData::print_data_on(outputStream* st) const {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if INCLUDE_SERVICES
|
||||||
|
// Size Statistics
|
||||||
|
void MethodData::collect_statistics(KlassSizeStats *sz) const {
|
||||||
|
int n = sz->count(this);
|
||||||
|
sz->_method_data_bytes += n;
|
||||||
|
sz->_method_all_bytes += n;
|
||||||
|
sz->_rw_bytes += n;
|
||||||
|
}
|
||||||
|
#endif // INCLUDE_SERVICES
|
||||||
|
|
||||||
// Verification
|
// Verification
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2012, 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
|
||||||
|
@ -32,6 +32,7 @@
|
||||||
#include "runtime/orderAccess.hpp"
|
#include "runtime/orderAccess.hpp"
|
||||||
|
|
||||||
class BytecodeStream;
|
class BytecodeStream;
|
||||||
|
class KlassSizeStats;
|
||||||
|
|
||||||
// The MethodData object collects counts and other profile information
|
// The MethodData object collects counts and other profile information
|
||||||
// during zeroth-tier (interpretive) and first-tier execution.
|
// during zeroth-tier (interpretive) and first-tier execution.
|
||||||
|
@ -1289,6 +1290,9 @@ public:
|
||||||
// My size
|
// My size
|
||||||
int size_in_bytes() const { return _size; }
|
int size_in_bytes() const { return _size; }
|
||||||
int size() const { return align_object_size(align_size_up(_size, BytesPerWord)/BytesPerWord); }
|
int size() const { return align_object_size(align_size_up(_size, BytesPerWord)/BytesPerWord); }
|
||||||
|
#if INCLUDE_SERVICES
|
||||||
|
void collect_statistics(KlassSizeStats *sz) const;
|
||||||
|
#endif
|
||||||
|
|
||||||
int creation_mileage() const { return _creation_mileage; }
|
int creation_mileage() const { return _creation_mileage; }
|
||||||
void set_creation_mileage(int x) { _creation_mileage = x; }
|
void set_creation_mileage(int x) { _creation_mileage = x; }
|
||||||
|
|
|
@ -516,6 +516,9 @@
|
||||||
develop(bool, SpecialArraysEquals, true, \
|
develop(bool, SpecialArraysEquals, true, \
|
||||||
"special version of Arrays.equals(char[],char[])") \
|
"special version of Arrays.equals(char[],char[])") \
|
||||||
\
|
\
|
||||||
|
product(bool, SpecialEncodeISOArray, true, \
|
||||||
|
"special version of ISO_8859_1$Encoder.encodeISOArray") \
|
||||||
|
\
|
||||||
develop(bool, BailoutToInterpreterForThrows, false, \
|
develop(bool, BailoutToInterpreterForThrows, false, \
|
||||||
"Compiled methods which throws/catches exceptions will be " \
|
"Compiled methods which throws/catches exceptions will be " \
|
||||||
"deopt and intp.") \
|
"deopt and intp.") \
|
||||||
|
|
|
@ -165,13 +165,13 @@ uint ReturnNode::match_edge(uint idx) const {
|
||||||
|
|
||||||
|
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
void ReturnNode::dump_req() const {
|
void ReturnNode::dump_req(outputStream *st) const {
|
||||||
// Dump the required inputs, enclosed in '(' and ')'
|
// Dump the required inputs, enclosed in '(' and ')'
|
||||||
uint i; // Exit value of loop
|
uint i; // Exit value of loop
|
||||||
for( i=0; i<req(); i++ ) { // For all required inputs
|
for (i = 0; i < req(); i++) { // For all required inputs
|
||||||
if( i == TypeFunc::Parms ) tty->print("returns");
|
if (i == TypeFunc::Parms) st->print("returns");
|
||||||
if( in(i) ) tty->print("%c%d ", Compile::current()->node_arena()->contains(in(i)) ? ' ' : 'o', in(i)->_idx);
|
if (in(i)) st->print("%c%d ", Compile::current()->node_arena()->contains(in(i)) ? ' ' : 'o', in(i)->_idx);
|
||||||
else tty->print("_ ");
|
else st->print("_ ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -208,13 +208,13 @@ uint RethrowNode::match_edge(uint idx) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
void RethrowNode::dump_req() const {
|
void RethrowNode::dump_req(outputStream *st) const {
|
||||||
// Dump the required inputs, enclosed in '(' and ')'
|
// Dump the required inputs, enclosed in '(' and ')'
|
||||||
uint i; // Exit value of loop
|
uint i; // Exit value of loop
|
||||||
for( i=0; i<req(); i++ ) { // For all required inputs
|
for (i = 0; i < req(); i++) { // For all required inputs
|
||||||
if( i == TypeFunc::Parms ) tty->print("exception");
|
if (i == TypeFunc::Parms) st->print("exception");
|
||||||
if( in(i) ) tty->print("%c%d ", Compile::current()->node_arena()->contains(in(i)) ? ' ' : 'o', in(i)->_idx);
|
if (in(i)) st->print("%c%d ", Compile::current()->node_arena()->contains(in(i)) ? ' ' : 'o', in(i)->_idx);
|
||||||
else tty->print("_ ");
|
else st->print("_ ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -330,7 +330,8 @@ static void format_helper( PhaseRegAlloc *regalloc, outputStream* st, Node *n, c
|
||||||
st->print(" %s%d]=#ScObj" INT32_FORMAT, msg, i, sco_n);
|
st->print(" %s%d]=#ScObj" INT32_FORMAT, msg, i, sco_n);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if( OptoReg::is_valid(regalloc->get_reg_first(n))) { // Check for undefined
|
if (regalloc->node_regs_max_index() > 0 &&
|
||||||
|
OptoReg::is_valid(regalloc->get_reg_first(n))) { // Check for undefined
|
||||||
char buf[50];
|
char buf[50];
|
||||||
regalloc->dump_register(n,buf);
|
regalloc->dump_register(n,buf);
|
||||||
st->print(" %s%d]=%s",msg,i,buf);
|
st->print(" %s%d]=%s",msg,i,buf);
|
||||||
|
@ -381,7 +382,7 @@ static void format_helper( PhaseRegAlloc *regalloc, outputStream* st, Node *n, c
|
||||||
//------------------------------format-----------------------------------------
|
//------------------------------format-----------------------------------------
|
||||||
void JVMState::format(PhaseRegAlloc *regalloc, const Node *n, outputStream* st) const {
|
void JVMState::format(PhaseRegAlloc *regalloc, const Node *n, outputStream* st) const {
|
||||||
st->print(" #");
|
st->print(" #");
|
||||||
if( _method ) {
|
if (_method) {
|
||||||
_method->print_short_name(st);
|
_method->print_short_name(st);
|
||||||
st->print(" @ bci:%d ",_bci);
|
st->print(" @ bci:%d ",_bci);
|
||||||
} else {
|
} else {
|
||||||
|
@ -393,21 +394,22 @@ void JVMState::format(PhaseRegAlloc *regalloc, const Node *n, outputStream* st)
|
||||||
MachSafePointNode *mcall = n->as_MachSafePoint();
|
MachSafePointNode *mcall = n->as_MachSafePoint();
|
||||||
uint i;
|
uint i;
|
||||||
// Print locals
|
// Print locals
|
||||||
for( i = 0; i < (uint)loc_size(); i++ )
|
for (i = 0; i < (uint)loc_size(); i++)
|
||||||
format_helper( regalloc, st, mcall->local(this, i), "L[", i, &scobjs );
|
format_helper(regalloc, st, mcall->local(this, i), "L[", i, &scobjs);
|
||||||
// Print stack
|
// Print stack
|
||||||
for (i = 0; i < (uint)stk_size(); i++) {
|
for (i = 0; i < (uint)stk_size(); i++) {
|
||||||
if ((uint)(_stkoff + i) >= mcall->len())
|
if ((uint)(_stkoff + i) >= mcall->len())
|
||||||
st->print(" oob ");
|
st->print(" oob ");
|
||||||
else
|
else
|
||||||
format_helper( regalloc, st, mcall->stack(this, i), "STK[", i, &scobjs );
|
format_helper(regalloc, st, mcall->stack(this, i), "STK[", i, &scobjs);
|
||||||
}
|
}
|
||||||
for (i = 0; (int)i < nof_monitors(); i++) {
|
for (i = 0; (int)i < nof_monitors(); i++) {
|
||||||
Node *box = mcall->monitor_box(this, i);
|
Node *box = mcall->monitor_box(this, i);
|
||||||
Node *obj = mcall->monitor_obj(this, i);
|
Node *obj = mcall->monitor_obj(this, i);
|
||||||
if ( OptoReg::is_valid(regalloc->get_reg_first(box)) ) {
|
if (regalloc->node_regs_max_index() > 0 &&
|
||||||
|
OptoReg::is_valid(regalloc->get_reg_first(box))) {
|
||||||
box = BoxLockNode::box_node(box);
|
box = BoxLockNode::box_node(box);
|
||||||
format_helper( regalloc, st, box, "MON-BOX[", i, &scobjs );
|
format_helper(regalloc, st, box, "MON-BOX[", i, &scobjs);
|
||||||
} else {
|
} else {
|
||||||
OptoReg::Name box_reg = BoxLockNode::reg(box);
|
OptoReg::Name box_reg = BoxLockNode::reg(box);
|
||||||
st->print(" MON-BOX%d=%s+%d",
|
st->print(" MON-BOX%d=%s+%d",
|
||||||
|
@ -420,7 +422,7 @@ void JVMState::format(PhaseRegAlloc *regalloc, const Node *n, outputStream* st)
|
||||||
if (BoxLockNode::box_node(box)->is_eliminated())
|
if (BoxLockNode::box_node(box)->is_eliminated())
|
||||||
obj_msg = "MON-OBJ(LOCK ELIMINATED)[";
|
obj_msg = "MON-OBJ(LOCK ELIMINATED)[";
|
||||||
}
|
}
|
||||||
format_helper( regalloc, st, obj, obj_msg, i, &scobjs );
|
format_helper(regalloc, st, obj, obj_msg, i, &scobjs);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < (uint)scobjs.length(); i++) {
|
for (i = 0; i < (uint)scobjs.length(); i++) {
|
||||||
|
@ -463,9 +465,9 @@ void JVMState::format(PhaseRegAlloc *regalloc, const Node *n, outputStream* st)
|
||||||
st->print(" [");
|
st->print(" [");
|
||||||
cifield = iklass->nonstatic_field_at(0);
|
cifield = iklass->nonstatic_field_at(0);
|
||||||
cifield->print_name_on(st);
|
cifield->print_name_on(st);
|
||||||
format_helper( regalloc, st, fld_node, ":", 0, &scobjs );
|
format_helper(regalloc, st, fld_node, ":", 0, &scobjs);
|
||||||
} else {
|
} else {
|
||||||
format_helper( regalloc, st, fld_node, "[", 0, &scobjs );
|
format_helper(regalloc, st, fld_node, "[", 0, &scobjs);
|
||||||
}
|
}
|
||||||
for (uint j = 1; j < nf; j++) {
|
for (uint j = 1; j < nf; j++) {
|
||||||
fld_node = mcall->in(first_ind+j);
|
fld_node = mcall->in(first_ind+j);
|
||||||
|
@ -473,9 +475,9 @@ void JVMState::format(PhaseRegAlloc *regalloc, const Node *n, outputStream* st)
|
||||||
st->print(", [");
|
st->print(", [");
|
||||||
cifield = iklass->nonstatic_field_at(j);
|
cifield = iklass->nonstatic_field_at(j);
|
||||||
cifield->print_name_on(st);
|
cifield->print_name_on(st);
|
||||||
format_helper( regalloc, st, fld_node, ":", j, &scobjs );
|
format_helper(regalloc, st, fld_node, ":", j, &scobjs);
|
||||||
} else {
|
} else {
|
||||||
format_helper( regalloc, st, fld_node, ", [", j, &scobjs );
|
format_helper(regalloc, st, fld_node, ", [", j, &scobjs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -586,15 +588,15 @@ JVMState* JVMState::clone_deep(Compile* C) const {
|
||||||
uint CallNode::cmp( const Node &n ) const
|
uint CallNode::cmp( const Node &n ) const
|
||||||
{ return _tf == ((CallNode&)n)._tf && _jvms == ((CallNode&)n)._jvms; }
|
{ return _tf == ((CallNode&)n)._tf && _jvms == ((CallNode&)n)._jvms; }
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
void CallNode::dump_req() const {
|
void CallNode::dump_req(outputStream *st) const {
|
||||||
// Dump the required inputs, enclosed in '(' and ')'
|
// Dump the required inputs, enclosed in '(' and ')'
|
||||||
uint i; // Exit value of loop
|
uint i; // Exit value of loop
|
||||||
for( i=0; i<req(); i++ ) { // For all required inputs
|
for (i = 0; i < req(); i++) { // For all required inputs
|
||||||
if( i == TypeFunc::Parms ) tty->print("(");
|
if (i == TypeFunc::Parms) st->print("(");
|
||||||
if( in(i) ) tty->print("%c%d ", Compile::current()->node_arena()->contains(in(i)) ? ' ' : 'o', in(i)->_idx);
|
if (in(i)) st->print("%c%d ", Compile::current()->node_arena()->contains(in(i)) ? ' ' : 'o', in(i)->_idx);
|
||||||
else tty->print("_ ");
|
else st->print("_ ");
|
||||||
}
|
}
|
||||||
tty->print(")");
|
st->print(")");
|
||||||
}
|
}
|
||||||
|
|
||||||
void CallNode::dump_spec(outputStream *st) const {
|
void CallNode::dump_spec(outputStream *st) const {
|
||||||
|
|
|
@ -126,7 +126,7 @@ public:
|
||||||
virtual uint ideal_reg() const { return NotAMachineReg; }
|
virtual uint ideal_reg() const { return NotAMachineReg; }
|
||||||
virtual uint match_edge(uint idx) const;
|
virtual uint match_edge(uint idx) const;
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
virtual void dump_req() const;
|
virtual void dump_req(outputStream *st = tty) const;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ class RethrowNode : public Node {
|
||||||
virtual uint match_edge(uint idx) const;
|
virtual uint match_edge(uint idx) const;
|
||||||
virtual uint ideal_reg() const { return NotAMachineReg; }
|
virtual uint ideal_reg() const { return NotAMachineReg; }
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
virtual void dump_req() const;
|
virtual void dump_req(outputStream *st = tty) const;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -579,7 +579,7 @@ public:
|
||||||
virtual uint match_edge(uint idx) const;
|
virtual uint match_edge(uint idx) const;
|
||||||
|
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
virtual void dump_req() const;
|
virtual void dump_req(outputStream *st = tty) const;
|
||||||
virtual void dump_spec(outputStream *st) const;
|
virtual void dump_spec(outputStream *st) const;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
|
@ -127,6 +127,7 @@ macro(DivL)
|
||||||
macro(DivMod)
|
macro(DivMod)
|
||||||
macro(DivModI)
|
macro(DivModI)
|
||||||
macro(DivModL)
|
macro(DivModL)
|
||||||
|
macro(EncodeISOArray)
|
||||||
macro(EncodeP)
|
macro(EncodeP)
|
||||||
macro(EncodePKlass)
|
macro(EncodePKlass)
|
||||||
macro(ExpD)
|
macro(ExpD)
|
||||||
|
|
|
@ -523,7 +523,8 @@ void ConnectionGraph::add_node_to_connection_graph(Node *n, Unique_Node_List *de
|
||||||
case Op_AryEq:
|
case Op_AryEq:
|
||||||
case Op_StrComp:
|
case Op_StrComp:
|
||||||
case Op_StrEquals:
|
case Op_StrEquals:
|
||||||
case Op_StrIndexOf: {
|
case Op_StrIndexOf:
|
||||||
|
case Op_EncodeISOArray: {
|
||||||
add_local_var(n, PointsToNode::ArgEscape);
|
add_local_var(n, PointsToNode::ArgEscape);
|
||||||
delayed_worklist->push(n); // Process it later.
|
delayed_worklist->push(n); // Process it later.
|
||||||
break;
|
break;
|
||||||
|
@ -701,7 +702,8 @@ void ConnectionGraph::add_final_edges(Node *n) {
|
||||||
case Op_AryEq:
|
case Op_AryEq:
|
||||||
case Op_StrComp:
|
case Op_StrComp:
|
||||||
case Op_StrEquals:
|
case Op_StrEquals:
|
||||||
case Op_StrIndexOf: {
|
case Op_StrIndexOf:
|
||||||
|
case Op_EncodeISOArray: {
|
||||||
// char[] arrays passed to string intrinsic do not escape but
|
// char[] arrays passed to string intrinsic do not escape but
|
||||||
// they are not scalar replaceable. Adjust escape state for them.
|
// they are not scalar replaceable. Adjust escape state for them.
|
||||||
// Start from in(2) edge since in(1) is memory edge.
|
// Start from in(2) edge since in(1) is memory edge.
|
||||||
|
@ -2581,15 +2583,22 @@ Node* ConnectionGraph::find_inst_mem(Node *orig_mem, int alias_idx, GrowableArra
|
||||||
}
|
}
|
||||||
// Otherwise skip it (the call updated 'result' value).
|
// Otherwise skip it (the call updated 'result' value).
|
||||||
} else if (result->Opcode() == Op_SCMemProj) {
|
} else if (result->Opcode() == Op_SCMemProj) {
|
||||||
assert(result->in(0)->is_LoadStore(), "sanity");
|
Node* mem = result->in(0);
|
||||||
const Type *at = igvn->type(result->in(0)->in(MemNode::Address));
|
Node* adr = NULL;
|
||||||
|
if (mem->is_LoadStore()) {
|
||||||
|
adr = mem->in(MemNode::Address);
|
||||||
|
} else {
|
||||||
|
assert(mem->Opcode() == Op_EncodeISOArray, "sanity");
|
||||||
|
adr = mem->in(3); // Memory edge corresponds to destination array
|
||||||
|
}
|
||||||
|
const Type *at = igvn->type(adr);
|
||||||
if (at != Type::TOP) {
|
if (at != Type::TOP) {
|
||||||
assert (at->isa_ptr() != NULL, "pointer type required.");
|
assert (at->isa_ptr() != NULL, "pointer type required.");
|
||||||
int idx = C->get_alias_index(at->is_ptr());
|
int idx = C->get_alias_index(at->is_ptr());
|
||||||
assert(idx != alias_idx, "Object is not scalar replaceable if a LoadStore node access its field");
|
assert(idx != alias_idx, "Object is not scalar replaceable if a LoadStore node access its field");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
result = result->in(0)->in(MemNode::Memory);
|
result = mem->in(MemNode::Memory);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (result->is_Phi()) {
|
if (result->is_Phi()) {
|
||||||
|
@ -2927,6 +2936,11 @@ void ConnectionGraph::split_unique_types(GrowableArray<Node *> &alloc_worklist)
|
||||||
if (m->is_MergeMem()) {
|
if (m->is_MergeMem()) {
|
||||||
assert(_mergemem_worklist.contains(m->as_MergeMem()), "EA: missing MergeMem node in the worklist");
|
assert(_mergemem_worklist.contains(m->as_MergeMem()), "EA: missing MergeMem node in the worklist");
|
||||||
}
|
}
|
||||||
|
} else if (use->Opcode() == Op_EncodeISOArray) {
|
||||||
|
if (use->in(MemNode::Memory) == n || use->in(3) == n) {
|
||||||
|
// EncodeISOArray overwrites destination array
|
||||||
|
memnode_worklist.append_if_missing(use);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
uint op = use->Opcode();
|
uint op = use->Opcode();
|
||||||
if (!(op == Op_CmpP || op == Op_Conv2B ||
|
if (!(op == Op_CmpP || op == Op_Conv2B ||
|
||||||
|
@ -2962,6 +2976,16 @@ void ConnectionGraph::split_unique_types(GrowableArray<Node *> &alloc_worklist)
|
||||||
n = n->as_MemBar()->proj_out(TypeFunc::Memory);
|
n = n->as_MemBar()->proj_out(TypeFunc::Memory);
|
||||||
if (n == NULL)
|
if (n == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
} else if (n->Opcode() == Op_EncodeISOArray) {
|
||||||
|
// get the memory projection
|
||||||
|
for (DUIterator_Fast imax, i = n->fast_outs(imax); i < imax; i++) {
|
||||||
|
Node *use = n->fast_out(i);
|
||||||
|
if (use->Opcode() == Op_SCMemProj) {
|
||||||
|
n = use;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
assert(n->Opcode() == Op_SCMemProj, "memory projection required");
|
||||||
} else {
|
} else {
|
||||||
assert(n->is_Mem(), "memory node required.");
|
assert(n->is_Mem(), "memory node required.");
|
||||||
Node *addr = n->in(MemNode::Address);
|
Node *addr = n->in(MemNode::Address);
|
||||||
|
@ -2999,7 +3023,7 @@ void ConnectionGraph::split_unique_types(GrowableArray<Node *> &alloc_worklist)
|
||||||
Node *use = n->fast_out(i);
|
Node *use = n->fast_out(i);
|
||||||
if (use->is_Phi() || use->is_ClearArray()) {
|
if (use->is_Phi() || use->is_ClearArray()) {
|
||||||
memnode_worklist.append_if_missing(use);
|
memnode_worklist.append_if_missing(use);
|
||||||
} else if(use->is_Mem() && use->in(MemNode::Memory) == n) {
|
} else if (use->is_Mem() && use->in(MemNode::Memory) == n) {
|
||||||
if (use->Opcode() == Op_StoreCM) // Ignore cardmark stores
|
if (use->Opcode() == Op_StoreCM) // Ignore cardmark stores
|
||||||
continue;
|
continue;
|
||||||
memnode_worklist.append_if_missing(use);
|
memnode_worklist.append_if_missing(use);
|
||||||
|
@ -3010,6 +3034,11 @@ void ConnectionGraph::split_unique_types(GrowableArray<Node *> &alloc_worklist)
|
||||||
assert(use->in(MemNode::Memory) != n, "EA: missing memory path");
|
assert(use->in(MemNode::Memory) != n, "EA: missing memory path");
|
||||||
} else if (use->is_MergeMem()) {
|
} else if (use->is_MergeMem()) {
|
||||||
assert(_mergemem_worklist.contains(use->as_MergeMem()), "EA: missing MergeMem node in the worklist");
|
assert(_mergemem_worklist.contains(use->as_MergeMem()), "EA: missing MergeMem node in the worklist");
|
||||||
|
} else if (use->Opcode() == Op_EncodeISOArray) {
|
||||||
|
if (use->in(MemNode::Memory) == n || use->in(3) == n) {
|
||||||
|
// EncodeISOArray overwrites destination array
|
||||||
|
memnode_worklist.append_if_missing(use);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
uint op = use->Opcode();
|
uint op = use->Opcode();
|
||||||
if (!(op == Op_StoreCM ||
|
if (!(op == Op_StoreCM ||
|
||||||
|
|
|
@ -175,6 +175,7 @@ void Block::implicit_null_check(PhaseCFG *cfg, Node *proj, Node *val, int allowe
|
||||||
case Op_StrEquals:
|
case Op_StrEquals:
|
||||||
case Op_StrIndexOf:
|
case Op_StrIndexOf:
|
||||||
case Op_AryEq:
|
case Op_AryEq:
|
||||||
|
case Op_EncodeISOArray:
|
||||||
// Not a legit memory op for implicit null check regardless of
|
// Not a legit memory op for implicit null check regardless of
|
||||||
// embedded loads
|
// embedded loads
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -290,6 +290,7 @@ class LibraryCallKit : public GraphKit {
|
||||||
bool inline_cipherBlockChaining_AESCrypt(vmIntrinsics::ID id);
|
bool inline_cipherBlockChaining_AESCrypt(vmIntrinsics::ID id);
|
||||||
Node* inline_cipherBlockChaining_AESCrypt_predicate(bool decrypting);
|
Node* inline_cipherBlockChaining_AESCrypt_predicate(bool decrypting);
|
||||||
Node* get_key_start_from_aescrypt_object(Node* aescrypt_object);
|
Node* get_key_start_from_aescrypt_object(Node* aescrypt_object);
|
||||||
|
bool inline_encodeISOArray();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -381,6 +382,10 @@ CallGenerator* Compile::make_vm_intrinsic(ciMethod* m, bool is_virtual) {
|
||||||
// These also use the arraycopy intrinsic mechanism:
|
// These also use the arraycopy intrinsic mechanism:
|
||||||
if (!InlineArrayCopy) return NULL;
|
if (!InlineArrayCopy) return NULL;
|
||||||
break;
|
break;
|
||||||
|
case vmIntrinsics::_encodeISOArray:
|
||||||
|
if (!SpecialEncodeISOArray) return NULL;
|
||||||
|
if (!Matcher::match_rule_supported(Op_EncodeISOArray)) return NULL;
|
||||||
|
break;
|
||||||
case vmIntrinsics::_checkIndex:
|
case vmIntrinsics::_checkIndex:
|
||||||
// We do not intrinsify this. The optimizer does fine with it.
|
// We do not intrinsify this. The optimizer does fine with it.
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -799,6 +804,9 @@ bool LibraryCallKit::try_to_inline() {
|
||||||
case vmIntrinsics::_cipherBlockChaining_decryptAESCrypt:
|
case vmIntrinsics::_cipherBlockChaining_decryptAESCrypt:
|
||||||
return inline_cipherBlockChaining_AESCrypt(intrinsic_id());
|
return inline_cipherBlockChaining_AESCrypt(intrinsic_id());
|
||||||
|
|
||||||
|
case vmIntrinsics::_encodeISOArray:
|
||||||
|
return inline_encodeISOArray();
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// If you get here, it may be that someone has added a new intrinsic
|
// If you get here, it may be that someone has added a new intrinsic
|
||||||
// to the list in vmSymbols.hpp without implementing it here.
|
// to the list in vmSymbols.hpp without implementing it here.
|
||||||
|
@ -5368,6 +5376,47 @@ LibraryCallKit::generate_unchecked_arraycopy(const TypePtr* adr_type,
|
||||||
src_start, dest_start, copy_length XTOP);
|
src_start, dest_start, copy_length XTOP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-------------inline_encodeISOArray-----------------------------------
|
||||||
|
// encode char[] to byte[] in ISO_8859_1
|
||||||
|
bool LibraryCallKit::inline_encodeISOArray() {
|
||||||
|
assert(callee()->signature()->size() == 5, "encodeISOArray has 5 parameters");
|
||||||
|
// no receiver since it is static method
|
||||||
|
Node *src = argument(0);
|
||||||
|
Node *src_offset = argument(1);
|
||||||
|
Node *dst = argument(2);
|
||||||
|
Node *dst_offset = argument(3);
|
||||||
|
Node *length = argument(4);
|
||||||
|
|
||||||
|
const Type* src_type = src->Value(&_gvn);
|
||||||
|
const Type* dst_type = dst->Value(&_gvn);
|
||||||
|
const TypeAryPtr* top_src = src_type->isa_aryptr();
|
||||||
|
const TypeAryPtr* top_dest = dst_type->isa_aryptr();
|
||||||
|
if (top_src == NULL || top_src->klass() == NULL ||
|
||||||
|
top_dest == NULL || top_dest->klass() == NULL) {
|
||||||
|
// failed array check
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Figure out the size and type of the elements we will be copying.
|
||||||
|
BasicType src_elem = src_type->isa_aryptr()->klass()->as_array_klass()->element_type()->basic_type();
|
||||||
|
BasicType dst_elem = dst_type->isa_aryptr()->klass()->as_array_klass()->element_type()->basic_type();
|
||||||
|
if (src_elem != T_CHAR || dst_elem != T_BYTE) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Node* src_start = array_element_address(src, src_offset, src_elem);
|
||||||
|
Node* dst_start = array_element_address(dst, dst_offset, dst_elem);
|
||||||
|
// 'src_start' points to src array + scaled offset
|
||||||
|
// 'dst_start' points to dst array + scaled offset
|
||||||
|
|
||||||
|
const TypeAryPtr* mtype = TypeAryPtr::BYTES;
|
||||||
|
Node* enc = new (C) EncodeISOArrayNode(control(), memory(mtype), src_start, dst_start, length);
|
||||||
|
enc = _gvn.transform(enc);
|
||||||
|
Node* res_mem = _gvn.transform(new (C) SCMemProjNode(enc));
|
||||||
|
set_memory(res_mem, mtype);
|
||||||
|
set_result(enc);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------inline_reference_get----------------------------
|
//----------------------------inline_reference_get----------------------------
|
||||||
// public T java.lang.ref.Reference.get();
|
// public T java.lang.ref.Reference.get();
|
||||||
bool LibraryCallKit::inline_reference_get() {
|
bool LibraryCallKit::inline_reference_get() {
|
||||||
|
|
|
@ -613,6 +613,7 @@ bool IdealLoopTree::policy_maximally_unroll( PhaseIdealLoop *phase ) const {
|
||||||
case Op_StrComp:
|
case Op_StrComp:
|
||||||
case Op_StrEquals:
|
case Op_StrEquals:
|
||||||
case Op_StrIndexOf:
|
case Op_StrIndexOf:
|
||||||
|
case Op_EncodeISOArray:
|
||||||
case Op_AryEq: {
|
case Op_AryEq: {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -717,6 +718,7 @@ bool IdealLoopTree::policy_unroll( PhaseIdealLoop *phase ) const {
|
||||||
case Op_StrComp:
|
case Op_StrComp:
|
||||||
case Op_StrEquals:
|
case Op_StrEquals:
|
||||||
case Op_StrIndexOf:
|
case Op_StrIndexOf:
|
||||||
|
case Op_EncodeISOArray:
|
||||||
case Op_AryEq: {
|
case Op_AryEq: {
|
||||||
// Do not unroll a loop with String intrinsics code.
|
// Do not unroll a loop with String intrinsics code.
|
||||||
// String intrinsics are large and have loops.
|
// String intrinsics are large and have loops.
|
||||||
|
|
|
@ -506,7 +506,7 @@ int MachConstantNode::constant_offset() {
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
void MachNullCheckNode::format( PhaseRegAlloc *ra_, outputStream *st ) const {
|
void MachNullCheckNode::format( PhaseRegAlloc *ra_, outputStream *st ) const {
|
||||||
int reg = ra_->get_reg_first(in(1)->in(_vidx));
|
int reg = ra_->get_reg_first(in(1)->in(_vidx));
|
||||||
tty->print("%s %s", Name(), Matcher::regName[reg]);
|
st->print("%s %s", Name(), Matcher::regName[reg]);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -361,14 +361,21 @@ static Node *scan_mem_chain(Node *mem, int alias_idx, int offset, Node *start_me
|
||||||
}
|
}
|
||||||
// Otherwise skip it (the call updated 'mem' value).
|
// Otherwise skip it (the call updated 'mem' value).
|
||||||
} else if (mem->Opcode() == Op_SCMemProj) {
|
} else if (mem->Opcode() == Op_SCMemProj) {
|
||||||
assert(mem->in(0)->is_LoadStore(), "sanity");
|
mem = mem->in(0);
|
||||||
const TypePtr* atype = mem->in(0)->in(MemNode::Address)->bottom_type()->is_ptr();
|
Node* adr = NULL;
|
||||||
|
if (mem->is_LoadStore()) {
|
||||||
|
adr = mem->in(MemNode::Address);
|
||||||
|
} else {
|
||||||
|
assert(mem->Opcode() == Op_EncodeISOArray, "sanity");
|
||||||
|
adr = mem->in(3); // Destination array
|
||||||
|
}
|
||||||
|
const TypePtr* atype = adr->bottom_type()->is_ptr();
|
||||||
int adr_idx = Compile::current()->get_alias_index(atype);
|
int adr_idx = Compile::current()->get_alias_index(atype);
|
||||||
if (adr_idx == alias_idx) {
|
if (adr_idx == alias_idx) {
|
||||||
assert(false, "Object is not scalar replaceable if a LoadStore node access its field");
|
assert(false, "Object is not scalar replaceable if a LoadStore node access its field");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
mem = mem->in(0)->in(MemNode::Memory);
|
mem = mem->in(MemNode::Memory);
|
||||||
} else {
|
} else {
|
||||||
return mem;
|
return mem;
|
||||||
}
|
}
|
||||||
|
@ -445,7 +452,7 @@ Node *PhaseMacroExpand::value_from_mem_phi(Node *mem, BasicType ft, const Type *
|
||||||
}
|
}
|
||||||
values.at_put(j, val);
|
values.at_put(j, val);
|
||||||
} else if (val->Opcode() == Op_SCMemProj) {
|
} else if (val->Opcode() == Op_SCMemProj) {
|
||||||
assert(val->in(0)->is_LoadStore(), "sanity");
|
assert(val->in(0)->is_LoadStore() || val->in(0)->Opcode() == Op_EncodeISOArray, "sanity");
|
||||||
assert(false, "Object is not scalar replaceable if a LoadStore node access its field");
|
assert(false, "Object is not scalar replaceable if a LoadStore node access its field");
|
||||||
return NULL;
|
return NULL;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -919,6 +919,7 @@ static void match_alias_type(Compile* C, Node* n, Node* m) {
|
||||||
case Op_AryEq:
|
case Op_AryEq:
|
||||||
case Op_MemBarVolatile:
|
case Op_MemBarVolatile:
|
||||||
case Op_MemBarCPUOrder: // %%% these ideals should have narrower adr_type?
|
case Op_MemBarCPUOrder: // %%% these ideals should have narrower adr_type?
|
||||||
|
case Op_EncodeISOArray:
|
||||||
nidx = Compile::AliasIdxTop;
|
nidx = Compile::AliasIdxTop;
|
||||||
nat = NULL;
|
nat = NULL;
|
||||||
break;
|
break;
|
||||||
|
@ -1982,6 +1983,7 @@ void Matcher::find_shared( Node *n ) {
|
||||||
case Op_StrEquals:
|
case Op_StrEquals:
|
||||||
case Op_StrIndexOf:
|
case Op_StrIndexOf:
|
||||||
case Op_AryEq:
|
case Op_AryEq:
|
||||||
|
case Op_EncodeISOArray:
|
||||||
set_shared(n); // Force result into register (it will be anyways)
|
set_shared(n); // Force result into register (it will be anyways)
|
||||||
break;
|
break;
|
||||||
case Op_ConP: { // Convert pointers above the centerline to NUL
|
case Op_ConP: { // Convert pointers above the centerline to NUL
|
||||||
|
@ -2183,6 +2185,13 @@ void Matcher::find_shared( Node *n ) {
|
||||||
n->del_req(4);
|
n->del_req(4);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case Op_EncodeISOArray: {
|
||||||
|
// Restructure into a binary tree for Matching.
|
||||||
|
Node* pair = new (C) BinaryNode(n->in(3), n->in(4));
|
||||||
|
n->set_req(3, pair);
|
||||||
|
n->del_req(4);
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2796,6 +2796,26 @@ const Type *StrIntrinsicNode::Value( PhaseTransform *phase ) const {
|
||||||
return bottom_type();
|
return bottom_type();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
//------------------------------match_edge-------------------------------------
|
||||||
|
// Do not match memory edge
|
||||||
|
uint EncodeISOArrayNode::match_edge(uint idx) const {
|
||||||
|
return idx == 2 || idx == 3; // EncodeISOArray src (Binary dst len)
|
||||||
|
}
|
||||||
|
|
||||||
|
//------------------------------Ideal------------------------------------------
|
||||||
|
// Return a node which is more "ideal" than the current node. Strip out
|
||||||
|
// control copies
|
||||||
|
Node *EncodeISOArrayNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
||||||
|
return remove_dead_region(phase, can_reshape) ? this : NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
//------------------------------Value------------------------------------------
|
||||||
|
const Type *EncodeISOArrayNode::Value(PhaseTransform *phase) const {
|
||||||
|
if (in(0) && phase->type(in(0)) == Type::TOP) return Type::TOP;
|
||||||
|
return bottom_type();
|
||||||
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
MemBarNode::MemBarNode(Compile* C, int alias_idx, Node* precedent)
|
MemBarNode::MemBarNode(Compile* C, int alias_idx, Node* precedent)
|
||||||
: MultiNode(TypeFunc::Parms + (precedent == NULL? 0: 1)),
|
: MultiNode(TypeFunc::Parms + (precedent == NULL? 0: 1)),
|
||||||
|
|
|
@ -888,6 +888,22 @@ public:
|
||||||
virtual const Type* bottom_type() const { return TypeInt::BOOL; }
|
virtual const Type* bottom_type() const { return TypeInt::BOOL; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//------------------------------EncodeISOArray--------------------------------
|
||||||
|
// encode char[] to byte[] in ISO_8859_1
|
||||||
|
class EncodeISOArrayNode: public Node {
|
||||||
|
public:
|
||||||
|
EncodeISOArrayNode(Node *control, Node* arymem, Node* s1, Node* s2, Node* c): Node(control, arymem, s1, s2, c) {};
|
||||||
|
virtual int Opcode() const;
|
||||||
|
virtual bool depends_only_on_test() const { return false; }
|
||||||
|
virtual const Type* bottom_type() const { return TypeInt::INT; }
|
||||||
|
virtual const TypePtr* adr_type() const { return TypePtr::BOTTOM; }
|
||||||
|
virtual uint match_edge(uint idx) const;
|
||||||
|
virtual uint ideal_reg() const { return Op_RegI; }
|
||||||
|
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||||
|
virtual const Type *Value(PhaseTransform *phase) const;
|
||||||
|
};
|
||||||
|
|
||||||
//------------------------------MemBar-----------------------------------------
|
//------------------------------MemBar-----------------------------------------
|
||||||
// There are different flavors of Memory Barriers to match the Java Memory
|
// There are different flavors of Memory Barriers to match the Java Memory
|
||||||
// Model. Monitor-enter and volatile-load act as Aquires: no following ref
|
// Model. Monitor-enter and volatile-load act as Aquires: no following ref
|
||||||
|
|
|
@ -1476,25 +1476,25 @@ static bool is_disconnected(const Node* n) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ASSERT
|
#ifdef ASSERT
|
||||||
static void dump_orig(Node* orig) {
|
static void dump_orig(Node* orig, outputStream *st) {
|
||||||
Compile* C = Compile::current();
|
Compile* C = Compile::current();
|
||||||
if (NotANode(orig)) orig = NULL;
|
if (NotANode(orig)) orig = NULL;
|
||||||
if (orig != NULL && !C->node_arena()->contains(orig)) orig = NULL;
|
if (orig != NULL && !C->node_arena()->contains(orig)) orig = NULL;
|
||||||
if (orig == NULL) return;
|
if (orig == NULL) return;
|
||||||
tty->print(" !orig=");
|
st->print(" !orig=");
|
||||||
Node* fast = orig->debug_orig(); // tortoise & hare algorithm to detect loops
|
Node* fast = orig->debug_orig(); // tortoise & hare algorithm to detect loops
|
||||||
if (NotANode(fast)) fast = NULL;
|
if (NotANode(fast)) fast = NULL;
|
||||||
while (orig != NULL) {
|
while (orig != NULL) {
|
||||||
bool discon = is_disconnected(orig); // if discon, print [123] else 123
|
bool discon = is_disconnected(orig); // if discon, print [123] else 123
|
||||||
if (discon) tty->print("[");
|
if (discon) st->print("[");
|
||||||
if (!Compile::current()->node_arena()->contains(orig))
|
if (!Compile::current()->node_arena()->contains(orig))
|
||||||
tty->print("o");
|
st->print("o");
|
||||||
tty->print("%d", orig->_idx);
|
st->print("%d", orig->_idx);
|
||||||
if (discon) tty->print("]");
|
if (discon) st->print("]");
|
||||||
orig = orig->debug_orig();
|
orig = orig->debug_orig();
|
||||||
if (NotANode(orig)) orig = NULL;
|
if (NotANode(orig)) orig = NULL;
|
||||||
if (orig != NULL && !C->node_arena()->contains(orig)) orig = NULL;
|
if (orig != NULL && !C->node_arena()->contains(orig)) orig = NULL;
|
||||||
if (orig != NULL) tty->print(",");
|
if (orig != NULL) st->print(",");
|
||||||
if (fast != NULL) {
|
if (fast != NULL) {
|
||||||
// Step fast twice for each single step of orig:
|
// Step fast twice for each single step of orig:
|
||||||
fast = fast->debug_orig();
|
fast = fast->debug_orig();
|
||||||
|
@ -1504,7 +1504,7 @@ static void dump_orig(Node* orig) {
|
||||||
if (NotANode(fast)) fast = NULL;
|
if (NotANode(fast)) fast = NULL;
|
||||||
}
|
}
|
||||||
if (fast == orig) {
|
if (fast == orig) {
|
||||||
tty->print("...");
|
st->print("...");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1531,35 +1531,34 @@ void Node::set_debug_orig(Node* orig) {
|
||||||
|
|
||||||
//------------------------------dump------------------------------------------
|
//------------------------------dump------------------------------------------
|
||||||
// Dump a Node
|
// Dump a Node
|
||||||
void Node::dump() const {
|
void Node::dump(const char* suffix, outputStream *st) const {
|
||||||
Compile* C = Compile::current();
|
Compile* C = Compile::current();
|
||||||
bool is_new = C->node_arena()->contains(this);
|
bool is_new = C->node_arena()->contains(this);
|
||||||
_in_dump_cnt++;
|
_in_dump_cnt++;
|
||||||
tty->print("%c%d\t%s\t=== ",
|
st->print("%c%d\t%s\t=== ", is_new ? ' ' : 'o', _idx, Name());
|
||||||
is_new ? ' ' : 'o', _idx, Name());
|
|
||||||
|
|
||||||
// Dump the required and precedence inputs
|
// Dump the required and precedence inputs
|
||||||
dump_req();
|
dump_req(st);
|
||||||
dump_prec();
|
dump_prec(st);
|
||||||
// Dump the outputs
|
// Dump the outputs
|
||||||
dump_out();
|
dump_out(st);
|
||||||
|
|
||||||
if (is_disconnected(this)) {
|
if (is_disconnected(this)) {
|
||||||
#ifdef ASSERT
|
#ifdef ASSERT
|
||||||
tty->print(" [%d]",debug_idx());
|
st->print(" [%d]",debug_idx());
|
||||||
dump_orig(debug_orig());
|
dump_orig(debug_orig(), st);
|
||||||
#endif
|
#endif
|
||||||
tty->cr();
|
st->cr();
|
||||||
_in_dump_cnt--;
|
_in_dump_cnt--;
|
||||||
return; // don't process dead nodes
|
return; // don't process dead nodes
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dump node-specific info
|
// Dump node-specific info
|
||||||
dump_spec(tty);
|
dump_spec(st);
|
||||||
#ifdef ASSERT
|
#ifdef ASSERT
|
||||||
// Dump the non-reset _debug_idx
|
// Dump the non-reset _debug_idx
|
||||||
if( Verbose && WizardMode ) {
|
if (Verbose && WizardMode) {
|
||||||
tty->print(" [%d]",debug_idx());
|
st->print(" [%d]",debug_idx());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1569,88 +1568,88 @@ void Node::dump() const {
|
||||||
const TypeInstPtr *toop = t->isa_instptr();
|
const TypeInstPtr *toop = t->isa_instptr();
|
||||||
const TypeKlassPtr *tkls = t->isa_klassptr();
|
const TypeKlassPtr *tkls = t->isa_klassptr();
|
||||||
ciKlass* klass = toop ? toop->klass() : (tkls ? tkls->klass() : NULL );
|
ciKlass* klass = toop ? toop->klass() : (tkls ? tkls->klass() : NULL );
|
||||||
if( klass && klass->is_loaded() && klass->is_interface() ) {
|
if (klass && klass->is_loaded() && klass->is_interface()) {
|
||||||
tty->print(" Interface:");
|
st->print(" Interface:");
|
||||||
} else if( toop ) {
|
} else if (toop) {
|
||||||
tty->print(" Oop:");
|
st->print(" Oop:");
|
||||||
} else if( tkls ) {
|
} else if (tkls) {
|
||||||
tty->print(" Klass:");
|
st->print(" Klass:");
|
||||||
}
|
}
|
||||||
t->dump();
|
t->dump_on(st);
|
||||||
} else if( t == Type::MEMORY ) {
|
} else if (t == Type::MEMORY) {
|
||||||
tty->print(" Memory:");
|
st->print(" Memory:");
|
||||||
MemNode::dump_adr_type(this, adr_type(), tty);
|
MemNode::dump_adr_type(this, adr_type(), st);
|
||||||
} else if( Verbose || WizardMode ) {
|
} else if (Verbose || WizardMode) {
|
||||||
tty->print(" Type:");
|
st->print(" Type:");
|
||||||
if( t ) {
|
if (t) {
|
||||||
t->dump();
|
t->dump_on(st);
|
||||||
} else {
|
} else {
|
||||||
tty->print("no type");
|
st->print("no type");
|
||||||
}
|
}
|
||||||
} else if (t->isa_vect() && this->is_MachSpillCopy()) {
|
} else if (t->isa_vect() && this->is_MachSpillCopy()) {
|
||||||
// Dump MachSpillcopy vector type.
|
// Dump MachSpillcopy vector type.
|
||||||
t->dump();
|
t->dump_on(st);
|
||||||
}
|
}
|
||||||
if (is_new) {
|
if (is_new) {
|
||||||
debug_only(dump_orig(debug_orig()));
|
debug_only(dump_orig(debug_orig(), st));
|
||||||
Node_Notes* nn = C->node_notes_at(_idx);
|
Node_Notes* nn = C->node_notes_at(_idx);
|
||||||
if (nn != NULL && !nn->is_clear()) {
|
if (nn != NULL && !nn->is_clear()) {
|
||||||
if (nn->jvms() != NULL) {
|
if (nn->jvms() != NULL) {
|
||||||
tty->print(" !jvms:");
|
st->print(" !jvms:");
|
||||||
nn->jvms()->dump_spec(tty);
|
nn->jvms()->dump_spec(st);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tty->cr();
|
if (suffix) st->print(suffix);
|
||||||
_in_dump_cnt--;
|
_in_dump_cnt--;
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------dump_req--------------------------------------
|
//------------------------------dump_req--------------------------------------
|
||||||
void Node::dump_req() const {
|
void Node::dump_req(outputStream *st) const {
|
||||||
// Dump the required input edges
|
// Dump the required input edges
|
||||||
for (uint i = 0; i < req(); i++) { // For all required inputs
|
for (uint i = 0; i < req(); i++) { // For all required inputs
|
||||||
Node* d = in(i);
|
Node* d = in(i);
|
||||||
if (d == NULL) {
|
if (d == NULL) {
|
||||||
tty->print("_ ");
|
st->print("_ ");
|
||||||
} else if (NotANode(d)) {
|
} else if (NotANode(d)) {
|
||||||
tty->print("NotANode "); // uninitialized, sentinel, garbage, etc.
|
st->print("NotANode "); // uninitialized, sentinel, garbage, etc.
|
||||||
} else {
|
} else {
|
||||||
tty->print("%c%d ", Compile::current()->node_arena()->contains(d) ? ' ' : 'o', d->_idx);
|
st->print("%c%d ", Compile::current()->node_arena()->contains(d) ? ' ' : 'o', d->_idx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//------------------------------dump_prec-------------------------------------
|
//------------------------------dump_prec-------------------------------------
|
||||||
void Node::dump_prec() const {
|
void Node::dump_prec(outputStream *st) const {
|
||||||
// Dump the precedence edges
|
// Dump the precedence edges
|
||||||
int any_prec = 0;
|
int any_prec = 0;
|
||||||
for (uint i = req(); i < len(); i++) { // For all precedence inputs
|
for (uint i = req(); i < len(); i++) { // For all precedence inputs
|
||||||
Node* p = in(i);
|
Node* p = in(i);
|
||||||
if (p != NULL) {
|
if (p != NULL) {
|
||||||
if( !any_prec++ ) tty->print(" |");
|
if (!any_prec++) st->print(" |");
|
||||||
if (NotANode(p)) { tty->print("NotANode "); continue; }
|
if (NotANode(p)) { st->print("NotANode "); continue; }
|
||||||
tty->print("%c%d ", Compile::current()->node_arena()->contains(in(i)) ? ' ' : 'o', in(i)->_idx);
|
st->print("%c%d ", Compile::current()->node_arena()->contains(in(i)) ? ' ' : 'o', in(i)->_idx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------dump_out--------------------------------------
|
//------------------------------dump_out--------------------------------------
|
||||||
void Node::dump_out() const {
|
void Node::dump_out(outputStream *st) const {
|
||||||
// Delimit the output edges
|
// Delimit the output edges
|
||||||
tty->print(" [[");
|
st->print(" [[");
|
||||||
// Dump the output edges
|
// Dump the output edges
|
||||||
for (uint i = 0; i < _outcnt; i++) { // For all outputs
|
for (uint i = 0; i < _outcnt; i++) { // For all outputs
|
||||||
Node* u = _out[i];
|
Node* u = _out[i];
|
||||||
if (u == NULL) {
|
if (u == NULL) {
|
||||||
tty->print("_ ");
|
st->print("_ ");
|
||||||
} else if (NotANode(u)) {
|
} else if (NotANode(u)) {
|
||||||
tty->print("NotANode ");
|
st->print("NotANode ");
|
||||||
} else {
|
} else {
|
||||||
tty->print("%c%d ", Compile::current()->node_arena()->contains(u) ? ' ' : 'o', u->_idx);
|
st->print("%c%d ", Compile::current()->node_arena()->contains(u) ? ' ' : 'o', u->_idx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tty->print("]] ");
|
st->print("]] ");
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------dump_nodes-------------------------------------
|
//------------------------------dump_nodes-------------------------------------
|
||||||
|
|
|
@ -994,12 +994,13 @@ public:
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
Node* find(int idx) const; // Search the graph for the given idx.
|
Node* find(int idx) const; // Search the graph for the given idx.
|
||||||
Node* find_ctrl(int idx) const; // Search control ancestors for the given idx.
|
Node* find_ctrl(int idx) const; // Search control ancestors for the given idx.
|
||||||
void dump() const; // Print this node,
|
void dump() const { dump("\n"); } // Print this node.
|
||||||
|
void dump(const char* suffix, outputStream *st = tty) const;// Print this node.
|
||||||
void dump(int depth) const; // Print this node, recursively to depth d
|
void dump(int depth) const; // Print this node, recursively to depth d
|
||||||
void dump_ctrl(int depth) const; // Print control nodes, to depth d
|
void dump_ctrl(int depth) const; // Print control nodes, to depth d
|
||||||
virtual void dump_req() const; // Print required-edge info
|
virtual void dump_req(outputStream *st = tty) const; // Print required-edge info
|
||||||
virtual void dump_prec() const; // Print precedence-edge info
|
virtual void dump_prec(outputStream *st = tty) const; // Print precedence-edge info
|
||||||
virtual void dump_out() const; // Print the output edge info
|
virtual void dump_out(outputStream *st = tty) const; // Print the output edge info
|
||||||
virtual void dump_spec(outputStream *st) const {}; // Print per-node info
|
virtual void dump_spec(outputStream *st) const {}; // Print per-node info
|
||||||
void verify_edges(Unique_Node_List &visited); // Verify bi-directional edges
|
void verify_edges(Unique_Node_List &visited); // Verify bi-directional edges
|
||||||
void verify() const; // Check Def-Use info for my subgraph
|
void verify() const; // Check Def-Use info for my subgraph
|
||||||
|
|
|
@ -77,7 +77,7 @@ class OptoReg VALUE_OBJ_CLASS_SPEC {
|
||||||
// (We would like to have an operator+ for RegName, but it is not
|
// (We would like to have an operator+ for RegName, but it is not
|
||||||
// a class, so this would be illegal in C++.)
|
// a class, so this would be illegal in C++.)
|
||||||
|
|
||||||
static void dump( int );
|
static void dump(int, outputStream *st = tty);
|
||||||
|
|
||||||
// Get the stack slot number of an OptoReg::Name
|
// Get the stack slot number of an OptoReg::Name
|
||||||
static unsigned int reg2stack( OptoReg::Name r) {
|
static unsigned int reg2stack( OptoReg::Name r) {
|
||||||
|
|
|
@ -40,6 +40,7 @@ PhaseRegAlloc::PhaseRegAlloc( uint unique, PhaseCFG &cfg,
|
||||||
Phase(Register_Allocation), _cfg(cfg), _matcher(matcher),
|
Phase(Register_Allocation), _cfg(cfg), _matcher(matcher),
|
||||||
_node_oops(Thread::current()->resource_area()),
|
_node_oops(Thread::current()->resource_area()),
|
||||||
_node_regs(0),
|
_node_regs(0),
|
||||||
|
_node_regs_max_index(0),
|
||||||
_framesize(0xdeadbeef)
|
_framesize(0xdeadbeef)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -108,13 +108,13 @@ int find_hihghest_bit( uint32 mask ) {
|
||||||
//------------------------------dump-------------------------------------------
|
//------------------------------dump-------------------------------------------
|
||||||
|
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
void OptoReg::dump( int r ) {
|
void OptoReg::dump(int r, outputStream *st) {
|
||||||
switch( r ) {
|
switch (r) {
|
||||||
case Special: tty->print("r---"); break;
|
case Special: st->print("r---"); break;
|
||||||
case Bad: tty->print("rBAD"); break;
|
case Bad: st->print("rBAD"); break;
|
||||||
default:
|
default:
|
||||||
if( r < _last_Mach_Reg ) tty->print(Matcher::regName[r]);
|
if (r < _last_Mach_Reg) st->print(Matcher::regName[r]);
|
||||||
else tty->print("rS%d",r);
|
else st->print("rS%d",r);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -404,53 +404,53 @@ uint RegMask::Size() const {
|
||||||
|
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
//------------------------------print------------------------------------------
|
//------------------------------print------------------------------------------
|
||||||
void RegMask::dump( ) const {
|
void RegMask::dump(outputStream *st) const {
|
||||||
tty->print("[");
|
st->print("[");
|
||||||
RegMask rm = *this; // Structure copy into local temp
|
RegMask rm = *this; // Structure copy into local temp
|
||||||
|
|
||||||
OptoReg::Name start = rm.find_first_elem(); // Get a register
|
OptoReg::Name start = rm.find_first_elem(); // Get a register
|
||||||
if( OptoReg::is_valid(start) ) { // Check for empty mask
|
if (OptoReg::is_valid(start)) { // Check for empty mask
|
||||||
rm.Remove(start); // Yank from mask
|
rm.Remove(start); // Yank from mask
|
||||||
OptoReg::dump(start); // Print register
|
OptoReg::dump(start, st); // Print register
|
||||||
OptoReg::Name last = start;
|
OptoReg::Name last = start;
|
||||||
|
|
||||||
// Now I have printed an initial register.
|
// Now I have printed an initial register.
|
||||||
// Print adjacent registers as "rX-rZ" instead of "rX,rY,rZ".
|
// Print adjacent registers as "rX-rZ" instead of "rX,rY,rZ".
|
||||||
// Begin looping over the remaining registers.
|
// Begin looping over the remaining registers.
|
||||||
while( 1 ) { //
|
while (1) { //
|
||||||
OptoReg::Name reg = rm.find_first_elem(); // Get a register
|
OptoReg::Name reg = rm.find_first_elem(); // Get a register
|
||||||
if( !OptoReg::is_valid(reg) )
|
if (!OptoReg::is_valid(reg))
|
||||||
break; // Empty mask, end loop
|
break; // Empty mask, end loop
|
||||||
rm.Remove(reg); // Yank from mask
|
rm.Remove(reg); // Yank from mask
|
||||||
|
|
||||||
if( last+1 == reg ) { // See if they are adjacent
|
if (last+1 == reg) { // See if they are adjacent
|
||||||
// Adjacent registers just collect into long runs, no printing.
|
// Adjacent registers just collect into long runs, no printing.
|
||||||
last = reg;
|
last = reg;
|
||||||
} else { // Ending some kind of run
|
} else { // Ending some kind of run
|
||||||
if( start == last ) { // 1-register run; no special printing
|
if (start == last) { // 1-register run; no special printing
|
||||||
} else if( start+1 == last ) {
|
} else if (start+1 == last) {
|
||||||
tty->print(","); // 2-register run; print as "rX,rY"
|
st->print(","); // 2-register run; print as "rX,rY"
|
||||||
OptoReg::dump(last);
|
OptoReg::dump(last, st);
|
||||||
} else { // Multi-register run; print as "rX-rZ"
|
} else { // Multi-register run; print as "rX-rZ"
|
||||||
tty->print("-");
|
st->print("-");
|
||||||
OptoReg::dump(last);
|
OptoReg::dump(last, st);
|
||||||
}
|
}
|
||||||
tty->print(","); // Seperate start of new run
|
st->print(","); // Seperate start of new run
|
||||||
start = last = reg; // Start a new register run
|
start = last = reg; // Start a new register run
|
||||||
OptoReg::dump(start); // Print register
|
OptoReg::dump(start, st); // Print register
|
||||||
} // End of if ending a register run or not
|
} // End of if ending a register run or not
|
||||||
} // End of while regmask not empty
|
} // End of while regmask not empty
|
||||||
|
|
||||||
if( start == last ) { // 1-register run; no special printing
|
if (start == last) { // 1-register run; no special printing
|
||||||
} else if( start+1 == last ) {
|
} else if (start+1 == last) {
|
||||||
tty->print(","); // 2-register run; print as "rX,rY"
|
st->print(","); // 2-register run; print as "rX,rY"
|
||||||
OptoReg::dump(last);
|
OptoReg::dump(last, st);
|
||||||
} else { // Multi-register run; print as "rX-rZ"
|
} else { // Multi-register run; print as "rX-rZ"
|
||||||
tty->print("-");
|
st->print("-");
|
||||||
OptoReg::dump(last);
|
OptoReg::dump(last, st);
|
||||||
}
|
}
|
||||||
if( rm.is_AllStack() ) tty->print("...");
|
if (rm.is_AllStack()) st->print("...");
|
||||||
}
|
}
|
||||||
tty->print("]");
|
st->print("]");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -310,7 +310,7 @@ public:
|
||||||
|
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
void print() const { dump(); }
|
void print() const { dump(); }
|
||||||
void dump() const; // Print a mask
|
void dump(outputStream *st = tty) const; // Print a mask
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const RegMask Empty; // Common empty mask
|
static const RegMask Empty; // Common empty mask
|
||||||
|
|
|
@ -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
|
||||||
|
@ -25,9 +25,7 @@
|
||||||
#ifndef SHARE_VM_PRIMS_JNICHECK_HPP
|
#ifndef SHARE_VM_PRIMS_JNICHECK_HPP
|
||||||
#define SHARE_VM_PRIMS_JNICHECK_HPP
|
#define SHARE_VM_PRIMS_JNICHECK_HPP
|
||||||
|
|
||||||
#ifndef KERNEL
|
|
||||||
#include "runtime/thread.hpp"
|
#include "runtime/thread.hpp"
|
||||||
#endif
|
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
// Report a JNI failure caught by -Xcheck:jni. Perform a core dump.
|
// Report a JNI failure caught by -Xcheck:jni. Perform a core dump.
|
||||||
|
|
|
@ -2302,6 +2302,15 @@ JVM_QUICK_ENTRY(jboolean, JVM_IsConstructorIx(JNIEnv *env, jclass cls, int metho
|
||||||
JVM_END
|
JVM_END
|
||||||
|
|
||||||
|
|
||||||
|
JVM_QUICK_ENTRY(jboolean, JVM_IsVMGeneratedMethodIx(JNIEnv *env, jclass cls, int method_index))
|
||||||
|
JVMWrapper("JVM_IsVMGeneratedMethodIx");
|
||||||
|
ResourceMark rm(THREAD);
|
||||||
|
Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve_non_null(cls));
|
||||||
|
k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
|
||||||
|
Method* method = InstanceKlass::cast(k)->methods()->at(method_index);
|
||||||
|
return method->is_overpass();
|
||||||
|
JVM_END
|
||||||
|
|
||||||
JVM_ENTRY(const char*, JVM_GetMethodIxNameUTF(JNIEnv *env, jclass cls, jint method_index))
|
JVM_ENTRY(const char*, JVM_GetMethodIxNameUTF(JNIEnv *env, jclass cls, jint method_index))
|
||||||
JVMWrapper("JVM_GetMethodIxIxUTF");
|
JVMWrapper("JVM_GetMethodIxIxUTF");
|
||||||
Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve_non_null(cls));
|
Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve_non_null(cls));
|
||||||
|
@ -4519,10 +4528,6 @@ JVM_ENTRY(void, JVM_GetVersionInfo(JNIEnv* env, jvm_version_info* info, size_t i
|
||||||
// consider to expose this new capability in the sun.rt.jvmCapabilities jvmstat
|
// consider to expose this new capability in the sun.rt.jvmCapabilities jvmstat
|
||||||
// counter defined in runtimeService.cpp.
|
// counter defined in runtimeService.cpp.
|
||||||
info->is_attachable = AttachListener::is_attach_supported();
|
info->is_attachable = AttachListener::is_attach_supported();
|
||||||
#ifdef KERNEL
|
|
||||||
info->is_kernel_jvm = 1; // true;
|
|
||||||
#else // KERNEL
|
|
||||||
info->is_kernel_jvm = 0; // false;
|
info->is_kernel_jvm = 0; // false;
|
||||||
#endif // KERNEL
|
|
||||||
}
|
}
|
||||||
JVM_END
|
JVM_END
|
||||||
|
|
|
@ -859,6 +859,13 @@ JVM_GetMethodIxMaxStack(JNIEnv *env, jclass cb, int index);
|
||||||
JNIEXPORT jboolean JNICALL
|
JNIEXPORT jboolean JNICALL
|
||||||
JVM_IsConstructorIx(JNIEnv *env, jclass cb, int index);
|
JVM_IsConstructorIx(JNIEnv *env, jclass cb, int index);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Is the given method generated by the VM.
|
||||||
|
* The method is identified by method_index.
|
||||||
|
*/
|
||||||
|
JNIEXPORT jboolean JNICALL
|
||||||
|
JVM_IsVMGeneratedMethodIx(JNIEnv *env, jclass cb, int index);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Returns the name of a given method in UTF format.
|
* Returns the name of a given method in UTF format.
|
||||||
* The result remains valid until JVM_ReleaseUTF is called.
|
* The result remains valid until JVM_ReleaseUTF is called.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003, 2010, 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
|
||||||
|
@ -25,9 +25,7 @@
|
||||||
#ifndef SHARE_VM_PRIMS_JVMTICODEBLOBEVENTS_HPP
|
#ifndef SHARE_VM_PRIMS_JVMTICODEBLOBEVENTS_HPP
|
||||||
#define SHARE_VM_PRIMS_JVMTICODEBLOBEVENTS_HPP
|
#define SHARE_VM_PRIMS_JVMTICODEBLOBEVENTS_HPP
|
||||||
|
|
||||||
#ifndef JVMTI_KERNEL
|
|
||||||
#include "jvmtifiles/jvmti.h"
|
#include "jvmtifiles/jvmti.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
// forward declaration
|
// forward declaration
|
||||||
class JvmtiEnv;
|
class JvmtiEnv;
|
||||||
|
|
|
@ -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
|
||||||
|
@ -647,8 +647,6 @@ JvmtiEnv::GetJLocationFormat(jvmtiJlocationFormat* format_ptr) {
|
||||||
return JVMTI_ERROR_NONE;
|
return JVMTI_ERROR_NONE;
|
||||||
} /* end GetJLocationFormat */
|
} /* end GetJLocationFormat */
|
||||||
|
|
||||||
#ifndef JVMTI_KERNEL
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Thread functions
|
// Thread functions
|
||||||
//
|
//
|
||||||
|
@ -3436,5 +3434,3 @@ JvmtiEnv::SetSystemProperty(const char* property, const char* value_ptr) {
|
||||||
}
|
}
|
||||||
return err;
|
return err;
|
||||||
} /* end SetSystemProperty */
|
} /* end SetSystemProperty */
|
||||||
|
|
||||||
#endif // !JVMTI_KERNEL
|
|
||||||
|
|
|
@ -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
|
||||||
|
@ -74,10 +74,8 @@ JvmtiEnvBase::globally_initialize() {
|
||||||
|
|
||||||
JvmtiManageCapabilities::initialize();
|
JvmtiManageCapabilities::initialize();
|
||||||
|
|
||||||
#ifndef JVMTI_KERNEL
|
|
||||||
// register extension functions and events
|
// register extension functions and events
|
||||||
JvmtiExtensions::register_extensions();
|
JvmtiExtensions::register_extensions();
|
||||||
#endif // !JVMTI_KERNEL
|
|
||||||
|
|
||||||
#ifdef JVMTI_TRACE
|
#ifdef JVMTI_TRACE
|
||||||
JvmtiTrace::initialize();
|
JvmtiTrace::initialize();
|
||||||
|
@ -236,14 +234,12 @@ JvmtiEnvBase::env_dispose() {
|
||||||
// Same situation as with events (see above)
|
// Same situation as with events (see above)
|
||||||
set_native_method_prefixes(0, NULL);
|
set_native_method_prefixes(0, NULL);
|
||||||
|
|
||||||
#ifndef JVMTI_KERNEL
|
|
||||||
JvmtiTagMap* tag_map_to_deallocate = _tag_map;
|
JvmtiTagMap* tag_map_to_deallocate = _tag_map;
|
||||||
set_tag_map(NULL);
|
set_tag_map(NULL);
|
||||||
// A tag map can be big, deallocate it now
|
// A tag map can be big, deallocate it now
|
||||||
if (tag_map_to_deallocate != NULL) {
|
if (tag_map_to_deallocate != NULL) {
|
||||||
delete tag_map_to_deallocate;
|
delete tag_map_to_deallocate;
|
||||||
}
|
}
|
||||||
#endif // !JVMTI_KERNEL
|
|
||||||
|
|
||||||
_needs_clean_up = true;
|
_needs_clean_up = true;
|
||||||
}
|
}
|
||||||
|
@ -255,14 +251,12 @@ JvmtiEnvBase::~JvmtiEnvBase() {
|
||||||
// There is a small window of time during which the tag map of a
|
// There is a small window of time during which the tag map of a
|
||||||
// disposed environment could have been reallocated.
|
// disposed environment could have been reallocated.
|
||||||
// Make sure it is gone.
|
// Make sure it is gone.
|
||||||
#ifndef JVMTI_KERNEL
|
|
||||||
JvmtiTagMap* tag_map_to_deallocate = _tag_map;
|
JvmtiTagMap* tag_map_to_deallocate = _tag_map;
|
||||||
set_tag_map(NULL);
|
set_tag_map(NULL);
|
||||||
// A tag map can be big, deallocate it now
|
// A tag map can be big, deallocate it now
|
||||||
if (tag_map_to_deallocate != NULL) {
|
if (tag_map_to_deallocate != NULL) {
|
||||||
delete tag_map_to_deallocate;
|
delete tag_map_to_deallocate;
|
||||||
}
|
}
|
||||||
#endif // !JVMTI_KERNEL
|
|
||||||
|
|
||||||
_magic = BAD_MAGIC;
|
_magic = BAD_MAGIC;
|
||||||
}
|
}
|
||||||
|
@ -593,8 +587,6 @@ JvmtiEnvBase::get_jni_class_non_null(Klass* k) {
|
||||||
return (jclass)jni_reference(k->java_mirror());
|
return (jclass)jni_reference(k->java_mirror());
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef JVMTI_KERNEL
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Field Information
|
// Field Information
|
||||||
//
|
//
|
||||||
|
@ -1482,5 +1474,3 @@ JvmtiMonitorClosure::do_monitor(ObjectMonitor* mon) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // !JVMTI_KERNEL
|
|
||||||
|
|
|
@ -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
|
||||||
|
@ -677,7 +677,6 @@ void JvmtiExport::report_unsupported(bool on) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifndef JVMTI_KERNEL
|
|
||||||
static inline Klass* oop_to_klass(oop obj) {
|
static inline Klass* oop_to_klass(oop obj) {
|
||||||
Klass* k = obj->klass();
|
Klass* k = obj->klass();
|
||||||
|
|
||||||
|
@ -2178,7 +2177,6 @@ extern "C" {
|
||||||
typedef jint (JNICALL *OnAttachEntry_t)(JavaVM*, char *, void *);
|
typedef jint (JNICALL *OnAttachEntry_t)(JavaVM*, char *, void *);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERVICES_KERNEL
|
|
||||||
jint JvmtiExport::load_agent_library(AttachOperation* op, outputStream* st) {
|
jint JvmtiExport::load_agent_library(AttachOperation* op, outputStream* st) {
|
||||||
char ebuf[1024];
|
char ebuf[1024];
|
||||||
char buffer[JVM_MAXPATHLEN];
|
char buffer[JVM_MAXPATHLEN];
|
||||||
|
@ -2259,7 +2257,6 @@ jint JvmtiExport::load_agent_library(AttachOperation* op, outputStream* st) {
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#endif // SERVICES_KERNEL
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@ -2457,4 +2454,3 @@ JvmtiGCMarker::~JvmtiGCMarker() {
|
||||||
JvmtiExport::post_garbage_collection_finish();
|
JvmtiExport::post_garbage_collection_finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // JVMTI_KERNEL
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003, 2010, 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
|
||||||
|
@ -25,11 +25,9 @@
|
||||||
#ifndef SHARE_VM_PRIMS_JVMTIEXTENSIONS_HPP
|
#ifndef SHARE_VM_PRIMS_JVMTIEXTENSIONS_HPP
|
||||||
#define SHARE_VM_PRIMS_JVMTIEXTENSIONS_HPP
|
#define SHARE_VM_PRIMS_JVMTIEXTENSIONS_HPP
|
||||||
|
|
||||||
#ifndef JVMTI_KERNEL
|
|
||||||
#include "jvmtifiles/jvmti.h"
|
#include "jvmtifiles/jvmti.h"
|
||||||
#include "jvmtifiles/jvmtiEnv.hpp"
|
#include "jvmtifiles/jvmtiEnv.hpp"
|
||||||
#include "memory/allocation.hpp"
|
#include "memory/allocation.hpp"
|
||||||
#endif
|
|
||||||
|
|
||||||
// JvmtiExtensions
|
// JvmtiExtensions
|
||||||
//
|
//
|
||||||
|
|
|
@ -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
|
||||||
|
@ -905,8 +905,6 @@ void JvmtiSuspendControl::print() {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef KERNEL
|
|
||||||
|
|
||||||
JvmtiDeferredEvent JvmtiDeferredEvent::compiled_method_load_event(
|
JvmtiDeferredEvent JvmtiDeferredEvent::compiled_method_load_event(
|
||||||
nmethod* nm) {
|
nmethod* nm) {
|
||||||
JvmtiDeferredEvent event = JvmtiDeferredEvent(TYPE_COMPILED_METHOD_LOAD);
|
JvmtiDeferredEvent event = JvmtiDeferredEvent(TYPE_COMPILED_METHOD_LOAD);
|
||||||
|
@ -1098,5 +1096,3 @@ void JvmtiDeferredEventQueue::process_pending_events() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // ndef KERNEL
|
|
||||||
|
|
|
@ -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
|
||||||
|
@ -25,8 +25,6 @@
|
||||||
#ifndef SHARE_VM_PRIMS_JVMTIIMPL_HPP
|
#ifndef SHARE_VM_PRIMS_JVMTIIMPL_HPP
|
||||||
#define SHARE_VM_PRIMS_JVMTIIMPL_HPP
|
#define SHARE_VM_PRIMS_JVMTIIMPL_HPP
|
||||||
|
|
||||||
#ifndef JVMTI_KERNEL
|
|
||||||
|
|
||||||
#include "classfile/systemDictionary.hpp"
|
#include "classfile/systemDictionary.hpp"
|
||||||
#include "jvmtifiles/jvmti.h"
|
#include "jvmtifiles/jvmti.h"
|
||||||
#include "oops/objArrayOop.hpp"
|
#include "oops/objArrayOop.hpp"
|
||||||
|
@ -435,7 +433,6 @@ public:
|
||||||
static void print();
|
static void print();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // !JVMTI_KERNEL
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When a thread (such as the compiler thread or VM thread) cannot post a
|
* When a thread (such as the compiler thread or VM thread) cannot post a
|
||||||
|
|
|
@ -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
|
||||||
|
@ -25,10 +25,8 @@
|
||||||
#ifndef SHARE_VM_PRIMS_JVMTIRAWMONITOR_HPP
|
#ifndef SHARE_VM_PRIMS_JVMTIRAWMONITOR_HPP
|
||||||
#define SHARE_VM_PRIMS_JVMTIRAWMONITOR_HPP
|
#define SHARE_VM_PRIMS_JVMTIRAWMONITOR_HPP
|
||||||
|
|
||||||
#ifndef JVMTI_KERNEL
|
|
||||||
#include "runtime/objectMonitor.hpp"
|
#include "runtime/objectMonitor.hpp"
|
||||||
#include "utilities/growableArray.hpp"
|
#include "utilities/growableArray.hpp"
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// class JvmtiRawMonitor
|
// class JvmtiRawMonitor
|
||||||
|
|
|
@ -1122,6 +1122,8 @@ bool VM_RedefineClasses::merge_constant_pools(constantPoolHandle old_cp,
|
||||||
}
|
}
|
||||||
} // end for each old_cp entry
|
} // end for each old_cp entry
|
||||||
|
|
||||||
|
ConstantPool::copy_operands(old_cp, *merge_cp_p, CHECK_0);
|
||||||
|
|
||||||
// We don't need to sanity check that *merge_cp_length_p is within
|
// We don't need to sanity check that *merge_cp_length_p is within
|
||||||
// *merge_cp_p bounds since we have the minimum on-entry check above.
|
// *merge_cp_p bounds since we have the minimum on-entry check above.
|
||||||
(*merge_cp_length_p) = old_i;
|
(*merge_cp_length_p) = old_i;
|
||||||
|
@ -1305,8 +1307,12 @@ jvmtiError VM_RedefineClasses::merge_cp_and_rewrite(
|
||||||
_index_map_count = 0;
|
_index_map_count = 0;
|
||||||
_index_map_p = new intArray(scratch_cp->length(), -1);
|
_index_map_p = new intArray(scratch_cp->length(), -1);
|
||||||
|
|
||||||
|
// reference to the cp holder is needed for copy_operands()
|
||||||
|
merge_cp->set_pool_holder(scratch_class());
|
||||||
bool result = merge_constant_pools(old_cp, scratch_cp, &merge_cp,
|
bool result = merge_constant_pools(old_cp, scratch_cp, &merge_cp,
|
||||||
&merge_cp_length, THREAD);
|
&merge_cp_length, THREAD);
|
||||||
|
merge_cp->set_pool_holder(NULL);
|
||||||
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
// The merge can fail due to memory allocation failure or due
|
// The merge can fail due to memory allocation failure or due
|
||||||
// to robustness checks.
|
// to robustness checks.
|
||||||
|
@ -2380,13 +2386,14 @@ void VM_RedefineClasses::set_new_constant_pool(
|
||||||
assert(version != 0, "sanity check");
|
assert(version != 0, "sanity check");
|
||||||
smaller_cp->set_version(version);
|
smaller_cp->set_version(version);
|
||||||
|
|
||||||
|
// attach klass to new constant pool
|
||||||
|
// reference to the cp holder is needed for copy_operands()
|
||||||
|
smaller_cp->set_pool_holder(scratch_class());
|
||||||
|
|
||||||
scratch_cp->copy_cp_to(1, scratch_cp_length - 1, smaller_cp, 1, THREAD);
|
scratch_cp->copy_cp_to(1, scratch_cp_length - 1, smaller_cp, 1, THREAD);
|
||||||
scratch_cp = smaller_cp;
|
scratch_cp = smaller_cp;
|
||||||
|
|
||||||
// attach new constant pool to klass
|
// attach new constant pool to klass
|
||||||
scratch_cp->set_pool_holder(scratch_class());
|
|
||||||
|
|
||||||
// attach klass to new constant pool
|
|
||||||
scratch_class->set_constants(scratch_cp());
|
scratch_class->set_constants(scratch_cp());
|
||||||
|
|
||||||
int i; // for portability
|
int i; // for portability
|
||||||
|
@ -3104,11 +3111,9 @@ void VM_RedefineClasses::redefine_single_class(jclass the_jclass,
|
||||||
Klass* the_class_oop = java_lang_Class::as_Klass(the_class_mirror);
|
Klass* the_class_oop = java_lang_Class::as_Klass(the_class_mirror);
|
||||||
instanceKlassHandle the_class = instanceKlassHandle(THREAD, the_class_oop);
|
instanceKlassHandle the_class = instanceKlassHandle(THREAD, the_class_oop);
|
||||||
|
|
||||||
#ifndef JVMTI_KERNEL
|
|
||||||
// Remove all breakpoints in methods of this class
|
// Remove all breakpoints in methods of this class
|
||||||
JvmtiBreakpoints& jvmti_breakpoints = JvmtiCurrentBreakpoints::get_jvmti_breakpoints();
|
JvmtiBreakpoints& jvmti_breakpoints = JvmtiCurrentBreakpoints::get_jvmti_breakpoints();
|
||||||
jvmti_breakpoints.clearall_in_class_at_safepoint(the_class_oop);
|
jvmti_breakpoints.clearall_in_class_at_safepoint(the_class_oop);
|
||||||
#endif // !JVMTI_KERNEL
|
|
||||||
|
|
||||||
if (the_class_oop == Universe::reflect_invoke_cache()->klass()) {
|
if (the_class_oop == Universe::reflect_invoke_cache()->klass()) {
|
||||||
// We are redefining java.lang.reflect.Method. Method.invoke() is
|
// We are redefining java.lang.reflect.Method. Method.invoke() is
|
||||||
|
|
|
@ -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
|
||||||
|
@ -27,14 +27,12 @@
|
||||||
#ifndef SHARE_VM_PRIMS_JVMTITAGMAP_HPP
|
#ifndef SHARE_VM_PRIMS_JVMTITAGMAP_HPP
|
||||||
#define SHARE_VM_PRIMS_JVMTITAGMAP_HPP
|
#define SHARE_VM_PRIMS_JVMTITAGMAP_HPP
|
||||||
|
|
||||||
#ifndef JVMTI_KERNEL
|
|
||||||
#include "gc_interface/collectedHeap.hpp"
|
#include "gc_interface/collectedHeap.hpp"
|
||||||
#include "jvmtifiles/jvmti.h"
|
#include "jvmtifiles/jvmti.h"
|
||||||
#include "jvmtifiles/jvmtiEnv.hpp"
|
#include "jvmtifiles/jvmtiEnv.hpp"
|
||||||
#include "memory/allocation.hpp"
|
#include "memory/allocation.hpp"
|
||||||
#include "memory/genCollectedHeap.hpp"
|
#include "memory/genCollectedHeap.hpp"
|
||||||
#include "memory/universe.hpp"
|
#include "memory/universe.hpp"
|
||||||
#endif
|
|
||||||
|
|
||||||
// forward references
|
// forward references
|
||||||
class JvmtiTagHashmap;
|
class JvmtiTagHashmap;
|
||||||
|
|
|
@ -2472,10 +2472,7 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args,
|
||||||
|
|
||||||
// -Xshare:dump
|
// -Xshare:dump
|
||||||
} else if (match_option(option, "-Xshare:dump", &tail)) {
|
} else if (match_option(option, "-Xshare:dump", &tail)) {
|
||||||
#if defined(KERNEL)
|
#if !INCLUDE_CDS
|
||||||
vm_exit_during_initialization(
|
|
||||||
"Dumping a shared archive is not supported on the Kernel JVM.", NULL);
|
|
||||||
#elif !INCLUDE_CDS
|
|
||||||
vm_exit_during_initialization(
|
vm_exit_during_initialization(
|
||||||
"Dumping a shared archive is not supported in this VM.", NULL);
|
"Dumping a shared archive is not supported in this VM.", NULL);
|
||||||
#else
|
#else
|
||||||
|
@ -3463,36 +3460,6 @@ void Arguments::PropertyList_unique_add(SystemProperty** plist, const char* k, c
|
||||||
PropertyList_add(plist, k, v);
|
PropertyList_add(plist, k, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef KERNEL
|
|
||||||
char *Arguments::get_kernel_properties() {
|
|
||||||
// Find properties starting with kernel and append them to string
|
|
||||||
// We need to find out how long they are first because the URL's that they
|
|
||||||
// might point to could get long.
|
|
||||||
int length = 0;
|
|
||||||
SystemProperty* prop;
|
|
||||||
for (prop = _system_properties; prop != NULL; prop = prop->next()) {
|
|
||||||
if (strncmp(prop->key(), "kernel.", 7 ) == 0) {
|
|
||||||
length += (strlen(prop->key()) + strlen(prop->value()) + 5); // "-D ="
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Add one for null terminator.
|
|
||||||
char *props = AllocateHeap(length + 1, mtInternal);
|
|
||||||
if (length != 0) {
|
|
||||||
int pos = 0;
|
|
||||||
for (prop = _system_properties; prop != NULL; prop = prop->next()) {
|
|
||||||
if (strncmp(prop->key(), "kernel.", 7 ) == 0) {
|
|
||||||
jio_snprintf(&props[pos], length-pos,
|
|
||||||
"-D%s=%s ", prop->key(), prop->value());
|
|
||||||
pos = strlen(props);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// null terminate props in case of null
|
|
||||||
props[length] = '\0';
|
|
||||||
return props;
|
|
||||||
}
|
|
||||||
#endif // KERNEL
|
|
||||||
|
|
||||||
// Copies src into buf, replacing "%%" with "%" and "%p" with pid
|
// Copies src into buf, replacing "%%" with "%" and "%p" with pid
|
||||||
// Returns true if all of the source pointed by src has been copied over to
|
// Returns true if all of the source pointed by src has been copied over to
|
||||||
// the destination buffer pointed by buf. Otherwise, returns false.
|
// the destination buffer pointed by buf. Otherwise, returns false.
|
||||||
|
|
|
@ -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
|
||||||
|
@ -540,11 +540,6 @@ class Arguments : AllStatic {
|
||||||
|
|
||||||
// Utility: copies src into buf, replacing "%%" with "%" and "%p" with pid.
|
// Utility: copies src into buf, replacing "%%" with "%" and "%p" with pid.
|
||||||
static bool copy_expand_pid(const char* src, size_t srclen, char* buf, size_t buflen);
|
static bool copy_expand_pid(const char* src, size_t srclen, char* buf, size_t buflen);
|
||||||
|
|
||||||
#ifdef KERNEL
|
|
||||||
// For java kernel vm, return property string for kernel properties.
|
|
||||||
static char *get_kernel_properties();
|
|
||||||
#endif // KERNEL
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SHARE_VM_RUNTIME_ARGUMENTS_HPP
|
#endif // SHARE_VM_RUNTIME_ARGUMENTS_HPP
|
||||||
|
|
|
@ -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
|
||||||
|
@ -3739,28 +3739,6 @@ static OnLoadEntry_t lookup_on_load(AgentLibrary* agent, const char *on_load_sym
|
||||||
name)) {
|
name)) {
|
||||||
library = os::dll_load(buffer, ebuf, sizeof ebuf);
|
library = os::dll_load(buffer, ebuf, sizeof ebuf);
|
||||||
}
|
}
|
||||||
#ifdef KERNEL
|
|
||||||
// Download instrument dll
|
|
||||||
if (library == NULL && strcmp(name, "instrument") == 0) {
|
|
||||||
char *props = Arguments::get_kernel_properties();
|
|
||||||
char *home = Arguments::get_java_home();
|
|
||||||
const char *fmt = "%s/bin/java %s -Dkernel.background.download=false"
|
|
||||||
" sun.jkernel.DownloadManager -download client_jvm";
|
|
||||||
size_t length = strlen(props) + strlen(home) + strlen(fmt) + 1;
|
|
||||||
char *cmd = NEW_C_HEAP_ARRAY(char, length, mtThread);
|
|
||||||
jio_snprintf(cmd, length, fmt, home, props);
|
|
||||||
int status = os::fork_and_exec(cmd);
|
|
||||||
FreeHeap(props);
|
|
||||||
if (status == -1) {
|
|
||||||
warning(cmd);
|
|
||||||
vm_exit_during_initialization("fork_and_exec failed: %s",
|
|
||||||
strerror(errno));
|
|
||||||
}
|
|
||||||
FREE_C_HEAP_ARRAY(char, cmd, mtThread);
|
|
||||||
// when this comes back the instrument.dll should be where it belongs.
|
|
||||||
library = os::dll_load(buffer, ebuf, sizeof ebuf);
|
|
||||||
}
|
|
||||||
#endif // KERNEL
|
|
||||||
if (library == NULL) { // Try the local directory
|
if (library == NULL) { // Try the local directory
|
||||||
char ns[1] = {0};
|
char ns[1] = {0};
|
||||||
if (os::dll_build_name(buffer, sizeof(buffer), ns, name)) {
|
if (os::dll_build_name(buffer, sizeof(buffer), ns, name)) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2012, 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
|
||||||
|
@ -25,9 +25,7 @@
|
||||||
#ifndef SHARE_VM_RUNTIME_VMSTRUCTS_HPP
|
#ifndef SHARE_VM_RUNTIME_VMSTRUCTS_HPP
|
||||||
#define SHARE_VM_RUNTIME_VMSTRUCTS_HPP
|
#define SHARE_VM_RUNTIME_VMSTRUCTS_HPP
|
||||||
|
|
||||||
#ifndef VM_STRUCTS_KERNEL
|
|
||||||
#include "utilities/debug.hpp"
|
#include "utilities/debug.hpp"
|
||||||
#endif
|
|
||||||
#ifdef COMPILER1
|
#ifdef COMPILER1
|
||||||
#include "c1/c1_Runtime1.hpp"
|
#include "c1/c1_Runtime1.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -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
|
||||||
|
@ -111,9 +111,6 @@ void Abstract_VM_Version::initialize() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef VMTYPE
|
#ifndef VMTYPE
|
||||||
#ifdef KERNEL
|
|
||||||
#define VMTYPE "Kernel"
|
|
||||||
#else // KERNEL
|
|
||||||
#ifdef TIERED
|
#ifdef TIERED
|
||||||
#define VMTYPE "Server"
|
#define VMTYPE "Server"
|
||||||
#else // TIERED
|
#else // TIERED
|
||||||
|
@ -128,7 +125,6 @@ void Abstract_VM_Version::initialize() {
|
||||||
COMPILER2_PRESENT("Server")
|
COMPILER2_PRESENT("Server")
|
||||||
#endif // ZERO
|
#endif // ZERO
|
||||||
#endif // TIERED
|
#endif // TIERED
|
||||||
#endif // KERNEL
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HOTSPOT_VM_DISTRO
|
#ifndef HOTSPOT_VM_DISTRO
|
||||||
|
|
|
@ -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
|
||||||
|
@ -170,7 +170,6 @@ static jint jcmd(AttachOperation* op, outputStream* out) {
|
||||||
return JNI_OK;
|
return JNI_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERVICES_KERNEL // Heap dumping not supported
|
|
||||||
// Implementation of "dumpheap" command.
|
// Implementation of "dumpheap" command.
|
||||||
// See also: HeapDumpDCmd class
|
// See also: HeapDumpDCmd class
|
||||||
//
|
//
|
||||||
|
@ -212,7 +211,6 @@ jint dump_heap(AttachOperation* op, outputStream* out) {
|
||||||
}
|
}
|
||||||
return JNI_OK;
|
return JNI_OK;
|
||||||
}
|
}
|
||||||
#endif // SERVICES_KERNEL
|
|
||||||
|
|
||||||
// Implementation of "inspectheap" command
|
// Implementation of "inspectheap" command
|
||||||
// See also: ClassHistogramDCmd class
|
// See also: ClassHistogramDCmd class
|
||||||
|
@ -382,9 +380,7 @@ static jint print_flag(AttachOperation* op, outputStream* out) {
|
||||||
static AttachOperationFunctionInfo funcs[] = {
|
static AttachOperationFunctionInfo funcs[] = {
|
||||||
{ "agentProperties", get_agent_properties },
|
{ "agentProperties", get_agent_properties },
|
||||||
{ "datadump", data_dump },
|
{ "datadump", data_dump },
|
||||||
#ifndef SERVICES_KERNEL
|
|
||||||
{ "dumpheap", dump_heap },
|
{ "dumpheap", dump_heap },
|
||||||
#endif // SERVICES_KERNEL
|
|
||||||
{ "load", JvmtiExport::load_agent_library },
|
{ "load", JvmtiExport::load_agent_library },
|
||||||
{ "properties", get_system_properties },
|
{ "properties", get_system_properties },
|
||||||
{ "threaddump", thread_dump },
|
{ "threaddump", thread_dump },
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue