This commit is contained in:
J. Duke 2017-07-05 18:31:08 +02:00
commit 57c273a689
195 changed files with 1432 additions and 1342 deletions

View File

@ -187,3 +187,4 @@ e07f499b9dccb529ecf74172cf6ac11a195ec57a jdk8-b60
3229597524cab4239325bc3602df6c486397a511 jdk8-b63
1c8370a55b305d35353346202bde042ba9e8a9fd jdk8-b64
b772de306dc24c17f7bd1398531ddeb58723b804 jdk8-b65
13bb8c326e7b7b0b19d78c8088033e3932e3f7ca jdk8-b66

View File

@ -129,7 +129,7 @@ AC_DEFUN([BASIC_REMOVE_SYMBOLIC_LINKS],
if test "x$READLINK_TESTED" != yes; then
# On MacOSX there is a readlink tool with a different
# purpose than the GNU readlink tool. Check the found readlink.
ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
if test "x$ISGNU" = x; then
# A readlink that we do not know how to use.
# Are there other non-GNU readlinks out there?
@ -141,20 +141,24 @@ AC_DEFUN([BASIC_REMOVE_SYMBOLIC_LINKS],
if test "x$READLINK" != x; then
$1=`$READLINK -f [$]$1`
else
# Save the current directory for restoring afterwards
STARTDIR=$PWD
COUNTER=0
sym_link_dir=`$DIRNAME [$]$1`
sym_link_file=`$BASENAME [$]$1`
# Use the system pwd and not the shell builtin to resolve directory symlinks
cd $sym_link_dir
cd `$THEPWDCMD`
sym_link_dir=`$THEPWDCMD`
# Resolve file symlinks
while test $COUNTER -lt 20; do
ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
if test "x$ISLINK" == x; then
# This is not a symbolic link! We are done!
break
fi
# The link might be relative! We have to use cd to travel safely.
cd $sym_link_dir
# ... and we must get the to the absolute path, not one using symbolic links.
cd `pwd -P`
# Again resolve directory symlinks since the target of the just found
# link could be in a different directory
cd `$DIRNAME $ISLINK`
sym_link_dir=`$THEPWDCMD`
sym_link_file=`$BASENAME $ISLINK`
@ -286,7 +290,7 @@ AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
# Where is the source? It is located two levels above the configure script.
CURDIR="$PWD"
cd "$AUTOCONF_DIR/../.."
SRC_ROOT="`pwd`"
SRC_ROOT="`$THEPWDCMD`"
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
PATH_SEP=";"

View File

@ -3672,7 +3672,7 @@ fi
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1354106772
DATE_WHEN_GENERATED=1354721616
###############################################################################
#
@ -6903,7 +6903,7 @@ SCRIPT="$0"
if test "x$READLINK_TESTED" != yes; then
# On MacOSX there is a readlink tool with a different
# purpose than the GNU readlink tool. Check the found readlink.
ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
if test "x$ISGNU" = x; then
# A readlink that we do not know how to use.
# Are there other non-GNU readlinks out there?
@ -6915,20 +6915,24 @@ SCRIPT="$0"
if test "x$READLINK" != x; then
SCRIPT=`$READLINK -f $SCRIPT`
else
# Save the current directory for restoring afterwards
STARTDIR=$PWD
COUNTER=0
sym_link_dir=`$DIRNAME $SCRIPT`
sym_link_file=`$BASENAME $SCRIPT`
# Use the system pwd and not the shell builtin to resolve directory symlinks
cd $sym_link_dir
cd `$THEPWDCMD`
sym_link_dir=`$THEPWDCMD`
# Resolve file symlinks
while test $COUNTER -lt 20; do
ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
if test "x$ISLINK" == x; then
# This is not a symbolic link! We are done!
break
fi
# The link might be relative! We have to use cd to travel safely.
cd $sym_link_dir
# ... and we must get the to the absolute path, not one using symbolic links.
cd `pwd -P`
# Again resolve directory symlinks since the target of the just found
# link could be in a different directory
cd `$DIRNAME $ISLINK`
sym_link_dir=`$THEPWDCMD`
sym_link_file=`$BASENAME $ISLINK`
@ -6944,7 +6948,7 @@ AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
# Where is the source? It is located two levels above the configure script.
CURDIR="$PWD"
cd "$AUTOCONF_DIR/../.."
SRC_ROOT="`pwd`"
SRC_ROOT="`$THEPWDCMD`"
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
PATH_SEP=";"
@ -7593,7 +7597,7 @@ NOSYM_CURDIR="$CURDIR"
if test "x$READLINK_TESTED" != yes; then
# On MacOSX there is a readlink tool with a different
# purpose than the GNU readlink tool. Check the found readlink.
ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
if test "x$ISGNU" = x; then
# A readlink that we do not know how to use.
# Are there other non-GNU readlinks out there?
@ -7605,20 +7609,24 @@ NOSYM_CURDIR="$CURDIR"
if test "x$READLINK" != x; then
NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
else
# Save the current directory for restoring afterwards
STARTDIR=$PWD
COUNTER=0
sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
sym_link_file=`$BASENAME $NOSYM_CURDIR`
# Use the system pwd and not the shell builtin to resolve directory symlinks
cd $sym_link_dir
cd `$THEPWDCMD`
sym_link_dir=`$THEPWDCMD`
# Resolve file symlinks
while test $COUNTER -lt 20; do
ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
if test "x$ISLINK" == x; then
# This is not a symbolic link! We are done!
break
fi
# The link might be relative! We have to use cd to travel safely.
cd $sym_link_dir
# ... and we must get the to the absolute path, not one using symbolic links.
cd `pwd -P`
# Again resolve directory symlinks since the target of the just found
# link could be in a different directory
cd `$DIRNAME $ISLINK`
sym_link_dir=`$THEPWDCMD`
sym_link_file=`$BASENAME $ISLINK`
@ -11707,7 +11715,7 @@ fi
if test "x$READLINK_TESTED" != yes; then
# On MacOSX there is a readlink tool with a different
# purpose than the GNU readlink tool. Check the found readlink.
ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
if test "x$ISGNU" = x; then
# A readlink that we do not know how to use.
# Are there other non-GNU readlinks out there?
@ -11719,20 +11727,24 @@ fi
if test "x$READLINK" != x; then
BINARY=`$READLINK -f $BINARY`
else
# Save the current directory for restoring afterwards
STARTDIR=$PWD
COUNTER=0
sym_link_dir=`$DIRNAME $BINARY`
sym_link_file=`$BASENAME $BINARY`
# Use the system pwd and not the shell builtin to resolve directory symlinks
cd $sym_link_dir
cd `$THEPWDCMD`
sym_link_dir=`$THEPWDCMD`
# Resolve file symlinks
while test $COUNTER -lt 20; do
ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
if test "x$ISLINK" == x; then
# This is not a symbolic link! We are done!
break
fi
# The link might be relative! We have to use cd to travel safely.
cd $sym_link_dir
# ... and we must get the to the absolute path, not one using symbolic links.
cd `pwd -P`
# Again resolve directory symlinks since the target of the just found
# link could be in a different directory
cd `$DIRNAME $ISLINK`
sym_link_dir=`$THEPWDCMD`
sym_link_file=`$BASENAME $ISLINK`
@ -15827,7 +15839,14 @@ $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio
fi
if test -d "$WIN_SDK_BASE"; then
if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
# There have been cases of partial or broken SDK installations. A missing
# lib dir is not going to work.
if test ! -d "$WIN_SDK_BASE/../lib"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
@ -15862,7 +15881,14 @@ $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignori
fi
if test -d "$WIN_SDK_BASE"; then
if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
# There have been cases of partial or broken SDK installations. A missing
# lib dir is not going to work.
if test ! -d "$WIN_SDK_BASE/../lib"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
@ -15897,7 +15923,14 @@ $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignori
fi
if test -d "$WIN_SDK_BASE"; then
if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
# There have been cases of partial or broken SDK installations. A missing
# lib dir is not going to work.
if test ! -d "$WIN_SDK_BASE/../lib"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
@ -15931,7 +15964,14 @@ $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignori
fi
if test -d "$WIN_SDK_BASE"; then
if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
# There have been cases of partial or broken SDK installations. A missing
# lib dir is not going to work.
if test ! -d "$WIN_SDK_BASE/../lib"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
@ -15964,7 +16004,14 @@ $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignori
fi
if test -d "$WIN_SDK_BASE"; then
if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
# There have been cases of partial or broken SDK installations. A missing
# lib dir is not going to work.
if test ! -d "$WIN_SDK_BASE/../lib"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
@ -16434,8 +16481,9 @@ $as_echo "present but broken" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
VS_INCLUDE="$INCLUDE"
VS_LIB="$LIB"
# Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
VS_PATH="$PATH"
@ -18082,7 +18130,7 @@ $as_echo_n "checking resolved symbolic links for CC... " >&6; }
if test "x$READLINK_TESTED" != yes; then
# On MacOSX there is a readlink tool with a different
# purpose than the GNU readlink tool. Check the found readlink.
ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
if test "x$ISGNU" = x; then
# A readlink that we do not know how to use.
# Are there other non-GNU readlinks out there?
@ -18094,20 +18142,24 @@ $as_echo_n "checking resolved symbolic links for CC... " >&6; }
if test "x$READLINK" != x; then
TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
else
# Save the current directory for restoring afterwards
STARTDIR=$PWD
COUNTER=0
sym_link_dir=`$DIRNAME $TEST_COMPILER`
sym_link_file=`$BASENAME $TEST_COMPILER`
# Use the system pwd and not the shell builtin to resolve directory symlinks
cd $sym_link_dir
cd `$THEPWDCMD`
sym_link_dir=`$THEPWDCMD`
# Resolve file symlinks
while test $COUNTER -lt 20; do
ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
if test "x$ISLINK" == x; then
# This is not a symbolic link! We are done!
break
fi
# The link might be relative! We have to use cd to travel safely.
cd $sym_link_dir
# ... and we must get the to the absolute path, not one using symbolic links.
cd `pwd -P`
# Again resolve directory symlinks since the target of the just found
# link could be in a different directory
cd `$DIRNAME $ISLINK`
sym_link_dir=`$THEPWDCMD`
sym_link_file=`$BASENAME $ISLINK`
@ -18504,7 +18556,7 @@ $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
if test "x$READLINK_TESTED" != yes; then
# On MacOSX there is a readlink tool with a different
# purpose than the GNU readlink tool. Check the found readlink.
ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
if test "x$ISGNU" = x; then
# A readlink that we do not know how to use.
# Are there other non-GNU readlinks out there?
@ -18516,20 +18568,24 @@ $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
if test "x$READLINK" != x; then
PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
else
# Save the current directory for restoring afterwards
STARTDIR=$PWD
COUNTER=0
sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
# Use the system pwd and not the shell builtin to resolve directory symlinks
cd $sym_link_dir
cd `$THEPWDCMD`
sym_link_dir=`$THEPWDCMD`
# Resolve file symlinks
while test $COUNTER -lt 20; do
ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
if test "x$ISLINK" == x; then
# This is not a symbolic link! We are done!
break
fi
# The link might be relative! We have to use cd to travel safely.
cd $sym_link_dir
# ... and we must get the to the absolute path, not one using symbolic links.
cd `pwd -P`
# Again resolve directory symlinks since the target of the just found
# link could be in a different directory
cd `$DIRNAME $ISLINK`
sym_link_dir=`$THEPWDCMD`
sym_link_file=`$BASENAME $ISLINK`
@ -19565,7 +19621,7 @@ $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
if test "x$READLINK_TESTED" != yes; then
# On MacOSX there is a readlink tool with a different
# purpose than the GNU readlink tool. Check the found readlink.
ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
if test "x$ISGNU" = x; then
# A readlink that we do not know how to use.
# Are there other non-GNU readlinks out there?
@ -19577,20 +19633,24 @@ $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
if test "x$READLINK" != x; then
TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
else
# Save the current directory for restoring afterwards
STARTDIR=$PWD
COUNTER=0
sym_link_dir=`$DIRNAME $TEST_COMPILER`
sym_link_file=`$BASENAME $TEST_COMPILER`
# Use the system pwd and not the shell builtin to resolve directory symlinks
cd $sym_link_dir
cd `$THEPWDCMD`
sym_link_dir=`$THEPWDCMD`
# Resolve file symlinks
while test $COUNTER -lt 20; do
ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
if test "x$ISLINK" == x; then
# This is not a symbolic link! We are done!
break
fi
# The link might be relative! We have to use cd to travel safely.
cd $sym_link_dir
# ... and we must get the to the absolute path, not one using symbolic links.
cd `pwd -P`
# Again resolve directory symlinks since the target of the just found
# link could be in a different directory
cd `$DIRNAME $ISLINK`
sym_link_dir=`$THEPWDCMD`
sym_link_file=`$BASENAME $ISLINK`
@ -19987,7 +20047,7 @@ $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
if test "x$READLINK_TESTED" != yes; then
# On MacOSX there is a readlink tool with a different
# purpose than the GNU readlink tool. Check the found readlink.
ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
if test "x$ISGNU" = x; then
# A readlink that we do not know how to use.
# Are there other non-GNU readlinks out there?
@ -19999,20 +20059,24 @@ $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
if test "x$READLINK" != x; then
PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
else
# Save the current directory for restoring afterwards
STARTDIR=$PWD
COUNTER=0
sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
# Use the system pwd and not the shell builtin to resolve directory symlinks
cd $sym_link_dir
cd `$THEPWDCMD`
sym_link_dir=`$THEPWDCMD`
# Resolve file symlinks
while test $COUNTER -lt 20; do
ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
if test "x$ISLINK" == x; then
# This is not a symbolic link! We are done!
break
fi
# The link might be relative! We have to use cd to travel safely.
cd $sym_link_dir
# ... and we must get the to the absolute path, not one using symbolic links.
cd `pwd -P`
# Again resolve directory symlinks since the target of the just found
# link could be in a different directory
cd `$DIRNAME $ISLINK`
sym_link_dir=`$THEPWDCMD`
sym_link_file=`$BASENAME $ISLINK`

View File

@ -48,7 +48,12 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT],
METHOD="$2"
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(WIN_SDK_BASE)
if test -d "$WIN_SDK_BASE"; then
if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
# There have been cases of partial or broken SDK installations. A missing
# lib dir is not going to work.
if test ! -d "$WIN_SDK_BASE/../lib"; then
AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
AC_MSG_NOTICE([Warning: Installation is broken, lib dir is missing. Ignoring])
elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
@ -200,8 +205,9 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
AC_MSG_ERROR([Your VC command prompt seems broken, INCLUDE and/or LIB is missing.])
else
AC_MSG_RESULT([ok])
VS_INCLUDE="$INCLUDE"
VS_LIB="$LIB"
# Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
VS_PATH="$PATH"
AC_SUBST(VS_INCLUDE)
AC_SUBST(VS_LIB)

View File

@ -149,7 +149,7 @@ define SetupArchive
$$($1_GREP_INCLUDES) $$($1_GREP_EXCLUDES)) \
$$(subst \,,$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/,$$($1_EXTRA_FILES))))
ifeq (,$$($1_SKIP_METAINF))
$1_DEPS+=$$(shell $(FIND) $$(addsuffix /META-INF,$$($1_SRCS)) -type f 2> /dev/null))
$1_DEPS+=$$(shell $(FIND) $$(addsuffix /META-INF,$$($1_SRCS)) -type f 2> /dev/null)
endif
endif

View File

@ -295,3 +295,5 @@ acabb5c282f59be7e3238920b2ea06b684ab68f7 jdk8-b63
b4ee7b773144a88af8b6b92e4384dea82cb948d8 hs25-b09
0f7290a03b24bd562583fa325d3566c21c51fb94 jdk8-b65
cfc5309f03b7bd6c1567618b63cf1fc74c0f2a8f hs25-b10
01684f7fee1b86222be69bc23841ec2a4416696c jdk8-b66
b61d9c88b759d1594b8af1655598e8fa00393672 hs25-b11

View File

@ -48,6 +48,7 @@ public class ConstMethod extends VMObject {
private static int HAS_CHECKED_EXCEPTIONS;
private static int HAS_LOCALVARIABLE_TABLE;
private static int HAS_EXCEPTION_TABLE;
private static int HAS_GENERIC_SIGNATURE;
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
Type type = db.lookupType("ConstMethod");
@ -60,13 +61,14 @@ public class ConstMethod extends VMObject {
HAS_CHECKED_EXCEPTIONS = db.lookupIntConstant("ConstMethod::_has_checked_exceptions").intValue();
HAS_LOCALVARIABLE_TABLE = db.lookupIntConstant("ConstMethod::_has_localvariable_table").intValue();
HAS_EXCEPTION_TABLE = db.lookupIntConstant("ConstMethod::_has_exception_table").intValue();
HAS_GENERIC_SIGNATURE = db.lookupIntConstant("ConstMethod::_has_generic_signature").intValue();
// Size of Java bytecodes allocated immediately after ConstMethod*.
codeSize = new CIntField(type.getCIntegerField("_code_size"), 0);
nameIndex = new CIntField(type.getCIntegerField("_name_index"), 0);
signatureIndex = new CIntField(type.getCIntegerField("_signature_index"), 0);
genericSignatureIndex = new CIntField(type.getCIntegerField("_generic_signature_index"),0);
idnum = new CIntField(type.getCIntegerField("_method_idnum"), 0);
maxStack = new CIntField(type.getCIntegerField("_max_stack"), 0);
// start of byte code
bytecodeOffset = type.getSize();
@ -92,8 +94,8 @@ public class ConstMethod extends VMObject {
private static CIntField codeSize;
private static CIntField nameIndex;
private static CIntField signatureIndex;
private static CIntField genericSignatureIndex;
private static CIntField idnum;
private static CIntField maxStack;
// start of bytecode
private static long bytecodeOffset;
@ -134,13 +136,21 @@ public class ConstMethod extends VMObject {
}
public long getGenericSignatureIndex() {
return genericSignatureIndex.getValue(this);
if (hasGenericSignature()) {
return getAddress().getCIntegerAt(offsetOfGenericSignatureIndex(), 2, true);
} else {
return 0;
}
}
public long getIdNum() {
return idnum.getValue(this);
}
public long getMaxStack() {
return maxStack.getValue(this);
}
public Symbol getName() {
return getMethod().getName();
}
@ -235,8 +245,8 @@ public class ConstMethod extends VMObject {
visitor.doCInt(codeSize, true);
visitor.doCInt(nameIndex, true);
visitor.doCInt(signatureIndex, true);
visitor.doCInt(genericSignatureIndex, true);
visitor.doCInt(codeSize, true);
visitor.doCInt(maxStack, true);
}
// Accessors
@ -353,6 +363,10 @@ public class ConstMethod extends VMObject {
return ret;
}
private boolean hasGenericSignature() {
return (getFlags() & HAS_GENERIC_SIGNATURE) != 0;
}
//---------------------------------------------------------------------------
// Internals only below this point
@ -377,10 +391,16 @@ public class ConstMethod extends VMObject {
return getSize() * VM.getVM().getObjectHeap().getOopSize() - 2;
}
private long offsetOfCheckedExceptionsLength() {
// Offset of the generic signature index
private long offsetOfGenericSignatureIndex() {
return offsetOfLastU2Element();
}
private long offsetOfCheckedExceptionsLength() {
return hasGenericSignature() ? offsetOfLastU2Element() - 2 :
offsetOfLastU2Element();
}
private int getCheckedExceptionsLength() {
if (hasCheckedExceptions()) {
return (int) getAddress().getCIntegerAt(offsetOfCheckedExceptionsLength(), 2, true);
@ -431,7 +451,8 @@ public class ConstMethod extends VMObject {
} else if (hasCheckedExceptions()) {
return offsetOfCheckedExceptions() - 2;
} else {
return offsetOfLastU2Element();
return hasGenericSignature() ? offsetOfLastU2Element() - 2 :
offsetOfLastU2Element();
}
}
@ -460,7 +481,8 @@ public class ConstMethod extends VMObject {
if (hasCheckedExceptions()) {
return offsetOfCheckedExceptions() - 2;
} else {
return offsetOfLastU2Element();
return hasGenericSignature() ? offsetOfLastU2Element() - 2 :
offsetOfLastU2Element();
}
}

View File

@ -50,7 +50,6 @@ public class Method extends Metadata {
constMethod = type.getAddressField("_constMethod");
methodData = type.getAddressField("_method_data");
methodSize = new CIntField(type.getCIntegerField("_method_size"), 0);
maxStack = new CIntField(type.getCIntegerField("_max_stack"), 0);
maxLocals = new CIntField(type.getCIntegerField("_max_locals"), 0);
sizeOfParameters = new CIntField(type.getCIntegerField("_size_of_parameters"), 0);
accessFlags = new CIntField(type.getCIntegerField("_access_flags"), 0);
@ -84,7 +83,6 @@ public class Method extends Metadata {
private static AddressField constMethod;
private static AddressField methodData;
private static CIntField methodSize;
private static CIntField maxStack;
private static CIntField maxLocals;
private static CIntField sizeOfParameters;
private static CIntField accessFlags;
@ -135,7 +133,7 @@ public class Method extends Metadata {
}
/** WARNING: this is in words, not useful in this system; use getObjectSize() instead */
public long getMethodSize() { return methodSize.getValue(this); }
public long getMaxStack() { return maxStack.getValue(this); }
public long getMaxStack() { return getConstMethod().getMaxStack(); }
public long getMaxLocals() { return maxLocals.getValue(this); }
public long getSizeOfParameters() { return sizeOfParameters.getValue(this); }
public long getNameIndex() { return getConstMethod().getNameIndex(); }
@ -284,7 +282,6 @@ public class Method extends Metadata {
public void iterateFields(MetadataVisitor visitor) {
visitor.doCInt(methodSize, true);
visitor.doCInt(maxStack, true);
visitor.doCInt(maxLocals, true);
visitor.doCInt(sizeOfParameters, true);
visitor.doCInt(accessFlags, true);

View File

@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2012
HS_MAJOR_VER=25
HS_MINOR_VER=0
HS_BUILD_NUMBER=10
HS_BUILD_NUMBER=11
JDK_MAJOR_VER=1
JDK_MINOR_VER=8

View File

@ -1048,7 +1048,6 @@ void CppInterpreterGenerator::generate_compute_interpreter_state(const Register
const Address constMethod (G5_method, 0, in_bytes(Method::const_offset()));
const Address access_flags (G5_method, 0, in_bytes(Method::access_flags_offset()));
const Address size_of_parameters(G5_method, 0, in_bytes(Method::size_of_parameters_offset()));
const Address max_stack (G5_method, 0, in_bytes(Method::max_stack_offset()));
const Address size_of_locals (G5_method, 0, in_bytes(Method::size_of_locals_offset()));
// slop factor is two extra slots on the expression stack so that
@ -1070,7 +1069,9 @@ void CppInterpreterGenerator::generate_compute_interpreter_state(const Register
__ lduh( size_of_parameters, Gtmp );
__ calc_mem_param_words(Gtmp, Gtmp); // space for native call parameters passed on the stack in words
} else {
__ lduh(max_stack, Gtmp); // Full size expression stack
// Full size expression stack
__ ld_ptr(constMethod, Gtmp);
__ lduh(Gtmp, in_bytes(ConstMethod::max_stack_offset()), Gtmp);
}
__ add(Gtmp, fixed_size, Gtmp); // plus the fixed portion
@ -1206,7 +1207,9 @@ void CppInterpreterGenerator::generate_compute_interpreter_state(const Register
__ sub(O2, wordSize, O2); // prepush
__ st_ptr(O2, XXX_STATE(_stack)); // PREPUSH
__ lduh(max_stack, O3); // Full size expression stack
// Full size expression stack
__ ld_ptr(constMethod, O3);
__ lduh(O3, in_bytes(ConstMethod::max_stack_offset()), O3);
guarantee(!EnableInvokeDynamic, "no support yet for java.lang.invoke.MethodHandle"); //6815692
//6815692//if (EnableInvokeDynamic)
//6815692// __ inc(O3, Method::extra_stack_entries());
@ -1539,7 +1542,6 @@ address InterpreterGenerator::generate_normal_entry(bool synchronized) {
const Address constMethod (G5_method, 0, in_bytes(Method::const_offset()));
const Address access_flags (G5_method, 0, in_bytes(Method::access_flags_offset()));
const Address size_of_parameters(G5_method, 0, in_bytes(Method::size_of_parameters_offset()));
const Address max_stack (G5_method, 0, in_bytes(Method::max_stack_offset()));
const Address size_of_locals (G5_method, 0, in_bytes(Method::size_of_locals_offset()));
address entry_point = __ pc();

View File

@ -648,7 +648,7 @@ bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
Method* m = *interpreter_frame_method_addr();
// validate the method we'd find in this potential sender
if (!Universe::heap()->is_valid_method(m)) return false;
if (!m->is_valid_method()) return false;
// stack frames shouldn't be much larger than max_stack elements

View File

@ -36,12 +36,7 @@
#include "runtime/basicLock.hpp"
#include "runtime/biasedLocking.hpp"
#include "runtime/sharedRuntime.hpp"
#ifdef TARGET_OS_FAMILY_linux
# include "thread_linux.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_solaris
# include "thread_solaris.inline.hpp"
#endif
#include "runtime/thread.inline.hpp"
#ifndef CC_INTERP
#ifndef FAST_DISPATCH
@ -523,7 +518,8 @@ void InterpreterMacroAssembler::empty_expression_stack() {
delayed()->nop();
// Compute max expression stack+register save area
lduh(Lmethod, in_bytes(Method::max_stack_offset()), Gframe_size); // Load max stack.
ld_ptr(Lmethod, in_bytes(Method::const_offset()), Gframe_size);
lduh(Gframe_size, in_bytes(ConstMethod::max_stack_offset()), Gframe_size); // Load max stack.
add( Gframe_size, frame::memory_parameter_word_sp_offset, Gframe_size );
//

View File

@ -37,13 +37,8 @@
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubCodeGenerator.hpp"
#include "runtime/stubRoutines.hpp"
#include "runtime/thread.inline.hpp"
#include "utilities/top.hpp"
#ifdef TARGET_OS_FAMILY_linux
# include "thread_linux.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_solaris
# include "thread_solaris.inline.hpp"
#endif
#ifdef COMPILER2
#include "opto/runtime.hpp"
#endif

View File

@ -26,12 +26,7 @@
#include "runtime/deoptimization.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/stubRoutines.hpp"
#ifdef TARGET_OS_FAMILY_linux
# include "thread_linux.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_solaris
# include "thread_solaris.inline.hpp"
#endif
#include "runtime/thread.inline.hpp"
// Implementation of the platform-specific part of StubRoutines - for
// a description of how to extend it, see the stubRoutines.hpp file.

View File

@ -496,7 +496,7 @@ void TemplateInterpreterGenerator::generate_fixed_frame(bool native_call) {
const Address size_of_parameters(G5_method, Method::size_of_parameters_offset());
const Address size_of_locals (G5_method, Method::size_of_locals_offset());
const Address max_stack (G5_method, Method::max_stack_offset());
const Address constMethod (G5_method, Method::const_offset());
int rounded_vm_local_words = round_to( frame::interpreter_frame_vm_local_words, WordsPerLong );
const int extra_space =
@ -538,7 +538,8 @@ void TemplateInterpreterGenerator::generate_fixed_frame(bool native_call) {
// see if the frame is greater than one page in size. If so,
// then we need to verify there is enough stack space remaining
// Frame_size = (max_stack + extra_space) * BytesPerWord;
__ lduh( max_stack, Gframe_size );
__ ld_ptr( constMethod, Gframe_size );
__ lduh( Gframe_size, in_bytes(ConstMethod::max_stack_offset()), Gframe_size );
__ add( Gframe_size, extra_space, Gframe_size );
__ round_to( Gframe_size, WordsPerLong );
__ sll( Gframe_size, Interpreter::logStackElementSize, Gframe_size);

View File

@ -538,9 +538,9 @@ void CppInterpreterGenerator::generate_compute_interpreter_state(const Register
// compute full expression stack limit
const Address size_of_stack (rbx, Method::max_stack_offset());
const int extra_stack = 0; //6815692//Method::extra_stack_words();
__ load_unsigned_short(rdx, size_of_stack); // get size of expression stack in words
__ movptr(rdx, Address(rbx, Method::const_offset()));
__ load_unsigned_short(rdx, Address(rdx, ConstMethod::max_stack_offset())); // get size of expression stack in words
__ negptr(rdx); // so we can subtract in next step
// Allocate expression stack
__ lea(rsp, Address(rsp, rdx, Address::times_ptr, -extra_stack));
@ -682,12 +682,12 @@ void InterpreterGenerator::generate_stack_overflow_check(void) {
const Address stack_size(thread, Thread::stack_size_offset());
// locals + overhead, in bytes
const Address size_of_stack (rbx, Method::max_stack_offset());
// Always give one monitor to allow us to start interp if sync method.
// Any additional monitors need a check when moving the expression stack
const int one_monitor = frame::interpreter_frame_monitor_size() * wordSize;
const int extra_stack = 0; //6815692//Method::extra_stack_entries();
__ load_unsigned_short(rax, size_of_stack); // get size of expression stack in words
// Always give one monitor to allow us to start interp if sync method.
// Any additional monitors need a check when moving the expression stack
const int one_monitor = frame::interpreter_frame_monitor_size() * wordSize;
const int extra_stack = 0; //6815692//Method::extra_stack_entries();
__ movptr(rax, Address(rbx, Method::const_offset()));
__ load_unsigned_short(rax, Address(rax, ConstMethod::max_stack_offset())); // get size of expression stack in words
__ lea(rax, Address(noreg, rax, Interpreter::stackElementScale(), extra_stack + one_monitor));
__ lea(rax, Address(rax, rdx, Interpreter::stackElementScale(), overhead_size));

View File

@ -534,7 +534,7 @@ bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
Method* m = *interpreter_frame_method_addr();
// validate the method we'd find in this potential sender
if (!Universe::heap()->is_valid_method(m)) return false;
if (!m->is_valid_method()) return false;
// stack frames shouldn't be much larger than max_stack elements

View File

@ -36,18 +36,7 @@
#include "runtime/basicLock.hpp"
#include "runtime/biasedLocking.hpp"
#include "runtime/sharedRuntime.hpp"
#ifdef TARGET_OS_FAMILY_linux
# include "thread_linux.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_solaris
# include "thread_solaris.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_windows
# include "thread_windows.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_bsd
# include "thread_bsd.inline.hpp"
#endif
#include "runtime/thread.inline.hpp"
// Implementation of InterpreterMacroAssembler

View File

@ -36,18 +36,7 @@
#include "runtime/basicLock.hpp"
#include "runtime/biasedLocking.hpp"
#include "runtime/sharedRuntime.hpp"
#ifdef TARGET_OS_FAMILY_linux
# include "thread_linux.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_solaris
# include "thread_solaris.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_windows
# include "thread_windows.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_bsd
# include "thread_bsd.inline.hpp"
#endif
#include "runtime/thread.inline.hpp"
// Implementation of InterpreterMacroAssembler

View File

@ -37,19 +37,8 @@
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubCodeGenerator.hpp"
#include "runtime/stubRoutines.hpp"
#include "runtime/thread.inline.hpp"
#include "utilities/top.hpp"
#ifdef TARGET_OS_FAMILY_linux
# include "thread_linux.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_solaris
# include "thread_solaris.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_windows
# include "thread_windows.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_bsd
# include "thread_bsd.inline.hpp"
#endif
#ifdef COMPILER2
#include "opto/runtime.hpp"
#endif

View File

@ -37,19 +37,8 @@
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubCodeGenerator.hpp"
#include "runtime/stubRoutines.hpp"
#include "runtime/thread.inline.hpp"
#include "utilities/top.hpp"
#ifdef TARGET_OS_FAMILY_linux
# include "thread_linux.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_solaris
# include "thread_solaris.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_windows
# include "thread_windows.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_bsd
# include "thread_bsd.inline.hpp"
#endif
#ifdef COMPILER2
#include "opto/runtime.hpp"
#endif

View File

@ -26,18 +26,7 @@
#include "runtime/deoptimization.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/stubRoutines.hpp"
#ifdef TARGET_OS_FAMILY_linux
# include "thread_linux.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_solaris
# include "thread_solaris.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_windows
# include "thread_windows.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_bsd
# include "thread_bsd.inline.hpp"
#endif
#include "runtime/thread.inline.hpp"
// Implementation of the platform-specific part of StubRoutines - for
// a description of how to extend it, see the stubRoutines.hpp file.

View File

@ -26,18 +26,7 @@
#include "runtime/deoptimization.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/stubRoutines.hpp"
#ifdef TARGET_OS_FAMILY_linux
# include "thread_linux.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_solaris
# include "thread_solaris.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_windows
# include "thread_windows.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_bsd
# include "thread_bsd.inline.hpp"
#endif
#include "runtime/thread.inline.hpp"
// Implementation of the platform-specific part of StubRoutines - for
// a description of how to extend it, see the stubRoutines.hpp file.

View File

@ -37,11 +37,6 @@
#include "runtime/basicLock.hpp"
#include "runtime/biasedLocking.hpp"
#include "runtime/sharedRuntime.hpp"
#ifdef TARGET_OS_FAMILY_linux
# include "thread_linux.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_bsd
# include "thread_bsd.inline.hpp"
#endif
#include "runtime/thread.inline.hpp"
// This file is intentionally empty

View File

@ -38,14 +38,9 @@
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubCodeGenerator.hpp"
#include "runtime/stubRoutines.hpp"
#include "runtime/thread.inline.hpp"
#include "stack_zero.inline.hpp"
#include "utilities/top.hpp"
#ifdef TARGET_OS_FAMILY_linux
# include "thread_linux.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_bsd
# include "thread_bsd.inline.hpp"
#endif
#ifdef COMPILER2
#include "opto/runtime.hpp"
#endif

View File

@ -27,9 +27,4 @@
#include "runtime/deoptimization.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/stubRoutines.hpp"
#ifdef TARGET_OS_FAMILY_linux
# include "thread_linux.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_bsd
# include "thread_bsd.inline.hpp"
#endif
#include "runtime/thread.inline.hpp"

View File

@ -26,7 +26,7 @@
#include "mutex_bsd.inline.hpp"
#include "runtime/interfaceSupport.hpp"
#include "runtime/mutex.hpp"
#include "thread_bsd.inline.hpp"
#include "runtime/thread.inline.hpp"
#include "utilities/events.hpp"
// put OS-includes here

View File

@ -27,7 +27,7 @@
#include "os_bsd.inline.hpp"
#include "runtime/interfaceSupport.hpp"
#include "thread_bsd.inline.hpp"
#include "runtime/thread.inline.hpp"
// Reconciliation History

View File

@ -52,11 +52,11 @@
#include "runtime/sharedRuntime.hpp"
#include "runtime/statSampler.hpp"
#include "runtime/stubRoutines.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/threadCritical.hpp"
#include "runtime/timer.hpp"
#include "services/attachListener.hpp"
#include "services/runtimeService.hpp"
#include "thread_bsd.inline.hpp"
#include "utilities/decoder.hpp"
#include "utilities/defaultStream.hpp"
#include "utilities/events.hpp"

View File

@ -23,8 +23,8 @@
*/
#include "precompiled.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/threadCritical.hpp"
#include "thread_bsd.inline.hpp"
// put OS-includes here
# include <pthread.h>

View File

@ -25,6 +25,10 @@
#ifndef OS_BSD_VM_THREAD_BSD_INLINE_HPP
#define OS_BSD_VM_THREAD_BSD_INLINE_HPP
#ifndef SHARE_VM_RUNTIME_THREAD_INLINE_HPP_SCOPE
#error "This file should only be included from thread.inline.hpp"
#endif
#include "runtime/atomic.hpp"
#include "runtime/prefetch.hpp"
#include "runtime/thread.hpp"

View File

@ -26,7 +26,7 @@
#include "mutex_linux.inline.hpp"
#include "runtime/interfaceSupport.hpp"
#include "runtime/mutex.hpp"
#include "thread_linux.inline.hpp"
#include "runtime/thread.inline.hpp"
#include "utilities/events.hpp"
// put OS-includes here

View File

@ -27,7 +27,7 @@
#include "os_linux.inline.hpp"
#include "runtime/interfaceSupport.hpp"
#include "thread_linux.inline.hpp"
#include "runtime/thread.inline.hpp"
// Reconciliation History

View File

@ -52,11 +52,11 @@
#include "runtime/sharedRuntime.hpp"
#include "runtime/statSampler.hpp"
#include "runtime/stubRoutines.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/threadCritical.hpp"
#include "runtime/timer.hpp"
#include "services/attachListener.hpp"
#include "services/runtimeService.hpp"
#include "thread_linux.inline.hpp"
#include "utilities/decoder.hpp"
#include "utilities/defaultStream.hpp"
#include "utilities/events.hpp"

View File

@ -23,8 +23,8 @@
*/
#include "precompiled.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/threadCritical.hpp"
#include "thread_linux.inline.hpp"
// put OS-includes here
# include <pthread.h>

View File

@ -25,6 +25,10 @@
#ifndef OS_LINUX_VM_THREAD_LINUX_INLINE_HPP
#define OS_LINUX_VM_THREAD_LINUX_INLINE_HPP
#ifndef SHARE_VM_RUNTIME_THREAD_INLINE_HPP_SCOPE
#error "This file should only be included from thread.inline.hpp"
#endif
#include "runtime/atomic.hpp"
#include "runtime/prefetch.hpp"
#include "runtime/thread.hpp"

View File

@ -26,7 +26,7 @@
#include "mutex_solaris.inline.hpp"
#include "runtime/interfaceSupport.hpp"
#include "runtime/mutex.hpp"
#include "thread_solaris.inline.hpp"
#include "runtime/thread.inline.hpp"
#include "utilities/events.hpp"
// Solaris-specific include, therefore not in includeDB_*

View File

@ -27,6 +27,6 @@
#include "os_solaris.inline.hpp"
#include "runtime/interfaceSupport.hpp"
#include "thread_solaris.inline.hpp"
#include "runtime/thread.inline.hpp"
#endif // OS_SOLARIS_VM_MUTEX_SOLARIS_INLINE_HPP

View File

@ -52,12 +52,12 @@
#include "runtime/sharedRuntime.hpp"
#include "runtime/statSampler.hpp"
#include "runtime/stubRoutines.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/threadCritical.hpp"
#include "runtime/timer.hpp"
#include "services/attachListener.hpp"
#include "services/memTracker.hpp"
#include "services/runtimeService.hpp"
#include "thread_solaris.inline.hpp"
#include "utilities/decoder.hpp"
#include "utilities/defaultStream.hpp"
#include "utilities/events.hpp"

View File

@ -23,8 +23,8 @@
*/
#include "precompiled.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/threadCritical.hpp"
#include "thread_solaris.inline.hpp"
// OS-includes here
#include <thread.h>

View File

@ -25,6 +25,10 @@
#ifndef OS_SOLARIS_VM_THREAD_SOLARIS_INLINE_HPP
#define OS_SOLARIS_VM_THREAD_SOLARIS_INLINE_HPP
#ifndef SHARE_VM_RUNTIME_THREAD_INLINE_HPP_SCOPE
#error "This file should only be included from thread.inline.hpp"
#endif
#include "runtime/atomic.hpp"
#include "runtime/prefetch.hpp"
#include "runtime/thread.hpp"

View File

@ -26,7 +26,7 @@
#include "mutex_windows.inline.hpp"
#include "runtime/interfaceSupport.hpp"
#include "runtime/mutex.hpp"
#include "thread_windows.inline.hpp"
#include "runtime/thread.inline.hpp"
#include "utilities/events.hpp"
// put OS-includes here

View File

@ -27,6 +27,6 @@
#include "os_windows.inline.hpp"
#include "runtime/interfaceSupport.hpp"
#include "thread_windows.inline.hpp"
#include "runtime/thread.inline.hpp"
#endif // OS_WINDOWS_VM_MUTEX_WINDOWS_INLINE_HPP

View File

@ -55,11 +55,11 @@
#include "runtime/sharedRuntime.hpp"
#include "runtime/statSampler.hpp"
#include "runtime/stubRoutines.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/threadCritical.hpp"
#include "runtime/timer.hpp"
#include "services/attachListener.hpp"
#include "services/runtimeService.hpp"
#include "thread_windows.inline.hpp"
#include "utilities/decoder.hpp"
#include "utilities/defaultStream.hpp"
#include "utilities/events.hpp"

View File

@ -23,8 +23,8 @@
*/
#include "precompiled.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/threadCritical.hpp"
#include "thread_windows.inline.hpp"
// OS-includes here
# include <windows.h>

View File

@ -25,6 +25,10 @@
#ifndef OS_WINDOWS_VM_THREAD_WINDOWS_INLINE_HPP
#define OS_WINDOWS_VM_THREAD_WINDOWS_INLINE_HPP
#ifndef SHARE_VM_RUNTIME_THREAD_INLINE_HPP_SCOPE
#error "This file should only be included from thread.inline.hpp"
#endif
#include "runtime/atomic.hpp"
#include "runtime/prefetch.hpp"
#include "runtime/thread.hpp"

View File

@ -48,8 +48,8 @@
#include "runtime/osThread.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/timer.hpp"
#include "thread_bsd.inline.hpp"
#include "utilities/events.hpp"
#include "utilities/vmError.hpp"

View File

@ -23,8 +23,8 @@
*/
#include "precompiled.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/threadLocalStorage.hpp"
#include "thread_bsd.inline.hpp"
// Map stack pointer (%esp) to thread pointer for faster TLS access
//

View File

@ -24,7 +24,7 @@
#include "precompiled.hpp"
#include "runtime/frame.inline.hpp"
#include "thread_bsd.inline.hpp"
#include "runtime/thread.inline.hpp"
// For Forte Analyzer AsyncGetCallTrace profiling support - thread is
// currently interrupted by SIGPROF

View File

@ -54,8 +54,8 @@
#include "runtime/osThread.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/timer.hpp"
#include "thread_bsd.inline.hpp"
#include "utilities/events.hpp"
#include "utilities/vmError.hpp"

View File

@ -24,8 +24,8 @@
*/
#include "precompiled.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/threadLocalStorage.hpp"
#include "thread_bsd.inline.hpp"
void ThreadLocalStorage::generate_code_for_get_thread() {
// nothing to do

View File

@ -25,7 +25,7 @@
#include "precompiled.hpp"
#include "runtime/frame.inline.hpp"
#include "thread_bsd.inline.hpp"
#include "runtime/thread.inline.hpp"
void JavaThread::cache_global_variables() {
// nothing to do

View File

@ -48,8 +48,8 @@
#include "runtime/osThread.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/timer.hpp"
#include "thread_linux.inline.hpp"
#include "utilities/events.hpp"
#include "utilities/vmError.hpp"

View File

@ -23,8 +23,8 @@
*/
#include "precompiled.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/threadLocalStorage.hpp"
#include "thread_linux.inline.hpp"
void ThreadLocalStorage::generate_code_for_get_thread() {
}

View File

@ -24,7 +24,7 @@
#include "precompiled.hpp"
#include "runtime/frame.inline.hpp"
#include "thread_linux.inline.hpp"
#include "runtime/thread.inline.hpp"
// For Forte Analyzer AsyncGetCallTrace profiling support - thread is
// currently interrupted by SIGPROF

View File

@ -48,8 +48,8 @@
#include "runtime/osThread.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/timer.hpp"
#include "thread_linux.inline.hpp"
#include "utilities/events.hpp"
#include "utilities/vmError.hpp"

View File

@ -23,8 +23,8 @@
*/
#include "precompiled.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/threadLocalStorage.hpp"
#include "thread_linux.inline.hpp"
// Map stack pointer (%esp) to thread pointer for faster TLS access
//

View File

@ -24,7 +24,7 @@
#include "precompiled.hpp"
#include "runtime/frame.inline.hpp"
#include "thread_linux.inline.hpp"
#include "runtime/thread.inline.hpp"
// For Forte Analyzer AsyncGetCallTrace profiling support - thread is
// currently interrupted by SIGPROF

View File

@ -49,8 +49,8 @@
#include "runtime/osThread.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/timer.hpp"
#include "thread_linux.inline.hpp"
#include "utilities/events.hpp"
#include "utilities/vmError.hpp"

View File

@ -24,8 +24,8 @@
*/
#include "precompiled.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/threadLocalStorage.hpp"
#include "thread_linux.inline.hpp"
void ThreadLocalStorage::generate_code_for_get_thread() {
// nothing to do

View File

@ -25,7 +25,7 @@
#include "precompiled.hpp"
#include "runtime/frame.inline.hpp"
#include "thread_linux.inline.hpp"
#include "runtime/thread.inline.hpp"
void JavaThread::cache_global_variables() {
// nothing to do

View File

@ -48,8 +48,8 @@
#include "runtime/osThread.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/timer.hpp"
#include "thread_solaris.inline.hpp"
#include "utilities/events.hpp"
#include "utilities/vmError.hpp"

View File

@ -23,8 +23,8 @@
*/
#include "precompiled.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/threadLocalStorage.hpp"
#include "thread_solaris.inline.hpp"
// Provides an entry point we can link against and
// a buffer we can emit code into. The buffer is

View File

@ -24,7 +24,7 @@
#include "precompiled.hpp"
#include "runtime/frame.inline.hpp"
#include "thread_solaris.inline.hpp"
#include "runtime/thread.inline.hpp"
// For Forte Analyzer AsyncGetCallTrace profiling support - thread is
// currently interrupted by SIGPROF

View File

@ -48,8 +48,8 @@
#include "runtime/osThread.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/timer.hpp"
#include "thread_solaris.inline.hpp"
#include "utilities/events.hpp"
#include "utilities/vmError.hpp"

View File

@ -23,8 +23,8 @@
*/
#include "precompiled.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/threadLocalStorage.hpp"
#include "thread_solaris.inline.hpp"
#ifdef AMD64
extern "C" Thread* fs_load(ptrdiff_t tlsOffset);

View File

@ -24,7 +24,7 @@
#include "precompiled.hpp"
#include "runtime/frame.inline.hpp"
#include "thread_solaris.inline.hpp"
#include "runtime/thread.inline.hpp"
// For Forte Analyzer AsyncGetCallTrace profiling support - thread is
// currently interrupted by SIGPROF

View File

@ -48,8 +48,8 @@
#include "runtime/osThread.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/timer.hpp"
#include "thread_windows.inline.hpp"
#include "utilities/events.hpp"
#include "utilities/vmError.hpp"

View File

@ -23,8 +23,8 @@
*/
#include "precompiled.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/threadLocalStorage.hpp"
#include "thread_windows.inline.hpp"
// Provides an entry point we can link against and
// a buffer we can emit code into. The buffer is

View File

@ -24,7 +24,7 @@
#include "precompiled.hpp"
#include "runtime/frame.inline.hpp"
#include "thread_windows.inline.hpp"
#include "runtime/thread.inline.hpp"
// For Forte Analyzer AsyncGetCallTrace profiling support - thread is
// currently interrupted by SIGPROF

View File

@ -492,6 +492,26 @@ void CodeBuffer::compute_final_layout(CodeBuffer* dest) const {
dest->verify_section_allocation();
}
// Anonymous classes need mirror to keep the metadata alive but
// for regular classes, the class_loader is sufficient.
static void append_oop_references(GrowableArray<oop>* oops, Klass* k) {
if (k->oop_is_instance()) {
InstanceKlass* ik = InstanceKlass::cast(k);
if (ik->is_anonymous()) {
oop o = ik->java_mirror();
assert (o != NULL, "should have a mirror");
if (!oops->contains(o)) {
oops->append(o);
}
return; // only need the mirror
}
}
oop cl = k->class_loader();
if (cl != NULL && !oops->contains(cl)) {
oops->append(cl);
}
}
void CodeBuffer::finalize_oop_references(methodHandle mh) {
No_Safepoint_Verifier nsv;
@ -509,7 +529,6 @@ void CodeBuffer::finalize_oop_references(methodHandle mh) {
if (md->metadata_is_immediate()) {
Metadata* m = md->metadata_value();
if (oop_recorder()->is_real(m)) {
oop o = NULL;
if (m->is_methodData()) {
m = ((MethodData*)m)->method();
}
@ -517,16 +536,13 @@ void CodeBuffer::finalize_oop_references(methodHandle mh) {
m = ((Method*)m)->method_holder();
}
if (m->is_klass()) {
o = ((Klass*)m)->class_loader();
append_oop_references(&oops, (Klass*)m);
} else {
// XXX This will currently occur for MDO which don't
// have a backpointer. This has to be fixed later.
m->print();
ShouldNotReachHere();
}
if (o != NULL && oops.find(o) == -1) {
oops.append(o);
}
}
}
}
@ -537,7 +553,6 @@ void CodeBuffer::finalize_oop_references(methodHandle mh) {
for (int i = 0; i < oop_recorder()->metadata_count(); i++) {
Metadata* m = oop_recorder()->metadata_at(i);
if (oop_recorder()->is_real(m)) {
oop o = NULL;
if (m->is_methodData()) {
m = ((MethodData*)m)->method();
}
@ -545,24 +560,18 @@ void CodeBuffer::finalize_oop_references(methodHandle mh) {
m = ((Method*)m)->method_holder();
}
if (m->is_klass()) {
o = ((Klass*)m)->class_loader();
append_oop_references(&oops, (Klass*)m);
} else {
m->print();
ShouldNotReachHere();
}
if (o != NULL && oops.find(o) == -1) {
oops.append(o);
}
}
}
}
// Add the class loader of Method* for the nmethod itself
oop cl = mh->method_holder()->class_loader();
if (cl != NULL) {
oops.append(cl);
}
append_oop_references(&oops, mh->method_holder());
// Add any oops that we've found
Thread* thread = Thread::current();

View File

@ -31,7 +31,7 @@
#include "memory/resourceArea.hpp"
#include "utilities/copy.hpp"
#ifdef ASSERT
#ifndef PRODUCT
// ciReplay
@ -939,4 +939,4 @@ bool ciReplay::is_loaded(Method* method) {
ciMethodRecord* rec = replay_state->find_ciMethodRecord(method);
return rec != NULL;
}
#endif
#endif // PRODUCT

View File

@ -32,7 +32,7 @@
class ciReplay {
CI_PACKAGE_ACCESS
#ifdef ASSERT
#ifndef PRODUCT
private:
static int replay_impl(TRAPS);

View File

@ -2184,7 +2184,7 @@ methodHandle ClassFileParser::parse_method(ClassLoaderData* loader_data,
Method* m = Method::allocate(
loader_data, code_length, access_flags, linenumber_table_length,
total_lvt_length, exception_table_length, checked_exceptions_length,
ConstMethod::NORMAL, CHECK_(nullHandle));
generic_signature_index, ConstMethod::NORMAL, CHECK_(nullHandle));
ClassLoadingService::add_class_method_size(m->size()*HeapWordSize);
@ -2192,7 +2192,6 @@ methodHandle ClassFileParser::parse_method(ClassLoaderData* loader_data,
m->set_constants(cp());
m->set_name_index(name_index);
m->set_signature_index(signature_index);
m->set_generic_signature_index(generic_signature_index);
#ifdef CC_INTERP
// hmm is there a gc issue here??
ResultTypeFinder rtf(cp->symbol_at(signature_index));
@ -2950,7 +2949,7 @@ static void parseAndPrintGenericSignatures(
instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
Handle class_loader,
ClassLoaderData* loader_data,
Handle protection_domain,
KlassHandle host_klass,
GrowableArray<Handle>* cp_patches,
@ -2964,7 +2963,7 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
// original class bytes.
unsigned char *cached_class_file_bytes = NULL;
jint cached_class_file_length;
ClassLoaderData* loader_data = ClassLoaderData::class_loader_data(class_loader());
Handle class_loader(THREAD, loader_data->class_loader());
bool has_default_methods = false;
ResourceMark rm(THREAD);
@ -3005,7 +3004,7 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
unsigned char* ptr = cfs->buffer();
unsigned char* end_ptr = cfs->buffer() + cfs->length();
JvmtiExport::post_class_file_load_hook(name, class_loader, protection_domain,
JvmtiExport::post_class_file_load_hook(name, class_loader(), protection_domain,
&ptr, &end_ptr,
&cached_class_file_bytes,
&cached_class_file_length);
@ -4004,8 +4003,7 @@ void ClassFileParser::set_precomputed_flags(instanceKlassHandle k) {
assert(k->size_helper() > 0, "layout_helper is initialized");
if ((!RegisterFinalizersAtInit && k->has_finalizer())
|| k->is_abstract() || k->is_interface()
|| (k->name() == vmSymbols::java_lang_Class()
&& k->class_loader_data()->is_the_null_class_loader_data())
|| (k->name() == vmSymbols::java_lang_Class() && k->class_loader() == NULL)
|| k->size_helper() >= FastAllocateSizeLimit) {
// Forbid fast-path allocation.
jint lh = Klass::instance_layout_helper(k->size_helper(), true);

View File

@ -363,16 +363,16 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC {
// "parsed_name" is updated by this method, and is the name found
// while parsing the stream.
instanceKlassHandle parseClassFile(Symbol* name,
Handle class_loader,
ClassLoaderData* loader_data,
Handle protection_domain,
TempNewSymbol& parsed_name,
bool verify,
TRAPS) {
KlassHandle no_host_klass;
return parseClassFile(name, class_loader, protection_domain, no_host_klass, NULL, parsed_name, verify, THREAD);
return parseClassFile(name, loader_data, protection_domain, no_host_klass, NULL, parsed_name, verify, THREAD);
}
instanceKlassHandle parseClassFile(Symbol* name,
Handle class_loader,
ClassLoaderData* loader_data,
Handle protection_domain,
KlassHandle host_klass,
GrowableArray<Handle>* cp_patches,

View File

@ -26,6 +26,7 @@
#include "classfile/classFileParser.hpp"
#include "classfile/classFileStream.hpp"
#include "classfile/classLoader.hpp"
#include "classfile/classLoaderData.inline.hpp"
#include "classfile/javaClasses.hpp"
#include "classfile/systemDictionary.hpp"
#include "classfile/vmSymbols.hpp"
@ -910,11 +911,11 @@ instanceKlassHandle ClassLoader::load_classfile(Symbol* h_name, TRAPS) {
// class file found, parse it
ClassFileParser parser(stream);
Handle class_loader;
ClassLoaderData* loader_data = ClassLoaderData::the_null_class_loader_data();
Handle protection_domain;
TempNewSymbol parsed_name = NULL;
instanceKlassHandle result = parser.parseClassFile(h_name,
class_loader,
loader_data,
protection_domain,
parsed_name,
false,

View File

@ -65,13 +65,19 @@
ClassLoaderData * ClassLoaderData::_the_null_class_loader_data = NULL;
ClassLoaderData::ClassLoaderData(Handle h_class_loader) : _class_loader(h_class_loader()),
_metaspace(NULL), _unloading(false), _klasses(NULL),
_claimed(0), _jmethod_ids(NULL), _handles(NULL),
_deallocate_list(NULL), _next(NULL),
_metaspace(NULL), _unloading(false), _keep_alive(false), _klasses(NULL),
_claimed(0), _jmethod_ids(NULL), _handles(NULL), _deallocate_list(NULL),
_next(NULL), _dependencies(NULL),
_metaspace_lock(new Mutex(Monitor::leaf+1, "Metaspace allocation lock", true)) {
// empty
}
void ClassLoaderData::init_dependencies(TRAPS) {
// Create empty dependencies array to add to. CMS requires this to be
// an oop so that it can track additions via card marks. We think.
_dependencies = (oop)oopFactory::new_objectArray(2, CHECK);
}
bool ClassLoaderData::claim() {
if (_claimed == 1) {
return false;
@ -86,6 +92,7 @@ void ClassLoaderData::oops_do(OopClosure* f, KlassClosure* klass_closure, bool m
}
f->do_oop(&_class_loader);
f->do_oop(&_dependencies);
_handles->oops_do(f);
if (klass_closure != NULL) {
classes_do(klass_closure);
@ -110,69 +117,99 @@ void ClassLoaderData::record_dependency(Klass* k, TRAPS) {
ClassLoaderData * const from_cld = this;
ClassLoaderData * const to_cld = k->class_loader_data();
// Records dependency between non-null class loaders only.
if (to_cld->is_the_null_class_loader_data() || from_cld->is_the_null_class_loader_data()) {
// Dependency to the null class loader data doesn't need to be recorded
// because the null class loader data never goes away.
if (to_cld->is_the_null_class_loader_data()) {
return;
}
// Check that this dependency isn't from the same or parent class_loader
oop to = to_cld->class_loader();
oop from = from_cld->class_loader();
oop to;
if (to_cld->is_anonymous()) {
// Anonymous class dependencies are through the mirror.
to = k->java_mirror();
} else {
to = to_cld->class_loader();
oop curr = from;
while (curr != NULL) {
if (curr == to) {
return; // this class loader is in the parent list, no need to add it.
// If from_cld is anonymous, even if it's class_loader is a parent of 'to'
// we still have to add it. The class_loader won't keep from_cld alive.
if (!from_cld->is_anonymous()) {
// Check that this dependency isn't from the same or parent class_loader
oop from = from_cld->class_loader();
oop curr = from;
while (curr != NULL) {
if (curr == to) {
return; // this class loader is in the parent list, no need to add it.
}
curr = java_lang_ClassLoader::parent(curr);
}
}
curr = java_lang_ClassLoader::parent(curr);
}
// It's a dependency we won't find through GC, add it. This is relatively rare
from_cld->add_dependency(to_cld, CHECK);
// Must handle over GC point.
Handle dependency(THREAD, to);
from_cld->add_dependency(dependency, CHECK);
}
bool ClassLoaderData::has_dependency(ClassLoaderData* dependency) {
oop loader = dependency->class_loader();
// Get objArrayOop out of the class_loader oop and see if this dependency
// is there. Don't safepoint! These are all oops.
// Dependency list is (oop class_loader, objArrayOop next)
objArrayOop ok = (objArrayOop)java_lang_ClassLoader::dependencies(class_loader());
void ClassLoaderData::add_dependency(Handle dependency, TRAPS) {
// Check first if this dependency is already in the list.
// Save a pointer to the last to add to under the lock.
objArrayOop ok = (objArrayOop)_dependencies;
objArrayOop last = NULL;
while (ok != NULL) {
if (ok->obj_at(0) == loader) {
return true;
last = ok;
if (ok->obj_at(0) == dependency()) {
// Don't need to add it
return;
}
ok = (objArrayOop)ok->obj_at(1);
}
return false;
}
void ClassLoaderData::add_dependency(ClassLoaderData* dependency, TRAPS) {
// Minimize the number of duplicates in the list.
if (has_dependency(dependency)) {
return;
}
// Create a new dependency node with fields for (class_loader, next)
// Create a new dependency node with fields for (class_loader or mirror, next)
objArrayOop deps = oopFactory::new_objectArray(2, CHECK);
deps->obj_at_put(0, dependency->class_loader());
deps->obj_at_put(0, dependency());
// Add this lock free, using compare and exchange, need barriers for GC
// Do the barrier first.
HeapWord* addr = java_lang_ClassLoader::dependencies_addr(class_loader());
while (true) {
oop old_dependency = java_lang_ClassLoader::dependencies(class_loader());
deps->obj_at_put(1, old_dependency);
// Must handle over more GC points
objArrayHandle new_dependency(THREAD, deps);
oop newold = oopDesc::atomic_compare_exchange_oop((oop)deps, addr, old_dependency, true);
if (newold == old_dependency) {
update_barrier_set((void*)addr, (oop)deps);
// we won the race to add this dependency
break;
}
}
// Add the dependency under lock
assert (last != NULL, "dependencies should be initialized");
objArrayHandle last_handle(THREAD, last);
locked_add_dependency(last_handle, new_dependency);
}
void ClassLoaderData::locked_add_dependency(objArrayHandle last_handle,
objArrayHandle new_dependency) {
// Have to lock and put the new dependency on the end of the dependency
// array so the card mark for CMS sees that this dependency is new.
// Can probably do this lock free with some effort.
MutexLockerEx ml(metaspace_lock(), Mutex::_no_safepoint_check_flag);
oop loader_or_mirror = new_dependency->obj_at(0);
// Since the dependencies are only added, add to the end.
objArrayOop end = last_handle();
objArrayOop last = NULL;
while (end != NULL) {
last = end;
// check again if another thread added it to the end.
if (end->obj_at(0) == loader_or_mirror) {
// Don't need to add it
return;
}
end = (objArrayOop)end->obj_at(1);
}
assert (last != NULL, "dependencies should be initialized");
// fill in the first element with the oop in new_dependency.
if (last->obj_at(0) == NULL) {
last->obj_at_put(0, new_dependency->obj_at(0));
} else {
last->obj_at_put(1, new_dependency());
}
}
void ClassLoaderDataGraph::clear_claimed_marks() {
for (ClassLoaderData* cld = _head; cld != NULL; cld = cld->next()) {
@ -187,7 +224,7 @@ void ClassLoaderData::add_class(Klass* k) {
// link the new item into the list
_klasses = k;
if (TraceClassLoaderData && k->class_loader_data() != NULL) {
if (TraceClassLoaderData && Verbose && k->class_loader_data() != NULL) {
ResourceMark rm;
tty->print_cr("[TraceClassLoaderData] Adding k: " PTR_FORMAT " %s to CLD: "
PTR_FORMAT " loader: " PTR_FORMAT " %s",
@ -195,8 +232,7 @@ void ClassLoaderData::add_class(Klass* k) {
k->external_name(),
k->class_loader_data(),
k->class_loader(),
k->class_loader() != NULL ? k->class_loader()->klass()->external_name() : "NULL"
);
loader_name());
}
}
@ -221,6 +257,38 @@ void ClassLoaderData::remove_class(Klass* scratch_class) {
ShouldNotReachHere(); // should have found this class!!
}
bool ClassLoaderData::is_anonymous() const {
Klass* k = _klasses;
return (_keep_alive || (k != NULL && k->oop_is_instance() &&
InstanceKlass::cast(k)->is_anonymous()));
}
void ClassLoaderData::unload() {
_unloading = true;
if (TraceClassLoaderData) {
ResourceMark rm;
tty->print("[ClassLoaderData: unload loader data "PTR_FORMAT, this);
tty->print(" for instance "PTR_FORMAT" of %s", class_loader(),
loader_name());
if (is_anonymous()) {
tty->print(" for anonymous class "PTR_FORMAT " ", _klasses);
}
tty->print_cr("]");
}
}
bool ClassLoaderData::is_alive(BoolObjectClosure* is_alive_closure) const {
bool alive =
is_anonymous() ?
is_alive_closure->do_object_b(_klasses->java_mirror()) :
class_loader() == NULL || is_alive_closure->do_object_b(class_loader());
assert(!alive || claimed(), "must be claimed");
return alive;
}
ClassLoaderData::~ClassLoaderData() {
Metaspace *m = _metaspace;
if (m != NULL) {
@ -263,8 +331,8 @@ Metaspace* ClassLoaderData::metaspace_non_null() {
if (_metaspace != NULL) {
return _metaspace;
}
if (class_loader() == NULL) {
assert(this == the_null_class_loader_data(), "Must be");
if (this == the_null_class_loader_data()) {
assert (class_loader() == NULL, "Must be");
size_t word_size = Metaspace::first_chunk_word_size();
set_metaspace(new Metaspace(_metaspace_lock, word_size));
} else {
@ -325,12 +393,19 @@ void ClassLoaderData::free_deallocate_list() {
}
}
#ifndef PRODUCT
void ClassLoaderData::print_loader(ClassLoaderData *loader_data, outputStream* out) {
oop class_loader = loader_data->class_loader();
out->print("%s", SystemDictionary::loader_name(class_loader));
// These anonymous class loaders are to contain classes used for JSR292
ClassLoaderData* ClassLoaderData::anonymous_class_loader_data(oop loader, TRAPS) {
// Add a new class loader data to the graph.
ClassLoaderData* cld = ClassLoaderDataGraph::add(NULL, loader, CHECK_NULL);
return cld;
}
const char* ClassLoaderData::loader_name() {
// Handles null class loader
return SystemDictionary::loader_name(class_loader());
}
#ifndef PRODUCT
// Define to dump klasses
#undef CLD_DUMP_KLASSES
@ -338,8 +413,7 @@ void ClassLoaderData::dump(outputStream * const out) {
ResourceMark rm;
out->print("ClassLoaderData CLD: "PTR_FORMAT", loader: "PTR_FORMAT", loader_klass: "PTR_FORMAT" %s {",
this, class_loader(),
class_loader() != NULL ? class_loader()->klass() : NULL,
class_loader() != NULL ? class_loader()->klass()->external_name() : "NULL");
class_loader() != NULL ? class_loader()->klass() : NULL, loader_name());
if (claimed()) out->print(" claimed ");
if (is_unloading()) out->print(" unloading ");
out->print(" handles " INTPTR_FORMAT, handles());
@ -373,8 +447,8 @@ void ClassLoaderData::dump(outputStream * const out) {
void ClassLoaderData::verify() {
oop cl = class_loader();
guarantee(this == class_loader_data(cl), "Must be the same");
guarantee(cl != NULL || this == ClassLoaderData::the_null_class_loader_data(), "must be");
guarantee(this == class_loader_data(cl) || is_anonymous(), "Must be the same");
guarantee(cl != NULL || this == ClassLoaderData::the_null_class_loader_data() || is_anonymous(), "must be");
// Verify the integrity of the allocated space.
if (metaspace_or_null() != NULL) {
@ -387,6 +461,7 @@ void ClassLoaderData::verify() {
}
}
// GC root of class loader data created.
ClassLoaderData* ClassLoaderDataGraph::_head = NULL;
ClassLoaderData* ClassLoaderDataGraph::_unloading = NULL;
@ -395,19 +470,25 @@ ClassLoaderData* ClassLoaderDataGraph::_saved_head = NULL;
// Add a new class loader data node to the list. Assign the newly created
// ClassLoaderData into the java/lang/ClassLoader object as a hidden field
ClassLoaderData* ClassLoaderDataGraph::add(ClassLoaderData** cld_addr, Handle loader_data) {
ClassLoaderData* ClassLoaderDataGraph::add(ClassLoaderData** cld_addr, Handle loader, TRAPS) {
// Not assigned a class loader data yet.
// Create one.
ClassLoaderData* *list_head = &_head;
ClassLoaderData* next = _head;
ClassLoaderData* cld = new ClassLoaderData(loader_data);
ClassLoaderData* cld = new ClassLoaderData(loader);
// First, Atomically set it.
ClassLoaderData* old = (ClassLoaderData*) Atomic::cmpxchg_ptr(cld, cld_addr, NULL);
if (old != NULL) {
delete cld;
// Returns the data.
return old;
if (cld_addr != NULL) {
// First, Atomically set it
ClassLoaderData* old = (ClassLoaderData*) Atomic::cmpxchg_ptr(cld, cld_addr, NULL);
if (old != NULL) {
delete cld;
// Returns the data.
return old;
}
} else {
// Disallow unloading for this CLD during initialization if there is no
// class_loader oop to link this to.
cld->set_keep_alive(true);
}
// We won the race, and therefore the task of adding the data to the list of
@ -417,16 +498,22 @@ ClassLoaderData* ClassLoaderDataGraph::add(ClassLoaderData** cld_addr, Handle lo
ClassLoaderData* exchanged = (ClassLoaderData*)Atomic::cmpxchg_ptr(cld, list_head, next);
if (exchanged == next) {
if (TraceClassLoaderData) {
ResourceMark rm;
tty->print("[ClassLoaderData: ");
tty->print("create class loader data "PTR_FORMAT, cld);
tty->print(" for instance "PTR_FORMAT" of ", cld->class_loader());
loader_data->klass()->name()->print_symbol_on(tty);
tty->print(" for instance "PTR_FORMAT" of %s", cld->class_loader(),
cld->loader_name());
tty->print_cr("]");
}
// Create dependencies after the CLD is added to the list. Otherwise,
// the GC GC will not find the CLD and the _class_loader field will
// not be updated.
cld->init_dependencies(CHECK_NULL);
return cld;
}
next = exchanged;
} while (true);
}
void ClassLoaderDataGraph::oops_do(OopClosure* f, KlassClosure* klass_closure, bool must_claim) {
@ -435,9 +522,19 @@ void ClassLoaderDataGraph::oops_do(OopClosure* f, KlassClosure* klass_closure, b
}
}
void ClassLoaderDataGraph::keep_alive_oops_do(OopClosure* f, KlassClosure* klass_closure, bool must_claim) {
for (ClassLoaderData* cld = _head; cld != NULL; cld = cld->next()) {
if (cld->keep_alive()) {
cld->oops_do(f, klass_closure, must_claim);
}
}
}
void ClassLoaderDataGraph::always_strong_oops_do(OopClosure* f, KlassClosure* klass_closure, bool must_claim) {
if (ClassUnloading) {
ClassLoaderData::the_null_class_loader_data()->oops_do(f, klass_closure, must_claim);
// keep any special CLDs alive.
ClassLoaderDataGraph::keep_alive_oops_do(f, klass_closure, must_claim);
} else {
ClassLoaderDataGraph::oops_do(f, klass_closure, must_claim);
}
@ -516,9 +613,10 @@ bool ClassLoaderDataGraph::contains_loader_data(ClassLoaderData* loader_data) {
}
#endif // PRODUCT
// Move class loader data from main list to the unloaded list for unloading
// and deallocation later.
bool ClassLoaderDataGraph::do_unloading(BoolObjectClosure* is_alive) {
bool ClassLoaderDataGraph::do_unloading(BoolObjectClosure* is_alive_closure) {
ClassLoaderData* data = _head;
ClassLoaderData* prev = NULL;
bool seen_dead_loader = false;
@ -527,8 +625,7 @@ bool ClassLoaderDataGraph::do_unloading(BoolObjectClosure* is_alive) {
bool has_redefined_a_class = JvmtiExport::has_redefined_a_class();
MetadataOnStackMark md_on_stack;
while (data != NULL) {
if (data->class_loader() == NULL || is_alive->do_object_b(data->class_loader())) {
assert(data->claimed(), "class loader data must have been claimed");
if (data->keep_alive() || data->is_alive(is_alive_closure)) {
if (has_redefined_a_class) {
data->classes_do(InstanceKlass::purge_previous_versions);
}
@ -539,13 +636,7 @@ bool ClassLoaderDataGraph::do_unloading(BoolObjectClosure* is_alive) {
}
seen_dead_loader = true;
ClassLoaderData* dead = data;
dead->mark_for_unload();
if (TraceClassLoaderData) {
tty->print("[ClassLoaderData: unload loader data "PTR_FORMAT, dead);
tty->print(" for instance "PTR_FORMAT" of ", dead->class_loader());
dead->class_loader()->klass()->name()->print_symbol_on(tty);
tty->print_cr("]");
}
dead->unload();
data = data->next();
// Remove from loader list.
if (prev != NULL) {

View File

@ -62,13 +62,14 @@ class ClassLoaderDataGraph : public AllStatic {
// CMS support.
static ClassLoaderData* _saved_head;
static ClassLoaderData* add(ClassLoaderData** loader_data_addr, Handle class_loader);
static ClassLoaderData* add(ClassLoaderData** loader_data_addr, Handle class_loader, TRAPS);
public:
static ClassLoaderData* find_or_create(Handle class_loader);
static ClassLoaderData* find_or_create(Handle class_loader, TRAPS);
static void purge();
static void clear_claimed_marks();
static void oops_do(OopClosure* f, KlassClosure* klass_closure, bool must_claim);
static void always_strong_oops_do(OopClosure* blk, KlassClosure* klass_closure, bool must_claim);
static void keep_alive_oops_do(OopClosure* blk, KlassClosure* klass_closure, bool must_claim);
static void classes_do(KlassClosure* klass_closure);
static bool do_unloading(BoolObjectClosure* is_alive);
@ -101,10 +102,13 @@ class ClassLoaderData : public CHeapObj<mtClass> {
oop _class_loader; // oop used to uniquely identify a class loader
// class loader or a canonical class path
oop _dependencies; // oop to hold dependencies from this class loader
// data to others.
Metaspace * _metaspace; // Meta-space where meta-data defined by the
// classes in the class loader are allocated.
Mutex* _metaspace_lock; // Locks the metaspace for allocations and setup.
bool _unloading; // true if this class loader goes away
bool _keep_alive; // if this CLD can be unloaded for anonymous loaders
volatile int _claimed; // true if claimed, for example during GC traces.
// To avoid applying oop closure more than once.
// Has to be an int because we cas it.
@ -129,8 +133,8 @@ class ClassLoaderData : public CHeapObj<mtClass> {
static Metaspace* _ro_metaspace;
static Metaspace* _rw_metaspace;
bool has_dependency(ClassLoaderData* cld);
void add_dependency(ClassLoaderData* to_loader_data, TRAPS);
void add_dependency(Handle dependency, TRAPS);
void locked_add_dependency(objArrayHandle last, objArrayHandle new_dependency);
void set_next(ClassLoaderData* next) { _next = next; }
ClassLoaderData* next() const { return _next; }
@ -150,7 +154,9 @@ class ClassLoaderData : public CHeapObj<mtClass> {
bool claimed() const { return _claimed == 1; }
bool claim();
void mark_for_unload() { _unloading = true; }
void unload();
bool keep_alive() const { return _keep_alive; }
bool is_alive(BoolObjectClosure* is_alive_closure) const;
void classes_do(void f(InstanceKlass*));
@ -168,6 +174,8 @@ class ClassLoaderData : public CHeapObj<mtClass> {
return _the_null_class_loader_data;
}
bool is_anonymous() const;
static void init_null_class_loader_data() {
assert(_the_null_class_loader_data == NULL, "cannot initialize twice");
assert(ClassLoaderDataGraph::_head == NULL, "cannot initialize twice");
@ -194,6 +202,9 @@ class ClassLoaderData : public CHeapObj<mtClass> {
assert(!(is_the_null_class_loader_data() && _unloading), "The null class loader can never be unloaded");
return _unloading;
}
// Anonymous class loader data doesn't have anything to keep them from
// being unloaded during parsing the anonymous class.
void set_keep_alive(bool value) { _keep_alive = value; }
unsigned int identity_hash() {
return _class_loader == NULL ? 0 : _class_loader->identity_hash();
@ -211,15 +222,18 @@ class ClassLoaderData : public CHeapObj<mtClass> {
void print_value_on(outputStream* out) const PRODUCT_RETURN;
void dump(outputStream * const out) PRODUCT_RETURN;
void verify();
const char* loader_name();
jobject add_handle(Handle h);
void add_class(Klass* k);
void remove_class(Klass* k);
void record_dependency(Klass* to, TRAPS);
void init_dependencies(TRAPS);
void add_to_deallocate_list(Metadata* m);
static ClassLoaderData* class_loader_data(oop loader);
static ClassLoaderData* anonymous_class_loader_data(oop loader, TRAPS);
static void print_loader(ClassLoaderData *loader_data, outputStream *out);
// CDS support

View File

@ -33,7 +33,7 @@ inline ClassLoaderData* ClassLoaderData::class_loader_data(oop loader) {
}
inline ClassLoaderData *ClassLoaderDataGraph::find_or_create(Handle loader) {
inline ClassLoaderData *ClassLoaderDataGraph::find_or_create(Handle loader, TRAPS) {
assert(loader() != NULL,"Must be a class loader");
// Gets the class loader data out of the java/lang/ClassLoader object, if non-null
// it's already in the loader_data, so no need to add
@ -42,5 +42,5 @@ inline ClassLoaderData *ClassLoaderDataGraph::find_or_create(Handle loader) {
if (loader_data_id) {
return loader_data_id;
}
return ClassLoaderDataGraph::add(loader_data_addr, loader);
return ClassLoaderDataGraph::add(loader_data_addr, loader, THREAD);
}

View File

@ -1148,12 +1148,11 @@ static Method* new_method(
int code_length = bytecodes->length();
Method* m = Method::allocate(cp->pool_holder()->class_loader_data(),
code_length, flags, 0, 0, 0, 0, mt, CHECK_NULL);
code_length, flags, 0, 0, 0, 0, 0, mt, CHECK_NULL);
m->set_constants(NULL); // This will get filled in later
m->set_name_index(cp->utf8(name));
m->set_signature_index(cp->utf8(sig));
m->set_generic_signature_index(0);
#ifdef CC_INTERP
ResultTypeFinder rtf(sig);
m->set_result_index(rtf.type());

View File

@ -580,7 +580,7 @@ void Dictionary::verify() {
// class loader must be present; a null class loader is the
// boostrap loader
guarantee(loader_data != NULL || DumpSharedSpaces ||
loader_data->is_the_null_class_loader_data() ||
loader_data->class_loader() == NULL ||
loader_data->class_loader()->is_instance(),
"checking type of class_loader");
e->verify();

View File

@ -47,20 +47,9 @@
#include "runtime/java.hpp"
#include "runtime/javaCalls.hpp"
#include "runtime/safepoint.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/vframe.hpp"
#include "utilities/preserveException.hpp"
#ifdef TARGET_OS_FAMILY_linux
# include "thread_linux.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_solaris
# include "thread_solaris.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_windows
# include "thread_windows.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_bsd
# include "thread_bsd.inline.hpp"
#endif
#define INJECTED_FIELD_COMPUTE_OFFSET(klass, name, signature, may_be_java) \
klass::_##name##_offset = JavaClasses::compute_injected_offset(JavaClasses::klass##_##name##_enum);
@ -2555,8 +2544,8 @@ Metadata* java_lang_invoke_MemberName::vmtarget(oop mname) {
void java_lang_invoke_MemberName::set_vmtarget(oop mname, Metadata* ref) {
assert(is_instance(mname), "wrong type");
#ifdef ASSERT
// check the type of the vmtarget
oop dependency = NULL;
if (ref != NULL) {
switch (flags(mname) & (MN_IS_METHOD |
MN_IS_CONSTRUCTOR |
@ -2564,28 +2553,21 @@ void java_lang_invoke_MemberName::set_vmtarget(oop mname, Metadata* ref) {
case MN_IS_METHOD:
case MN_IS_CONSTRUCTOR:
assert(ref->is_method(), "should be a method");
dependency = ((Method*)ref)->method_holder()->java_mirror();
break;
case MN_IS_FIELD:
assert(ref->is_klass(), "should be a class");
dependency = ((Klass*)ref)->java_mirror();
break;
default:
ShouldNotReachHere();
}
}
#endif //ASSERT
mname->address_field_put(_vmtarget_offset, (address)ref);
oop loader = NULL;
if (ref != NULL) {
if (ref->is_klass()) {
loader = ((Klass*)ref)->class_loader();
} else if (ref->is_method()) {
loader = ((Method*)ref)->method_holder()->class_loader();
} else {
ShouldNotReachHere();
}
}
// Add a reference to the loader to ensure the metadata is kept alive
mname->obj_field_put(_vmloader_offset, loader);
// Add a reference to the loader (actually mirror because anonymous classes will not have
// distinct loaders) to ensure the metadata is kept alive
// This mirror may be different than the one in clazz field.
mname->obj_field_put(_vmloader_offset, dependency);
}
intptr_t java_lang_invoke_MemberName::vmindex(oop mname) {
@ -2750,7 +2732,6 @@ oop java_security_AccessControlContext::create(objArrayHandle context, bool isPr
bool java_lang_ClassLoader::offsets_computed = false;
int java_lang_ClassLoader::_loader_data_offset = -1;
int java_lang_ClassLoader::_dependencies_offset = -1;
int java_lang_ClassLoader::parallelCapable_offset = -1;
ClassLoaderData** java_lang_ClassLoader::loader_data_addr(oop loader) {
@ -2762,18 +2743,6 @@ ClassLoaderData* java_lang_ClassLoader::loader_data(oop loader) {
return *java_lang_ClassLoader::loader_data_addr(loader);
}
oop java_lang_ClassLoader::dependencies(oop loader) {
return loader->obj_field(_dependencies_offset);
}
HeapWord* java_lang_ClassLoader::dependencies_addr(oop loader) {
if (UseCompressedOops) {
return (HeapWord*)loader->obj_field_addr<narrowOop>(_dependencies_offset);
} else {
return (HeapWord*)loader->obj_field_addr<oop>(_dependencies_offset);
}
}
void java_lang_ClassLoader::compute_offsets() {
assert(!offsets_computed, "offsets should be initialized only once");
offsets_computed = true;

View File

@ -1125,8 +1125,7 @@ class java_security_AccessControlContext: AllStatic {
// Interface to java.lang.ClassLoader objects
#define CLASSLOADER_INJECTED_FIELDS(macro) \
macro(java_lang_ClassLoader, loader_data, intptr_signature, false) \
macro(java_lang_ClassLoader, dependencies, object_signature, false)
macro(java_lang_ClassLoader, loader_data, intptr_signature, false)
class java_lang_ClassLoader : AllStatic {
private:
@ -1135,7 +1134,6 @@ class java_lang_ClassLoader : AllStatic {
hc_parent_offset = 0
};
static int _loader_data_offset;
static int _dependencies_offset;
static bool offsets_computed;
static int parent_offset;
static int parallelCapable_offset;
@ -1146,9 +1144,6 @@ class java_lang_ClassLoader : AllStatic {
static ClassLoaderData** loader_data_addr(oop loader);
static ClassLoaderData* loader_data(oop loader);
static oop dependencies(oop loader);
static HeapWord* dependencies_addr(oop loader);
static oop parent(oop loader);
static bool isAncestor(oop loader, oop cl);

View File

@ -118,7 +118,7 @@ void LoaderConstraintTable::purge_loader_constraints() {
probe->name()->as_C_string());
for (int i = 0; i < probe->num_loaders(); i++) {
tty->print_cr("[ [%d]: %s", i,
SystemDictionary::loader_name(probe->loader_data(i)));
probe->loader_data(i)->loader_name());
}
}
}
@ -129,7 +129,7 @@ void LoaderConstraintTable::purge_loader_constraints() {
if (TraceLoaderConstraints) {
ResourceMark rm;
tty->print_cr("[Purging loader %s from constraint for name %s",
SystemDictionary::loader_name(probe->loader_data(n)),
probe->loader_data(n)->loader_name(),
probe->name()->as_C_string()
);
}
@ -145,7 +145,7 @@ void LoaderConstraintTable::purge_loader_constraints() {
tty->print_cr("[New loader list:");
for (int i = 0; i < probe->num_loaders(); i++) {
tty->print_cr("[ [%d]: %s", i,
SystemDictionary::loader_name(probe->loader_data(i)));
probe->loader_data(i)->loader_name());
}
}
@ -400,7 +400,7 @@ void LoaderConstraintTable::merge_loader_constraints(
for (int i = 0; i < p1->num_loaders(); i++) {
tty->print_cr("[ [%d]: %s", i,
SystemDictionary::loader_name(p1->loader_data(i)));
p1->loader_data(i)->loader_name());
}
if (p1->klass() == NULL) {
tty->print_cr("[... and setting class object]");

View File

@ -106,9 +106,9 @@ void SystemDictionary::compute_java_system_loader(TRAPS) {
}
ClassLoaderData* SystemDictionary::register_loader(Handle class_loader) {
ClassLoaderData* SystemDictionary::register_loader(Handle class_loader, TRAPS) {
if (class_loader() == NULL) return ClassLoaderData::the_null_class_loader_data();
return ClassLoaderDataGraph::find_or_create(class_loader);
return ClassLoaderDataGraph::find_or_create(class_loader, CHECK_NULL);
}
// ----------------------------------------------------------------------------
@ -591,7 +591,7 @@ Klass* SystemDictionary::resolve_instance_class_or_null(Symbol* name, Handle cla
// UseNewReflection
// Fix for 4474172; see evaluation for more details
class_loader = Handle(THREAD, java_lang_ClassLoader::non_reflection_class_loader(class_loader()));
ClassLoaderData *loader_data = register_loader(class_loader);
ClassLoaderData *loader_data = register_loader(class_loader, CHECK_NULL);
// Do lookup to see if class already exist and the protection domain
// has the right access
@ -888,7 +888,7 @@ Klass* SystemDictionary::find(Symbol* class_name,
// of the call to resolve_instance_class_or_null().
// See evaluation 6790209 and 4474172 for more details.
class_loader = Handle(THREAD, java_lang_ClassLoader::non_reflection_class_loader(class_loader()));
ClassLoaderData* loader_data = register_loader(class_loader);
ClassLoaderData* loader_data = register_loader(class_loader, CHECK_NULL);
unsigned int d_hash = dictionary()->compute_hash(class_name, loader_data);
int d_index = dictionary()->hash_to_index(d_hash);
@ -948,6 +948,18 @@ Klass* SystemDictionary::parse_stream(Symbol* class_name,
TRAPS) {
TempNewSymbol parsed_name = NULL;
ClassLoaderData* loader_data;
if (host_klass.not_null()) {
// Create a new CLD for anonymous class, that uses the same class loader
// as the host_klass
assert(EnableInvokeDynamic, "");
guarantee(host_klass->class_loader() == class_loader(), "should be the same");
loader_data = ClassLoaderData::anonymous_class_loader_data(class_loader(), CHECK_NULL);
loader_data->record_dependency(host_klass(), CHECK_NULL);
} else {
loader_data = ClassLoaderData::class_loader_data(class_loader());
}
// Parse the stream. Note that we do this even though this klass might
// already be present in the SystemDictionary, otherwise we would not
// throw potential ClassFormatErrors.
@ -959,7 +971,7 @@ Klass* SystemDictionary::parse_stream(Symbol* class_name,
// java.lang.Object through resolve_or_fail, not this path.
instanceKlassHandle k = ClassFileParser(st).parseClassFile(class_name,
class_loader,
loader_data,
protection_domain,
host_klass,
cp_patches,
@ -973,8 +985,6 @@ Klass* SystemDictionary::parse_stream(Symbol* class_name,
// Parsed name could be null if we threw an error before we got far
// enough along to parse it -- in that case, there is nothing to clean up.
if (parsed_name != NULL) {
ClassLoaderData* loader_data = class_loader_data(class_loader);
unsigned int p_hash = placeholders()->compute_hash(parsed_name,
loader_data);
int p_index = placeholders()->hash_to_index(p_hash);
@ -987,9 +997,8 @@ Klass* SystemDictionary::parse_stream(Symbol* class_name,
if (host_klass.not_null() && k.not_null()) {
assert(EnableInvokeDynamic, "");
// If it's anonymous, initialize it now, since nobody else will.
k->class_loader_data()->record_dependency(host_klass(), CHECK_NULL);
k->set_host_klass(host_klass());
// If it's anonymous, initialize it now, since nobody else will.
{
MutexLocker mu_r(Compile_lock, THREAD);
@ -1002,11 +1011,11 @@ Klass* SystemDictionary::parse_stream(Symbol* class_name,
}
// Rewrite and patch constant pool here.
k->link_class(THREAD);
k->link_class(CHECK_NULL);
if (cp_patches != NULL) {
k->constants()->patch_resolved_references(cp_patches);
}
k->eager_initialize(THREAD);
k->eager_initialize(CHECK_NULL);
// notify jvmti
if (JvmtiExport::should_post_class_load()) {
@ -1039,7 +1048,7 @@ Klass* SystemDictionary::resolve_from_stream(Symbol* class_name,
DoObjectLock = false;
}
ClassLoaderData* loader_data = register_loader(class_loader);
ClassLoaderData* loader_data = register_loader(class_loader, CHECK_NULL);
// Make sure we are synchronized on the class loader before we proceed
Handle lockObject = compute_loader_lock_object(class_loader, THREAD);
@ -1059,7 +1068,7 @@ Klass* SystemDictionary::resolve_from_stream(Symbol* class_name,
// java.lang.Object through resolve_or_fail, not this path.
instanceKlassHandle k = ClassFileParser(st).parseClassFile(class_name,
class_loader,
loader_data,
protection_domain,
parsed_name,
verify,
@ -2343,6 +2352,7 @@ methodHandle SystemDictionary::find_method_handle_intrinsic(vmIntrinsics::ID iid
// Helper for unpacking the return value from linkMethod and linkCallSite.
static methodHandle unpack_method_and_appendix(Handle mname,
KlassHandle accessing_klass,
objArrayHandle appendix_box,
Handle* appendix_result,
TRAPS) {
@ -2361,6 +2371,12 @@ static methodHandle unpack_method_and_appendix(Handle mname,
#endif //PRODUCT
}
(*appendix_result) = Handle(THREAD, appendix);
// the target is stored in the cpCache and if a reference to this
// MethodName is dropped we need a way to make sure the
// class_loader containing this method is kept alive.
// FIXME: the appendix might also preserve this dependency.
ClassLoaderData* this_key = InstanceKlass::cast(accessing_klass())->class_loader_data();
this_key->record_dependency(m->method_holder(), CHECK_NULL); // Can throw OOM
return methodHandle(THREAD, m);
}
}
@ -2405,7 +2421,7 @@ methodHandle SystemDictionary::find_method_handle_invoker(Symbol* name,
&args, CHECK_(empty));
Handle mname(THREAD, (oop) result.get_jobject());
(*method_type_result) = method_type;
return unpack_method_and_appendix(mname, appendix_box, appendix_result, THREAD);
return unpack_method_and_appendix(mname, accessing_klass, appendix_box, appendix_result, THREAD);
}
@ -2596,7 +2612,7 @@ methodHandle SystemDictionary::find_dynamic_call_site_invoker(KlassHandle caller
&args, CHECK_(empty));
Handle mname(THREAD, (oop) result.get_jobject());
(*method_type_result) = method_type;
return unpack_method_and_appendix(mname, appendix_box, appendix_result, THREAD);
return unpack_method_and_appendix(mname, caller, appendix_box, appendix_result, THREAD);
}
// Since the identity hash code for symbols changes when the symbols are

View File

@ -471,7 +471,7 @@ public:
static void compute_java_system_loader(TRAPS);
// Register a new class loader
static ClassLoaderData* register_loader(Handle class_loader);
static ClassLoaderData* register_loader(Handle class_loader, TRAPS);
private:
// Mirrors for primitive classes (created eagerly)
static oop check_mirror(oop m) {
@ -531,7 +531,7 @@ public:
InstanceKlass::cast((loader)->klass())->name()->as_C_string() );
}
static const char* loader_name(ClassLoaderData* loader_data) {
return (loader_data->is_the_null_class_loader_data() ? "<bootloader>" :
return (loader_data->class_loader() == NULL ? "<bootloader>" :
InstanceKlass::cast((loader_data->class_loader())->klass())->name()->as_C_string() );
}

View File

@ -269,10 +269,12 @@ void CompileTask::initialize(int compile_id,
const char* comment,
bool is_blocking) {
assert(!_lock->is_locked(), "bad locking");
InstanceKlass* holder = method->method_holder();
_compile_id = compile_id;
_method = method();
_method_loader = JNIHandles::make_global(_method->method_holder()->class_loader());
_method_holder = JNIHandles::make_global(
holder->is_anonymous() ? holder->java_mirror(): holder->class_loader());
_osr_bci = osr_bci;
_is_blocking = is_blocking;
_comp_level = comp_level;
@ -283,7 +285,7 @@ void CompileTask::initialize(int compile_id,
_code_handle = NULL;
_hot_method = NULL;
_hot_method_loader = NULL;
_hot_method_holder = NULL;
_hot_count = hot_count;
_time_queued = 0; // tidy
_comment = comment;
@ -295,8 +297,12 @@ void CompileTask::initialize(int compile_id,
_hot_method = _method;
} else {
_hot_method = hot_method();
// only add loader or mirror if different from _method_holder
InstanceKlass* hot_holder = hot_method->method_holder();
_hot_method_holder = JNIHandles::make_global(
hot_holder->is_anonymous() ? hot_holder->java_mirror() :
hot_holder->class_loader());
}
_hot_method_loader = JNIHandles::make_global(_hot_method->method_holder()->class_loader());
}
}
@ -321,8 +327,8 @@ void CompileTask::set_code(nmethod* nm) {
void CompileTask::free() {
set_code(NULL);
assert(!_lock->is_locked(), "Should not be locked when freed");
JNIHandles::destroy_global(_method_loader);
JNIHandles::destroy_global(_hot_method_loader);
JNIHandles::destroy_global(_method_holder);
JNIHandles::destroy_global(_hot_method_holder);
}

View File

@ -43,7 +43,7 @@ class CompileTask : public CHeapObj<mtCompiler> {
Monitor* _lock;
uint _compile_id;
Method* _method;
jobject _method_loader;
jobject _method_holder;
int _osr_bci;
bool _is_complete;
bool _is_success;
@ -56,7 +56,7 @@ class CompileTask : public CHeapObj<mtCompiler> {
// Fields used for logging why the compilation was initiated:
jlong _time_queued; // in units of os::elapsed_counter()
Method* _hot_method; // which method actually triggered this task
jobject _hot_method_loader;
jobject _hot_method_holder;
int _hot_count; // information about its invocation counter
const char* _comment; // more info about the task

View File

@ -40,19 +40,8 @@
#include "runtime/globals_extension.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/java.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/vmThread.hpp"
#ifdef TARGET_OS_FAMILY_linux
# include "thread_linux.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_solaris
# include "thread_solaris.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_windows
# include "thread_windows.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_bsd
# include "thread_bsd.inline.hpp"
#endif
//
// ConcurrentMarkSweepPolicy methods

View File

@ -27,18 +27,7 @@
#include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp"
#include "gc_implementation/shared/concurrentGCThread.hpp"
#ifdef TARGET_OS_FAMILY_linux
# include "thread_linux.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_solaris
# include "thread_solaris.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_windows
# include "thread_windows.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_bsd
# include "thread_bsd.inline.hpp"
#endif
#include "runtime/thread.inline.hpp"
class ConcurrentMarkSweepGeneration;
class CMSCollector;

View File

@ -65,8 +65,7 @@ typedef BinaryTreeDictionary<FreeChunk, AdaptiveFreeList> AFLBinaryTreeDictionar
declare_toplevel_type(AFLBinaryTreeDictionary*) \
declare_toplevel_type(LinearAllocBlock) \
declare_toplevel_type(FreeBlockDictionary<FreeChunk>) \
declare_type(AFLBinaryTreeDictionary, FreeBlockDictionary<FreeChunk>) \
declare_type(AFLBinaryTreeDictionary, FreeBlockDictionary<FreeChunk>) \
declare_type(AFLBinaryTreeDictionary, FreeBlockDictionary<FreeChunk>)
#define VM_INT_CONSTANTS_CMS(declare_constant) \
declare_constant(Generation::ConcurrentMarkSweep) \

View File

@ -28,20 +28,8 @@
#include "runtime/atomic.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/safepoint.hpp"
#include "runtime/thread.hpp"
#include "runtime/thread.inline.hpp"
#include "utilities/workgroup.hpp"
#ifdef TARGET_OS_FAMILY_linux
# include "thread_linux.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_solaris
# include "thread_solaris.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_windows
# include "thread_windows.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_bsd
# include "thread_bsd.inline.hpp"
#endif
bool DirtyCardQueue::apply_closure(CardTableEntryClosure* cl,
bool consume,

View File

@ -302,16 +302,28 @@ void G1BlockOffsetArray::check_all_cards(size_t start_card, size_t end_card) con
for (size_t c = start_card + 1; c <= end_card; c++ /* yeah! */) {
u_char entry = _array->offset_array(c);
if (c - start_card > BlockOffsetArray::power_to_cards_back(1)) {
guarantee(entry > N_words, "Should be in logarithmic region");
guarantee(entry > N_words,
err_msg("Should be in logarithmic region - "
"entry: " UINT32_FORMAT ", "
"_array->offset_array(c): " UINT32_FORMAT ", "
"N_words: " UINT32_FORMAT,
entry, _array->offset_array(c), N_words));
}
size_t backskip = BlockOffsetArray::entry_to_cards_back(entry);
size_t landing_card = c - backskip;
guarantee(landing_card >= (start_card - 1), "Inv");
if (landing_card >= start_card) {
guarantee(_array->offset_array(landing_card) <= entry, "monotonicity");
guarantee(_array->offset_array(landing_card) <= entry,
err_msg("Monotonicity - landing_card offset: " UINT32_FORMAT ", "
"entry: " UINT32_FORMAT,
_array->offset_array(landing_card), entry));
} else {
guarantee(landing_card == start_card - 1, "Tautology");
guarantee(_array->offset_array(landing_card) <= N_words, "Offset value");
// Note that N_words is the maximum offset value
guarantee(_array->offset_array(landing_card) <= N_words,
err_msg("landing card offset: " UINT32_FORMAT ", "
"N_words: " UINT32_FORMAT,
_array->offset_array(landing_card), N_words));
}
}
}
@ -536,17 +548,27 @@ void G1BlockOffsetArray::alloc_block_work2(HeapWord** threshold_, size_t* index_
// The offset can be 0 if the block starts on a boundary. That
// is checked by an assertion above.
size_t start_index = _array->index_for(blk_start);
HeapWord* boundary = _array->address_for_index(start_index);
HeapWord* boundary = _array->address_for_index(start_index);
assert((_array->offset_array(orig_index) == 0 &&
blk_start == boundary) ||
(_array->offset_array(orig_index) > 0 &&
_array->offset_array(orig_index) <= N_words),
"offset array should have been set");
err_msg("offset array should have been set - "
"orig_index offset: " UINT32_FORMAT ", "
"blk_start: " PTR_FORMAT ", "
"boundary: " PTR_FORMAT,
_array->offset_array(orig_index),
blk_start, boundary));
for (size_t j = orig_index + 1; j <= end_index; j++) {
assert(_array->offset_array(j) > 0 &&
_array->offset_array(j) <=
(u_char) (N_words+BlockOffsetArray::N_powers-1),
"offset array should have been set");
err_msg("offset array should have been set - "
UINT32_FORMAT " not > 0 OR "
UINT32_FORMAT " not <= " UINT32_FORMAT,
_array->offset_array(j),
_array->offset_array(j),
(u_char) (N_words+BlockOffsetArray::N_powers-1)));
}
#endif
}

View File

@ -78,7 +78,9 @@ public:
virtual void resize(size_t new_word_size) = 0;
virtual void set_bottom(HeapWord* new_bottom) {
assert(new_bottom <= _end, "new_bottom > _end");
assert(new_bottom <= _end,
err_msg("new_bottom (" PTR_FORMAT ") > _end (" PTR_FORMAT ")",
new_bottom, _end));
_bottom = new_bottom;
resize(pointer_delta(_end, _bottom));
}
@ -134,29 +136,42 @@ private:
VirtualSpace _vs;
u_char* _offset_array; // byte array keeping backwards offsets
void check_index(size_t index, const char* msg) const {
assert(index < _vs.committed_size(),
err_msg("%s - "
"index: " SIZE_FORMAT ", _vs.committed_size: " SIZE_FORMAT,
msg, index, _vs.committed_size()));
}
void check_offset(size_t offset, const char* msg) const {
assert(offset <= N_words,
err_msg("%s - "
"offset: " UINT32_FORMAT", N_words: " UINT32_FORMAT,
msg, offset, N_words));
}
// Bounds checking accessors:
// For performance these have to devolve to array accesses in product builds.
u_char offset_array(size_t index) const {
assert(index < _vs.committed_size(), "index out of range");
check_index(index, "index out of range");
return _offset_array[index];
}
void set_offset_array(size_t index, u_char offset) {
assert(index < _vs.committed_size(), "index out of range");
assert(offset <= N_words, "offset too large");
check_index(index, "index out of range");
check_offset(offset, "offset too large");
_offset_array[index] = offset;
}
void set_offset_array(size_t index, HeapWord* high, HeapWord* low) {
assert(index < _vs.committed_size(), "index out of range");
check_index(index, "index out of range");
assert(high >= low, "addresses out of order");
assert(pointer_delta(high, low) <= N_words, "offset too large");
check_offset(pointer_delta(high, low), "offset too large");
_offset_array[index] = (u_char) pointer_delta(high, low);
}
void set_offset_array(HeapWord* left, HeapWord* right, u_char offset) {
assert(index_for(right - 1) < _vs.committed_size(),
"right address out of range");
check_index(index_for(right - 1), "right address out of range");
assert(left < right, "Heap addresses out of order");
size_t num_cards = pointer_delta(right, left) >> LogN_words;
if (UseMemSetInBOT) {
@ -171,7 +186,7 @@ private:
}
void set_offset_array(size_t left, size_t right, u_char offset) {
assert(right < _vs.committed_size(), "right address out of range");
check_index(right, "right index out of range");
assert(left <= right, "indexes out of order");
size_t num_cards = right - left + 1;
if (UseMemSetInBOT) {
@ -186,11 +201,10 @@ private:
}
void check_offset_array(size_t index, HeapWord* high, HeapWord* low) const {
assert(index < _vs.committed_size(), "index out of range");
check_index(index, "index out of range");
assert(high >= low, "addresses out of order");
assert(pointer_delta(high, low) <= N_words, "offset too large");
assert(_offset_array[index] == pointer_delta(high, low),
"Wrong offset");
check_offset(pointer_delta(high, low), "offset too large");
assert(_offset_array[index] == pointer_delta(high, low), "Wrong offset");
}
bool is_card_boundary(HeapWord* p) const;
@ -481,7 +495,6 @@ class G1BlockOffsetArrayContigSpace: public G1BlockOffsetArray {
blk_start, blk_end);
}
public:
G1BlockOffsetArrayContigSpace(G1BlockOffsetSharedArray* array, MemRegion mr);

View File

@ -49,16 +49,17 @@ inline size_t G1BlockOffsetSharedArray::index_for(const void* p) const {
char* pc = (char*)p;
assert(pc >= (char*)_reserved.start() &&
pc < (char*)_reserved.end(),
"p not in range.");
err_msg("p (" PTR_FORMAT ") not in reserved [" PTR_FORMAT ", " PTR_FORMAT ")",
p, (char*)_reserved.start(), (char*)_reserved.end()));
size_t delta = pointer_delta(pc, _reserved.start(), sizeof(char));
size_t result = delta >> LogN;
assert(result < _vs.committed_size(), "bad index from address");
check_index(result, "bad index from address");
return result;
}
inline HeapWord*
G1BlockOffsetSharedArray::address_for_index(size_t index) const {
assert(index < _vs.committed_size(), "bad index");
check_index(index, "index out of range");
HeapWord* result = _reserved.start() + (index << LogN_words);
assert(result >= _reserved.start() && result < _reserved.end(),
err_msg("bad address from index result " PTR_FORMAT

View File

@ -27,19 +27,7 @@
#include "gc_implementation/g1/heapRegion.hpp"
#include "gc_implementation/g1/satbQueue.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/thread.hpp"
#ifdef TARGET_OS_FAMILY_linux
# include "thread_linux.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_solaris
# include "thread_solaris.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_windows
# include "thread_windows.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_bsd
# include "thread_bsd.inline.hpp"
#endif
#include "runtime/thread.inline.hpp"
G1SATBCardTableModRefBS::G1SATBCardTableModRefBS(MemRegion whole_heap,
int max_covered_regions) :

View File

@ -28,18 +28,7 @@
#include "memory/allocation.inline.hpp"
#include "runtime/mutex.hpp"
#include "runtime/mutexLocker.hpp"
#ifdef TARGET_OS_FAMILY_linux
# include "thread_linux.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_solaris
# include "thread_solaris.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_windows
# include "thread_windows.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_bsd
# include "thread_bsd.inline.hpp"
#endif
#include "runtime/thread.inline.hpp"
PtrQueue::PtrQueue(PtrQueueSet* qset, bool perm, bool active) :
_qset(qset), _buf(NULL), _index(0), _active(active),

View File

@ -52,14 +52,22 @@ void ThreadRootsMarkingTask::do_it(GCTaskManager* manager, uint which) {
PrintGCDetails && TraceParallelOldGCTasks, true, gclog_or_tty));
ParCompactionManager* cm =
ParCompactionManager::gc_thread_compaction_manager(which);
PSParallelCompact::MarkAndPushClosure mark_and_push_closure(cm);
CLDToOopClosure mark_and_push_from_clds(&mark_and_push_closure, true);
CodeBlobToOopClosure mark_and_push_in_blobs(&mark_and_push_closure, /*do_marking=*/ true);
if (_java_thread != NULL)
_java_thread->oops_do(&mark_and_push_closure, &mark_and_push_in_blobs);
_java_thread->oops_do(
&mark_and_push_closure,
&mark_and_push_from_clds,
&mark_and_push_in_blobs);
if (_vm_thread != NULL)
_vm_thread->oops_do(&mark_and_push_closure, &mark_and_push_in_blobs);
_vm_thread->oops_do(
&mark_and_push_closure,
&mark_and_push_from_clds,
&mark_and_push_in_blobs);
// Do the real work
cm->follow_marking_stacks();
@ -89,7 +97,8 @@ void MarkFromRootsTask::do_it(GCTaskManager* manager, uint which) {
{
ResourceMark rm;
CodeBlobToOopClosure each_active_code_blob(&mark_and_push_closure, /*do_marking=*/ true);
Threads::oops_do(&mark_and_push_closure, &each_active_code_blob);
CLDToOopClosure mark_and_push_from_cld(&mark_and_push_closure);
Threads::oops_do(&mark_and_push_closure, &mark_and_push_from_cld, &each_active_code_blob);
}
break;

View File

@ -495,8 +495,9 @@ void PSMarkSweep::mark_sweep_phase1(bool clear_all_softrefs) {
ParallelScavengeHeap::ParStrongRootsScope psrs;
Universe::oops_do(mark_and_push_closure());
JNIHandles::oops_do(mark_and_push_closure()); // Global (strong) JNI handles
CLDToOopClosure mark_and_push_from_cld(mark_and_push_closure());
CodeBlobToOopClosure each_active_code_blob(mark_and_push_closure(), /*do_marking=*/ true);
Threads::oops_do(mark_and_push_closure(), &each_active_code_blob);
Threads::oops_do(mark_and_push_closure(), &mark_and_push_from_cld, &each_active_code_blob);
ObjectSynchronizer::oops_do(mark_and_push_closure());
FlatProfiler::oops_do(mark_and_push_closure());
Management::oops_do(mark_and_push_closure());
@ -584,7 +585,8 @@ void PSMarkSweep::mark_sweep_phase3() {
// General strong roots.
Universe::oops_do(adjust_root_pointer_closure());
JNIHandles::oops_do(adjust_root_pointer_closure()); // Global (strong) JNI handles
Threads::oops_do(adjust_root_pointer_closure(), NULL);
CLDToOopClosure adjust_from_cld(adjust_root_pointer_closure());
Threads::oops_do(adjust_root_pointer_closure(), &adjust_from_cld, NULL);
ObjectSynchronizer::oops_do(adjust_root_pointer_closure());
FlatProfiler::oops_do(adjust_root_pointer_closure());
Management::oops_do(adjust_root_pointer_closure());

View File

@ -2436,7 +2436,8 @@ void PSParallelCompact::adjust_roots() {
// General strong roots.
Universe::oops_do(adjust_root_pointer_closure());
JNIHandles::oops_do(adjust_root_pointer_closure()); // Global (strong) JNI handles
Threads::oops_do(adjust_root_pointer_closure(), NULL);
CLDToOopClosure adjust_from_cld(adjust_root_pointer_closure());
Threads::oops_do(adjust_root_pointer_closure(), &adjust_from_cld, NULL);
ObjectSynchronizer::oops_do(adjust_root_pointer_closure());
FlatProfiler::oops_do(adjust_root_pointer_closure());
Management::oops_do(adjust_root_pointer_closure());

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