mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
Merge
This commit is contained in:
commit
07a6ab00bc
762 changed files with 21735 additions and 12179 deletions
3
.hgtags
3
.hgtags
|
@ -291,3 +291,6 @@ bfc24ae2b900187585079bb11e66e459d1e525fe jdk9-b45
|
||||||
722378bc599e38d9a1dd484de30f10dfd7b21438 jdk9-b46
|
722378bc599e38d9a1dd484de30f10dfd7b21438 jdk9-b46
|
||||||
8327024a99559982b848e9c2191da9c0bf8838fd jdk9-b47
|
8327024a99559982b848e9c2191da9c0bf8838fd jdk9-b47
|
||||||
b2f9702efbe95527ea3a991474fda23987ff1c5c jdk9-b48
|
b2f9702efbe95527ea3a991474fda23987ff1c5c jdk9-b48
|
||||||
|
5b8db585a33c3cc48e70e688ceee57dd9271dc5d jdk9-b49
|
||||||
|
1550b2f6b63d1411fa84dc7bbc6f04809aedb43f jdk9-b50
|
||||||
|
6efe265424e3f1ea596408a1f71baf2de316c772 jdk9-b51
|
||||||
|
|
|
@ -291,3 +291,6 @@ f7c11da0b0481d49cc7a65a453336c108191e821 jdk9-b42
|
||||||
12f1e276447bcc81516e85367d53e4f08897049d jdk9-b46
|
12f1e276447bcc81516e85367d53e4f08897049d jdk9-b46
|
||||||
b6cca3e6175a69f39e5799b7349ddb0176630291 jdk9-b47
|
b6cca3e6175a69f39e5799b7349ddb0176630291 jdk9-b47
|
||||||
0064e246d83f6f9fc245c19b6d05041ecaf4b6d4 jdk9-b48
|
0064e246d83f6f9fc245c19b6d05041ecaf4b6d4 jdk9-b48
|
||||||
|
d91ed1951b948210590ce1394bea5515357246ba jdk9-b49
|
||||||
|
d1f37d39ff2421f956a6ddf316cf763807bc3363 jdk9-b50
|
||||||
|
6207b4b8731ca75c51b031c47daa813ab92ef558 jdk9-b51
|
||||||
|
|
103
Makefile
103
Makefile
|
@ -48,6 +48,17 @@ else
|
||||||
endif
|
endif
|
||||||
root_dir:=$(patsubst %/,%,$(dir $(makefile_path)))
|
root_dir:=$(patsubst %/,%,$(dir $(makefile_path)))
|
||||||
|
|
||||||
|
ifeq ($(MAIN_TARGETS), )
|
||||||
|
COMMAND_LINE_VARIABLES:=$(subst =command,,$(filter %=command,$(foreach var,$(.VARIABLES),$(var)=$(firstword $(origin $(var))))))
|
||||||
|
MAKE_CONTROL_VARIABLES:=LOG CONF SPEC JOBS TEST IGNORE_OLD_CONFIG
|
||||||
|
UNKNOWN_COMMAND_LINE_VARIABLES:=$(strip $(filter-out $(MAKE_CONTROL_VARIABLES), $(COMMAND_LINE_VARIABLES)))
|
||||||
|
ifneq ($(UNKNOWN_COMMAND_LINE_VARIABLES), )
|
||||||
|
$(info Note: Command line contains non-control variables: $(UNKNOWN_COMMAND_LINE_VARIABLES).)
|
||||||
|
$(info Make sure it is not mistyped, and that you intend to override this variable.)
|
||||||
|
$(info 'make help' will list known control variables)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(findstring qp,$(MAKEFLAGS)),)
|
ifneq ($(findstring qp,$(MAKEFLAGS)),)
|
||||||
# When called with -qp, assume an external part (e.g. bash completion) is trying
|
# When called with -qp, assume an external part (e.g. bash completion) is trying
|
||||||
# to understand our targets.
|
# to understand our targets.
|
||||||
|
@ -148,62 +159,64 @@ endif
|
||||||
# Here are "global" targets, i.e. targets that can be executed without specifying a single configuration.
|
# Here are "global" targets, i.e. targets that can be executed without specifying a single configuration.
|
||||||
# If you add more global targets, please update the variable global_targets in MakeHelpers.
|
# If you add more global targets, please update the variable global_targets in MakeHelpers.
|
||||||
|
|
||||||
|
# Helper macro to allow $(info) to properly print strings beginning with spaces.
|
||||||
|
_:=
|
||||||
|
|
||||||
help:
|
help:
|
||||||
$(info )
|
$(info )
|
||||||
$(info OpenJDK Makefile help)
|
$(info OpenJDK Makefile help)
|
||||||
$(info =====================)
|
$(info =====================)
|
||||||
$(info )
|
$(info )
|
||||||
$(info Common make targets)
|
$(info Common make targets)
|
||||||
$(info . make [default] # Compile all modules in langtools, hotspot, jaxp, jaxws,)
|
$(info $(_) make [default] # Compile all modules in langtools, hotspot, jdk, jaxws,)
|
||||||
$(info . # corba and jdk and create a runnable "exploded" image)
|
$(info $(_) # jaxp and corba, and create a runnable "exploded" image)
|
||||||
$(info . make all # Compile everything, all repos, docs and images)
|
$(info $(_) make all # Compile everything, all repos, docs and images)
|
||||||
$(info . make images # Create complete jdk and jre images)
|
$(info $(_) make images # Create complete j2sdk and j2re images)
|
||||||
$(info . make <phase> # Compile the specified phase and everything it depends on)
|
$(info $(_) make <phase> # Build the specified phase and everything it depends on)
|
||||||
$(info . # (gensrc, java, copy, libs, launchers, gendata, rmic))
|
$(info $(_) # (gensrc, java, copy, libs, launchers, gendata, rmic))
|
||||||
$(info . make *-only # Applies to most targets and disables compling the)
|
$(info $(_) make *-only # Applies to most targets and disables compling the)
|
||||||
$(info . # dependencies for the target. This is faster but may)
|
$(info $(_) # dependencies for the target. This is faster but may)
|
||||||
$(info . # result in incorrect build results!)
|
$(info $(_) # result in incorrect build results!)
|
||||||
$(info . make docs # Create all docs)
|
$(info $(_) make docs # Create all docs)
|
||||||
$(info . make docs-javadoc # Create just javadocs, depends on less than full docs)
|
$(info $(_) make docs-javadoc # Create just javadocs, depends on less than full docs)
|
||||||
$(info . make profiles # Create complete jre compact profile images)
|
$(info $(_) make profiles # Create complete j2re compact profile images)
|
||||||
$(info . make bootcycle-images # Build images twice, second time with newly built JDK)
|
$(info $(_) make bootcycle-images # Build images twice, second time with newly built JDK)
|
||||||
$(info . make install # Install the generated images locally)
|
$(info $(_) make install # Install the generated images locally)
|
||||||
$(info . make reconfigure # Rerun configure with the same arguments as last time)
|
$(info $(_) make reconfigure # Rerun configure with the same arguments as last time)
|
||||||
$(info . make help # Give some help on using make)
|
$(info $(_) make help # Give some help on using make)
|
||||||
$(info . make test # Run tests, default is all tests (see TEST below))
|
$(info $(_) make test # Run tests, default is all tests (see TEST below))
|
||||||
$(info )
|
$(info )
|
||||||
$(info Targets for cleaning)
|
$(info Targets for cleaning)
|
||||||
$(info . make clean # Remove all files generated by make, but not those)
|
$(info $(_) make clean # Remove all files generated by make, but not those)
|
||||||
$(info . # generated by configure)
|
$(info $(_) # generated by configure)
|
||||||
$(info . make dist-clean # Remove all files, including configuration)
|
$(info $(_) make dist-clean # Remove all files, including configuration)
|
||||||
$(info . make clean-<outputdir> # Remove the subdir in the output dir with the name)
|
$(info $(_) make clean-<outputdir> # Remove the subdir in the output dir with the name)
|
||||||
$(info . make clean-<phase> # Remove all build results related to a certain build)
|
$(info $(_) make clean-<phase> # Remove all build results related to a certain build)
|
||||||
$(info . # phase (gensrc, java, libs, launchers))
|
$(info $(_) # phase (gensrc, java, libs, launchers))
|
||||||
$(info . make clean-<module> # Remove all build results related to a certain module)
|
$(info $(_) make clean-<module> # Remove all build results related to a certain module)
|
||||||
$(info . make clean-<module>-<phase> # Remove all build results related to a certain)
|
$(info $(_) make clean-<module>-<phase> # Remove all build results related to a certain)
|
||||||
$(info . # module and phase)
|
$(info $(_) # module and phase)
|
||||||
$(info )
|
$(info )
|
||||||
$(info Targets for specific modules)
|
$(info Targets for specific modules)
|
||||||
$(info . make <module> # Build <module> and everything it depends on. )
|
$(info $(_) make <module> # Build <module> and everything it depends on.)
|
||||||
$(info . make <module>-<phase> # Compile the specified phase for the specified module)
|
$(info $(_) make <module>-<phase> # Compile the specified phase for the specified module)
|
||||||
$(info . # and everything it depends on)
|
$(info $(_) # and everything it depends on)
|
||||||
$(info . # (gensrc, java, copy, libs, launchers, gendata, rmic))
|
$(info $(_) # (gensrc, java, copy, libs, launchers, gendata, rmic))
|
||||||
$(info )
|
$(info )
|
||||||
$(info Useful make variables)
|
$(info Make control variables)
|
||||||
$(info . make CONF= # Build all configurations (note, assignment is empty))
|
$(info $(_) CONF= # Build all configurations (note, assignment is empty))
|
||||||
$(info . make CONF=<substring> # Build the configuration(s) with a name matching)
|
$(info $(_) CONF=<substring> # Build the configuration(s) with a name matching)
|
||||||
$(info . # <substring>)
|
$(info $(_) # <substring>)
|
||||||
$(info )
|
$(info $(_) SPEC=<spec file> # Build the configuration given by the spec file)
|
||||||
$(info . make LOG=<loglevel> # Change the log level from warn to <loglevel>)
|
$(info $(_) LOG=<loglevel> # Change the log level from warn to <loglevel>)
|
||||||
$(info . # Available log levels are:)
|
$(info $(_) # Available log levels are:)
|
||||||
$(info . # 'warn' (default), 'info', 'debug' and 'trace')
|
$(info $(_) # 'warn' (default), 'info', 'debug' and 'trace')
|
||||||
$(info . # To see executed command lines, use LOG=debug)
|
$(info $(_) # To see executed command lines, use LOG=debug)
|
||||||
$(info )
|
$(info $(_) JOBS=<n> # Run <n> parallel make jobs)
|
||||||
$(info . make JOBS=<n> # Run <n> parallel make jobs)
|
$(info $(_) # Note that -jN does not work as expected!)
|
||||||
$(info . # Note that -jN does not work as expected!)
|
$(info $(_) IGNORE_OLD_CONFIG=true # Skip tests if spec file is up to date)
|
||||||
$(info )
|
$(info $(_) make test TEST=<test> # Only run the given test or tests, e.g.)
|
||||||
$(info . make test TEST=<test> # Only run the given test or tests, e.g.)
|
$(info $(_) # make test TEST="jdk_lang jdk_net")
|
||||||
$(info . # make test TEST="jdk_lang jdk_net")
|
|
||||||
$(info )
|
$(info )
|
||||||
|
|
||||||
.PHONY: help
|
.PHONY: help
|
||||||
|
|
|
@ -1463,14 +1463,13 @@
|
||||||
|
|
||||||
<h4>Building with ccache</h4>
|
<h4>Building with ccache</h4>
|
||||||
|
|
||||||
<p>A simple way to radically speed up compilation of native code
|
<p>The OpenJDK build supports building with ccache
|
||||||
(typically hotspot and native libraries in JDK) is to install
|
when using gcc or clang. Using ccache can
|
||||||
ccache. This will cache and reuse prior compilation results, if the
|
radically speed up compilation of native code if
|
||||||
source code is unchanged. However, ccache versions prior to 3.1.4
|
you often rebuild the same sources. Your milage
|
||||||
does not work correctly with the precompiled headers used in
|
may vary however so we recommend evaluating it for
|
||||||
OpenJDK. So if your platform supports ccache at 3.1.4 or later, we
|
yourself. To enable it, make sure it's on the path
|
||||||
highly recommend installing it. This is currently only supported on
|
and configure with <code>--enable-ccache</code>.</p>
|
||||||
linux.</p>
|
|
||||||
|
|
||||||
<h4>Building on local disk</h4>
|
<h4>Building on local disk</h4>
|
||||||
|
|
||||||
|
|
|
@ -242,6 +242,9 @@ AC_DEFUN_ONCE([BASIC_INIT],
|
||||||
[
|
[
|
||||||
# Save the original command line. This is passed to us by the wrapper configure script.
|
# Save the original command line. This is passed to us by the wrapper configure script.
|
||||||
AC_SUBST(CONFIGURE_COMMAND_LINE)
|
AC_SUBST(CONFIGURE_COMMAND_LINE)
|
||||||
|
# Save the path variable before it gets changed
|
||||||
|
ORIGINAL_PATH="$PATH"
|
||||||
|
AC_SUBST(ORIGINAL_PATH)
|
||||||
DATE_WHEN_CONFIGURED=`LANG=C date`
|
DATE_WHEN_CONFIGURED=`LANG=C date`
|
||||||
AC_SUBST(DATE_WHEN_CONFIGURED)
|
AC_SUBST(DATE_WHEN_CONFIGURED)
|
||||||
AC_MSG_NOTICE([Configuration created at $DATE_WHEN_CONFIGURED.])
|
AC_MSG_NOTICE([Configuration created at $DATE_WHEN_CONFIGURED.])
|
||||||
|
@ -896,10 +899,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
|
||||||
fi
|
fi
|
||||||
AC_SUBST(IS_GNU_TIME)
|
AC_SUBST(IS_GNU_TIME)
|
||||||
|
|
||||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
|
||||||
BASIC_REQUIRE_PROGS(COMM, comm)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
|
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
|
||||||
BASIC_REQUIRE_PROGS(DSYMUTIL, dsymutil)
|
BASIC_REQUIRE_PROGS(DSYMUTIL, dsymutil)
|
||||||
BASIC_REQUIRE_PROGS(XATTR, xattr)
|
BASIC_REQUIRE_PROGS(XATTR, xattr)
|
||||||
|
|
|
@ -164,19 +164,26 @@ AC_DEFUN([BPERF_SETUP_CCACHE],
|
||||||
[enable using ccache to speed up recompilations @<:@disabled@:>@])])
|
[enable using ccache to speed up recompilations @<:@disabled@:>@])])
|
||||||
|
|
||||||
CCACHE=
|
CCACHE=
|
||||||
|
CCACHE_STATUS=
|
||||||
AC_MSG_CHECKING([is ccache enabled])
|
AC_MSG_CHECKING([is ccache enabled])
|
||||||
ENABLE_CCACHE=$enable_ccache
|
|
||||||
if test "x$enable_ccache" = xyes; then
|
if test "x$enable_ccache" = xyes; then
|
||||||
AC_MSG_RESULT([yes])
|
if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
|
||||||
OLD_PATH="$PATH"
|
AC_MSG_RESULT([yes])
|
||||||
if test "x$TOOLCHAIN_PATH" != x; then
|
OLD_PATH="$PATH"
|
||||||
PATH=$TOOLCHAIN_PATH:$PATH
|
if test "x$TOOLCHAIN_PATH" != x; then
|
||||||
|
PATH=$TOOLCHAIN_PATH:$PATH
|
||||||
|
fi
|
||||||
|
BASIC_REQUIRE_PROGS(CCACHE, ccache)
|
||||||
|
PATH="$OLD_PATH"
|
||||||
|
CCACHE_VERSION=[`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`]
|
||||||
|
CCACHE_STATUS="Active ($CCACHE_VERSION)"
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
AC_MSG_WARN([ccache is not supported with toolchain type $TOOLCHAIN_TYPE])
|
||||||
fi
|
fi
|
||||||
BASIC_REQUIRE_PROGS(CCACHE, ccache)
|
|
||||||
CCACHE_STATUS="enabled"
|
|
||||||
PATH="$OLD_PATH"
|
|
||||||
elif test "x$enable_ccache" = xno; then
|
elif test "x$enable_ccache" = xno; then
|
||||||
AC_MSG_RESULT([no, explicitly disabled])
|
AC_MSG_RESULT([no, explicitly disabled])
|
||||||
|
CCACHE_STATUS="Disabled"
|
||||||
elif test "x$enable_ccache" = x; then
|
elif test "x$enable_ccache" = x; then
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
else
|
else
|
||||||
|
@ -206,35 +213,31 @@ AC_DEFUN([BPERF_SETUP_CCACHE],
|
||||||
AC_DEFUN([BPERF_SETUP_CCACHE_USAGE],
|
AC_DEFUN([BPERF_SETUP_CCACHE_USAGE],
|
||||||
[
|
[
|
||||||
if test "x$CCACHE" != x; then
|
if test "x$CCACHE" != x; then
|
||||||
# Only use ccache if it is 3.1.4 or later, which supports
|
if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
|
||||||
# precompiled headers.
|
HAS_BAD_CCACHE=[`$ECHO $CCACHE_VERSION | \
|
||||||
AC_MSG_CHECKING([if ccache supports precompiled headers])
|
$GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]'`]
|
||||||
HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.@<:@456789@:>@) 2> /dev/null`
|
if test "x$HAS_BAD_CCACHE" != "x"; then
|
||||||
if test "x$HAS_GOOD_CCACHE" = x; then
|
AC_MSG_ERROR([Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION])
|
||||||
AC_MSG_RESULT([no, disabling ccache])
|
fi
|
||||||
CCACHE=
|
|
||||||
CCACHE_STATUS="disabled"
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
AC_MSG_CHECKING([if C-compiler supports ccache precompiled headers])
|
AC_MSG_CHECKING([if C-compiler supports ccache precompiled headers])
|
||||||
|
CCACHE_PRECOMP_FLAG="-fpch-preprocess"
|
||||||
PUSHED_FLAGS="$CXXFLAGS"
|
PUSHED_FLAGS="$CXXFLAGS"
|
||||||
CXXFLAGS="-fpch-preprocess $CXXFLAGS"
|
CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [CC_KNOWS_CCACHE_TRICK=yes], [CC_KNOWS_CCACHE_TRICK=no])
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [CC_KNOWS_CCACHE_TRICK=yes], [CC_KNOWS_CCACHE_TRICK=no])
|
||||||
CXXFLAGS="$PUSHED_FLAGS"
|
CXXFLAGS="$PUSHED_FLAGS"
|
||||||
if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
|
if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
|
CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
|
||||||
|
AC_SUBST(CFLAGS_CCACHE)
|
||||||
|
CCACHE_SLOPPINESS=pch_defines,time_macros
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT([no, disabling ccaching of precompiled headers])
|
AC_MSG_RESULT([no])
|
||||||
CCACHE=
|
AC_MSG_ERROR([Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG])
|
||||||
CCACHE_STATUS="disabled"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
if test "x$CCACHE" != x; then
|
CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
|
||||||
CCACHE_SLOPPINESS=time_macros
|
CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
|
||||||
CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
|
|
||||||
CCACHE_FLAGS=-fpch-preprocess
|
|
||||||
|
|
||||||
if test "x$SET_CCACHE_DIR" != x; then
|
if test "x$SET_CCACHE_DIR" != x; then
|
||||||
mkdir -p $CCACHE_DIR > /dev/null 2>&1
|
mkdir -p $CCACHE_DIR > /dev/null 2>&1
|
||||||
|
|
3
common/autoconf/configure
vendored
3
common/autoconf/configure
vendored
|
@ -40,8 +40,9 @@ if test "x$BASH" = x; then
|
||||||
echo "Error: This script must be run using bash." 1>&2
|
echo "Error: This script must be run using bash." 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# Force autoconf to use bash
|
# Force autoconf to use bash. This also means we must disable autoconf re-exec.
|
||||||
export CONFIG_SHELL=$BASH
|
export CONFIG_SHELL=$BASH
|
||||||
|
export _as_can_reexec=no
|
||||||
|
|
||||||
conf_script_dir="$TOPDIR/common/autoconf"
|
conf_script_dir="$TOPDIR/common/autoconf"
|
||||||
|
|
||||||
|
|
|
@ -558,15 +558,23 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
|
||||||
CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
|
CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
|
||||||
CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
|
CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
|
||||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||||
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
|
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
|
||||||
-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
|
-Zi -MD -Zc:wchar_t- -W3 -wd4800 \
|
||||||
-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
|
-DWIN32_LEAN_AND_MEAN \
|
||||||
-DWIN32 -DIAL"
|
-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
|
||||||
|
-DWIN32 -DIAL"
|
||||||
if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
||||||
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
|
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
|
||||||
else
|
else
|
||||||
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
|
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
|
||||||
fi
|
fi
|
||||||
|
# If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
|
||||||
|
# avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
|
||||||
|
# studio.
|
||||||
|
if test "x$TOOLCHAIN_VERSION" = "x2010"; then
|
||||||
|
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
|
||||||
|
-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -209,7 +209,10 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
|
||||||
printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
|
printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
|
||||||
fi
|
fi
|
||||||
printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
|
printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
|
||||||
printf "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
|
if test "x$TOOLCHAIN_VERSION" != "x"; then
|
||||||
|
print_version=" $TOOLCHAIN_VERSION"
|
||||||
|
fi
|
||||||
|
printf "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
|
||||||
printf "* C Compiler: Version $CC_VERSION_NUMBER (at $CC)\n"
|
printf "* C Compiler: Version $CC_VERSION_NUMBER (at $CC)\n"
|
||||||
printf "* C++ Compiler: Version $CXX_VERSION_NUMBER (at $CXX)\n"
|
printf "* C++ Compiler: Version $CXX_VERSION_NUMBER (at $CXX)\n"
|
||||||
|
|
||||||
|
|
|
@ -109,8 +109,8 @@ LD:=@HOTSPOT_LD@
|
||||||
MT:=@HOTSPOT_MT@
|
MT:=@HOTSPOT_MT@
|
||||||
RC:=@HOTSPOT_RC@
|
RC:=@HOTSPOT_RC@
|
||||||
|
|
||||||
EXTRA_CFLAGS=@LEGACY_EXTRA_CFLAGS@
|
EXTRA_CFLAGS=@LEGACY_EXTRA_CFLAGS@ $(CFLAGS_CCACHE)
|
||||||
EXTRA_CXXFLAGS=@LEGACY_EXTRA_CXXFLAGS@
|
EXTRA_CXXFLAGS=@LEGACY_EXTRA_CXXFLAGS@ $(CFLAGS_CCACHE)
|
||||||
EXTRA_LDFLAGS=@LEGACY_EXTRA_LDFLAGS@
|
EXTRA_LDFLAGS=@LEGACY_EXTRA_LDFLAGS@
|
||||||
|
|
||||||
USE_PRECOMPILED_HEADER=@USE_PRECOMPILED_HEADER@
|
USE_PRECOMPILED_HEADER=@USE_PRECOMPILED_HEADER@
|
||||||
|
@ -132,6 +132,13 @@ else
|
||||||
ZIP_DEBUGINFO_FILES:=0
|
ZIP_DEBUGINFO_FILES:=0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||||
|
# On Windows, the Visual Studio toolchain needs the LIB and INCLUDE
|
||||||
|
# environment variables (in Windows path style).
|
||||||
|
export INCLUDE:=@VS_INCLUDE@
|
||||||
|
export LIB:=@VS_LIB@
|
||||||
|
endif
|
||||||
|
|
||||||
# Sneak this in via the spec.gmk file, since we don't want to mess around too much with the Hotspot make files.
|
# Sneak this in via the spec.gmk file, since we don't want to mess around too much with the Hotspot make files.
|
||||||
# This is needed to get the LOG setting to work properly.
|
# This is needed to get the LOG setting to work properly.
|
||||||
include $(SRC_ROOT)/make/common/MakeBase.gmk
|
include $(SRC_ROOT)/make/common/MakeBase.gmk
|
||||||
|
|
|
@ -1124,10 +1124,9 @@ AC_DEFUN_ONCE([LIB_SETUP_STATIC_LINK_LIBSTDCPP],
|
||||||
AC_DEFUN_ONCE([LIB_SETUP_ON_WINDOWS],
|
AC_DEFUN_ONCE([LIB_SETUP_ON_WINDOWS],
|
||||||
[
|
[
|
||||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||||
TOOLCHAIN_SETUP_MSVCR_DLL
|
TOOLCHAIN_SETUP_VS_RUNTIME_DLLS
|
||||||
BASIC_DEPRECATED_ARG_WITH([dxsdk])
|
BASIC_DEPRECATED_ARG_WITH([dxsdk])
|
||||||
BASIC_DEPRECATED_ARG_WITH([dxsdk-lib])
|
BASIC_DEPRECATED_ARG_WITH([dxsdk-lib])
|
||||||
BASIC_DEPRECATED_ARG_WITH([dxsdk-include])
|
BASIC_DEPRECATED_ARG_WITH([dxsdk-include])
|
||||||
fi
|
fi
|
||||||
AC_SUBST(MSVCR_DLL)
|
|
||||||
])
|
])
|
||||||
|
|
|
@ -129,14 +129,12 @@ LIBDL:=@LIBDL@
|
||||||
# colon or semicolon
|
# colon or semicolon
|
||||||
PATH_SEP:=@PATH_SEP@
|
PATH_SEP:=@PATH_SEP@
|
||||||
|
|
||||||
|
# Save the original path before replacing it with the Visual Studio tools
|
||||||
|
ORIGINAL_PATH:=@ORIGINAL_PATH@
|
||||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||||
# On Windows, the Visual Studio toolchain needs the LIB and INCLUDE
|
# On Windows, the Visual Studio toolchain needs the PATH to be adjusted
|
||||||
# environment variables (in Windows path style), and the PATH needs to
|
# to include Visual Studio tools (this needs to be in cygwin/msys style).
|
||||||
# be adjusted to include Visual Studio tools (but this needs to be in
|
|
||||||
# cygwin/msys style).
|
|
||||||
export PATH:=@VS_PATH@
|
export PATH:=@VS_PATH@
|
||||||
export INCLUDE:=@VS_INCLUDE@
|
|
||||||
export LIB:=@VS_LIB@
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SYSROOT_CFLAGS := @SYSROOT_CFLAGS@
|
SYSROOT_CFLAGS := @SYSROOT_CFLAGS@
|
||||||
|
@ -328,6 +326,8 @@ CXX_FLAG_DEPS:=@CXX_FLAG_DEPS@
|
||||||
|
|
||||||
CFLAGS_WARNINGS_ARE_ERRORS:=@CFLAGS_WARNINGS_ARE_ERRORS@
|
CFLAGS_WARNINGS_ARE_ERRORS:=@CFLAGS_WARNINGS_ARE_ERRORS@
|
||||||
|
|
||||||
|
CFLAGS_CCACHE:=@CFLAGS_CCACHE@
|
||||||
|
|
||||||
# Tools that potentially need to be cross compilation aware.
|
# Tools that potentially need to be cross compilation aware.
|
||||||
CC:=@FIXPATH@ @CCACHE@ @CC@
|
CC:=@FIXPATH@ @CCACHE@ @CC@
|
||||||
|
|
||||||
|
@ -583,6 +583,7 @@ USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@
|
||||||
USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@
|
USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@
|
||||||
LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@
|
LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@
|
||||||
MSVCR_DLL:=@MSVCR_DLL@
|
MSVCR_DLL:=@MSVCR_DLL@
|
||||||
|
MSVCP_DLL:=@MSVCP_DLL@
|
||||||
|
|
||||||
|
|
||||||
# ADD_SRCS takes a single argument with source roots
|
# ADD_SRCS takes a single argument with source roots
|
||||||
|
|
|
@ -691,8 +691,8 @@ AC_DEFUN_ONCE([TOOLCHAIN_MISC_CHECKS],
|
||||||
CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
|
CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
|
||||||
COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
|
COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
|
||||||
if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
|
if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
|
||||||
if test "x$COMPILER_CPU_TEST" != "x80x86"; then
|
if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
|
||||||
AC_MSG_ERROR([Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for "$COMPILER_CPU_TEST"; expected "80x86".])
|
AC_MSG_ERROR([Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for "$COMPILER_CPU_TEST"; expected "80x86" or "x86".])
|
||||||
fi
|
fi
|
||||||
elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
|
elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
|
||||||
if test "x$COMPILER_CPU_TEST" != "xx64"; then
|
if test "x$COMPILER_CPU_TEST" != "xx64"; then
|
||||||
|
|
|
@ -23,43 +23,90 @@
|
||||||
# questions.
|
# questions.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
VALID_VS_VERSIONS="2010 2012 2013"
|
||||||
|
|
||||||
|
VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
|
||||||
|
VS_VERSION_INTERNAL_2010=100
|
||||||
|
VS_MSVCR_2010=msvcr100.dll
|
||||||
|
# We don't use msvcp on Visual Studio 2010
|
||||||
|
#VS_MSVCP_2010=msvcp100.dll
|
||||||
|
VS_ENVVAR_2010="VS100COMNTOOLS"
|
||||||
|
VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
|
||||||
|
VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
|
||||||
|
VS_VS_PLATFORM_NAME_2010="v100"
|
||||||
|
VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
|
||||||
|
|
||||||
|
VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
|
||||||
|
VS_VERSION_INTERNAL_2012=110
|
||||||
|
VS_MSVCR_2012=msvcr110.dll
|
||||||
|
VS_MSVCP_2012=msvcp110.dll
|
||||||
|
VS_ENVVAR_2012="VS110COMNTOOLS"
|
||||||
|
VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
|
||||||
|
VS_SDK_INSTALLDIR_2012=
|
||||||
|
VS_VS_PLATFORM_NAME_2012="v110"
|
||||||
|
VS_SDK_PLATFORM_NAME_2012=
|
||||||
|
|
||||||
|
VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
|
||||||
|
VS_VERSION_INTERNAL_2013=120
|
||||||
|
VS_MSVCR_2013=msvcr120.dll
|
||||||
|
VS_MSVCP_2013=msvcp120.dll
|
||||||
|
VS_ENVVAR_2013="VS120COMNTOOLS"
|
||||||
|
VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
|
||||||
|
VS_SDK_INSTALLDIR_2013=
|
||||||
|
VS_VS_PLATFORM_NAME_2013="v120"
|
||||||
|
VS_SDK_PLATFORM_NAME_2013=
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
|
||||||
AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
|
AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
|
||||||
[
|
[
|
||||||
if test "x$VS_ENV_CMD" = x; then
|
if test "x$VS_ENV_CMD" = x; then
|
||||||
VS100BASE="$1"
|
VS_VERSION="$1"
|
||||||
METHOD="$2"
|
VS_BASE="$2"
|
||||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(VS100BASE)
|
METHOD="$3"
|
||||||
if test -d "$VS100BASE"; then
|
|
||||||
if test -f "$VS100BASE/$VCVARSFILE"; then
|
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
|
||||||
AC_MSG_NOTICE([Found Visual Studio installation at $VS100BASE using $METHOD])
|
VCVARSFILE="vc/bin/vcvars32.bat"
|
||||||
VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
|
else
|
||||||
|
VCVARSFILE="vc/bin/amd64/vcvars64.bat"
|
||||||
|
fi
|
||||||
|
|
||||||
|
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(VS_BASE)
|
||||||
|
if test -d "$VS_BASE"; then
|
||||||
|
if test -f "$VS_BASE/$VCVARSFILE"; then
|
||||||
|
AC_MSG_NOTICE([Found Visual Studio installation at $VS_BASE using $METHOD])
|
||||||
|
VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
|
||||||
# PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
|
# PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
|
||||||
# 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
|
# 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
|
||||||
# TODO: improve detection for other versions of VS
|
eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
|
||||||
PLATFORM_TOOLSET="v100"
|
|
||||||
else
|
else
|
||||||
AC_MSG_NOTICE([Found Visual Studio installation at $VS100BASE using $METHOD])
|
AC_MSG_NOTICE([Found Visual Studio installation at $VS_BASE using $METHOD])
|
||||||
AC_MSG_NOTICE([Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring])
|
AC_MSG_NOTICE([Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
|
||||||
AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT],
|
AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT],
|
||||||
[
|
[
|
||||||
if test "x$VS_ENV_CMD" = x; then
|
if test "x$VS_ENV_CMD" = x; then
|
||||||
WIN_SDK_BASE="$1"
|
VS_VERSION="$1"
|
||||||
METHOD="$2"
|
WIN_SDK_BASE="$2"
|
||||||
|
METHOD="$3"
|
||||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(WIN_SDK_BASE)
|
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(WIN_SDK_BASE)
|
||||||
if test -d "$WIN_SDK_BASE"; then
|
if test -d "$WIN_SDK_BASE"; then
|
||||||
# There have been cases of partial or broken SDK installations. A missing
|
# There have been cases of partial or broken SDK installations. A missing
|
||||||
# lib dir is not going to work.
|
# lib dir is not going to work.
|
||||||
if test ! -d "$WIN_SDK_BASE/../lib"; then
|
if test ! -d "$WIN_SDK_BASE/lib"; then
|
||||||
AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
|
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])
|
AC_MSG_NOTICE([Warning: Installation is broken, lib dir is missing. Ignoring])
|
||||||
elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
|
elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
|
||||||
AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
|
AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
|
||||||
VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
|
VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
|
||||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
|
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
|
||||||
VS_ENV_ARGS="/x86"
|
VS_ENV_ARGS="/x86"
|
||||||
else
|
else
|
||||||
|
@ -68,7 +115,7 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT],
|
||||||
# PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
|
# PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
|
||||||
# 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
|
# 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
|
||||||
# TODO: improve detection for other versions of SDK
|
# TODO: improve detection for other versions of SDK
|
||||||
PLATFORM_TOOLSET="Windows7.1SDK"
|
eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
|
||||||
else
|
else
|
||||||
AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
|
AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
|
||||||
AC_MSG_NOTICE([Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring])
|
AC_MSG_NOTICE([Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring])
|
||||||
|
@ -77,50 +124,121 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT],
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
|
||||||
|
# build environment and assigns it to VS_ENV_CMD
|
||||||
AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
|
AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
|
||||||
[
|
[
|
||||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
|
VS_VERSION="$1"
|
||||||
VCVARSFILE="vc/bin/vcvars32.bat"
|
eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
|
||||||
else
|
eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
|
||||||
VCVARSFILE="vc/bin/amd64/vcvars64.bat"
|
eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
|
||||||
|
eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
|
||||||
|
|
||||||
|
# When using --with-tools-dir, assume it points to the correct and default
|
||||||
|
# version of Visual Studio or that --with-toolchain-version was also set.
|
||||||
|
if test "x$with_tools_dir" != x; then
|
||||||
|
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
|
||||||
|
[$with_tools_dir/../..], [--with-tools-dir])
|
||||||
|
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
|
||||||
|
[$with_tools_dir/../../..], [--with-tools-dir])
|
||||||
|
if test "x$VS_ENV_CMD" = x; then
|
||||||
|
# Having specified an argument which is incorrect will produce an instant failure;
|
||||||
|
# we should not go on looking
|
||||||
|
AC_MSG_NOTICE([The path given by --with-tools-dir does not contain a valid])
|
||||||
|
AC_MSG_NOTICE([Visual Studio installation. Please point to the VC/bin or VC/bin/amd64])
|
||||||
|
AC_MSG_NOTICE([directory within the Visual Studio installation])
|
||||||
|
AC_MSG_ERROR([Cannot locate a valid Visual Studio installation])
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
VS_ENV_CMD=""
|
VS_ENV_CMD=""
|
||||||
VS_ENV_ARGS=""
|
VS_ENV_ARGS=""
|
||||||
if test "x$with_toolsdir" != x; then
|
|
||||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$with_toolsdir/../..], [--with-tools-dir])
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
|
if test "x$VS_COMNTOOLS" != x; then
|
||||||
# Having specified an argument which is incorrect will produce an instant failure;
|
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
|
||||||
# we should not go on looking
|
[$VS_COMNTOOLS/../..], [$VS_COMNTOOLS_VAR variable])
|
||||||
AC_MSG_NOTICE([The path given by --with-tools-dir does not contain a valid Visual Studio installation])
|
|
||||||
AC_MSG_NOTICE([Please point to the VC/bin directory within the Visual Studio installation])
|
|
||||||
AC_MSG_ERROR([Cannot locate a valid Visual Studio installation])
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "x$VS100COMNTOOLS" != x; then
|
|
||||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$VS100COMNTOOLS/../..], [VS100COMNTOOLS variable])
|
|
||||||
fi
|
fi
|
||||||
if test "x$PROGRAMFILES" != x; then
|
if test "x$PROGRAMFILES" != x; then
|
||||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$PROGRAMFILES/Microsoft Visual Studio 10.0], [well-known name])
|
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
|
||||||
|
[$PROGRAMFILES/$VS_INSTALL_DIR], [well-known name])
|
||||||
fi
|
fi
|
||||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([C:/Program Files/Microsoft Visual Studio 10.0], [well-known name])
|
# Work around the insanely named ProgramFiles(x86) env variable
|
||||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([C:/Program Files (x86)/Microsoft Visual Studio 10.0], [well-known name])
|
PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
|
||||||
|
if test "x$PROGRAMFILES_X86" != x; then
|
||||||
|
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
|
||||||
|
[$PROGRAMFILES_X86/$VS_INSTALL_DIR], [well-known name])
|
||||||
|
fi
|
||||||
|
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
|
||||||
|
[C:/Program Files/$VS_INSTALL_DIR], [well-known name])
|
||||||
|
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
|
||||||
|
[C:/Program Files (x86)/$VS_INSTALL_DIR], [well-known name])
|
||||||
|
|
||||||
if test "x$ProgramW6432" != x; then
|
if test "x$SDK_INSTALL_DIR" != x; then
|
||||||
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin], [well-known name])
|
if test "x$ProgramW6432" != x; then
|
||||||
|
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([${VS_VERSION}],
|
||||||
|
[$ProgramW6432/$SDK_INSTALL_DIR], [well-known name])
|
||||||
|
fi
|
||||||
|
if test "x$PROGRAMW6432" != x; then
|
||||||
|
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([${VS_VERSION}],
|
||||||
|
[$PROGRAMW6432/$SDK_INSTALL_DIR], [well-known name])
|
||||||
|
fi
|
||||||
|
if test "x$PROGRAMFILES" != x; then
|
||||||
|
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([${VS_VERSION}],
|
||||||
|
[$PROGRAMFILES/$SDK_INSTALL_DIR], [well-known name])
|
||||||
|
fi
|
||||||
|
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([${VS_VERSION}],
|
||||||
|
[C:/Program Files/$SDK_INSTALL_DIR], [well-known name])
|
||||||
|
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([${VS_VERSION}],
|
||||||
|
[C:/Program Files (x86)/$SDK_INSTALL_DIR], [well-known name])
|
||||||
fi
|
fi
|
||||||
if test "x$PROGRAMW6432" != x; then
|
|
||||||
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin], [well-known name])
|
|
||||||
fi
|
|
||||||
if test "x$PROGRAMFILES" != x; then
|
|
||||||
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin], [well-known name])
|
|
||||||
fi
|
|
||||||
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin], [well-known name])
|
|
||||||
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin], [well-known name])
|
|
||||||
])
|
])
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO],
|
||||||
|
[
|
||||||
|
AC_ARG_WITH(toolchain-version, [AS_HELP_STRING([--with-toolchain-version],
|
||||||
|
[the version of the toolchain to look for, use '--help' to show possible values @<:@platform dependent@:>@])])
|
||||||
|
|
||||||
|
if test "x$with_toolchain_version" = xlist; then
|
||||||
|
# List all toolchains
|
||||||
|
AC_MSG_NOTICE([The following toolchain versions are valid on this platform:])
|
||||||
|
for version in $VALID_VS_VERSIONS; do
|
||||||
|
eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
|
||||||
|
$PRINTF " %-10s %s\n" $version "$VS_DESCRIPTION"
|
||||||
|
done
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
elif test "x$with_toolchain_version" != x; then
|
||||||
|
# User override; check that it is valid
|
||||||
|
if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
|
||||||
|
AC_MSG_NOTICE([Visual Studio version $with_toolchain_version is not valid.])
|
||||||
|
AC_MSG_NOTICE([Valid Visual Studio versions: $VALID_VS_VERSIONS.])
|
||||||
|
AC_MSG_ERROR([Cannot continue.])
|
||||||
|
fi
|
||||||
|
VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
|
||||||
|
else
|
||||||
|
# No flag given, use default
|
||||||
|
VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
|
||||||
|
TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE([$VS_VERSION])
|
||||||
|
if test "x$VS_ENV_CMD" != x; then
|
||||||
|
TOOLCHAIN_VERSION=$VS_VERSION
|
||||||
|
eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
|
||||||
|
eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
|
||||||
|
eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
|
||||||
|
eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
|
||||||
|
# The rest of the variables are already evaled while probing
|
||||||
|
AC_MSG_NOTICE([Found $VS_DESCRIPTION])
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
])
|
||||||
|
|
||||||
|
################################################################################
|
||||||
# Check if the VS env variables were setup prior to running configure.
|
# Check if the VS env variables were setup prior to running configure.
|
||||||
# If not, then find vcvarsall.bat and run it automatically, and integrate
|
# If not, then find vcvarsall.bat and run it automatically, and integrate
|
||||||
# the set env variables into the spec file.
|
# the set env variables into the spec file.
|
||||||
|
@ -142,7 +260,8 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# First-hand choice is to locate and run the vsvars bat file.
|
# First-hand choice is to locate and run the vsvars bat file.
|
||||||
TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE
|
TOOLCHAIN_FIND_VISUAL_STUDIO
|
||||||
|
|
||||||
if test "x$VS_ENV_CMD" != x; then
|
if test "x$VS_ENV_CMD" != x; then
|
||||||
# We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
|
# We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
|
||||||
BASIC_FIXUP_EXECUTABLE(VS_ENV_CMD)
|
BASIC_FIXUP_EXECUTABLE(VS_ENV_CMD)
|
||||||
|
@ -213,9 +332,9 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
|
||||||
AC_MSG_ERROR([Your VC command prompt seems broken, INCLUDE and/or LIB is missing.])
|
AC_MSG_ERROR([Your VC command prompt seems broken, INCLUDE and/or LIB is missing.])
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT([ok])
|
AC_MSG_RESULT([ok])
|
||||||
# Remove any trailing "\" and " " from the variables.
|
# Remove any trailing "\" ";" and " " from the variables.
|
||||||
VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
|
VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
|
||||||
VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
|
VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
|
||||||
VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
|
VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
|
||||||
WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
|
WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
|
||||||
WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
|
WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
|
||||||
|
@ -226,6 +345,26 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
|
||||||
AC_SUBST(VS_PATH)
|
AC_SUBST(VS_PATH)
|
||||||
AC_SUBST(VS_INCLUDE)
|
AC_SUBST(VS_INCLUDE)
|
||||||
AC_SUBST(VS_LIB)
|
AC_SUBST(VS_LIB)
|
||||||
|
|
||||||
|
# Convert VS_INCLUDE into SYSROOT_CFLAGS
|
||||||
|
OLDIFS="$IFS"
|
||||||
|
IFS=";"
|
||||||
|
for i in $VS_INCLUDE; do
|
||||||
|
ipath=$i
|
||||||
|
IFS="$OLDIFS"
|
||||||
|
BASIC_FIXUP_PATH([ipath])
|
||||||
|
IFS=";"
|
||||||
|
SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
|
||||||
|
done
|
||||||
|
# Convert VS_LIB into SYSROOT_LDFLAGS
|
||||||
|
for i in $VS_LIB; do
|
||||||
|
libpath=$i
|
||||||
|
IFS="$OLDIFS"
|
||||||
|
BASIC_FIXUP_PATH([libpath])
|
||||||
|
IFS=";"
|
||||||
|
SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
|
||||||
|
done
|
||||||
|
IFS="$OLDIFS"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT([not found])
|
AC_MSG_RESULT([not found])
|
||||||
|
@ -242,16 +381,17 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL],
|
AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL],
|
||||||
[
|
[
|
||||||
POSSIBLE_MSVCR_DLL="$1"
|
DLL_NAME="$1"
|
||||||
METHOD="$2"
|
POSSIBLE_MSVC_DLL="$2"
|
||||||
if test -e "$POSSIBLE_MSVCR_DLL"; then
|
METHOD="$3"
|
||||||
AC_MSG_NOTICE([Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD])
|
if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
|
||||||
|
AC_MSG_NOTICE([Found $1 at $POSSIBLE_MSVC_DLL using $METHOD])
|
||||||
|
|
||||||
# Need to check if the found msvcr is correct architecture
|
# Need to check if the found msvcr is correct architecture
|
||||||
AC_MSG_CHECKING([found msvcr100.dll architecture])
|
AC_MSG_CHECKING([found $1 architecture])
|
||||||
MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
|
MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
|
||||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||||
# The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
|
# The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
|
||||||
# on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
|
# on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
|
||||||
|
@ -267,96 +407,135 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL],
|
||||||
CORRECT_MSVCR_ARCH=x86-64
|
CORRECT_MSVCR_ARCH=x86-64
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
|
if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
|
||||||
AC_MSG_RESULT([ok])
|
AC_MSG_RESULT([ok])
|
||||||
MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
|
MSVC_DLL="$POSSIBLE_MSVC_DLL"
|
||||||
AC_MSG_CHECKING([for msvcr100.dll])
|
AC_MSG_CHECKING([for $1])
|
||||||
AC_MSG_RESULT([$MSVCR_DLL])
|
AC_MSG_RESULT([$MSVC_DLL])
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT([incorrect, ignoring])
|
AC_MSG_RESULT([incorrect, ignoring])
|
||||||
AC_MSG_NOTICE([The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE])
|
AC_MSG_NOTICE([The file type of the located $1 is $MSVC_DLL_FILETYPE])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([TOOLCHAIN_SETUP_MSVCR_DLL],
|
AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
|
||||||
[
|
[
|
||||||
AC_ARG_WITH(msvcr-dll, [AS_HELP_STRING([--with-msvcr-dll],
|
VAR_NAME="$1"
|
||||||
[copy this msvcr100.dll into the built JDK (Windows only) @<:@probed@:>@])])
|
DLL_NAME="$2"
|
||||||
|
MSVC_DLL=
|
||||||
|
|
||||||
if test "x$with_msvcr_dll" != x; then
|
if test "x$MSVC_DLL" = x; then
|
||||||
# If given explicitely by user, do not probe. If not present, fail directly.
|
|
||||||
TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$with_msvcr_dll], [--with-msvcr-dll])
|
|
||||||
if test "x$MSVCR_DLL" = x; then
|
|
||||||
AC_MSG_ERROR([Could not find a proper msvcr100.dll as specified by --with-msvcr-dll])
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "x$MSVCR_DLL" = x; then
|
|
||||||
# Probe: Using well-known location from Visual Studio 10.0
|
# Probe: Using well-known location from Visual Studio 10.0
|
||||||
if test "x$VCINSTALLDIR" != x; then
|
if test "x$VCINSTALLDIR" != x; then
|
||||||
CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
|
CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
|
||||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_VC_INSTALL_DIR)
|
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_VC_INSTALL_DIR)
|
||||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||||
POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
|
POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
|
||||||
else
|
else
|
||||||
POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
|
POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
|
||||||
fi
|
fi
|
||||||
TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [well-known location in VCINSTALLDIR])
|
$ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
|
||||||
|
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
|
||||||
|
[well-known location in VCINSTALLDIR])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$MSVCR_DLL" = x; then
|
if test "x$MSVC_DLL" = x; then
|
||||||
# Probe: Check in the Boot JDK directory.
|
# Probe: Check in the Boot JDK directory.
|
||||||
POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
|
POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
|
||||||
TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [well-known location in Boot JDK])
|
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
|
||||||
|
[well-known location in Boot JDK])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$MSVCR_DLL" = x; then
|
if test "x$MSVC_DLL" = x; then
|
||||||
# Probe: Look in the Windows system32 directory
|
# Probe: Look in the Windows system32 directory
|
||||||
CYGWIN_SYSTEMROOT="$SYSTEMROOT"
|
CYGWIN_SYSTEMROOT="$SYSTEMROOT"
|
||||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_SYSTEMROOT)
|
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_SYSTEMROOT)
|
||||||
POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
|
POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
|
||||||
TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [well-known location in SYSTEMROOT])
|
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
|
||||||
|
[well-known location in SYSTEMROOT])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$MSVCR_DLL" = x; then
|
if test "x$MSVC_DLL" = x; then
|
||||||
# Probe: If Visual Studio Express is installed, there is usually one with the debugger
|
# Probe: If Visual Studio Express is installed, there is usually one with the debugger
|
||||||
if test "x$VS100COMNTOOLS" != x; then
|
if test "x$VS100COMNTOOLS" != x; then
|
||||||
CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
|
CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
|
||||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_VS_TOOLS_DIR)
|
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_VS_TOOLS_DIR)
|
||||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||||
POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
|
POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
|
||||||
|
| $GREP -i /x64/ | $HEAD --lines 1`
|
||||||
else
|
else
|
||||||
POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
|
POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
|
||||||
|
| $GREP -i /x86/ | $HEAD --lines 1`
|
||||||
fi
|
fi
|
||||||
TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [search of VS100COMNTOOLS])
|
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
|
||||||
|
[search of VS100COMNTOOLS])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$MSVCR_DLL" = x; then
|
if test "x$MSVC_DLL" = x; then
|
||||||
# Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
|
# Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
|
||||||
# (This was the original behaviour; kept since it might turn up something)
|
# (This was the original behaviour; kept since it might turn something up)
|
||||||
if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
|
if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
|
||||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||||
POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
|
POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
|
||||||
|
| $GREP x64 | $HEAD --lines 1`
|
||||||
else
|
else
|
||||||
POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
|
POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
|
||||||
if test "x$POSSIBLE_MSVCR_DLL" = x; then
|
| $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
|
||||||
|
if test "x$POSSIBLE_MSVC_DLL" = x; then
|
||||||
# We're grasping at straws now...
|
# We're grasping at straws now...
|
||||||
POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
|
POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
|
||||||
|
| $HEAD --lines 1`
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [search of VCINSTALLDIR])
|
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
|
||||||
|
[search of VCINSTALLDIR])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$MSVCR_DLL" = x; then
|
if test "x$MSVC_DLL" = x; then
|
||||||
AC_MSG_CHECKING([for msvcr100.dll])
|
AC_MSG_CHECKING([for $DLL_NAME])
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
AC_MSG_ERROR([Could not find msvcr100.dll. Please specify using --with-msvcr-dll.])
|
AC_MSG_ERROR([Could not find $DLL_NAME. Please specify using --with-msvcr-dll.])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BASIC_FIXUP_PATH(MSVCR_DLL)
|
$1=$MSVC_DLL
|
||||||
|
BASIC_FIXUP_PATH($1)
|
||||||
|
AC_SUBST($1, [$]$1)
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
|
||||||
|
[
|
||||||
|
AC_ARG_WITH(msvcr-dll, [AS_HELP_STRING([--with-msvcr-dll],
|
||||||
|
[path to microsoft C runtime dll (msvcr*.dll) (Windows only) @<:@probed@:>@])])
|
||||||
|
|
||||||
|
if test "x$with_msvcr_dll" != x; then
|
||||||
|
# If given explicitely by user, do not probe. If not present, fail directly.
|
||||||
|
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$with_msvcr_dll],
|
||||||
|
[--with-msvcr-dll])
|
||||||
|
if test "x$MSVC_DLL" = x; then
|
||||||
|
AC_MSG_ERROR([Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll])
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
TOOLCHAIN_SETUP_MSVC_DLL([MSVCR_DLL], [${MSVCR_NAME}])
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_ARG_WITH(msvcp-dll, [AS_HELP_STRING([--with-msvcp-dll],
|
||||||
|
[path to microsoft C++ runtime dll (msvcp*.dll) (Windows only) @<:@probed@:>@])])
|
||||||
|
|
||||||
|
if test "x$MSVCP_NAME" != "x"; then
|
||||||
|
if test "x$with_msvcp_dll" != x; then
|
||||||
|
# If given explicitely by user, do not probe. If not present, fail directly.
|
||||||
|
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$with_msvcp_dll],
|
||||||
|
[--with-msvcp-dll])
|
||||||
|
if test "x$MSVC_DLL" = x; then
|
||||||
|
AC_MSG_ERROR([Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll])
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
TOOLCHAIN_SETUP_MSVC_DLL([MSVCP_DLL], [${MSVCP_NAME}])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
])
|
])
|
||||||
|
|
|
@ -123,6 +123,7 @@ jdk/src/java.base/share/classes/java/lang/reflect : jdk/src/share/classes/java/l
|
||||||
jdk/src/java.base/share/classes/java/math : jdk/src/share/classes/java/math
|
jdk/src/java.base/share/classes/java/math : jdk/src/share/classes/java/math
|
||||||
jdk/src/java.base/share/classes/java/net : jdk/src/share/classes/java/net
|
jdk/src/java.base/share/classes/java/net : jdk/src/share/classes/java/net
|
||||||
jdk/src/java.base/share/classes/java/nio : jdk/src/share/classes/java/nio
|
jdk/src/java.base/share/classes/java/nio : jdk/src/share/classes/java/nio
|
||||||
|
jdk/src/java.base/share/classes/java/security/acl : jdk/src/share/classes/java/security/acl
|
||||||
jdk/src/java.base/share/classes/java/security/cert : jdk/src/share/classes/java/security/cert
|
jdk/src/java.base/share/classes/java/security/cert : jdk/src/share/classes/java/security/cert
|
||||||
jdk/src/java.base/share/classes/java/security/interfaces : jdk/src/share/classes/java/security/interfaces
|
jdk/src/java.base/share/classes/java/security/interfaces : jdk/src/share/classes/java/security/interfaces
|
||||||
jdk/src/java.base/share/classes/java/security : jdk/src/share/classes/java/security
|
jdk/src/java.base/share/classes/java/security : jdk/src/share/classes/java/security
|
||||||
|
@ -179,6 +180,7 @@ jdk/src/java.base/share/classes/sun/nio/ch : jdk/src/share/classes/sun/nio/ch
|
||||||
jdk/src/java.base/share/classes/sun/nio/cs : jdk/src/share/classes/sun/nio/cs
|
jdk/src/java.base/share/classes/sun/nio/cs : jdk/src/share/classes/sun/nio/cs
|
||||||
jdk/src/java.base/share/classes/sun/nio/fs : jdk/src/share/classes/sun/nio/fs
|
jdk/src/java.base/share/classes/sun/nio/fs : jdk/src/share/classes/sun/nio/fs
|
||||||
jdk/src/java.base/share/classes/sun/reflect : jdk/src/share/classes/sun/reflect
|
jdk/src/java.base/share/classes/sun/reflect : jdk/src/share/classes/sun/reflect
|
||||||
|
jdk/src/java.base/share/classes/sun/security/acl : jdk/src/share/classes/sun/security/acl
|
||||||
jdk/src/java.base/share/classes/sun/security/action : jdk/src/share/classes/sun/security/action
|
jdk/src/java.base/share/classes/sun/security/action : jdk/src/share/classes/sun/security/action
|
||||||
jdk/src/java.base/share/classes/sun/security/internal : jdk/src/share/classes/sun/security/internal
|
jdk/src/java.base/share/classes/sun/security/internal : jdk/src/share/classes/sun/security/internal
|
||||||
jdk/src/java.base/share/classes/sun/security/jca : jdk/src/share/classes/sun/security/jca
|
jdk/src/java.base/share/classes/sun/security/jca : jdk/src/share/classes/sun/security/jca
|
||||||
|
@ -1211,8 +1213,6 @@ jdk/src/java.rmi/share/doc/stub/java/rmi/activation : jdk/src/share/doc/stub/jav
|
||||||
jdk/src/java.rmi/unix/bin/java-rmi.cgi.sh : jdk/src/solaris/bin/java-rmi.cgi.sh
|
jdk/src/java.rmi/unix/bin/java-rmi.cgi.sh : jdk/src/solaris/bin/java-rmi.cgi.sh
|
||||||
jdk/src/java.scripting/share/classes/javax/script : jdk/src/share/classes/javax/script
|
jdk/src/java.scripting/share/classes/javax/script : jdk/src/share/classes/javax/script
|
||||||
jdk/src/java.scripting/share/classes/com/sun/tools/script/shell : jdk/src/share/classes/com/sun/tools/script/shell
|
jdk/src/java.scripting/share/classes/com/sun/tools/script/shell : jdk/src/share/classes/com/sun/tools/script/shell
|
||||||
jdk/src/java.security.acl/share/classes/java/security/acl : jdk/src/share/classes/java/security/acl
|
|
||||||
jdk/src/java.security.acl/share/classes/sun/security/acl : jdk/src/share/classes/sun/security/acl
|
|
||||||
jdk/src/java.security.jgss/macosx/native/libosxkrb5/nativeccache.c : jdk/src/share/native/sun/security/krb5/nativeccache.c
|
jdk/src/java.security.jgss/macosx/native/libosxkrb5/nativeccache.c : jdk/src/share/native/sun/security/krb5/nativeccache.c
|
||||||
jdk/src/java.security.jgss/macosx/native/libosxkrb5/SCDynamicStoreConfig.m : jdk/src/macosx/native/sun/security/krb5/SCDynamicStoreConfig.m
|
jdk/src/java.security.jgss/macosx/native/libosxkrb5/SCDynamicStoreConfig.m : jdk/src/macosx/native/sun/security/krb5/SCDynamicStoreConfig.m
|
||||||
jdk/src/java.security.jgss/share/classes/javax/security/auth/kerberos : jdk/src/share/classes/javax/security/auth/kerberos
|
jdk/src/java.security.jgss/share/classes/javax/security/auth/kerberos : jdk/src/share/classes/javax/security/auth/kerberos
|
||||||
|
@ -1303,6 +1303,7 @@ jdk/src/jdk.deploy.osx/macosx/native/libosx/KeystoreImpl.m : jdk/src/macosx/nati
|
||||||
jdk/src/jdk.dev/share/classes/com/sun/jarsigner : jdk/src/share/classes/com/sun/jarsigner
|
jdk/src/jdk.dev/share/classes/com/sun/jarsigner : jdk/src/share/classes/com/sun/jarsigner
|
||||||
jdk/src/jdk.dev/share/classes/com/sun/tools/hat : jdk/src/share/classes/com/sun/tools/hat
|
jdk/src/jdk.dev/share/classes/com/sun/tools/hat : jdk/src/share/classes/com/sun/tools/hat
|
||||||
jdk/src/jdk.dev/share/classes/sun/security/tools/jarsigner : jdk/src/share/classes/sun/security/tools/jarsigner
|
jdk/src/jdk.dev/share/classes/sun/security/tools/jarsigner : jdk/src/share/classes/sun/security/tools/jarsigner
|
||||||
|
jdk/src/jdk.dev/share/classes/sun/security/tools/policytool : jdk/src/share/classes/sun/security/tools/policytool
|
||||||
jdk/src/jdk.dev/share/classes/sun/tools/jar : jdk/src/share/classes/sun/tools/jar
|
jdk/src/jdk.dev/share/classes/sun/tools/jar : jdk/src/share/classes/sun/tools/jar
|
||||||
jdk/src/jdk.dev/share/classes/sun/tools/native2ascii : jdk/src/share/classes/sun/tools/native2ascii
|
jdk/src/jdk.dev/share/classes/sun/tools/native2ascii : jdk/src/share/classes/sun/tools/native2ascii
|
||||||
jdk/src/jdk.hprof.agent/share/classes/com/sun/demo/jvmti/hprof : jdk/src/share/classes/com/sun/demo/jvmti/hprof
|
jdk/src/jdk.hprof.agent/share/classes/com/sun/demo/jvmti/hprof : jdk/src/share/classes/com/sun/demo/jvmti/hprof
|
||||||
|
@ -1443,7 +1444,6 @@ jdk/src/jdk.rmic/share/classes/sun/tools/java : jdk/src/share/classes/sun/tools/
|
||||||
jdk/src/jdk.rmic/share/classes/sun/tools/tree : jdk/src/share/classes/sun/tools/tree
|
jdk/src/jdk.rmic/share/classes/sun/tools/tree : jdk/src/share/classes/sun/tools/tree
|
||||||
jdk/src/jdk.rmic/share/classes/sun/tools/util : jdk/src/share/classes/sun/tools/util
|
jdk/src/jdk.rmic/share/classes/sun/tools/util : jdk/src/share/classes/sun/tools/util
|
||||||
jdk/src/jdk.runtime/share/classes/com/sun/tracing : jdk/src/share/classes/com/sun/tracing
|
jdk/src/jdk.runtime/share/classes/com/sun/tracing : jdk/src/share/classes/com/sun/tracing
|
||||||
jdk/src/jdk.runtime/share/classes/sun/security/tools/policytool : jdk/src/share/classes/sun/security/tools/policytool
|
|
||||||
jdk/src/jdk.runtime/share/classes/sun/tracing : jdk/src/share/classes/sun/tracing
|
jdk/src/jdk.runtime/share/classes/sun/tracing : jdk/src/share/classes/sun/tracing
|
||||||
jdk/src/jdk.runtime/share/native/common-unpack/bands.cpp : jdk/src/share/native/com/sun/java/util/jar/pack/bands.cpp
|
jdk/src/jdk.runtime/share/native/common-unpack/bands.cpp : jdk/src/share/native/com/sun/java/util/jar/pack/bands.cpp
|
||||||
jdk/src/jdk.runtime/share/native/common-unpack/bands.h : jdk/src/share/native/com/sun/java/util/jar/pack/bands.h
|
jdk/src/jdk.runtime/share/native/common-unpack/bands.h : jdk/src/share/native/com/sun/java/util/jar/pack/bands.h
|
||||||
|
|
|
@ -291,3 +291,6 @@ e27c725d6c9d155667b35255f442d4ceb8c3c084 jdk9-b40
|
||||||
326f2068b4a4c05e2fa27d6acf93eba7b54b090d jdk9-b46
|
326f2068b4a4c05e2fa27d6acf93eba7b54b090d jdk9-b46
|
||||||
ee8447ca632e1d39180b4767c749db101bff7314 jdk9-b47
|
ee8447ca632e1d39180b4767c749db101bff7314 jdk9-b47
|
||||||
a13c49c5f2899b702652a460ed7aa73123e671e6 jdk9-b48
|
a13c49c5f2899b702652a460ed7aa73123e671e6 jdk9-b48
|
||||||
|
9285d14eb7b6b0815679bae98dd936dbc136218d jdk9-b49
|
||||||
|
224f593393e5b01b3c8f1e591b7f4b1790a3737a jdk9-b50
|
||||||
|
2309c02386d1fa4ced5051873ffb9e04874f7a44 jdk9-b51
|
||||||
|
|
|
@ -176,42 +176,9 @@ public abstract class ORB extends com.sun.corba.se.org.omg.CORBA.ORB
|
||||||
staticWrapper = ORBUtilSystemException.get(
|
staticWrapper = ORBUtilSystemException.get(
|
||||||
CORBALogDomains.RPC_PRESENTATION ) ;
|
CORBALogDomains.RPC_PRESENTATION ) ;
|
||||||
|
|
||||||
boolean useDynamicStub =
|
boolean useDynamicStub = false;
|
||||||
((Boolean)AccessController.doPrivileged(
|
|
||||||
new PrivilegedAction() {
|
|
||||||
public java.lang.Object run() {
|
|
||||||
return Boolean.valueOf( Boolean.getBoolean (
|
|
||||||
ORBConstants.USE_DYNAMIC_STUB_PROPERTY ) ) ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)).booleanValue() ;
|
|
||||||
|
|
||||||
PresentationManager.StubFactoryFactory dynamicStubFactoryFactory =
|
PresentationManager.StubFactoryFactory dynamicStubFactoryFactory = null;
|
||||||
(PresentationManager.StubFactoryFactory)AccessController.doPrivileged(
|
|
||||||
new PrivilegedAction() {
|
|
||||||
public java.lang.Object run() {
|
|
||||||
PresentationManager.StubFactoryFactory sff =
|
|
||||||
PresentationDefaults.getProxyStubFactoryFactory() ;
|
|
||||||
|
|
||||||
String className = System.getProperty(
|
|
||||||
ORBConstants.DYNAMIC_STUB_FACTORY_FACTORY_CLASS,
|
|
||||||
"com.sun.corba.se.impl.presentation.rmi.bcel.StubFactoryFactoryBCELImpl" ) ;
|
|
||||||
|
|
||||||
try {
|
|
||||||
// First try the configured class name, if any
|
|
||||||
Class<?> cls =
|
|
||||||
sun.corba.SharedSecrets.getJavaCorbaAccess().loadClass(className);
|
|
||||||
sff = (PresentationManager.StubFactoryFactory)cls.newInstance();
|
|
||||||
} catch (Exception exc) {
|
|
||||||
// Use the default. Log the error as a warning.
|
|
||||||
staticWrapper.errorInSettingDynamicStubFactoryFactory(
|
|
||||||
exc, className ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return sff ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
) ;
|
|
||||||
|
|
||||||
PresentationManager pm = new PresentationManagerImpl( useDynamicStub ) ;
|
PresentationManager pm = new PresentationManagerImpl( useDynamicStub ) ;
|
||||||
pm.setStubFactoryFactory( false,
|
pm.setStubFactoryFactory( false,
|
||||||
|
|
|
@ -28,7 +28,9 @@ package sun.corba;
|
||||||
import com.sun.corba.se.impl.io.ValueUtility;
|
import com.sun.corba.se.impl.io.ValueUtility;
|
||||||
import sun.misc.Unsafe;
|
import sun.misc.Unsafe;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
import java.security.AccessController;
|
import java.security.AccessController;
|
||||||
|
import java.security.PrivilegedAction;
|
||||||
|
|
||||||
/** A repository of "shared secrets", which are a mechanism for
|
/** A repository of "shared secrets", which are a mechanism for
|
||||||
calling implementation-private methods in another package without
|
calling implementation-private methods in another package without
|
||||||
|
@ -41,9 +43,23 @@ import java.security.AccessController;
|
||||||
|
|
||||||
// SharedSecrets cloned in corba repo to avoid build issues
|
// SharedSecrets cloned in corba repo to avoid build issues
|
||||||
public class SharedSecrets {
|
public class SharedSecrets {
|
||||||
private static final Unsafe unsafe = Unsafe.getUnsafe();
|
private static final Unsafe unsafe = getUnsafe();
|
||||||
private static JavaCorbaAccess javaCorbaAccess;
|
private static JavaCorbaAccess javaCorbaAccess;
|
||||||
|
|
||||||
|
private static Unsafe getUnsafe() {
|
||||||
|
PrivilegedAction<Unsafe> pa = () -> {
|
||||||
|
Class<?> unsafeClass = sun.misc.Unsafe.class ;
|
||||||
|
try {
|
||||||
|
Field f = unsafeClass.getDeclaredField("theUnsafe");
|
||||||
|
f.setAccessible(true);
|
||||||
|
return (Unsafe) f.get(null);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new Error(e);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return AccessController.doPrivileged(pa);
|
||||||
|
}
|
||||||
|
|
||||||
public static JavaCorbaAccess getJavaCorbaAccess() {
|
public static JavaCorbaAccess getJavaCorbaAccess() {
|
||||||
if (javaCorbaAccess == null) {
|
if (javaCorbaAccess == null) {
|
||||||
// Ensure ValueUtility is initialized; we know that that class
|
// Ensure ValueUtility is initialized; we know that that class
|
||||||
|
|
|
@ -451,3 +451,6 @@ c363a8b87e477ee45d6d3cb2a36cb365141bc596 jdk9-b38
|
||||||
a184ee1d717297bd35b7c3e35393e137921a3ed2 jdk9-b46
|
a184ee1d717297bd35b7c3e35393e137921a3ed2 jdk9-b46
|
||||||
3b241fb72b8925b75941d612db762a6d5da66d02 jdk9-b47
|
3b241fb72b8925b75941d612db762a6d5da66d02 jdk9-b47
|
||||||
cc775a4a24c7f5d9e624b4205e9fbd48a17331f6 jdk9-b48
|
cc775a4a24c7f5d9e624b4205e9fbd48a17331f6 jdk9-b48
|
||||||
|
360cd1fc42f10941a9fd17cc32d5b85a22d12a0b jdk9-b49
|
||||||
|
e0947f58c9c1426aa0d98b98ebb78357b27a7b99 jdk9-b50
|
||||||
|
403b9cbadb04d3d1201823591cf931dc93b38e3a jdk9-b51
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright 2012, 2013 SAP AG. All rights reserved.
|
* Copyright 2012, 2013 SAP AG. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
|
@ -32,7 +32,6 @@
|
||||||
#include "memory/resourceArea.hpp"
|
#include "memory/resourceArea.hpp"
|
||||||
#include "nativeInst_ppc.hpp"
|
#include "nativeInst_ppc.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
#include "oops/oop.inline2.hpp"
|
|
||||||
|
|
||||||
#define __ masm.
|
#define __ masm.
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include "interp_masm_ppc_64.hpp"
|
#include "interp_masm_ppc_64.hpp"
|
||||||
#include "interpreter/interpreterRuntime.hpp"
|
#include "interpreter/interpreterRuntime.hpp"
|
||||||
#include "prims/jvmtiThreadState.hpp"
|
#include "prims/jvmtiThreadState.hpp"
|
||||||
|
#include "runtime/sharedRuntime.hpp"
|
||||||
|
|
||||||
#ifdef PRODUCT
|
#ifdef PRODUCT
|
||||||
#define BLOCK_COMMENT(str) // nothing
|
#define BLOCK_COMMENT(str) // nothing
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright 2012, 2014 SAP AG. All rights reserved.
|
* Copyright 2012, 2014 SAP AG. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "asm/macroAssembler.inline.hpp"
|
#include "asm/macroAssembler.inline.hpp"
|
||||||
|
#include "classfile/javaClasses.inline.hpp"
|
||||||
#include "interpreter/interpreter.hpp"
|
#include "interpreter/interpreter.hpp"
|
||||||
#include "memory/allocation.inline.hpp"
|
#include "memory/allocation.inline.hpp"
|
||||||
#include "prims/methodHandles.hpp"
|
#include "prims/methodHandles.hpp"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -33,6 +33,7 @@
|
||||||
#include "runtime/basicLock.hpp"
|
#include "runtime/basicLock.hpp"
|
||||||
#include "runtime/biasedLocking.hpp"
|
#include "runtime/biasedLocking.hpp"
|
||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
|
#include "runtime/sharedRuntime.hpp"
|
||||||
#include "runtime/stubRoutines.hpp"
|
#include "runtime/stubRoutines.hpp"
|
||||||
|
|
||||||
void C1_MacroAssembler::inline_cache_check(Register receiver, Register iCache) {
|
void C1_MacroAssembler::inline_cache_check(Register receiver, Register iCache) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -30,7 +30,6 @@
|
||||||
#include "memory/resourceArea.hpp"
|
#include "memory/resourceArea.hpp"
|
||||||
#include "nativeInst_sparc.hpp"
|
#include "nativeInst_sparc.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
#include "oops/oop.inline2.hpp"
|
|
||||||
|
|
||||||
int InlineCacheBuffer::ic_stub_code_size() {
|
int InlineCacheBuffer::ic_stub_code_size() {
|
||||||
#ifdef _LP64
|
#ifdef _LP64
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "asm/macroAssembler.hpp"
|
#include "asm/macroAssembler.hpp"
|
||||||
|
#include "classfile/javaClasses.inline.hpp"
|
||||||
#include "interpreter/interpreter.hpp"
|
#include "interpreter/interpreter.hpp"
|
||||||
#include "interpreter/interp_masm.hpp"
|
#include "interpreter/interp_masm.hpp"
|
||||||
#include "memory/allocation.inline.hpp"
|
#include "memory/allocation.inline.hpp"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -33,6 +33,7 @@
|
||||||
#include "runtime/basicLock.hpp"
|
#include "runtime/basicLock.hpp"
|
||||||
#include "runtime/biasedLocking.hpp"
|
#include "runtime/biasedLocking.hpp"
|
||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
|
#include "runtime/sharedRuntime.hpp"
|
||||||
#include "runtime/stubRoutines.hpp"
|
#include "runtime/stubRoutines.hpp"
|
||||||
|
|
||||||
int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr, Register scratch, Label& slow_case) {
|
int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr, Register scratch, Label& slow_case) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -31,7 +31,6 @@
|
||||||
#include "memory/resourceArea.hpp"
|
#include "memory/resourceArea.hpp"
|
||||||
#include "nativeInst_x86.hpp"
|
#include "nativeInst_x86.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
#include "oops/oop.inline2.hpp"
|
|
||||||
|
|
||||||
int InlineCacheBuffer::ic_stub_code_size() {
|
int InlineCacheBuffer::ic_stub_code_size() {
|
||||||
return NativeMovConstReg::instruction_size +
|
return NativeMovConstReg::instruction_size +
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "asm/macroAssembler.hpp"
|
#include "asm/macroAssembler.hpp"
|
||||||
|
#include "classfile/javaClasses.inline.hpp"
|
||||||
#include "interpreter/interpreter.hpp"
|
#include "interpreter/interpreter.hpp"
|
||||||
#include "interpreter/interpreterRuntime.hpp"
|
#include "interpreter/interpreterRuntime.hpp"
|
||||||
#include "memory/allocation.inline.hpp"
|
#include "memory/allocation.inline.hpp"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright 2007 Red Hat, Inc.
|
* Copyright 2007 Red Hat, Inc.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
|
@ -32,7 +32,6 @@
|
||||||
#include "memory/resourceArea.hpp"
|
#include "memory/resourceArea.hpp"
|
||||||
#include "nativeInst_zero.hpp"
|
#include "nativeInst_zero.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
#include "oops/oop.inline2.hpp"
|
|
||||||
|
|
||||||
int InlineCacheBuffer::ic_stub_code_size() {
|
int InlineCacheBuffer::ic_stub_code_size() {
|
||||||
// NB set this once the functions below are implemented
|
// NB set this once the functions below are implemented
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -24,12 +24,12 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A SAX based parser of LogCompilation output from HotSpot. It takes a complete
|
* A SAX based parser of LogCompilation output from HotSpot. It takes a complete
|
||||||
* @author never
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.sun.hotspot.tools.compiler;
|
package com.sun.hotspot.tools.compiler;
|
||||||
|
|
||||||
import java.io.FileReader;
|
import java.io.FileReader;
|
||||||
|
import java.io.PrintStream;
|
||||||
import java.io.Reader;
|
import java.io.Reader;
|
||||||
import java.util.ArrayDeque;
|
import java.util.ArrayDeque;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -134,6 +134,44 @@ public class LogParser extends DefaultHandler implements ErrorHandler, Constants
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class Jvms {
|
||||||
|
Jvms(Method method, int bci) {
|
||||||
|
this.method = method;
|
||||||
|
this.bci = bci;
|
||||||
|
}
|
||||||
|
final public Method method;
|
||||||
|
final public int bci;
|
||||||
|
final public String toString() {
|
||||||
|
return "@" + bci + " " + method;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class LockElimination extends BasicLogEvent {
|
||||||
|
|
||||||
|
ArrayList<Jvms> jvms = new ArrayList<Jvms>(1);
|
||||||
|
final String kind;
|
||||||
|
final String classId;
|
||||||
|
final String tagName;
|
||||||
|
LockElimination(String tagName, double start, String id, String kind, String classId) {
|
||||||
|
super(start, id);
|
||||||
|
this.kind = kind;
|
||||||
|
this.classId = classId;
|
||||||
|
this.tagName = tagName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void print(PrintStream stream) {
|
||||||
|
stream.printf("%s %s %s %s %.3f ", getId(), tagName, kind, classId, getStart());
|
||||||
|
stream.print(jvms.toString());
|
||||||
|
stream.print("\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
void addJVMS(Method method, int bci) {
|
||||||
|
jvms.add(new Jvms(method, bci));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private ArrayList<LogEvent> events = new ArrayList<LogEvent>();
|
private ArrayList<LogEvent> events = new ArrayList<LogEvent>();
|
||||||
|
|
||||||
private HashMap<String, String> types = new HashMap<String, String>();
|
private HashMap<String, String> types = new HashMap<String, String>();
|
||||||
|
@ -147,6 +185,7 @@ public class LogParser extends DefaultHandler implements ErrorHandler, Constants
|
||||||
private CallSite site;
|
private CallSite site;
|
||||||
private CallSite methodHandleSite;
|
private CallSite methodHandleSite;
|
||||||
private Stack<Phase> phaseStack = new Stack<Phase>();
|
private Stack<Phase> phaseStack = new Stack<Phase>();
|
||||||
|
private LockElimination currentLockElimination;
|
||||||
private UncommonTrapEvent currentTrap;
|
private UncommonTrapEvent currentTrap;
|
||||||
private Stack<CallSite> lateInlineScope;
|
private Stack<CallSite> lateInlineScope;
|
||||||
private boolean lateInlining;
|
private boolean lateInlining;
|
||||||
|
@ -192,7 +231,12 @@ public class LogParser extends DefaultHandler implements ErrorHandler, Constants
|
||||||
}
|
}
|
||||||
|
|
||||||
LogParser log = new LogParser();
|
LogParser log = new LogParser();
|
||||||
p.parse(new InputSource(reader), log);
|
try {
|
||||||
|
p.parse(new InputSource(reader), log);
|
||||||
|
} catch (Throwable th) {
|
||||||
|
th.printStackTrace();
|
||||||
|
// Carry on with what we've got...
|
||||||
|
}
|
||||||
|
|
||||||
// Associate compilations with their NMethods
|
// Associate compilations with their NMethods
|
||||||
for (NMethod nm : log.nmethods.values()) {
|
for (NMethod nm : log.nmethods.values()) {
|
||||||
|
@ -418,8 +462,23 @@ public class LogParser extends DefaultHandler implements ErrorHandler, Constants
|
||||||
// uncommon trap inserted during parsing.
|
// uncommon trap inserted during parsing.
|
||||||
// ignore for now
|
// ignore for now
|
||||||
}
|
}
|
||||||
|
} else if (qname.startsWith("eliminate_lock")) {
|
||||||
|
String id = atts.getValue("compile_id");
|
||||||
|
if (id != null) {
|
||||||
|
id = makeId(atts);
|
||||||
|
String kind = atts.getValue("kind");
|
||||||
|
String classId = atts.getValue("class_id");
|
||||||
|
currentLockElimination = new LockElimination(qname, Double.parseDouble(search(atts, "stamp")), id, kind, classId);
|
||||||
|
events.add(currentLockElimination);
|
||||||
|
}
|
||||||
} else if (qname.equals("late_inline")) {
|
} else if (qname.equals("late_inline")) {
|
||||||
long inlineId = Long.parseLong(search(atts, "inline_id"));
|
long inlineId = 0;
|
||||||
|
try {
|
||||||
|
Long.parseLong(search(atts, "inline_id"));
|
||||||
|
} catch (InternalError ex) {
|
||||||
|
// Log files from older hotspots may lack inline_id,
|
||||||
|
// and zero is an acceptable substitute that allows processing to continue.
|
||||||
|
}
|
||||||
lateInlineScope = new Stack<CallSite>();
|
lateInlineScope = new Stack<CallSite>();
|
||||||
site = new CallSite(-999, method(search(atts, "method")));
|
site = new CallSite(-999, method(search(atts, "method")));
|
||||||
site.setInlineId(inlineId);
|
site.setInlineId(inlineId);
|
||||||
|
@ -428,13 +487,14 @@ public class LogParser extends DefaultHandler implements ErrorHandler, Constants
|
||||||
// <jvms bci='4' method='java/io/DataInputStream readChar ()C' bytes='40' count='5815' iicount='20815'/>
|
// <jvms bci='4' method='java/io/DataInputStream readChar ()C' bytes='40' count='5815' iicount='20815'/>
|
||||||
if (currentTrap != null) {
|
if (currentTrap != null) {
|
||||||
currentTrap.addJVMS(atts.getValue("method"), Integer.parseInt(atts.getValue("bci")));
|
currentTrap.addJVMS(atts.getValue("method"), Integer.parseInt(atts.getValue("bci")));
|
||||||
|
} else if (currentLockElimination != null) {
|
||||||
|
currentLockElimination.addJVMS(method(atts.getValue("method")), Integer.parseInt(atts.getValue("bci")));
|
||||||
} else if (lateInlineScope != null) {
|
} else if (lateInlineScope != null) {
|
||||||
bci = Integer.parseInt(search(atts, "bci"));
|
bci = Integer.parseInt(search(atts, "bci"));
|
||||||
site = new CallSite(bci, method(search(atts, "method")));
|
site = new CallSite(bci, method(search(atts, "method")));
|
||||||
lateInlineScope.push(site);
|
lateInlineScope.push(site);
|
||||||
} else {
|
} else {
|
||||||
// Ignore <eliminate_allocation type='667'>,
|
// Ignore <eliminate_allocation type='667'>,
|
||||||
// <eliminate_lock lock='1'>,
|
|
||||||
// <replace_string_concat arguments='2' string_alloc='0' multiple='0'>
|
// <replace_string_concat arguments='2' string_alloc='0' multiple='0'>
|
||||||
}
|
}
|
||||||
} else if (qname.equals("inline_id")) {
|
} else if (qname.equals("inline_id")) {
|
||||||
|
@ -512,6 +572,8 @@ public class LogParser extends DefaultHandler implements ErrorHandler, Constants
|
||||||
}
|
}
|
||||||
} else if (qname.equals("uncommon_trap")) {
|
} else if (qname.equals("uncommon_trap")) {
|
||||||
currentTrap = null;
|
currentTrap = null;
|
||||||
|
} else if (qname.startsWith("eliminate_lock")) {
|
||||||
|
currentLockElimination = null;
|
||||||
} else if (qname.equals("late_inline")) {
|
} else if (qname.equals("late_inline")) {
|
||||||
// Populate late inlining info.
|
// Populate late inlining info.
|
||||||
if (scopes.size() != 0) {
|
if (scopes.size() != 0) {
|
||||||
|
@ -522,8 +584,8 @@ public class LogParser extends DefaultHandler implements ErrorHandler, Constants
|
||||||
CallSite caller = lateInlineScope.pop();
|
CallSite caller = lateInlineScope.pop();
|
||||||
Method m = compile.getMethod();
|
Method m = compile.getMethod();
|
||||||
if (m != caller.getMethod()) {
|
if (m != caller.getMethod()) {
|
||||||
System.out.println(m);
|
System.err.println(m);
|
||||||
System.out.println(caller.getMethod() + " bci: " + bci);
|
System.err.println(caller.getMethod() + " bci: " + bci);
|
||||||
throw new InternalError("call site and late_inline info don't match");
|
throw new InternalError("call site and late_inline info don't match");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -50,7 +50,7 @@ class UncommonTrapEvent extends BasicLogEvent {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void print(PrintStream stream) {
|
public void print(PrintStream stream) {
|
||||||
stream.printf("%s uncommon trap %s %s\n", getId(), getReason(), getAction());
|
stream.printf("%s uncommon trap %.3f %s %s\n", getId(), getStart(), getReason(), getAction());
|
||||||
stream.print(getJvms());
|
stream.print(getJvms());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -220,7 +220,6 @@ int main(int argc, char *argv[])
|
||||||
AD.addInclude(AD._CPP_file, "oops/markOop.hpp");
|
AD.addInclude(AD._CPP_file, "oops/markOop.hpp");
|
||||||
AD.addInclude(AD._CPP_file, "oops/method.hpp");
|
AD.addInclude(AD._CPP_file, "oops/method.hpp");
|
||||||
AD.addInclude(AD._CPP_file, "oops/oop.inline.hpp");
|
AD.addInclude(AD._CPP_file, "oops/oop.inline.hpp");
|
||||||
AD.addInclude(AD._CPP_file, "oops/oop.inline2.hpp");
|
|
||||||
AD.addInclude(AD._CPP_file, "opto/cfgnode.hpp");
|
AD.addInclude(AD._CPP_file, "opto/cfgnode.hpp");
|
||||||
AD.addInclude(AD._CPP_file, "opto/locknode.hpp");
|
AD.addInclude(AD._CPP_file, "opto/locknode.hpp");
|
||||||
AD.addInclude(AD._CPP_file, "opto/opcodes.hpp");
|
AD.addInclude(AD._CPP_file, "opto/opcodes.hpp");
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -29,12 +29,12 @@
|
||||||
#include "c1/c1_LIRAssembler.hpp"
|
#include "c1/c1_LIRAssembler.hpp"
|
||||||
#include "c1/c1_LinearScan.hpp"
|
#include "c1/c1_LinearScan.hpp"
|
||||||
#include "c1/c1_MacroAssembler.hpp"
|
#include "c1/c1_MacroAssembler.hpp"
|
||||||
|
#include "c1/c1_RangeCheckElimination.hpp"
|
||||||
#include "c1/c1_ValueMap.hpp"
|
#include "c1/c1_ValueMap.hpp"
|
||||||
#include "c1/c1_ValueStack.hpp"
|
#include "c1/c1_ValueStack.hpp"
|
||||||
#include "code/debugInfoRec.hpp"
|
#include "code/debugInfoRec.hpp"
|
||||||
#include "compiler/compileLog.hpp"
|
#include "compiler/compileLog.hpp"
|
||||||
#include "c1/c1_RangeCheckElimination.hpp"
|
#include "runtime/sharedRuntime.hpp"
|
||||||
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
_t_compile,
|
_t_compile,
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#include "ci/ciMemberName.hpp"
|
#include "ci/ciMemberName.hpp"
|
||||||
#include "compiler/compileBroker.hpp"
|
#include "compiler/compileBroker.hpp"
|
||||||
#include "interpreter/bytecode.hpp"
|
#include "interpreter/bytecode.hpp"
|
||||||
|
#include "oops/oop.inline.hpp"
|
||||||
#include "runtime/sharedRuntime.hpp"
|
#include "runtime/sharedRuntime.hpp"
|
||||||
#include "runtime/compilationPolicy.hpp"
|
#include "runtime/compilationPolicy.hpp"
|
||||||
#include "runtime/vm_version.hpp"
|
#include "runtime/vm_version.hpp"
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include "ci/ciArrayKlass.hpp"
|
#include "ci/ciArrayKlass.hpp"
|
||||||
#include "ci/ciInstance.hpp"
|
#include "ci/ciInstance.hpp"
|
||||||
#include "ci/ciObjArray.hpp"
|
#include "ci/ciObjArray.hpp"
|
||||||
|
#include "memory/cardTableModRefBS.hpp"
|
||||||
#include "runtime/arguments.hpp"
|
#include "runtime/arguments.hpp"
|
||||||
#include "runtime/sharedRuntime.hpp"
|
#include "runtime/sharedRuntime.hpp"
|
||||||
#include "runtime/stubRoutines.hpp"
|
#include "runtime/stubRoutines.hpp"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -29,6 +29,7 @@
|
||||||
#include "ci/ciMethodBlocks.hpp"
|
#include "ci/ciMethodBlocks.hpp"
|
||||||
#include "ci/ciStreams.hpp"
|
#include "ci/ciStreams.hpp"
|
||||||
#include "interpreter/bytecode.hpp"
|
#include "interpreter/bytecode.hpp"
|
||||||
|
#include "oops/oop.inline.hpp"
|
||||||
#include "utilities/bitMap.inline.hpp"
|
#include "utilities/bitMap.inline.hpp"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -28,7 +28,8 @@
|
||||||
#include "ci/ciConstant.hpp"
|
#include "ci/ciConstant.hpp"
|
||||||
#include "ci/ciKlass.hpp"
|
#include "ci/ciKlass.hpp"
|
||||||
#include "ci/ciUtilities.hpp"
|
#include "ci/ciUtilities.hpp"
|
||||||
#include "oops/objArrayOop.hpp"
|
#include "oops/objArrayOop.inline.hpp"
|
||||||
|
#include "oops/oop.inline.hpp"
|
||||||
#include "oops/typeArrayOop.hpp"
|
#include "oops/typeArrayOop.hpp"
|
||||||
|
|
||||||
// ciArray
|
// ciArray
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -26,7 +26,6 @@
|
||||||
#include "ci/ciBaseObject.hpp"
|
#include "ci/ciBaseObject.hpp"
|
||||||
#include "ci/ciUtilities.hpp"
|
#include "ci/ciUtilities.hpp"
|
||||||
#include "gc_interface/collectedHeap.inline.hpp"
|
#include "gc_interface/collectedHeap.inline.hpp"
|
||||||
#include "oops/oop.inline2.hpp"
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
// ciBaseObject::set_ident
|
// ciBaseObject::set_ident
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -23,6 +23,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
|
#include "classfile/javaClasses.inline.hpp"
|
||||||
#include "ci/ciCallSite.hpp"
|
#include "ci/ciCallSite.hpp"
|
||||||
#include "ci/ciUtilities.hpp"
|
#include "ci/ciUtilities.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -46,8 +46,8 @@
|
||||||
#include "memory/universe.inline.hpp"
|
#include "memory/universe.inline.hpp"
|
||||||
#include "oops/methodData.hpp"
|
#include "oops/methodData.hpp"
|
||||||
#include "oops/objArrayKlass.hpp"
|
#include "oops/objArrayKlass.hpp"
|
||||||
|
#include "oops/objArrayOop.inline.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
#include "oops/oop.inline2.hpp"
|
|
||||||
#include "prims/jvmtiExport.hpp"
|
#include "prims/jvmtiExport.hpp"
|
||||||
#include "runtime/init.hpp"
|
#include "runtime/init.hpp"
|
||||||
#include "runtime/reflection.hpp"
|
#include "runtime/reflection.hpp"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -31,7 +31,6 @@
|
||||||
#include "interpreter/linkResolver.hpp"
|
#include "interpreter/linkResolver.hpp"
|
||||||
#include "memory/universe.inline.hpp"
|
#include "memory/universe.inline.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
#include "oops/oop.inline2.hpp"
|
|
||||||
#include "runtime/fieldDescriptor.hpp"
|
#include "runtime/fieldDescriptor.hpp"
|
||||||
|
|
||||||
// ciField
|
// ciField
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
#include "ci/ciObject.hpp"
|
#include "ci/ciObject.hpp"
|
||||||
#include "oops/instanceOop.hpp"
|
#include "oops/instanceOop.hpp"
|
||||||
|
#include "oops/oop.hpp"
|
||||||
|
|
||||||
// ciInstance
|
// ciInstance
|
||||||
//
|
//
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -26,7 +26,6 @@
|
||||||
#include "ci/ciObject.hpp"
|
#include "ci/ciObject.hpp"
|
||||||
#include "ci/ciUtilities.hpp"
|
#include "ci/ciUtilities.hpp"
|
||||||
#include "gc_interface/collectedHeap.inline.hpp"
|
#include "gc_interface/collectedHeap.inline.hpp"
|
||||||
#include "oops/oop.inline2.hpp"
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
// ciMetadata::print
|
// ciMetadata::print
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
#include "ci/ciObject.hpp"
|
#include "ci/ciObject.hpp"
|
||||||
#include "ci/ciUtilities.hpp"
|
#include "ci/ciUtilities.hpp"
|
||||||
#include "oops/methodData.hpp"
|
#include "oops/methodData.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.hpp"
|
||||||
#include "runtime/deoptimization.hpp"
|
#include "runtime/deoptimization.hpp"
|
||||||
|
|
||||||
class ciBitData;
|
class ciBitData;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
#include "ci/ciNullObject.hpp"
|
#include "ci/ciNullObject.hpp"
|
||||||
#include "ci/ciObjArray.hpp"
|
#include "ci/ciObjArray.hpp"
|
||||||
#include "ci/ciUtilities.hpp"
|
#include "ci/ciUtilities.hpp"
|
||||||
#include "oops/objArrayOop.hpp"
|
#include "oops/objArrayOop.inline.hpp"
|
||||||
|
|
||||||
// ciObjArray
|
// ciObjArray
|
||||||
//
|
//
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
#include "ci/ciObject.hpp"
|
#include "ci/ciObject.hpp"
|
||||||
#include "ci/ciUtilities.hpp"
|
#include "ci/ciUtilities.hpp"
|
||||||
#include "gc_interface/collectedHeap.inline.hpp"
|
#include "gc_interface/collectedHeap.inline.hpp"
|
||||||
#include "oops/oop.inline2.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
|
|
||||||
// ciObject
|
// ciObject
|
||||||
//
|
//
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -40,11 +40,11 @@
|
||||||
#include "ci/ciTypeArray.hpp"
|
#include "ci/ciTypeArray.hpp"
|
||||||
#include "ci/ciTypeArrayKlass.hpp"
|
#include "ci/ciTypeArrayKlass.hpp"
|
||||||
#include "ci/ciUtilities.hpp"
|
#include "ci/ciUtilities.hpp"
|
||||||
|
#include "classfile/javaClasses.inline.hpp"
|
||||||
#include "classfile/systemDictionary.hpp"
|
#include "classfile/systemDictionary.hpp"
|
||||||
#include "gc_interface/collectedHeap.inline.hpp"
|
#include "gc_interface/collectedHeap.inline.hpp"
|
||||||
#include "memory/allocation.inline.hpp"
|
#include "memory/allocation.inline.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
#include "oops/oop.inline2.hpp"
|
|
||||||
#include "runtime/fieldType.hpp"
|
#include "runtime/fieldType.hpp"
|
||||||
#include "utilities/macros.hpp"
|
#include "utilities/macros.hpp"
|
||||||
#if INCLUDE_ALL_GCS
|
#if INCLUDE_ALL_GCS
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
|
/* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -31,6 +31,7 @@
|
||||||
#include "memory/allocation.inline.hpp"
|
#include "memory/allocation.inline.hpp"
|
||||||
#include "memory/oopFactory.hpp"
|
#include "memory/oopFactory.hpp"
|
||||||
#include "memory/resourceArea.hpp"
|
#include "memory/resourceArea.hpp"
|
||||||
|
#include "oops/oop.inline.hpp"
|
||||||
#include "utilities/copy.hpp"
|
#include "utilities/copy.hpp"
|
||||||
#include "utilities/macros.hpp"
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -35,6 +35,7 @@
|
||||||
#include "interpreter/bytecode.hpp"
|
#include "interpreter/bytecode.hpp"
|
||||||
#include "interpreter/bytecodes.hpp"
|
#include "interpreter/bytecodes.hpp"
|
||||||
#include "memory/allocation.inline.hpp"
|
#include "memory/allocation.inline.hpp"
|
||||||
|
#include "oops/oop.inline.hpp"
|
||||||
#include "opto/compile.hpp"
|
#include "opto/compile.hpp"
|
||||||
#include "opto/node.hpp"
|
#include "opto/node.hpp"
|
||||||
#include "runtime/deoptimization.hpp"
|
#include "runtime/deoptimization.hpp"
|
||||||
|
|
|
@ -25,10 +25,9 @@
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "classfile/classFileParser.hpp"
|
#include "classfile/classFileParser.hpp"
|
||||||
#include "classfile/classLoader.hpp"
|
#include "classfile/classLoader.hpp"
|
||||||
#include "classfile/classLoaderData.hpp"
|
|
||||||
#include "classfile/classLoaderData.inline.hpp"
|
#include "classfile/classLoaderData.inline.hpp"
|
||||||
#include "classfile/defaultMethods.hpp"
|
#include "classfile/defaultMethods.hpp"
|
||||||
#include "classfile/javaClasses.hpp"
|
#include "classfile/javaClasses.inline.hpp"
|
||||||
#include "classfile/symbolTable.hpp"
|
#include "classfile/symbolTable.hpp"
|
||||||
#include "classfile/systemDictionary.hpp"
|
#include "classfile/systemDictionary.hpp"
|
||||||
#include "classfile/verificationType.hpp"
|
#include "classfile/verificationType.hpp"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -27,9 +27,7 @@
|
||||||
|
|
||||||
#include "classfile/classFileStream.hpp"
|
#include "classfile/classFileStream.hpp"
|
||||||
#include "memory/resourceArea.hpp"
|
#include "memory/resourceArea.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
|
||||||
#include "oops/typeArrayOop.hpp"
|
#include "oops/typeArrayOop.hpp"
|
||||||
#include "runtime/handles.inline.hpp"
|
|
||||||
#include "utilities/accessFlags.hpp"
|
#include "utilities/accessFlags.hpp"
|
||||||
#include "classfile/symbolTable.hpp"
|
#include "classfile/symbolTable.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -57,6 +57,8 @@
|
||||||
#include "memory/metadataFactory.hpp"
|
#include "memory/metadataFactory.hpp"
|
||||||
#include "memory/metaspaceShared.hpp"
|
#include "memory/metaspaceShared.hpp"
|
||||||
#include "memory/oopFactory.hpp"
|
#include "memory/oopFactory.hpp"
|
||||||
|
#include "oops/objArrayOop.inline.hpp"
|
||||||
|
#include "oops/oop.inline.hpp"
|
||||||
#include "runtime/atomic.inline.hpp"
|
#include "runtime/atomic.inline.hpp"
|
||||||
#include "runtime/jniHandles.hpp"
|
#include "runtime/jniHandles.hpp"
|
||||||
#include "runtime/mutex.hpp"
|
#include "runtime/mutex.hpp"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "classfile/classLoaderStats.hpp"
|
#include "classfile/classLoaderStats.hpp"
|
||||||
|
#include "oops/oop.inline.hpp"
|
||||||
#include "utilities/globalDefinitions.hpp"
|
#include "utilities/globalDefinitions.hpp"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
#include "classfile/systemDictionary.hpp"
|
#include "classfile/systemDictionary.hpp"
|
||||||
#include "oops/instanceKlass.hpp"
|
#include "oops/instanceKlass.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.hpp"
|
||||||
#include "utilities/hashtable.hpp"
|
#include "utilities/hashtable.hpp"
|
||||||
|
|
||||||
class DictionaryEntry;
|
class DictionaryEntry;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "classfile/altHashing.hpp"
|
#include "classfile/altHashing.hpp"
|
||||||
#include "classfile/javaClasses.hpp"
|
#include "classfile/javaClasses.inline.hpp"
|
||||||
#include "classfile/stringTable.hpp"
|
#include "classfile/stringTable.hpp"
|
||||||
#include "classfile/vmSymbols.hpp"
|
#include "classfile/vmSymbols.hpp"
|
||||||
#include "code/debugInfo.hpp"
|
#include "code/debugInfo.hpp"
|
||||||
|
@ -39,6 +39,8 @@
|
||||||
#include "oops/instanceMirrorKlass.hpp"
|
#include "oops/instanceMirrorKlass.hpp"
|
||||||
#include "oops/klass.hpp"
|
#include "oops/klass.hpp"
|
||||||
#include "oops/method.hpp"
|
#include "oops/method.hpp"
|
||||||
|
#include "oops/objArrayOop.inline.hpp"
|
||||||
|
#include "oops/oop.inline.hpp"
|
||||||
#include "oops/symbol.hpp"
|
#include "oops/symbol.hpp"
|
||||||
#include "oops/typeArrayOop.hpp"
|
#include "oops/typeArrayOop.hpp"
|
||||||
#include "prims/jvmtiRedefineClassesTrace.hpp"
|
#include "prims/jvmtiRedefineClassesTrace.hpp"
|
||||||
|
@ -149,6 +151,10 @@ int java_lang_String::hash_offset = 0;
|
||||||
|
|
||||||
bool java_lang_String::initialized = false;
|
bool java_lang_String::initialized = false;
|
||||||
|
|
||||||
|
bool java_lang_String::is_instance(oop obj) {
|
||||||
|
return is_instance_inlined(obj);
|
||||||
|
}
|
||||||
|
|
||||||
void java_lang_String::compute_offsets() {
|
void java_lang_String::compute_offsets() {
|
||||||
assert(!initialized, "offsets should be initialized only once");
|
assert(!initialized, "offsets should be initialized only once");
|
||||||
|
|
||||||
|
@ -2730,6 +2736,11 @@ void java_lang_invoke_LambdaForm::compute_offsets() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool java_lang_invoke_LambdaForm::is_instance(oop obj) {
|
||||||
|
return obj != NULL && is_subclass(obj->klass());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
oop java_lang_invoke_MethodHandle::type(oop mh) {
|
oop java_lang_invoke_MethodHandle::type(oop mh) {
|
||||||
return mh->obj_field(_type_offset);
|
return mh->obj_field(_type_offset);
|
||||||
}
|
}
|
||||||
|
@ -3076,6 +3087,10 @@ bool java_lang_ClassLoader::isAncestor(oop loader, oop cl) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool java_lang_ClassLoader::is_instance(oop obj) {
|
||||||
|
return obj != NULL && is_subclass(obj->klass());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// For class loader classes, parallelCapable defined
|
// For class loader classes, parallelCapable defined
|
||||||
// based on non-null field
|
// based on non-null field
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -204,9 +204,8 @@ class java_lang_String : AllStatic {
|
||||||
static Symbol* as_symbol_or_null(oop java_string);
|
static Symbol* as_symbol_or_null(oop java_string);
|
||||||
|
|
||||||
// Testers
|
// Testers
|
||||||
static bool is_instance(oop obj) {
|
static bool is_instance(oop obj);
|
||||||
return obj != NULL && obj->klass() == SystemDictionary::String_klass();
|
static bool is_instance_inlined(oop obj);
|
||||||
}
|
|
||||||
|
|
||||||
// Debugging
|
// Debugging
|
||||||
static void print(oop java_string, outputStream* st);
|
static void print(oop java_string, outputStream* st);
|
||||||
|
@ -273,9 +272,8 @@ class java_lang_Class : AllStatic {
|
||||||
static Symbol* as_signature(oop java_class, bool intern_if_not_found, TRAPS);
|
static Symbol* as_signature(oop java_class, bool intern_if_not_found, TRAPS);
|
||||||
static void print_signature(oop java_class, outputStream *st);
|
static void print_signature(oop java_class, outputStream *st);
|
||||||
// Testing
|
// Testing
|
||||||
static bool is_instance(oop obj) {
|
static bool is_instance(oop obj);
|
||||||
return obj != NULL && obj->klass() == SystemDictionary::Class_klass();
|
|
||||||
}
|
|
||||||
static bool is_primitive(oop java_class);
|
static bool is_primitive(oop java_class);
|
||||||
static BasicType primitive_type(oop java_class);
|
static BasicType primitive_type(oop java_class);
|
||||||
static oop primitive_mirror(BasicType t);
|
static oop primitive_mirror(BasicType t);
|
||||||
|
@ -989,9 +987,7 @@ class java_lang_invoke_MethodHandle: AllStatic {
|
||||||
static bool is_subclass(Klass* klass) {
|
static bool is_subclass(Klass* klass) {
|
||||||
return klass->is_subclass_of(SystemDictionary::MethodHandle_klass());
|
return klass->is_subclass_of(SystemDictionary::MethodHandle_klass());
|
||||||
}
|
}
|
||||||
static bool is_instance(oop obj) {
|
static bool is_instance(oop obj);
|
||||||
return obj != NULL && is_subclass(obj->klass());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Accessors for code generation:
|
// Accessors for code generation:
|
||||||
static int type_offset_in_bytes() { return _type_offset; }
|
static int type_offset_in_bytes() { return _type_offset; }
|
||||||
|
@ -1016,9 +1012,7 @@ class java_lang_invoke_DirectMethodHandle: AllStatic {
|
||||||
static bool is_subclass(Klass* klass) {
|
static bool is_subclass(Klass* klass) {
|
||||||
return klass->is_subclass_of(SystemDictionary::DirectMethodHandle_klass());
|
return klass->is_subclass_of(SystemDictionary::DirectMethodHandle_klass());
|
||||||
}
|
}
|
||||||
static bool is_instance(oop obj) {
|
static bool is_instance(oop obj);
|
||||||
return obj != NULL && is_subclass(obj->klass());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Accessors for code generation:
|
// Accessors for code generation:
|
||||||
static int member_offset_in_bytes() { return _member_offset; }
|
static int member_offset_in_bytes() { return _member_offset; }
|
||||||
|
@ -1045,9 +1039,7 @@ class java_lang_invoke_LambdaForm: AllStatic {
|
||||||
return SystemDictionary::LambdaForm_klass() != NULL &&
|
return SystemDictionary::LambdaForm_klass() != NULL &&
|
||||||
klass->is_subclass_of(SystemDictionary::LambdaForm_klass());
|
klass->is_subclass_of(SystemDictionary::LambdaForm_klass());
|
||||||
}
|
}
|
||||||
static bool is_instance(oop obj) {
|
static bool is_instance(oop obj);
|
||||||
return obj != NULL && is_subclass(obj->klass());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Accessors for code generation:
|
// Accessors for code generation:
|
||||||
static int vmentry_offset_in_bytes() { return _vmentry_offset; }
|
static int vmentry_offset_in_bytes() { return _vmentry_offset; }
|
||||||
|
@ -1111,9 +1103,7 @@ class java_lang_invoke_MemberName: AllStatic {
|
||||||
static bool is_subclass(Klass* klass) {
|
static bool is_subclass(Klass* klass) {
|
||||||
return klass->is_subclass_of(SystemDictionary::MemberName_klass());
|
return klass->is_subclass_of(SystemDictionary::MemberName_klass());
|
||||||
}
|
}
|
||||||
static bool is_instance(oop obj) {
|
static bool is_instance(oop obj);
|
||||||
return obj != NULL && is_subclass(obj->klass());
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool is_method(oop obj);
|
static bool is_method(oop obj);
|
||||||
|
|
||||||
|
@ -1166,9 +1156,7 @@ class java_lang_invoke_MethodType: AllStatic {
|
||||||
static Symbol* as_signature(oop mt, bool intern_if_not_found, TRAPS);
|
static Symbol* as_signature(oop mt, bool intern_if_not_found, TRAPS);
|
||||||
static void print_signature(oop mt, outputStream* st);
|
static void print_signature(oop mt, outputStream* st);
|
||||||
|
|
||||||
static bool is_instance(oop obj) {
|
static bool is_instance(oop obj);
|
||||||
return obj != NULL && obj->klass() == SystemDictionary::MethodType_klass();
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool equals(oop mt1, oop mt2);
|
static bool equals(oop mt1, oop mt2);
|
||||||
|
|
||||||
|
@ -1190,19 +1178,17 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Accessors
|
// Accessors
|
||||||
static oop target( oop site) { return site->obj_field( _target_offset); }
|
static oop target( oop site);
|
||||||
static void set_target( oop site, oop target) { site->obj_field_put( _target_offset, target); }
|
static void set_target( oop site, oop target);
|
||||||
|
|
||||||
static volatile oop target_volatile(oop site) { return oop((oopDesc *)(site->obj_field_volatile(_target_offset))); }
|
static volatile oop target_volatile(oop site);
|
||||||
static void set_target_volatile(oop site, oop target) { site->obj_field_put_volatile(_target_offset, target); }
|
static void set_target_volatile(oop site, oop target);
|
||||||
|
|
||||||
// Testers
|
// Testers
|
||||||
static bool is_subclass(Klass* klass) {
|
static bool is_subclass(Klass* klass) {
|
||||||
return klass->is_subclass_of(SystemDictionary::CallSite_klass());
|
return klass->is_subclass_of(SystemDictionary::CallSite_klass());
|
||||||
}
|
}
|
||||||
static bool is_instance(oop obj) {
|
static bool is_instance(oop obj);
|
||||||
return obj != NULL && is_subclass(obj->klass());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Accessors for code generation:
|
// Accessors for code generation:
|
||||||
static int target_offset_in_bytes() { return _target_offset; }
|
static int target_offset_in_bytes() { return _target_offset; }
|
||||||
|
@ -1268,9 +1254,7 @@ class java_lang_ClassLoader : AllStatic {
|
||||||
static bool is_subclass(Klass* klass) {
|
static bool is_subclass(Klass* klass) {
|
||||||
return klass->is_subclass_of(SystemDictionary::ClassLoader_klass());
|
return klass->is_subclass_of(SystemDictionary::ClassLoader_klass());
|
||||||
}
|
}
|
||||||
static bool is_instance(oop obj) {
|
static bool is_instance(oop obj);
|
||||||
return obj != NULL && is_subclass(obj->klass());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Debugging
|
// Debugging
|
||||||
friend class JavaClasses;
|
friend class JavaClasses;
|
||||||
|
|
76
hotspot/src/share/vm/classfile/javaClasses.inline.hpp
Normal file
76
hotspot/src/share/vm/classfile/javaClasses.inline.hpp
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
|
*
|
||||||
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License version 2 only, as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
* version 2 for more details (a copy is included in the LICENSE file that
|
||||||
|
* accompanied this code).
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License version
|
||||||
|
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
|
* or visit www.oracle.com if you need additional information or have any
|
||||||
|
* questions.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SHARE_VM_CLASSFILE_JAVACLASSES_INLINE_HPP
|
||||||
|
#define SHARE_VM_CLASSFILE_JAVACLASSES_INLINE_HPP
|
||||||
|
|
||||||
|
#include "classfile/javaClasses.hpp"
|
||||||
|
#include "oops/oop.inline.hpp"
|
||||||
|
#include "oops/oopsHierarchy.hpp"
|
||||||
|
|
||||||
|
inline volatile oop java_lang_invoke_CallSite::target_volatile(oop site) {
|
||||||
|
return oop((oopDesc *)(site->obj_field_volatile(_target_offset)));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void java_lang_invoke_CallSite::set_target_volatile(oop site, oop target) {
|
||||||
|
site->obj_field_put_volatile(_target_offset, target);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline oop java_lang_invoke_CallSite::target(oop site) {
|
||||||
|
return site->obj_field(_target_offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void java_lang_invoke_CallSite::set_target(oop site, oop target) {
|
||||||
|
site->obj_field_put(_target_offset, target);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline bool java_lang_String::is_instance_inlined(oop obj) {
|
||||||
|
return obj != NULL && obj->klass() == SystemDictionary::String_klass();
|
||||||
|
}
|
||||||
|
|
||||||
|
inline bool java_lang_invoke_CallSite::is_instance(oop obj) {
|
||||||
|
return obj != NULL && is_subclass(obj->klass());
|
||||||
|
}
|
||||||
|
|
||||||
|
inline bool java_lang_invoke_MemberName::is_instance(oop obj) {
|
||||||
|
return obj != NULL && is_subclass(obj->klass());
|
||||||
|
}
|
||||||
|
|
||||||
|
inline bool java_lang_invoke_MethodType::is_instance(oop obj) {
|
||||||
|
return obj != NULL && obj->klass() == SystemDictionary::MethodType_klass();
|
||||||
|
}
|
||||||
|
|
||||||
|
inline bool java_lang_invoke_MethodHandle::is_instance(oop obj) {
|
||||||
|
return obj != NULL && is_subclass(obj->klass());
|
||||||
|
}
|
||||||
|
|
||||||
|
inline bool java_lang_Class::is_instance(oop obj) {
|
||||||
|
return obj != NULL && obj->klass() == SystemDictionary::Class_klass();
|
||||||
|
}
|
||||||
|
|
||||||
|
inline bool java_lang_invoke_DirectMethodHandle::is_instance(oop obj) {
|
||||||
|
return obj != NULL && is_subclass(obj->klass());
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // SHARE_VM_CLASSFILE_JAVACLASSES_INLINE_HPP
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -33,7 +33,6 @@
|
||||||
#include "memory/filemap.hpp"
|
#include "memory/filemap.hpp"
|
||||||
#include "memory/gcLocker.inline.hpp"
|
#include "memory/gcLocker.inline.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
#include "oops/oop.inline2.hpp"
|
|
||||||
#include "runtime/atomic.inline.hpp"
|
#include "runtime/atomic.inline.hpp"
|
||||||
#include "runtime/mutexLocker.hpp"
|
#include "runtime/mutexLocker.hpp"
|
||||||
#include "utilities/hashtable.inline.hpp"
|
#include "utilities/hashtable.inline.hpp"
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
#include "memory/filemap.hpp"
|
#include "memory/filemap.hpp"
|
||||||
#include "memory/gcLocker.inline.hpp"
|
#include "memory/gcLocker.inline.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
#include "oops/oop.inline2.hpp"
|
|
||||||
#include "runtime/atomic.inline.hpp"
|
#include "runtime/atomic.inline.hpp"
|
||||||
#include "runtime/mutexLocker.hpp"
|
#include "runtime/mutexLocker.hpp"
|
||||||
#include "utilities/hashtable.inline.hpp"
|
#include "utilities/hashtable.inline.hpp"
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "classfile/classLoaderData.inline.hpp"
|
#include "classfile/classLoaderData.inline.hpp"
|
||||||
#include "classfile/dictionary.hpp"
|
#include "classfile/dictionary.hpp"
|
||||||
#include "classfile/javaClasses.hpp"
|
#include "classfile/javaClasses.inline.hpp"
|
||||||
#include "classfile/loaderConstraints.hpp"
|
#include "classfile/loaderConstraints.hpp"
|
||||||
#include "classfile/placeholders.hpp"
|
#include "classfile/placeholders.hpp"
|
||||||
#include "classfile/resolutionErrors.hpp"
|
#include "classfile/resolutionErrors.hpp"
|
||||||
|
@ -44,8 +44,8 @@
|
||||||
#include "oops/klass.inline.hpp"
|
#include "oops/klass.inline.hpp"
|
||||||
#include "oops/methodData.hpp"
|
#include "oops/methodData.hpp"
|
||||||
#include "oops/objArrayKlass.hpp"
|
#include "oops/objArrayKlass.hpp"
|
||||||
|
#include "oops/objArrayOop.inline.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
#include "oops/oop.inline2.hpp"
|
|
||||||
#include "oops/typeArrayKlass.hpp"
|
#include "oops/typeArrayKlass.hpp"
|
||||||
#include "prims/jvmtiEnvBase.hpp"
|
#include "prims/jvmtiEnvBase.hpp"
|
||||||
#include "prims/methodHandles.hpp"
|
#include "prims/methodHandles.hpp"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
#include "classfile/systemDictionary.hpp"
|
#include "classfile/systemDictionary.hpp"
|
||||||
#include "memory/allocation.hpp"
|
#include "memory/allocation.hpp"
|
||||||
#include "oops/instanceKlass.hpp"
|
#include "oops/instanceKlass.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.hpp"
|
||||||
#include "oops/symbol.hpp"
|
#include "oops/symbol.hpp"
|
||||||
#include "runtime/handles.hpp"
|
#include "runtime/handles.hpp"
|
||||||
#include "runtime/signature.hpp"
|
#include "runtime/signature.hpp"
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
#include "oops/method.hpp"
|
#include "oops/method.hpp"
|
||||||
#include "oops/objArrayOop.hpp"
|
#include "oops/objArrayOop.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
|
#include "oops/verifyOopClosure.hpp"
|
||||||
#include "runtime/handles.inline.hpp"
|
#include "runtime/handles.inline.hpp"
|
||||||
#include "runtime/arguments.hpp"
|
#include "runtime/arguments.hpp"
|
||||||
#include "runtime/icache.hpp"
|
#include "runtime/icache.hpp"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -27,6 +27,7 @@
|
||||||
#include "ci/ciEnv.hpp"
|
#include "ci/ciEnv.hpp"
|
||||||
#include "ci/ciKlass.hpp"
|
#include "ci/ciKlass.hpp"
|
||||||
#include "ci/ciMethod.hpp"
|
#include "ci/ciMethod.hpp"
|
||||||
|
#include "classfile/javaClasses.inline.hpp"
|
||||||
#include "code/dependencies.hpp"
|
#include "code/dependencies.hpp"
|
||||||
#include "compiler/compileLog.hpp"
|
#include "compiler/compileLog.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -35,7 +35,6 @@
|
||||||
#include "memory/universe.inline.hpp"
|
#include "memory/universe.inline.hpp"
|
||||||
#include "oops/method.hpp"
|
#include "oops/method.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
#include "oops/oop.inline2.hpp"
|
|
||||||
#include "runtime/mutexLocker.hpp"
|
#include "runtime/mutexLocker.hpp"
|
||||||
#include "runtime/stubRoutines.hpp"
|
#include "runtime/stubRoutines.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -35,6 +35,7 @@
|
||||||
#include "compiler/disassembler.hpp"
|
#include "compiler/disassembler.hpp"
|
||||||
#include "interpreter/bytecode.hpp"
|
#include "interpreter/bytecode.hpp"
|
||||||
#include "oops/methodData.hpp"
|
#include "oops/methodData.hpp"
|
||||||
|
#include "oops/oop.inline.hpp"
|
||||||
#include "prims/jvmtiRedefineClassesTrace.hpp"
|
#include "prims/jvmtiRedefineClassesTrace.hpp"
|
||||||
#include "prims/jvmtiImpl.hpp"
|
#include "prims/jvmtiImpl.hpp"
|
||||||
#include "runtime/atomic.inline.hpp"
|
#include "runtime/atomic.inline.hpp"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -28,6 +28,7 @@
|
||||||
#include "compiler/disassembler.hpp"
|
#include "compiler/disassembler.hpp"
|
||||||
#include "gc_interface/collectedHeap.hpp"
|
#include "gc_interface/collectedHeap.hpp"
|
||||||
#include "memory/cardTableModRefBS.hpp"
|
#include "memory/cardTableModRefBS.hpp"
|
||||||
|
#include "oops/oop.inline.hpp"
|
||||||
#include "runtime/fprofiler.hpp"
|
#include "runtime/fprofiler.hpp"
|
||||||
#include "runtime/handles.inline.hpp"
|
#include "runtime/handles.inline.hpp"
|
||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -129,8 +129,8 @@ class VM_CMS_Final_Remark: public VM_CMS_Operation {
|
||||||
// GenCollectedHeap heap.
|
// GenCollectedHeap heap.
|
||||||
class VM_GenCollectFullConcurrent: public VM_GC_Operation {
|
class VM_GenCollectFullConcurrent: public VM_GC_Operation {
|
||||||
public:
|
public:
|
||||||
VM_GenCollectFullConcurrent(unsigned int gc_count_before,
|
VM_GenCollectFullConcurrent(uint gc_count_before,
|
||||||
unsigned int full_gc_count_before,
|
uint full_gc_count_before,
|
||||||
GCCause::Cause gc_cause)
|
GCCause::Cause gc_cause)
|
||||||
: VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true /* full */)
|
: VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true /* full */)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -333,7 +333,7 @@ void YoungList::print() {
|
||||||
HeapRegion* lists[] = {_head, _survivor_head};
|
HeapRegion* lists[] = {_head, _survivor_head};
|
||||||
const char* names[] = {"YOUNG", "SURVIVOR"};
|
const char* names[] = {"YOUNG", "SURVIVOR"};
|
||||||
|
|
||||||
for (unsigned int list = 0; list < ARRAY_SIZE(lists); ++list) {
|
for (uint list = 0; list < ARRAY_SIZE(lists); ++list) {
|
||||||
gclog_or_tty->print_cr("%s LIST CONTENTS", names[list]);
|
gclog_or_tty->print_cr("%s LIST CONTENTS", names[list]);
|
||||||
HeapRegion *curr = lists[list];
|
HeapRegion *curr = lists[list];
|
||||||
if (curr == NULL)
|
if (curr == NULL)
|
||||||
|
@ -765,8 +765,8 @@ HeapWord* G1CollectedHeap::allocate_new_tlab(size_t word_size) {
|
||||||
assert_heap_not_locked_and_not_at_safepoint();
|
assert_heap_not_locked_and_not_at_safepoint();
|
||||||
assert(!is_humongous(word_size), "we do not allow humongous TLABs");
|
assert(!is_humongous(word_size), "we do not allow humongous TLABs");
|
||||||
|
|
||||||
unsigned int dummy_gc_count_before;
|
uint dummy_gc_count_before;
|
||||||
int dummy_gclocker_retry_count = 0;
|
uint dummy_gclocker_retry_count = 0;
|
||||||
return attempt_allocation(word_size, &dummy_gc_count_before, &dummy_gclocker_retry_count);
|
return attempt_allocation(word_size, &dummy_gc_count_before, &dummy_gclocker_retry_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -776,8 +776,8 @@ G1CollectedHeap::mem_allocate(size_t word_size,
|
||||||
assert_heap_not_locked_and_not_at_safepoint();
|
assert_heap_not_locked_and_not_at_safepoint();
|
||||||
|
|
||||||
// Loop until the allocation is satisfied, or unsatisfied after GC.
|
// Loop until the allocation is satisfied, or unsatisfied after GC.
|
||||||
for (int try_count = 1, gclocker_retry_count = 0; /* we'll return */; try_count += 1) {
|
for (uint try_count = 1, gclocker_retry_count = 0; /* we'll return */; try_count += 1) {
|
||||||
unsigned int gc_count_before;
|
uint gc_count_before;
|
||||||
|
|
||||||
HeapWord* result = NULL;
|
HeapWord* result = NULL;
|
||||||
if (!is_humongous(word_size)) {
|
if (!is_humongous(word_size)) {
|
||||||
|
@ -829,8 +829,8 @@ G1CollectedHeap::mem_allocate(size_t word_size,
|
||||||
|
|
||||||
HeapWord* G1CollectedHeap::attempt_allocation_slow(size_t word_size,
|
HeapWord* G1CollectedHeap::attempt_allocation_slow(size_t word_size,
|
||||||
AllocationContext_t context,
|
AllocationContext_t context,
|
||||||
unsigned int *gc_count_before_ret,
|
uint* gc_count_before_ret,
|
||||||
int* gclocker_retry_count_ret) {
|
uint* gclocker_retry_count_ret) {
|
||||||
// Make sure you read the note in attempt_allocation_humongous().
|
// Make sure you read the note in attempt_allocation_humongous().
|
||||||
|
|
||||||
assert_heap_not_locked_and_not_at_safepoint();
|
assert_heap_not_locked_and_not_at_safepoint();
|
||||||
|
@ -847,7 +847,7 @@ HeapWord* G1CollectedHeap::attempt_allocation_slow(size_t word_size,
|
||||||
HeapWord* result = NULL;
|
HeapWord* result = NULL;
|
||||||
for (int try_count = 1; /* we'll return */; try_count += 1) {
|
for (int try_count = 1; /* we'll return */; try_count += 1) {
|
||||||
bool should_try_gc;
|
bool should_try_gc;
|
||||||
unsigned int gc_count_before;
|
uint gc_count_before;
|
||||||
|
|
||||||
{
|
{
|
||||||
MutexLockerEx x(Heap_lock);
|
MutexLockerEx x(Heap_lock);
|
||||||
|
@ -891,7 +891,7 @@ HeapWord* G1CollectedHeap::attempt_allocation_slow(size_t word_size,
|
||||||
if (should_try_gc) {
|
if (should_try_gc) {
|
||||||
bool succeeded;
|
bool succeeded;
|
||||||
result = do_collection_pause(word_size, gc_count_before, &succeeded,
|
result = do_collection_pause(word_size, gc_count_before, &succeeded,
|
||||||
GCCause::_g1_inc_collection_pause);
|
GCCause::_g1_inc_collection_pause);
|
||||||
if (result != NULL) {
|
if (result != NULL) {
|
||||||
assert(succeeded, "only way to get back a non-NULL result");
|
assert(succeeded, "only way to get back a non-NULL result");
|
||||||
return result;
|
return result;
|
||||||
|
@ -945,8 +945,8 @@ HeapWord* G1CollectedHeap::attempt_allocation_slow(size_t word_size,
|
||||||
}
|
}
|
||||||
|
|
||||||
HeapWord* G1CollectedHeap::attempt_allocation_humongous(size_t word_size,
|
HeapWord* G1CollectedHeap::attempt_allocation_humongous(size_t word_size,
|
||||||
unsigned int * gc_count_before_ret,
|
uint* gc_count_before_ret,
|
||||||
int* gclocker_retry_count_ret) {
|
uint* gclocker_retry_count_ret) {
|
||||||
// The structure of this method has a lot of similarities to
|
// The structure of this method has a lot of similarities to
|
||||||
// attempt_allocation_slow(). The reason these two were not merged
|
// attempt_allocation_slow(). The reason these two were not merged
|
||||||
// into a single one is that such a method would require several "if
|
// into a single one is that such a method would require several "if
|
||||||
|
@ -979,7 +979,7 @@ HeapWord* G1CollectedHeap::attempt_allocation_humongous(size_t word_size,
|
||||||
HeapWord* result = NULL;
|
HeapWord* result = NULL;
|
||||||
for (int try_count = 1; /* we'll return */; try_count += 1) {
|
for (int try_count = 1; /* we'll return */; try_count += 1) {
|
||||||
bool should_try_gc;
|
bool should_try_gc;
|
||||||
unsigned int gc_count_before;
|
uint gc_count_before;
|
||||||
|
|
||||||
{
|
{
|
||||||
MutexLockerEx x(Heap_lock);
|
MutexLockerEx x(Heap_lock);
|
||||||
|
@ -1017,7 +1017,7 @@ HeapWord* G1CollectedHeap::attempt_allocation_humongous(size_t word_size,
|
||||||
|
|
||||||
bool succeeded;
|
bool succeeded;
|
||||||
result = do_collection_pause(word_size, gc_count_before, &succeeded,
|
result = do_collection_pause(word_size, gc_count_before, &succeeded,
|
||||||
GCCause::_g1_humongous_allocation);
|
GCCause::_g1_humongous_allocation);
|
||||||
if (result != NULL) {
|
if (result != NULL) {
|
||||||
assert(succeeded, "only way to get back a non-NULL result");
|
assert(succeeded, "only way to get back a non-NULL result");
|
||||||
return result;
|
return result;
|
||||||
|
@ -1815,7 +1815,7 @@ G1CollectedHeap::G1CollectedHeap(G1CollectorPolicy* policy_) :
|
||||||
assert(n_rem_sets > 0, "Invariant.");
|
assert(n_rem_sets > 0, "Invariant.");
|
||||||
|
|
||||||
_worker_cset_start_region = NEW_C_HEAP_ARRAY(HeapRegion*, n_queues, mtGC);
|
_worker_cset_start_region = NEW_C_HEAP_ARRAY(HeapRegion*, n_queues, mtGC);
|
||||||
_worker_cset_start_region_time_stamp = NEW_C_HEAP_ARRAY(unsigned int, n_queues, mtGC);
|
_worker_cset_start_region_time_stamp = NEW_C_HEAP_ARRAY(uint, n_queues, mtGC);
|
||||||
_evacuation_failed_info_array = NEW_C_HEAP_ARRAY(EvacuationFailedInfo, n_queues, mtGC);
|
_evacuation_failed_info_array = NEW_C_HEAP_ARRAY(EvacuationFailedInfo, n_queues, mtGC);
|
||||||
|
|
||||||
for (int i = 0; i < n_queues; i++) {
|
for (int i = 0; i < n_queues; i++) {
|
||||||
|
@ -2396,9 +2396,9 @@ G1YCType G1CollectedHeap::yc_type() {
|
||||||
void G1CollectedHeap::collect(GCCause::Cause cause) {
|
void G1CollectedHeap::collect(GCCause::Cause cause) {
|
||||||
assert_heap_not_locked();
|
assert_heap_not_locked();
|
||||||
|
|
||||||
unsigned int gc_count_before;
|
uint gc_count_before;
|
||||||
unsigned int old_marking_count_before;
|
uint old_marking_count_before;
|
||||||
unsigned int full_gc_count_before;
|
uint full_gc_count_before;
|
||||||
bool retry_gc;
|
bool retry_gc;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
@ -3418,7 +3418,7 @@ void G1CollectedHeap::gc_epilogue(bool full) {
|
||||||
}
|
}
|
||||||
|
|
||||||
HeapWord* G1CollectedHeap::do_collection_pause(size_t word_size,
|
HeapWord* G1CollectedHeap::do_collection_pause(size_t word_size,
|
||||||
unsigned int gc_count_before,
|
uint gc_count_before,
|
||||||
bool* succeeded,
|
bool* succeeded,
|
||||||
GCCause::Cause gc_cause) {
|
GCCause::Cause gc_cause) {
|
||||||
assert_heap_not_locked_and_not_at_safepoint();
|
assert_heap_not_locked_and_not_at_safepoint();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -325,11 +325,11 @@ private:
|
||||||
|
|
||||||
// Keeps track of how many "old marking cycles" (i.e., Full GCs or
|
// Keeps track of how many "old marking cycles" (i.e., Full GCs or
|
||||||
// concurrent cycles) we have started.
|
// concurrent cycles) we have started.
|
||||||
volatile unsigned int _old_marking_cycles_started;
|
volatile uint _old_marking_cycles_started;
|
||||||
|
|
||||||
// Keeps track of how many "old marking cycles" (i.e., Full GCs or
|
// Keeps track of how many "old marking cycles" (i.e., Full GCs or
|
||||||
// concurrent cycles) we have completed.
|
// concurrent cycles) we have completed.
|
||||||
volatile unsigned int _old_marking_cycles_completed;
|
volatile uint _old_marking_cycles_completed;
|
||||||
|
|
||||||
bool _concurrent_cycle_started;
|
bool _concurrent_cycle_started;
|
||||||
bool _heap_summary_sent;
|
bool _heap_summary_sent;
|
||||||
|
@ -497,22 +497,22 @@ protected:
|
||||||
// the mutator alloc region without taking the Heap_lock. This
|
// the mutator alloc region without taking the Heap_lock. This
|
||||||
// should only be used for non-humongous allocations.
|
// should only be used for non-humongous allocations.
|
||||||
inline HeapWord* attempt_allocation(size_t word_size,
|
inline HeapWord* attempt_allocation(size_t word_size,
|
||||||
unsigned int* gc_count_before_ret,
|
uint* gc_count_before_ret,
|
||||||
int* gclocker_retry_count_ret);
|
uint* gclocker_retry_count_ret);
|
||||||
|
|
||||||
// Second-level mutator allocation attempt: take the Heap_lock and
|
// Second-level mutator allocation attempt: take the Heap_lock and
|
||||||
// retry the allocation attempt, potentially scheduling a GC
|
// retry the allocation attempt, potentially scheduling a GC
|
||||||
// pause. This should only be used for non-humongous allocations.
|
// pause. This should only be used for non-humongous allocations.
|
||||||
HeapWord* attempt_allocation_slow(size_t word_size,
|
HeapWord* attempt_allocation_slow(size_t word_size,
|
||||||
AllocationContext_t context,
|
AllocationContext_t context,
|
||||||
unsigned int* gc_count_before_ret,
|
uint* gc_count_before_ret,
|
||||||
int* gclocker_retry_count_ret);
|
uint* gclocker_retry_count_ret);
|
||||||
|
|
||||||
// Takes the Heap_lock and attempts a humongous allocation. It can
|
// Takes the Heap_lock and attempts a humongous allocation. It can
|
||||||
// potentially schedule a GC pause.
|
// potentially schedule a GC pause.
|
||||||
HeapWord* attempt_allocation_humongous(size_t word_size,
|
HeapWord* attempt_allocation_humongous(size_t word_size,
|
||||||
unsigned int* gc_count_before_ret,
|
uint* gc_count_before_ret,
|
||||||
int* gclocker_retry_count_ret);
|
uint* gclocker_retry_count_ret);
|
||||||
|
|
||||||
// Allocation attempt that should be called during safepoints (e.g.,
|
// Allocation attempt that should be called during safepoints (e.g.,
|
||||||
// at the end of a successful GC). expect_null_mutator_alloc_region
|
// at the end of a successful GC). expect_null_mutator_alloc_region
|
||||||
|
@ -686,7 +686,7 @@ public:
|
||||||
// +ExplicitGCInvokesConcurrent).
|
// +ExplicitGCInvokesConcurrent).
|
||||||
void increment_old_marking_cycles_completed(bool concurrent);
|
void increment_old_marking_cycles_completed(bool concurrent);
|
||||||
|
|
||||||
unsigned int old_marking_cycles_completed() {
|
uint old_marking_cycles_completed() {
|
||||||
return _old_marking_cycles_completed;
|
return _old_marking_cycles_completed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -745,7 +745,7 @@ protected:
|
||||||
// methods that call do_collection_pause() release the Heap_lock
|
// methods that call do_collection_pause() release the Heap_lock
|
||||||
// before the call, so it's easy to read gc_count_before just before.
|
// before the call, so it's easy to read gc_count_before just before.
|
||||||
HeapWord* do_collection_pause(size_t word_size,
|
HeapWord* do_collection_pause(size_t word_size,
|
||||||
unsigned int gc_count_before,
|
uint gc_count_before,
|
||||||
bool* succeeded,
|
bool* succeeded,
|
||||||
GCCause::Cause gc_cause);
|
GCCause::Cause gc_cause);
|
||||||
|
|
||||||
|
@ -981,7 +981,7 @@ protected:
|
||||||
// The heap region entry for a given worker is valid iff
|
// The heap region entry for a given worker is valid iff
|
||||||
// the associated time stamp value matches the current value
|
// the associated time stamp value matches the current value
|
||||||
// of G1CollectedHeap::_gc_time_stamp.
|
// of G1CollectedHeap::_gc_time_stamp.
|
||||||
unsigned int* _worker_cset_start_region_time_stamp;
|
uint* _worker_cset_start_region_time_stamp;
|
||||||
|
|
||||||
enum G1H_process_roots_tasks {
|
enum G1H_process_roots_tasks {
|
||||||
G1H_PS_filter_satb_buffers,
|
G1H_PS_filter_satb_buffers,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -131,8 +131,8 @@ inline bool G1CollectedHeap::obj_in_cs(oop obj) {
|
||||||
}
|
}
|
||||||
|
|
||||||
inline HeapWord* G1CollectedHeap::attempt_allocation(size_t word_size,
|
inline HeapWord* G1CollectedHeap::attempt_allocation(size_t word_size,
|
||||||
unsigned int* gc_count_before_ret,
|
uint* gc_count_before_ret,
|
||||||
int* gclocker_retry_count_ret) {
|
uint* gclocker_retry_count_ret) {
|
||||||
assert_heap_not_locked_and_not_at_safepoint();
|
assert_heap_not_locked_and_not_at_safepoint();
|
||||||
assert(!is_humongous(word_size), "attempt_allocation() should not "
|
assert(!is_humongous(word_size), "attempt_allocation() should not "
|
||||||
"be called for humongous allocation requests");
|
"be called for humongous allocation requests");
|
||||||
|
|
239
hotspot/src/share/vm/gc_implementation/g1/g1EvacFailure.cpp
Normal file
239
hotspot/src/share/vm/gc_implementation/g1/g1EvacFailure.cpp
Normal file
|
@ -0,0 +1,239 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
|
*
|
||||||
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License version 2 only, as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
* version 2 for more details (a copy is included in the LICENSE file that
|
||||||
|
* accompanied this code).
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License version
|
||||||
|
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
|
* or visit www.oracle.com if you need additional information or have any
|
||||||
|
* questions.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "precompiled.hpp"
|
||||||
|
#include "gc_implementation/g1/concurrentMark.inline.hpp"
|
||||||
|
#include "gc_implementation/g1/dirtyCardQueue.hpp"
|
||||||
|
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
||||||
|
#include "gc_implementation/g1/g1EvacFailure.hpp"
|
||||||
|
#include "gc_implementation/g1/g1_globals.hpp"
|
||||||
|
#include "gc_implementation/g1/g1OopClosures.inline.hpp"
|
||||||
|
#include "gc_implementation/g1/heapRegion.hpp"
|
||||||
|
#include "gc_implementation/g1/heapRegionRemSet.hpp"
|
||||||
|
|
||||||
|
class UpdateRSetDeferred : public OopsInHeapRegionClosure {
|
||||||
|
private:
|
||||||
|
G1CollectedHeap* _g1;
|
||||||
|
DirtyCardQueue *_dcq;
|
||||||
|
G1SATBCardTableModRefBS* _ct_bs;
|
||||||
|
|
||||||
|
public:
|
||||||
|
UpdateRSetDeferred(G1CollectedHeap* g1, DirtyCardQueue* dcq) :
|
||||||
|
_g1(g1), _ct_bs(_g1->g1_barrier_set()), _dcq(dcq) {}
|
||||||
|
|
||||||
|
virtual void do_oop(narrowOop* p) { do_oop_work(p); }
|
||||||
|
virtual void do_oop( oop* p) { do_oop_work(p); }
|
||||||
|
template <class T> void do_oop_work(T* p) {
|
||||||
|
assert(_from->is_in_reserved(p), "paranoia");
|
||||||
|
if (!_from->is_in_reserved(oopDesc::load_decode_heap_oop(p)) &&
|
||||||
|
!_from->is_survivor()) {
|
||||||
|
size_t card_index = _ct_bs->index_for(p);
|
||||||
|
if (_ct_bs->mark_card_deferred(card_index)) {
|
||||||
|
_dcq->enqueue((jbyte*)_ct_bs->byte_for_index(card_index));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class RemoveSelfForwardPtrObjClosure: public ObjectClosure {
|
||||||
|
private:
|
||||||
|
G1CollectedHeap* _g1;
|
||||||
|
ConcurrentMark* _cm;
|
||||||
|
HeapRegion* _hr;
|
||||||
|
size_t _marked_bytes;
|
||||||
|
OopsInHeapRegionClosure *_update_rset_cl;
|
||||||
|
bool _during_initial_mark;
|
||||||
|
bool _during_conc_mark;
|
||||||
|
uint _worker_id;
|
||||||
|
HeapWord* _end_of_last_gap;
|
||||||
|
HeapWord* _last_gap_threshold;
|
||||||
|
HeapWord* _last_obj_threshold;
|
||||||
|
|
||||||
|
public:
|
||||||
|
RemoveSelfForwardPtrObjClosure(G1CollectedHeap* g1, ConcurrentMark* cm,
|
||||||
|
HeapRegion* hr,
|
||||||
|
OopsInHeapRegionClosure* update_rset_cl,
|
||||||
|
bool during_initial_mark,
|
||||||
|
bool during_conc_mark,
|
||||||
|
uint worker_id) :
|
||||||
|
_g1(g1), _cm(cm), _hr(hr), _marked_bytes(0),
|
||||||
|
_update_rset_cl(update_rset_cl),
|
||||||
|
_during_initial_mark(during_initial_mark),
|
||||||
|
_during_conc_mark(during_conc_mark),
|
||||||
|
_worker_id(worker_id),
|
||||||
|
_end_of_last_gap(hr->bottom()),
|
||||||
|
_last_gap_threshold(hr->bottom()),
|
||||||
|
_last_obj_threshold(hr->bottom()) { }
|
||||||
|
|
||||||
|
size_t marked_bytes() { return _marked_bytes; }
|
||||||
|
|
||||||
|
// <original comment>
|
||||||
|
// The original idea here was to coalesce evacuated and dead objects.
|
||||||
|
// However that caused complications with the block offset table (BOT).
|
||||||
|
// In particular if there were two TLABs, one of them partially refined.
|
||||||
|
// |----- TLAB_1--------|----TLAB_2-~~~(partially refined part)~~~|
|
||||||
|
// The BOT entries of the unrefined part of TLAB_2 point to the start
|
||||||
|
// of TLAB_2. If the last object of the TLAB_1 and the first object
|
||||||
|
// of TLAB_2 are coalesced, then the cards of the unrefined part
|
||||||
|
// would point into middle of the filler object.
|
||||||
|
// The current approach is to not coalesce and leave the BOT contents intact.
|
||||||
|
// </original comment>
|
||||||
|
//
|
||||||
|
// We now reset the BOT when we start the object iteration over the
|
||||||
|
// region and refine its entries for every object we come across. So
|
||||||
|
// the above comment is not really relevant and we should be able
|
||||||
|
// to coalesce dead objects if we want to.
|
||||||
|
void do_object(oop obj) {
|
||||||
|
HeapWord* obj_addr = (HeapWord*) obj;
|
||||||
|
assert(_hr->is_in(obj_addr), "sanity");
|
||||||
|
size_t obj_size = obj->size();
|
||||||
|
HeapWord* obj_end = obj_addr + obj_size;
|
||||||
|
|
||||||
|
if (_end_of_last_gap != obj_addr) {
|
||||||
|
// there was a gap before obj_addr
|
||||||
|
_last_gap_threshold = _hr->cross_threshold(_end_of_last_gap, obj_addr);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (obj->is_forwarded() && obj->forwardee() == obj) {
|
||||||
|
// The object failed to move.
|
||||||
|
|
||||||
|
// We consider all objects that we find self-forwarded to be
|
||||||
|
// live. What we'll do is that we'll update the prev marking
|
||||||
|
// info so that they are all under PTAMS and explicitly marked.
|
||||||
|
if (!_cm->isPrevMarked(obj)) {
|
||||||
|
_cm->markPrev(obj);
|
||||||
|
}
|
||||||
|
if (_during_initial_mark) {
|
||||||
|
// For the next marking info we'll only mark the
|
||||||
|
// self-forwarded objects explicitly if we are during
|
||||||
|
// initial-mark (since, normally, we only mark objects pointed
|
||||||
|
// to by roots if we succeed in copying them). By marking all
|
||||||
|
// self-forwarded objects we ensure that we mark any that are
|
||||||
|
// still pointed to be roots. During concurrent marking, and
|
||||||
|
// after initial-mark, we don't need to mark any objects
|
||||||
|
// explicitly and all objects in the CSet are considered
|
||||||
|
// (implicitly) live. So, we won't mark them explicitly and
|
||||||
|
// we'll leave them over NTAMS.
|
||||||
|
_cm->grayRoot(obj, obj_size, _worker_id, _hr);
|
||||||
|
}
|
||||||
|
_marked_bytes += (obj_size * HeapWordSize);
|
||||||
|
obj->set_mark(markOopDesc::prototype());
|
||||||
|
|
||||||
|
// While we were processing RSet buffers during the collection,
|
||||||
|
// we actually didn't scan any cards on the collection set,
|
||||||
|
// since we didn't want to update remembered sets with entries
|
||||||
|
// that point into the collection set, given that live objects
|
||||||
|
// from the collection set are about to move and such entries
|
||||||
|
// will be stale very soon.
|
||||||
|
// This change also dealt with a reliability issue which
|
||||||
|
// involved scanning a card in the collection set and coming
|
||||||
|
// across an array that was being chunked and looking malformed.
|
||||||
|
// The problem is that, if evacuation fails, we might have
|
||||||
|
// remembered set entries missing given that we skipped cards on
|
||||||
|
// the collection set. So, we'll recreate such entries now.
|
||||||
|
obj->oop_iterate(_update_rset_cl);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
// The object has been either evacuated or is dead. Fill it with a
|
||||||
|
// dummy object.
|
||||||
|
MemRegion mr(obj_addr, obj_size);
|
||||||
|
CollectedHeap::fill_with_object(mr);
|
||||||
|
|
||||||
|
// must nuke all dead objects which we skipped when iterating over the region
|
||||||
|
_cm->clearRangePrevBitmap(MemRegion(_end_of_last_gap, obj_end));
|
||||||
|
}
|
||||||
|
_end_of_last_gap = obj_end;
|
||||||
|
_last_obj_threshold = _hr->cross_threshold(obj_addr, obj_end);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class RemoveSelfForwardPtrHRClosure: public HeapRegionClosure {
|
||||||
|
G1CollectedHeap* _g1h;
|
||||||
|
ConcurrentMark* _cm;
|
||||||
|
uint _worker_id;
|
||||||
|
HeapRegionClaimer* _hrclaimer;
|
||||||
|
|
||||||
|
DirtyCardQueue _dcq;
|
||||||
|
UpdateRSetDeferred _update_rset_cl;
|
||||||
|
|
||||||
|
public:
|
||||||
|
RemoveSelfForwardPtrHRClosure(G1CollectedHeap* g1h,
|
||||||
|
uint worker_id,
|
||||||
|
HeapRegionClaimer* hrclaimer) :
|
||||||
|
_g1h(g1h), _dcq(&g1h->dirty_card_queue_set()), _update_rset_cl(g1h, &_dcq),
|
||||||
|
_worker_id(worker_id), _cm(_g1h->concurrent_mark()), _hrclaimer(hrclaimer) {
|
||||||
|
}
|
||||||
|
|
||||||
|
bool doHeapRegion(HeapRegion *hr) {
|
||||||
|
bool during_initial_mark = _g1h->g1_policy()->during_initial_mark_pause();
|
||||||
|
bool during_conc_mark = _g1h->mark_in_progress();
|
||||||
|
|
||||||
|
assert(!hr->is_humongous(), "sanity");
|
||||||
|
assert(hr->in_collection_set(), "bad CS");
|
||||||
|
|
||||||
|
if (_hrclaimer->claim_region(hr->hrm_index())) {
|
||||||
|
if (hr->evacuation_failed()) {
|
||||||
|
RemoveSelfForwardPtrObjClosure rspc(_g1h, _cm, hr, &_update_rset_cl,
|
||||||
|
during_initial_mark,
|
||||||
|
during_conc_mark,
|
||||||
|
_worker_id);
|
||||||
|
|
||||||
|
hr->note_self_forwarding_removal_start(during_initial_mark,
|
||||||
|
during_conc_mark);
|
||||||
|
_g1h->check_bitmaps("Self-Forwarding Ptr Removal", hr);
|
||||||
|
|
||||||
|
// In the common case (i.e. when there is no evacuation
|
||||||
|
// failure) we make sure that the following is done when
|
||||||
|
// the region is freed so that it is "ready-to-go" when it's
|
||||||
|
// re-allocated. However, when evacuation failure happens, a
|
||||||
|
// region will remain in the heap and might ultimately be added
|
||||||
|
// to a CSet in the future. So we have to be careful here and
|
||||||
|
// make sure the region's RSet is ready for parallel iteration
|
||||||
|
// whenever this might be required in the future.
|
||||||
|
hr->rem_set()->reset_for_par_iteration();
|
||||||
|
hr->reset_bot();
|
||||||
|
_update_rset_cl.set_region(hr);
|
||||||
|
hr->object_iterate(&rspc);
|
||||||
|
|
||||||
|
hr->rem_set()->clean_strong_code_roots(hr);
|
||||||
|
|
||||||
|
hr->note_self_forwarding_removal_end(during_initial_mark,
|
||||||
|
during_conc_mark,
|
||||||
|
rspc.marked_bytes());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
G1ParRemoveSelfForwardPtrsTask::G1ParRemoveSelfForwardPtrsTask(G1CollectedHeap* g1h) :
|
||||||
|
AbstractGangTask("G1 Remove Self-forwarding Pointers"), _g1h(g1h),
|
||||||
|
_hrclaimer(g1h->workers()->active_workers()) {}
|
||||||
|
|
||||||
|
void G1ParRemoveSelfForwardPtrsTask::work(uint worker_id) {
|
||||||
|
RemoveSelfForwardPtrHRClosure rsfp_cl(_g1h, worker_id, &_hrclaimer);
|
||||||
|
|
||||||
|
HeapRegion* hr = _g1h->start_cset_region_for_worker(worker_id);
|
||||||
|
_g1h->collection_set_iterate_from(hr, &rsfp_cl);
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -25,229 +25,24 @@
|
||||||
#ifndef SHARE_VM_GC_IMPLEMENTATION_G1_G1EVACFAILURE_HPP
|
#ifndef SHARE_VM_GC_IMPLEMENTATION_G1_G1EVACFAILURE_HPP
|
||||||
#define SHARE_VM_GC_IMPLEMENTATION_G1_G1EVACFAILURE_HPP
|
#define SHARE_VM_GC_IMPLEMENTATION_G1_G1EVACFAILURE_HPP
|
||||||
|
|
||||||
#include "gc_implementation/g1/concurrentMark.inline.hpp"
|
#include "gc_implementation/g1/g1OopClosures.hpp"
|
||||||
#include "gc_implementation/g1/dirtyCardQueue.hpp"
|
#include "gc_implementation/g1/heapRegionManager.hpp"
|
||||||
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
#include "utilities/globalDefinitions.hpp"
|
||||||
#include "gc_implementation/g1/g1_globals.hpp"
|
|
||||||
#include "gc_implementation/g1/g1OopClosures.inline.hpp"
|
|
||||||
#include "gc_implementation/g1/heapRegion.hpp"
|
|
||||||
#include "gc_implementation/g1/heapRegionRemSet.hpp"
|
|
||||||
#include "utilities/workgroup.hpp"
|
#include "utilities/workgroup.hpp"
|
||||||
|
|
||||||
// Closures and tasks associated with any self-forwarding pointers
|
class G1CollectedHeap;
|
||||||
|
|
||||||
|
// Task to fixup self-forwarding pointers
|
||||||
// installed as a result of an evacuation failure.
|
// installed as a result of an evacuation failure.
|
||||||
|
|
||||||
class UpdateRSetDeferred : public OopsInHeapRegionClosure {
|
|
||||||
private:
|
|
||||||
G1CollectedHeap* _g1;
|
|
||||||
DirtyCardQueue *_dcq;
|
|
||||||
G1SATBCardTableModRefBS* _ct_bs;
|
|
||||||
|
|
||||||
public:
|
|
||||||
UpdateRSetDeferred(G1CollectedHeap* g1, DirtyCardQueue* dcq) :
|
|
||||||
_g1(g1), _ct_bs(_g1->g1_barrier_set()), _dcq(dcq) {}
|
|
||||||
|
|
||||||
virtual void do_oop(narrowOop* p) { do_oop_work(p); }
|
|
||||||
virtual void do_oop( oop* p) { do_oop_work(p); }
|
|
||||||
template <class T> void do_oop_work(T* p) {
|
|
||||||
assert(_from->is_in_reserved(p), "paranoia");
|
|
||||||
if (!_from->is_in_reserved(oopDesc::load_decode_heap_oop(p)) &&
|
|
||||||
!_from->is_survivor()) {
|
|
||||||
size_t card_index = _ct_bs->index_for(p);
|
|
||||||
if (_ct_bs->mark_card_deferred(card_index)) {
|
|
||||||
_dcq->enqueue((jbyte*)_ct_bs->byte_for_index(card_index));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
class RemoveSelfForwardPtrObjClosure: public ObjectClosure {
|
|
||||||
private:
|
|
||||||
G1CollectedHeap* _g1;
|
|
||||||
ConcurrentMark* _cm;
|
|
||||||
HeapRegion* _hr;
|
|
||||||
size_t _marked_bytes;
|
|
||||||
OopsInHeapRegionClosure *_update_rset_cl;
|
|
||||||
bool _during_initial_mark;
|
|
||||||
bool _during_conc_mark;
|
|
||||||
uint _worker_id;
|
|
||||||
HeapWord* _end_of_last_gap;
|
|
||||||
HeapWord* _last_gap_threshold;
|
|
||||||
HeapWord* _last_obj_threshold;
|
|
||||||
|
|
||||||
public:
|
|
||||||
RemoveSelfForwardPtrObjClosure(G1CollectedHeap* g1, ConcurrentMark* cm,
|
|
||||||
HeapRegion* hr,
|
|
||||||
OopsInHeapRegionClosure* update_rset_cl,
|
|
||||||
bool during_initial_mark,
|
|
||||||
bool during_conc_mark,
|
|
||||||
uint worker_id) :
|
|
||||||
_g1(g1), _cm(cm), _hr(hr), _marked_bytes(0),
|
|
||||||
_update_rset_cl(update_rset_cl),
|
|
||||||
_during_initial_mark(during_initial_mark),
|
|
||||||
_during_conc_mark(during_conc_mark),
|
|
||||||
_worker_id(worker_id),
|
|
||||||
_end_of_last_gap(hr->bottom()),
|
|
||||||
_last_gap_threshold(hr->bottom()),
|
|
||||||
_last_obj_threshold(hr->bottom()) { }
|
|
||||||
|
|
||||||
size_t marked_bytes() { return _marked_bytes; }
|
|
||||||
|
|
||||||
// <original comment>
|
|
||||||
// The original idea here was to coalesce evacuated and dead objects.
|
|
||||||
// However that caused complications with the block offset table (BOT).
|
|
||||||
// In particular if there were two TLABs, one of them partially refined.
|
|
||||||
// |----- TLAB_1--------|----TLAB_2-~~~(partially refined part)~~~|
|
|
||||||
// The BOT entries of the unrefined part of TLAB_2 point to the start
|
|
||||||
// of TLAB_2. If the last object of the TLAB_1 and the first object
|
|
||||||
// of TLAB_2 are coalesced, then the cards of the unrefined part
|
|
||||||
// would point into middle of the filler object.
|
|
||||||
// The current approach is to not coalesce and leave the BOT contents intact.
|
|
||||||
// </original comment>
|
|
||||||
//
|
|
||||||
// We now reset the BOT when we start the object iteration over the
|
|
||||||
// region and refine its entries for every object we come across. So
|
|
||||||
// the above comment is not really relevant and we should be able
|
|
||||||
// to coalesce dead objects if we want to.
|
|
||||||
void do_object(oop obj) {
|
|
||||||
HeapWord* obj_addr = (HeapWord*) obj;
|
|
||||||
assert(_hr->is_in(obj_addr), "sanity");
|
|
||||||
size_t obj_size = obj->size();
|
|
||||||
HeapWord* obj_end = obj_addr + obj_size;
|
|
||||||
|
|
||||||
if (_end_of_last_gap != obj_addr) {
|
|
||||||
// there was a gap before obj_addr
|
|
||||||
_last_gap_threshold = _hr->cross_threshold(_end_of_last_gap, obj_addr);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (obj->is_forwarded() && obj->forwardee() == obj) {
|
|
||||||
// The object failed to move.
|
|
||||||
|
|
||||||
// We consider all objects that we find self-forwarded to be
|
|
||||||
// live. What we'll do is that we'll update the prev marking
|
|
||||||
// info so that they are all under PTAMS and explicitly marked.
|
|
||||||
if (!_cm->isPrevMarked(obj)) {
|
|
||||||
_cm->markPrev(obj);
|
|
||||||
}
|
|
||||||
if (_during_initial_mark) {
|
|
||||||
// For the next marking info we'll only mark the
|
|
||||||
// self-forwarded objects explicitly if we are during
|
|
||||||
// initial-mark (since, normally, we only mark objects pointed
|
|
||||||
// to by roots if we succeed in copying them). By marking all
|
|
||||||
// self-forwarded objects we ensure that we mark any that are
|
|
||||||
// still pointed to be roots. During concurrent marking, and
|
|
||||||
// after initial-mark, we don't need to mark any objects
|
|
||||||
// explicitly and all objects in the CSet are considered
|
|
||||||
// (implicitly) live. So, we won't mark them explicitly and
|
|
||||||
// we'll leave them over NTAMS.
|
|
||||||
_cm->grayRoot(obj, obj_size, _worker_id, _hr);
|
|
||||||
}
|
|
||||||
_marked_bytes += (obj_size * HeapWordSize);
|
|
||||||
obj->set_mark(markOopDesc::prototype());
|
|
||||||
|
|
||||||
// While we were processing RSet buffers during the collection,
|
|
||||||
// we actually didn't scan any cards on the collection set,
|
|
||||||
// since we didn't want to update remembered sets with entries
|
|
||||||
// that point into the collection set, given that live objects
|
|
||||||
// from the collection set are about to move and such entries
|
|
||||||
// will be stale very soon.
|
|
||||||
// This change also dealt with a reliability issue which
|
|
||||||
// involved scanning a card in the collection set and coming
|
|
||||||
// across an array that was being chunked and looking malformed.
|
|
||||||
// The problem is that, if evacuation fails, we might have
|
|
||||||
// remembered set entries missing given that we skipped cards on
|
|
||||||
// the collection set. So, we'll recreate such entries now.
|
|
||||||
obj->oop_iterate(_update_rset_cl);
|
|
||||||
} else {
|
|
||||||
|
|
||||||
// The object has been either evacuated or is dead. Fill it with a
|
|
||||||
// dummy object.
|
|
||||||
MemRegion mr(obj_addr, obj_size);
|
|
||||||
CollectedHeap::fill_with_object(mr);
|
|
||||||
|
|
||||||
// must nuke all dead objects which we skipped when iterating over the region
|
|
||||||
_cm->clearRangePrevBitmap(MemRegion(_end_of_last_gap, obj_end));
|
|
||||||
}
|
|
||||||
_end_of_last_gap = obj_end;
|
|
||||||
_last_obj_threshold = _hr->cross_threshold(obj_addr, obj_end);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
class RemoveSelfForwardPtrHRClosure: public HeapRegionClosure {
|
|
||||||
G1CollectedHeap* _g1h;
|
|
||||||
ConcurrentMark* _cm;
|
|
||||||
uint _worker_id;
|
|
||||||
HeapRegionClaimer* _hrclaimer;
|
|
||||||
|
|
||||||
DirtyCardQueue _dcq;
|
|
||||||
UpdateRSetDeferred _update_rset_cl;
|
|
||||||
|
|
||||||
public:
|
|
||||||
RemoveSelfForwardPtrHRClosure(G1CollectedHeap* g1h,
|
|
||||||
uint worker_id,
|
|
||||||
HeapRegionClaimer* hrclaimer) :
|
|
||||||
_g1h(g1h), _dcq(&g1h->dirty_card_queue_set()), _update_rset_cl(g1h, &_dcq),
|
|
||||||
_worker_id(worker_id), _cm(_g1h->concurrent_mark()), _hrclaimer(hrclaimer) {
|
|
||||||
}
|
|
||||||
|
|
||||||
bool doHeapRegion(HeapRegion *hr) {
|
|
||||||
bool during_initial_mark = _g1h->g1_policy()->during_initial_mark_pause();
|
|
||||||
bool during_conc_mark = _g1h->mark_in_progress();
|
|
||||||
|
|
||||||
assert(!hr->is_humongous(), "sanity");
|
|
||||||
assert(hr->in_collection_set(), "bad CS");
|
|
||||||
|
|
||||||
if (_hrclaimer->claim_region(hr->hrm_index())) {
|
|
||||||
if (hr->evacuation_failed()) {
|
|
||||||
RemoveSelfForwardPtrObjClosure rspc(_g1h, _cm, hr, &_update_rset_cl,
|
|
||||||
during_initial_mark,
|
|
||||||
during_conc_mark,
|
|
||||||
_worker_id);
|
|
||||||
|
|
||||||
hr->note_self_forwarding_removal_start(during_initial_mark,
|
|
||||||
during_conc_mark);
|
|
||||||
_g1h->check_bitmaps("Self-Forwarding Ptr Removal", hr);
|
|
||||||
|
|
||||||
// In the common case (i.e. when there is no evacuation
|
|
||||||
// failure) we make sure that the following is done when
|
|
||||||
// the region is freed so that it is "ready-to-go" when it's
|
|
||||||
// re-allocated. However, when evacuation failure happens, a
|
|
||||||
// region will remain in the heap and might ultimately be added
|
|
||||||
// to a CSet in the future. So we have to be careful here and
|
|
||||||
// make sure the region's RSet is ready for parallel iteration
|
|
||||||
// whenever this might be required in the future.
|
|
||||||
hr->rem_set()->reset_for_par_iteration();
|
|
||||||
hr->reset_bot();
|
|
||||||
_update_rset_cl.set_region(hr);
|
|
||||||
hr->object_iterate(&rspc);
|
|
||||||
|
|
||||||
hr->rem_set()->clean_strong_code_roots(hr);
|
|
||||||
|
|
||||||
hr->note_self_forwarding_removal_end(during_initial_mark,
|
|
||||||
during_conc_mark,
|
|
||||||
rspc.marked_bytes());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
class G1ParRemoveSelfForwardPtrsTask: public AbstractGangTask {
|
class G1ParRemoveSelfForwardPtrsTask: public AbstractGangTask {
|
||||||
protected:
|
protected:
|
||||||
G1CollectedHeap* _g1h;
|
G1CollectedHeap* _g1h;
|
||||||
HeapRegionClaimer _hrclaimer;
|
HeapRegionClaimer _hrclaimer;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
G1ParRemoveSelfForwardPtrsTask(G1CollectedHeap* g1h) :
|
G1ParRemoveSelfForwardPtrsTask(G1CollectedHeap* g1h);
|
||||||
AbstractGangTask("G1 Remove Self-forwarding Pointers"), _g1h(g1h),
|
|
||||||
_hrclaimer(g1h->workers()->active_workers()) {}
|
|
||||||
|
|
||||||
void work(uint worker_id) {
|
void work(uint worker_id);
|
||||||
RemoveSelfForwardPtrHRClosure rsfp_cl(_g1h, worker_id, &_hrclaimer);
|
|
||||||
|
|
||||||
HeapRegion* hr = _g1h->start_cset_region_for_worker(worker_id);
|
|
||||||
_g1h->collection_set_iterate_from(hr, &rsfp_cl);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1EVACFAILURE_HPP
|
#endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1EVACFAILURE_HPP
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
||||||
#include "gc_implementation/g1/heapRegion.hpp"
|
#include "gc_implementation/g1/heapRegion.hpp"
|
||||||
#include "gc_implementation/g1/satbQueue.hpp"
|
#include "gc_implementation/g1/satbQueue.hpp"
|
||||||
|
#include "oops/oop.inline.hpp"
|
||||||
#include "runtime/atomic.inline.hpp"
|
#include "runtime/atomic.inline.hpp"
|
||||||
#include "runtime/mutexLocker.hpp"
|
#include "runtime/mutexLocker.hpp"
|
||||||
#include "runtime/orderAccess.inline.hpp"
|
#include "runtime/orderAccess.inline.hpp"
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include "gc_implementation/g1/g1RegionToSpaceMapper.hpp"
|
#include "gc_implementation/g1/g1RegionToSpaceMapper.hpp"
|
||||||
#include "memory/cardTableModRefBS.hpp"
|
#include "memory/cardTableModRefBS.hpp"
|
||||||
#include "memory/memRegion.hpp"
|
#include "memory/memRegion.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.hpp"
|
||||||
#include "utilities/macros.hpp"
|
#include "utilities/macros.hpp"
|
||||||
|
|
||||||
class DirtyCardQueueSet;
|
class DirtyCardQueueSet;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "classfile/javaClasses.hpp"
|
#include "classfile/javaClasses.inline.hpp"
|
||||||
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
||||||
#include "gc_implementation/g1/g1GCPhaseTimes.hpp"
|
#include "gc_implementation/g1/g1GCPhaseTimes.hpp"
|
||||||
#include "gc_implementation/g1/g1StringDedup.hpp"
|
#include "gc_implementation/g1/g1StringDedup.hpp"
|
||||||
|
@ -51,7 +51,7 @@ void G1StringDedup::stop() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool G1StringDedup::is_candidate_from_mark(oop obj) {
|
bool G1StringDedup::is_candidate_from_mark(oop obj) {
|
||||||
if (java_lang_String::is_instance(obj)) {
|
if (java_lang_String::is_instance_inlined(obj)) {
|
||||||
bool from_young = G1CollectedHeap::heap()->heap_region_containing_raw(obj)->is_young();
|
bool from_young = G1CollectedHeap::heap()->heap_region_containing_raw(obj)->is_young();
|
||||||
if (from_young && obj->age() < StringDeduplicationAgeThreshold) {
|
if (from_young && obj->age() < StringDeduplicationAgeThreshold) {
|
||||||
// Candidate found. String is being evacuated from young to old but has not
|
// Candidate found. String is being evacuated from young to old but has not
|
||||||
|
@ -73,7 +73,7 @@ void G1StringDedup::enqueue_from_mark(oop java_string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool G1StringDedup::is_candidate_from_evacuation(bool from_young, bool to_young, oop obj) {
|
bool G1StringDedup::is_candidate_from_evacuation(bool from_young, bool to_young, oop obj) {
|
||||||
if (from_young && java_lang_String::is_instance(obj)) {
|
if (from_young && java_lang_String::is_instance_inlined(obj)) {
|
||||||
if (to_young && obj->age() == StringDeduplicationAgeThreshold) {
|
if (to_young && obj->age() == StringDeduplicationAgeThreshold) {
|
||||||
// Candidate found. String is being evacuated from young to young and just
|
// Candidate found. String is being evacuated from young to young and just
|
||||||
// reached the deduplication age threshold.
|
// reached the deduplication age threshold.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -23,9 +23,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "classfile/javaClasses.hpp"
|
#include "classfile/javaClasses.inline.hpp"
|
||||||
|
#include "gc_implementation/g1/g1StringDedup.hpp"
|
||||||
#include "gc_implementation/g1/g1StringDedupQueue.hpp"
|
#include "gc_implementation/g1/g1StringDedupQueue.hpp"
|
||||||
#include "memory/gcLocker.hpp"
|
#include "memory/gcLocker.hpp"
|
||||||
|
#include "oops/oop.inline.hpp"
|
||||||
#include "runtime/atomic.inline.hpp"
|
#include "runtime/atomic.inline.hpp"
|
||||||
#include "runtime/mutexLocker.hpp"
|
#include "runtime/mutexLocker.hpp"
|
||||||
#include "utilities/stack.inline.hpp"
|
#include "utilities/stack.inline.hpp"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -24,13 +24,14 @@
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "classfile/altHashing.hpp"
|
#include "classfile/altHashing.hpp"
|
||||||
#include "classfile/javaClasses.hpp"
|
#include "classfile/javaClasses.inline.hpp"
|
||||||
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
||||||
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
||||||
#include "gc_implementation/g1/g1StringDedupTable.hpp"
|
#include "gc_implementation/g1/g1StringDedupTable.hpp"
|
||||||
#include "memory/gcLocker.hpp"
|
#include "memory/gcLocker.hpp"
|
||||||
#include "memory/padded.inline.hpp"
|
#include "memory/padded.inline.hpp"
|
||||||
#include "oops/typeArrayOop.hpp"
|
#include "oops/typeArrayOop.hpp"
|
||||||
|
#include "oops/oop.inline.hpp"
|
||||||
#include "runtime/mutexLocker.hpp"
|
#include "runtime/mutexLocker.hpp"
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -29,6 +29,7 @@
|
||||||
#include "gc_implementation/g1/g1CollectedHeap.hpp"
|
#include "gc_implementation/g1/g1CollectedHeap.hpp"
|
||||||
#include "gc_implementation/g1/heapRegion.hpp"
|
#include "gc_implementation/g1/heapRegion.hpp"
|
||||||
#include "memory/space.hpp"
|
#include "memory/space.hpp"
|
||||||
|
#include "oops/oop.inline.hpp"
|
||||||
#include "runtime/atomic.inline.hpp"
|
#include "runtime/atomic.inline.hpp"
|
||||||
|
|
||||||
// This version requires locking.
|
// This version requires locking.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -34,12 +34,11 @@
|
||||||
#include "gc_implementation/g1/vm_operations_g1.hpp"
|
#include "gc_implementation/g1/vm_operations_g1.hpp"
|
||||||
#include "runtime/interfaceSupport.hpp"
|
#include "runtime/interfaceSupport.hpp"
|
||||||
|
|
||||||
VM_G1CollectForAllocation::VM_G1CollectForAllocation(
|
VM_G1CollectForAllocation::VM_G1CollectForAllocation(uint gc_count_before,
|
||||||
unsigned int gc_count_before,
|
size_t word_size)
|
||||||
size_t word_size)
|
|
||||||
: VM_G1OperationWithAllocRequest(gc_count_before, word_size,
|
: VM_G1OperationWithAllocRequest(gc_count_before, word_size,
|
||||||
GCCause::_allocation_failure) {
|
GCCause::_allocation_failure) {
|
||||||
guarantee(word_size > 0, "an allocation should always be requested");
|
guarantee(word_size != 0, "An allocation should always be requested with this operation.");
|
||||||
}
|
}
|
||||||
|
|
||||||
void VM_G1CollectForAllocation::doit() {
|
void VM_G1CollectForAllocation::doit() {
|
||||||
|
@ -57,12 +56,11 @@ void VM_G1CollectFull::doit() {
|
||||||
g1h->do_full_collection(false /* clear_all_soft_refs */);
|
g1h->do_full_collection(false /* clear_all_soft_refs */);
|
||||||
}
|
}
|
||||||
|
|
||||||
VM_G1IncCollectionPause::VM_G1IncCollectionPause(
|
VM_G1IncCollectionPause::VM_G1IncCollectionPause(uint gc_count_before,
|
||||||
unsigned int gc_count_before,
|
size_t word_size,
|
||||||
size_t word_size,
|
bool should_initiate_conc_mark,
|
||||||
bool should_initiate_conc_mark,
|
double target_pause_time_ms,
|
||||||
double target_pause_time_ms,
|
GCCause::Cause gc_cause)
|
||||||
GCCause::Cause gc_cause)
|
|
||||||
: VM_G1OperationWithAllocRequest(gc_count_before, word_size, gc_cause),
|
: VM_G1OperationWithAllocRequest(gc_count_before, word_size, gc_cause),
|
||||||
_should_initiate_conc_mark(should_initiate_conc_mark),
|
_should_initiate_conc_mark(should_initiate_conc_mark),
|
||||||
_target_pause_time_ms(target_pause_time_ms),
|
_target_pause_time_ms(target_pause_time_ms),
|
||||||
|
@ -75,7 +73,7 @@ VM_G1IncCollectionPause::VM_G1IncCollectionPause(
|
||||||
}
|
}
|
||||||
|
|
||||||
bool VM_G1IncCollectionPause::doit_prologue() {
|
bool VM_G1IncCollectionPause::doit_prologue() {
|
||||||
bool res = VM_GC_Operation::doit_prologue();
|
bool res = VM_G1OperationWithAllocRequest::doit_prologue();
|
||||||
if (!res) {
|
if (!res) {
|
||||||
if (_should_initiate_conc_mark) {
|
if (_should_initiate_conc_mark) {
|
||||||
// The prologue can fail for a couple of reasons. The first is that another GC
|
// The prologue can fail for a couple of reasons. The first is that another GC
|
||||||
|
@ -165,7 +163,7 @@ void VM_G1IncCollectionPause::doit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void VM_G1IncCollectionPause::doit_epilogue() {
|
void VM_G1IncCollectionPause::doit_epilogue() {
|
||||||
VM_GC_Operation::doit_epilogue();
|
VM_G1OperationWithAllocRequest::doit_epilogue();
|
||||||
|
|
||||||
// If the pause was initiated by a System.gc() and
|
// If the pause was initiated by a System.gc() and
|
||||||
// +ExplicitGCInvokesConcurrent, we have to wait here for the cycle
|
// +ExplicitGCInvokesConcurrent, we have to wait here for the cycle
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -36,20 +36,17 @@
|
||||||
// - VM_G1CollectForAllocation
|
// - VM_G1CollectForAllocation
|
||||||
// - VM_G1IncCollectionPause
|
// - VM_G1IncCollectionPause
|
||||||
|
|
||||||
class VM_G1OperationWithAllocRequest: public VM_GC_Operation {
|
class VM_G1OperationWithAllocRequest : public VM_CollectForAllocation {
|
||||||
protected:
|
protected:
|
||||||
size_t _word_size;
|
|
||||||
HeapWord* _result;
|
|
||||||
bool _pause_succeeded;
|
bool _pause_succeeded;
|
||||||
AllocationContext_t _allocation_context;
|
AllocationContext_t _allocation_context;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
VM_G1OperationWithAllocRequest(unsigned int gc_count_before,
|
VM_G1OperationWithAllocRequest(uint gc_count_before,
|
||||||
size_t word_size,
|
size_t word_size,
|
||||||
GCCause::Cause gc_cause)
|
GCCause::Cause gc_cause)
|
||||||
: VM_GC_Operation(gc_count_before, gc_cause),
|
: VM_CollectForAllocation(word_size, gc_count_before, gc_cause),
|
||||||
_word_size(word_size), _result(NULL), _pause_succeeded(false) { }
|
_pause_succeeded(false) {}
|
||||||
HeapWord* result() { return _result; }
|
|
||||||
bool pause_succeeded() { return _pause_succeeded; }
|
bool pause_succeeded() { return _pause_succeeded; }
|
||||||
void set_allocation_context(AllocationContext_t context) { _allocation_context = context; }
|
void set_allocation_context(AllocationContext_t context) { _allocation_context = context; }
|
||||||
AllocationContext_t allocation_context() { return _allocation_context; }
|
AllocationContext_t allocation_context() { return _allocation_context; }
|
||||||
|
@ -57,8 +54,8 @@ public:
|
||||||
|
|
||||||
class VM_G1CollectFull: public VM_GC_Operation {
|
class VM_G1CollectFull: public VM_GC_Operation {
|
||||||
public:
|
public:
|
||||||
VM_G1CollectFull(unsigned int gc_count_before,
|
VM_G1CollectFull(uint gc_count_before,
|
||||||
unsigned int full_gc_count_before,
|
uint full_gc_count_before,
|
||||||
GCCause::Cause cause)
|
GCCause::Cause cause)
|
||||||
: VM_GC_Operation(gc_count_before, cause, full_gc_count_before, true) { }
|
: VM_GC_Operation(gc_count_before, cause, full_gc_count_before, true) { }
|
||||||
virtual VMOp_Type type() const { return VMOp_G1CollectFull; }
|
virtual VMOp_Type type() const { return VMOp_G1CollectFull; }
|
||||||
|
@ -70,7 +67,7 @@ public:
|
||||||
|
|
||||||
class VM_G1CollectForAllocation: public VM_G1OperationWithAllocRequest {
|
class VM_G1CollectForAllocation: public VM_G1OperationWithAllocRequest {
|
||||||
public:
|
public:
|
||||||
VM_G1CollectForAllocation(unsigned int gc_count_before,
|
VM_G1CollectForAllocation(uint gc_count_before,
|
||||||
size_t word_size);
|
size_t word_size);
|
||||||
virtual VMOp_Type type() const { return VMOp_G1CollectForAllocation; }
|
virtual VMOp_Type type() const { return VMOp_G1CollectForAllocation; }
|
||||||
virtual void doit();
|
virtual void doit();
|
||||||
|
@ -84,9 +81,9 @@ private:
|
||||||
bool _should_initiate_conc_mark;
|
bool _should_initiate_conc_mark;
|
||||||
bool _should_retry_gc;
|
bool _should_retry_gc;
|
||||||
double _target_pause_time_ms;
|
double _target_pause_time_ms;
|
||||||
unsigned int _old_marking_cycles_completed_before;
|
uint _old_marking_cycles_completed_before;
|
||||||
public:
|
public:
|
||||||
VM_G1IncCollectionPause(unsigned int gc_count_before,
|
VM_G1IncCollectionPause(uint gc_count_before,
|
||||||
size_t word_size,
|
size_t word_size,
|
||||||
bool should_initiate_conc_mark,
|
bool should_initiate_conc_mark,
|
||||||
double target_pause_time_ms,
|
double target_pause_time_ms,
|
||||||
|
|
|
@ -126,7 +126,9 @@ void ObjectStartArray::reset() {
|
||||||
|
|
||||||
bool ObjectStartArray::object_starts_in_range(HeapWord* start_addr,
|
bool ObjectStartArray::object_starts_in_range(HeapWord* start_addr,
|
||||||
HeapWord* end_addr) const {
|
HeapWord* end_addr) const {
|
||||||
assert(start_addr <= end_addr, "range is wrong");
|
assert(start_addr <= end_addr,
|
||||||
|
err_msg("Range is wrong. start_addr (" PTR_FORMAT ") is after end_addr (" PTR_FORMAT ")",
|
||||||
|
p2i(start_addr), p2i(end_addr)));
|
||||||
if (start_addr > end_addr) {
|
if (start_addr > end_addr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,8 +119,13 @@ class ObjectStartArray : public CHeapObj<mtGC> {
|
||||||
|
|
||||||
MemRegion covered_region() { return _covered_region; }
|
MemRegion covered_region() { return _covered_region; }
|
||||||
|
|
||||||
|
#define assert_covered_region_contains(addr) \
|
||||||
|
assert(_covered_region.contains(addr), \
|
||||||
|
err_msg(#addr " (" PTR_FORMAT ") is not in covered region [" PTR_FORMAT ", " PTR_FORMAT "]", \
|
||||||
|
p2i(addr), p2i(_covered_region.start()), p2i(_covered_region.end())))
|
||||||
|
|
||||||
void allocate_block(HeapWord* p) {
|
void allocate_block(HeapWord* p) {
|
||||||
assert(_covered_region.contains(p), "Must be in covered region");
|
assert_covered_region_contains(p);
|
||||||
jbyte* block = block_for_addr(p);
|
jbyte* block = block_for_addr(p);
|
||||||
HeapWord* block_base = addr_for_block(block);
|
HeapWord* block_base = addr_for_block(block);
|
||||||
size_t offset = pointer_delta(p, block_base, sizeof(HeapWord*));
|
size_t offset = pointer_delta(p, block_base, sizeof(HeapWord*));
|
||||||
|
@ -135,7 +140,7 @@ class ObjectStartArray : public CHeapObj<mtGC> {
|
||||||
// object in that block. Scroll backwards by one, and the first
|
// object in that block. Scroll backwards by one, and the first
|
||||||
// object hit should be at the beginning of the block
|
// object hit should be at the beginning of the block
|
||||||
HeapWord* object_start(HeapWord* addr) const {
|
HeapWord* object_start(HeapWord* addr) const {
|
||||||
assert(_covered_region.contains(addr), "Must be in covered region");
|
assert_covered_region_contains(addr);
|
||||||
jbyte* block = block_for_addr(addr);
|
jbyte* block = block_for_addr(addr);
|
||||||
HeapWord* scroll_forward = offset_addr_for_block(block--);
|
HeapWord* scroll_forward = offset_addr_for_block(block--);
|
||||||
while (scroll_forward > addr) {
|
while (scroll_forward > addr) {
|
||||||
|
@ -153,13 +158,14 @@ class ObjectStartArray : public CHeapObj<mtGC> {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool is_block_allocated(HeapWord* addr) {
|
bool is_block_allocated(HeapWord* addr) {
|
||||||
assert(_covered_region.contains(addr), "Must be in covered region");
|
assert_covered_region_contains(addr);
|
||||||
jbyte* block = block_for_addr(addr);
|
jbyte* block = block_for_addr(addr);
|
||||||
if (*block == clean_block)
|
if (*block == clean_block)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#undef assert_covered_region_contains
|
||||||
|
|
||||||
// Return true if an object starts in the range of heap addresses.
|
// Return true if an object starts in the range of heap addresses.
|
||||||
// If an object starts at an address corresponding to
|
// If an object starts at an address corresponding to
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -260,7 +260,7 @@ HeapWord* ParallelScavengeHeap::mem_allocate(
|
||||||
|
|
||||||
uint loop_count = 0;
|
uint loop_count = 0;
|
||||||
uint gc_count = 0;
|
uint gc_count = 0;
|
||||||
int gclocker_stalled_count = 0;
|
uint gclocker_stalled_count = 0;
|
||||||
|
|
||||||
while (result == NULL) {
|
while (result == NULL) {
|
||||||
// We don't want to have multiple collections for a single filled generation.
|
// We don't want to have multiple collections for a single filled generation.
|
||||||
|
@ -520,8 +520,8 @@ void ParallelScavengeHeap::collect(GCCause::Cause cause) {
|
||||||
assert(!Heap_lock->owned_by_self(),
|
assert(!Heap_lock->owned_by_self(),
|
||||||
"this thread should not own the Heap_lock");
|
"this thread should not own the Heap_lock");
|
||||||
|
|
||||||
unsigned int gc_count = 0;
|
uint gc_count = 0;
|
||||||
unsigned int full_gc_count = 0;
|
uint full_gc_count = 0;
|
||||||
{
|
{
|
||||||
MutexLocker ml(Heap_lock);
|
MutexLocker ml(Heap_lock);
|
||||||
// This value is guarded by the Heap_lock
|
// This value is guarded by the Heap_lock
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -32,12 +32,10 @@
|
||||||
#include "utilities/dtrace.hpp"
|
#include "utilities/dtrace.hpp"
|
||||||
|
|
||||||
// The following methods are used by the parallel scavenge collector
|
// The following methods are used by the parallel scavenge collector
|
||||||
VM_ParallelGCFailedAllocation::VM_ParallelGCFailedAllocation(size_t size,
|
VM_ParallelGCFailedAllocation::VM_ParallelGCFailedAllocation(size_t word_size,
|
||||||
unsigned int gc_count) :
|
uint gc_count) :
|
||||||
VM_GC_Operation(gc_count, GCCause::_allocation_failure),
|
VM_CollectForAllocation(word_size, gc_count, GCCause::_allocation_failure) {
|
||||||
_size(size),
|
assert(word_size != 0, "An allocation should always be requested with this operation.");
|
||||||
_result(NULL)
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void VM_ParallelGCFailedAllocation::doit() {
|
void VM_ParallelGCFailedAllocation::doit() {
|
||||||
|
@ -47,7 +45,7 @@ void VM_ParallelGCFailedAllocation::doit() {
|
||||||
assert(heap->kind() == CollectedHeap::ParallelScavengeHeap, "must be a ParallelScavengeHeap");
|
assert(heap->kind() == CollectedHeap::ParallelScavengeHeap, "must be a ParallelScavengeHeap");
|
||||||
|
|
||||||
GCCauseSetter gccs(heap, _gc_cause);
|
GCCauseSetter gccs(heap, _gc_cause);
|
||||||
_result = heap->failed_mem_allocate(_size);
|
_result = heap->failed_mem_allocate(_word_size);
|
||||||
|
|
||||||
if (_result == NULL && GC_locker::is_active_and_needs_gc()) {
|
if (_result == NULL && GC_locker::is_active_and_needs_gc()) {
|
||||||
set_gc_locked();
|
set_gc_locked();
|
||||||
|
@ -55,8 +53,8 @@ void VM_ParallelGCFailedAllocation::doit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only used for System.gc() calls
|
// Only used for System.gc() calls
|
||||||
VM_ParallelGCSystemGC::VM_ParallelGCSystemGC(unsigned int gc_count,
|
VM_ParallelGCSystemGC::VM_ParallelGCSystemGC(uint gc_count,
|
||||||
unsigned int full_gc_count,
|
uint full_gc_count,
|
||||||
GCCause::Cause gc_cause) :
|
GCCause::Cause gc_cause) :
|
||||||
VM_GC_Operation(gc_count, gc_cause, full_gc_count, true /* full */)
|
VM_GC_Operation(gc_count, gc_cause, full_gc_count, true /* full */)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -29,26 +29,19 @@
|
||||||
#include "gc_implementation/shared/vmGCOperations.hpp"
|
#include "gc_implementation/shared/vmGCOperations.hpp"
|
||||||
#include "gc_interface/gcCause.hpp"
|
#include "gc_interface/gcCause.hpp"
|
||||||
|
|
||||||
class VM_ParallelGCFailedAllocation: public VM_GC_Operation {
|
class VM_ParallelGCFailedAllocation : public VM_CollectForAllocation {
|
||||||
private:
|
|
||||||
size_t _size;
|
|
||||||
HeapWord* _result;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
VM_ParallelGCFailedAllocation(size_t size, unsigned int gc_count);
|
VM_ParallelGCFailedAllocation(size_t word_size, uint gc_count);
|
||||||
|
|
||||||
virtual VMOp_Type type() const {
|
virtual VMOp_Type type() const {
|
||||||
return VMOp_ParallelGCFailedAllocation;
|
return VMOp_ParallelGCFailedAllocation;
|
||||||
}
|
}
|
||||||
virtual void doit();
|
virtual void doit();
|
||||||
|
|
||||||
HeapWord* result() const { return _result; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class VM_ParallelGCSystemGC: public VM_GC_Operation {
|
class VM_ParallelGCSystemGC: public VM_GC_Operation {
|
||||||
public:
|
public:
|
||||||
VM_ParallelGCSystemGC(unsigned int gc_count, unsigned int full_gc_count,
|
VM_ParallelGCSystemGC(uint gc_count, uint full_gc_count, GCCause::Cause gc_cause);
|
||||||
GCCause::Cause gc_cause);
|
|
||||||
virtual VMOp_Type type() const { return VMOp_ParallelGCSystemGC; }
|
virtual VMOp_Type type() const { return VMOp_ParallelGCSystemGC; }
|
||||||
virtual void doit();
|
virtual void doit();
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -31,6 +31,7 @@
|
||||||
#include "gc_implementation/shared/objectCountEventSender.hpp"
|
#include "gc_implementation/shared/objectCountEventSender.hpp"
|
||||||
#include "memory/heapInspection.hpp"
|
#include "memory/heapInspection.hpp"
|
||||||
#include "memory/referenceProcessorStats.hpp"
|
#include "memory/referenceProcessorStats.hpp"
|
||||||
|
#include "memory/resourceArea.hpp"
|
||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
#include "utilities/globalDefinitions.hpp"
|
#include "utilities/globalDefinitions.hpp"
|
||||||
#include "utilities/macros.hpp"
|
#include "utilities/macros.hpp"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -41,6 +41,11 @@
|
||||||
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
||||||
#endif // INCLUDE_ALL_GCS
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
|
VM_GC_Operation::~VM_GC_Operation() {
|
||||||
|
CollectedHeap* ch = Universe::heap();
|
||||||
|
ch->collector_policy()->set_all_soft_refs_clear(false);
|
||||||
|
}
|
||||||
|
|
||||||
// The same dtrace probe can't be inserted in two different files, so we
|
// The same dtrace probe can't be inserted in two different files, so we
|
||||||
// have to call it here, so it's only in one file. Can't create new probes
|
// have to call it here, so it's only in one file. Can't create new probes
|
||||||
// for the other file anymore. The dtrace probes have to remain stable.
|
// for the other file anymore. The dtrace probes have to remain stable.
|
||||||
|
@ -179,10 +184,10 @@ void VM_GenCollectForAllocation::doit() {
|
||||||
|
|
||||||
GenCollectedHeap* gch = GenCollectedHeap::heap();
|
GenCollectedHeap* gch = GenCollectedHeap::heap();
|
||||||
GCCauseSetter gccs(gch, _gc_cause);
|
GCCauseSetter gccs(gch, _gc_cause);
|
||||||
_res = gch->satisfy_failed_allocation(_size, _tlab);
|
_result = gch->satisfy_failed_allocation(_word_size, _tlab);
|
||||||
assert(gch->is_in_reserved_or_null(_res), "result not in heap");
|
assert(gch->is_in_reserved_or_null(_result), "result not in heap");
|
||||||
|
|
||||||
if (_res == NULL && GC_locker::is_active_and_needs_gc()) {
|
if (_result == NULL && GC_locker::is_active_and_needs_gc()) {
|
||||||
set_gc_locked();
|
set_gc_locked();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -25,6 +25,7 @@
|
||||||
#ifndef SHARE_VM_GC_IMPLEMENTATION_SHARED_VMGCOPERATIONS_HPP
|
#ifndef SHARE_VM_GC_IMPLEMENTATION_SHARED_VMGCOPERATIONS_HPP
|
||||||
#define SHARE_VM_GC_IMPLEMENTATION_SHARED_VMGCOPERATIONS_HPP
|
#define SHARE_VM_GC_IMPLEMENTATION_SHARED_VMGCOPERATIONS_HPP
|
||||||
|
|
||||||
|
#include "gc_interface/collectedHeap.hpp"
|
||||||
#include "memory/heapInspection.hpp"
|
#include "memory/heapInspection.hpp"
|
||||||
#include "runtime/handles.hpp"
|
#include "runtime/handles.hpp"
|
||||||
#include "runtime/jniHandles.hpp"
|
#include "runtime/jniHandles.hpp"
|
||||||
|
@ -38,11 +39,12 @@
|
||||||
// VM_Operation
|
// VM_Operation
|
||||||
// VM_GC_Operation
|
// VM_GC_Operation
|
||||||
// VM_GC_HeapInspection
|
// VM_GC_HeapInspection
|
||||||
// VM_GenCollectForAllocation
|
|
||||||
// VM_GenCollectFull
|
// VM_GenCollectFull
|
||||||
// VM_GenCollectFullConcurrent
|
// VM_GenCollectFullConcurrent
|
||||||
// VM_ParallelGCFailedAllocation
|
|
||||||
// VM_ParallelGCSystemGC
|
// VM_ParallelGCSystemGC
|
||||||
|
// VM_CollectForAllocation
|
||||||
|
// VM_GenCollectForAllocation
|
||||||
|
// VM_ParallelGCFailedAllocation
|
||||||
// VM_GC_Operation
|
// VM_GC_Operation
|
||||||
// - implements methods common to all classes in the hierarchy:
|
// - implements methods common to all classes in the hierarchy:
|
||||||
// prevents multiple gc requests and manages lock on heap;
|
// prevents multiple gc requests and manages lock on heap;
|
||||||
|
@ -51,6 +53,7 @@
|
||||||
// - prints class histogram on SIGBREAK if PrintClassHistogram
|
// - prints class histogram on SIGBREAK if PrintClassHistogram
|
||||||
// is specified; and also the attach "inspectheap" operation
|
// is specified; and also the attach "inspectheap" operation
|
||||||
//
|
//
|
||||||
|
// VM_CollectForAllocation
|
||||||
// VM_GenCollectForAllocation
|
// VM_GenCollectForAllocation
|
||||||
// VM_ParallelGCFailedAllocation
|
// VM_ParallelGCFailedAllocation
|
||||||
// - this operation is invoked when allocation is failed;
|
// - this operation is invoked when allocation is failed;
|
||||||
|
@ -66,13 +69,13 @@
|
||||||
|
|
||||||
class VM_GC_Operation: public VM_Operation {
|
class VM_GC_Operation: public VM_Operation {
|
||||||
protected:
|
protected:
|
||||||
BasicLock _pending_list_basic_lock; // for refs pending list notification (PLL)
|
BasicLock _pending_list_basic_lock; // for refs pending list notification (PLL)
|
||||||
unsigned int _gc_count_before; // gc count before acquiring PLL
|
uint _gc_count_before; // gc count before acquiring PLL
|
||||||
unsigned int _full_gc_count_before; // full gc count before acquiring PLL
|
uint _full_gc_count_before; // full gc count before acquiring PLL
|
||||||
bool _full; // whether a "full" collection
|
bool _full; // whether a "full" collection
|
||||||
bool _prologue_succeeded; // whether doit_prologue succeeded
|
bool _prologue_succeeded; // whether doit_prologue succeeded
|
||||||
GCCause::Cause _gc_cause; // the putative cause for this gc op
|
GCCause::Cause _gc_cause; // the putative cause for this gc op
|
||||||
bool _gc_locked; // will be set if gc was locked
|
bool _gc_locked; // will be set if gc was locked
|
||||||
|
|
||||||
virtual bool skip_operation() const;
|
virtual bool skip_operation() const;
|
||||||
|
|
||||||
|
@ -81,9 +84,9 @@ class VM_GC_Operation: public VM_Operation {
|
||||||
void release_and_notify_pending_list_lock();
|
void release_and_notify_pending_list_lock();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
VM_GC_Operation(unsigned int gc_count_before,
|
VM_GC_Operation(uint gc_count_before,
|
||||||
GCCause::Cause _cause,
|
GCCause::Cause _cause,
|
||||||
unsigned int full_gc_count_before = 0,
|
uint full_gc_count_before = 0,
|
||||||
bool full = false) {
|
bool full = false) {
|
||||||
_full = full;
|
_full = full;
|
||||||
_prologue_succeeded = false;
|
_prologue_succeeded = false;
|
||||||
|
@ -104,10 +107,7 @@ class VM_GC_Operation: public VM_Operation {
|
||||||
// mutators have run. Soft refs will be cleared again in this
|
// mutators have run. Soft refs will be cleared again in this
|
||||||
// collection.
|
// collection.
|
||||||
}
|
}
|
||||||
~VM_GC_Operation() {
|
~VM_GC_Operation();
|
||||||
CollectedHeap* ch = Universe::heap();
|
|
||||||
ch->collector_policy()->set_all_soft_refs_clear(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Acquire the reference synchronization lock
|
// Acquire the reference synchronization lock
|
||||||
virtual bool doit_prologue();
|
virtual bool doit_prologue();
|
||||||
|
@ -160,38 +160,46 @@ class VM_GC_HeapInspection: public VM_GC_Operation {
|
||||||
bool collect();
|
bool collect();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class VM_CollectForAllocation : public VM_GC_Operation {
|
||||||
|
protected:
|
||||||
|
size_t _word_size; // Size of object to be allocated (in number of words)
|
||||||
|
HeapWord* _result; // Allocation result (NULL if allocation failed)
|
||||||
|
|
||||||
class VM_GenCollectForAllocation: public VM_GC_Operation {
|
public:
|
||||||
|
VM_CollectForAllocation(size_t word_size, uint gc_count_before, GCCause::Cause cause)
|
||||||
|
: VM_GC_Operation(gc_count_before, cause), _result(NULL), _word_size(word_size) {}
|
||||||
|
|
||||||
|
HeapWord* result() const {
|
||||||
|
return _result;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class VM_GenCollectForAllocation : public VM_CollectForAllocation {
|
||||||
private:
|
private:
|
||||||
HeapWord* _res;
|
|
||||||
size_t _size; // size of object to be allocated.
|
|
||||||
bool _tlab; // alloc is of a tlab.
|
bool _tlab; // alloc is of a tlab.
|
||||||
public:
|
public:
|
||||||
VM_GenCollectForAllocation(size_t size,
|
VM_GenCollectForAllocation(size_t word_size,
|
||||||
bool tlab,
|
bool tlab,
|
||||||
unsigned int gc_count_before)
|
uint gc_count_before)
|
||||||
: VM_GC_Operation(gc_count_before, GCCause::_allocation_failure),
|
: VM_CollectForAllocation(word_size, gc_count_before, GCCause::_allocation_failure),
|
||||||
_size(size),
|
|
||||||
_tlab(tlab) {
|
_tlab(tlab) {
|
||||||
_res = NULL;
|
assert(word_size != 0, "An allocation should always be requested with this operation.");
|
||||||
}
|
}
|
||||||
~VM_GenCollectForAllocation() {}
|
~VM_GenCollectForAllocation() {}
|
||||||
virtual VMOp_Type type() const { return VMOp_GenCollectForAllocation; }
|
virtual VMOp_Type type() const { return VMOp_GenCollectForAllocation; }
|
||||||
virtual void doit();
|
virtual void doit();
|
||||||
HeapWord* result() const { return _res; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// VM operation to invoke a collection of the heap as a
|
// VM operation to invoke a collection of the heap as a
|
||||||
// GenCollectedHeap heap.
|
// GenCollectedHeap heap.
|
||||||
class VM_GenCollectFull: public VM_GC_Operation {
|
class VM_GenCollectFull: public VM_GC_Operation {
|
||||||
private:
|
private:
|
||||||
int _max_level;
|
int _max_level;
|
||||||
public:
|
public:
|
||||||
VM_GenCollectFull(unsigned int gc_count_before,
|
VM_GenCollectFull(uint gc_count_before,
|
||||||
unsigned int full_gc_count_before,
|
uint full_gc_count_before,
|
||||||
GCCause::Cause gc_cause,
|
GCCause::Cause gc_cause,
|
||||||
int max_level)
|
int max_level)
|
||||||
: VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true /* full */),
|
: VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true /* full */),
|
||||||
_max_level(max_level) { }
|
_max_level(max_level) { }
|
||||||
~VM_GenCollectFull() {}
|
~VM_GenCollectFull() {}
|
||||||
|
@ -208,9 +216,9 @@ class VM_CollectForMetadataAllocation: public VM_GC_Operation {
|
||||||
public:
|
public:
|
||||||
VM_CollectForMetadataAllocation(ClassLoaderData* loader_data,
|
VM_CollectForMetadataAllocation(ClassLoaderData* loader_data,
|
||||||
size_t size, Metaspace::MetadataType mdtype,
|
size_t size, Metaspace::MetadataType mdtype,
|
||||||
unsigned int gc_count_before,
|
uint gc_count_before,
|
||||||
unsigned int full_gc_count_before,
|
uint full_gc_count_before,
|
||||||
GCCause::Cause gc_cause)
|
GCCause::Cause gc_cause)
|
||||||
: VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true),
|
: VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true),
|
||||||
_loader_data(loader_data), _size(size), _mdtype(mdtype), _result(NULL) {
|
_loader_data(loader_data), _size(size), _mdtype(mdtype), _result(NULL) {
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -32,6 +32,7 @@
|
||||||
#include "gc_interface/allocTracer.hpp"
|
#include "gc_interface/allocTracer.hpp"
|
||||||
#include "gc_interface/collectedHeap.hpp"
|
#include "gc_interface/collectedHeap.hpp"
|
||||||
#include "gc_interface/collectedHeap.inline.hpp"
|
#include "gc_interface/collectedHeap.inline.hpp"
|
||||||
|
#include "memory/barrierSet.inline.hpp"
|
||||||
#include "memory/metaspace.hpp"
|
#include "memory/metaspace.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
#include "oops/instanceMirrorKlass.hpp"
|
#include "oops/instanceMirrorKlass.hpp"
|
||||||
|
@ -124,6 +125,14 @@ void CollectedHeap::print_heap_after_gc() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CollectedHeap::print_on_error(outputStream* st) const {
|
||||||
|
st->print_cr("Heap:");
|
||||||
|
print_extended_on(st);
|
||||||
|
st->cr();
|
||||||
|
|
||||||
|
_barrier_set->print_on(st);
|
||||||
|
}
|
||||||
|
|
||||||
void CollectedHeap::register_nmethod(nmethod* nm) {
|
void CollectedHeap::register_nmethod(nmethod* nm) {
|
||||||
assert_locked_or_safepoint(CodeCache_lock);
|
assert_locked_or_safepoint(CodeCache_lock);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -28,7 +28,6 @@
|
||||||
#include "gc_interface/gcCause.hpp"
|
#include "gc_interface/gcCause.hpp"
|
||||||
#include "gc_implementation/shared/gcWhen.hpp"
|
#include "gc_implementation/shared/gcWhen.hpp"
|
||||||
#include "memory/allocation.hpp"
|
#include "memory/allocation.hpp"
|
||||||
#include "memory/barrierSet.hpp"
|
|
||||||
#include "runtime/handles.hpp"
|
#include "runtime/handles.hpp"
|
||||||
#include "runtime/perfData.hpp"
|
#include "runtime/perfData.hpp"
|
||||||
#include "runtime/safepoint.hpp"
|
#include "runtime/safepoint.hpp"
|
||||||
|
@ -576,13 +575,7 @@ class CollectedHeap : public CHeapObj<mtInternal> {
|
||||||
print_on(st);
|
print_on(st);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void print_on_error(outputStream* st) const {
|
virtual void print_on_error(outputStream* st) const;
|
||||||
st->print_cr("Heap:");
|
|
||||||
print_extended_on(st);
|
|
||||||
st->cr();
|
|
||||||
|
|
||||||
_barrier_set->print_on(st);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Print all GC threads (other than the VM thread)
|
// Print all GC threads (other than the VM thread)
|
||||||
// used by this heap.
|
// used by this heap.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -23,6 +23,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
|
#include "classfile/javaClasses.inline.hpp"
|
||||||
#include "interpreter/bytecodeHistogram.hpp"
|
#include "interpreter/bytecodeHistogram.hpp"
|
||||||
#include "interpreter/bytecodeTracer.hpp"
|
#include "interpreter/bytecodeTracer.hpp"
|
||||||
#include "interpreter/bytecodes.hpp"
|
#include "interpreter/bytecodes.hpp"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -23,6 +23,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
|
#include "classfile/javaClasses.inline.hpp"
|
||||||
#include "classfile/systemDictionary.hpp"
|
#include "classfile/systemDictionary.hpp"
|
||||||
#include "classfile/vmSymbols.hpp"
|
#include "classfile/vmSymbols.hpp"
|
||||||
#include "compiler/compileBroker.hpp"
|
#include "compiler/compileBroker.hpp"
|
||||||
|
@ -38,6 +39,7 @@
|
||||||
#include "oops/instanceKlass.hpp"
|
#include "oops/instanceKlass.hpp"
|
||||||
#include "oops/methodData.hpp"
|
#include "oops/methodData.hpp"
|
||||||
#include "oops/objArrayKlass.hpp"
|
#include "oops/objArrayKlass.hpp"
|
||||||
|
#include "oops/objArrayOop.inline.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
#include "oops/symbol.hpp"
|
#include "oops/symbol.hpp"
|
||||||
#include "prims/jvmtiExport.hpp"
|
#include "prims/jvmtiExport.hpp"
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
#include "memory/universe.inline.hpp"
|
#include "memory/universe.inline.hpp"
|
||||||
#include "oops/instanceKlass.hpp"
|
#include "oops/instanceKlass.hpp"
|
||||||
#include "oops/objArrayOop.hpp"
|
#include "oops/objArrayOop.hpp"
|
||||||
|
#include "oops/oop.inline.hpp"
|
||||||
#include "prims/methodHandles.hpp"
|
#include "prims/methodHandles.hpp"
|
||||||
#include "prims/nativeLookup.hpp"
|
#include "prims/nativeLookup.hpp"
|
||||||
#include "runtime/compilationPolicy.hpp"
|
#include "runtime/compilationPolicy.hpp"
|
||||||
|
|
|
@ -160,7 +160,7 @@ public:
|
||||||
// (For efficiency reasons, this operation is specialized for certain
|
// (For efficiency reasons, this operation is specialized for certain
|
||||||
// barrier types. Semantically, it should be thought of as a call to the
|
// barrier types. Semantically, it should be thought of as a call to the
|
||||||
// virtual "_work" function below, which must implement the barrier.)
|
// virtual "_work" function below, which must implement the barrier.)
|
||||||
inline void write_region(MemRegion mr);
|
void write_region(MemRegion mr);
|
||||||
protected:
|
protected:
|
||||||
virtual void write_region_work(MemRegion mr) = 0;
|
virtual void write_region_work(MemRegion mr) = 0;
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
#define SHARE_VM_MEMORY_BARRIERSET_INLINE_HPP
|
#define SHARE_VM_MEMORY_BARRIERSET_INLINE_HPP
|
||||||
|
|
||||||
#include "memory/barrierSet.hpp"
|
#include "memory/barrierSet.hpp"
|
||||||
#include "memory/cardTableModRefBS.hpp"
|
#include "memory/cardTableModRefBS.inline.hpp"
|
||||||
|
|
||||||
// Inline functions of BarrierSet, which de-virtualize certain
|
// Inline functions of BarrierSet, which de-virtualize certain
|
||||||
// performance-critical calls when the barrier is the most common
|
// performance-critical calls when the barrier is the most common
|
||||||
|
@ -76,7 +76,7 @@ void BarrierSet::write_ref_array(HeapWord* start, size_t count) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void BarrierSet::write_region(MemRegion mr) {
|
inline void BarrierSet::write_region(MemRegion mr) {
|
||||||
if (kind() == CardTableModRef) {
|
if (kind() == CardTableModRef) {
|
||||||
((CardTableModRefBS*)this)->inline_write_region(mr);
|
((CardTableModRefBS*)this)->inline_write_region(mr);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "memory/allocation.inline.hpp"
|
#include "memory/allocation.inline.hpp"
|
||||||
#include "memory/cardTableModRefBS.hpp"
|
#include "memory/cardTableModRefBS.inline.hpp"
|
||||||
#include "memory/cardTableRS.hpp"
|
#include "memory/cardTableRS.hpp"
|
||||||
#include "memory/sharedHeap.hpp"
|
#include "memory/sharedHeap.hpp"
|
||||||
#include "memory/space.hpp"
|
#include "memory/space.hpp"
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
|
|
||||||
#include "memory/modRefBarrierSet.hpp"
|
#include "memory/modRefBarrierSet.hpp"
|
||||||
#include "oops/oop.hpp"
|
#include "oops/oop.hpp"
|
||||||
#include "oops/oop.inline2.hpp"
|
|
||||||
|
|
||||||
// This kind of "BarrierSet" allows a "CollectedHeap" to detect and
|
// This kind of "BarrierSet" allows a "CollectedHeap" to detect and
|
||||||
// enumerate ref fields that have been modified (since the last
|
// enumerate ref fields that have been modified (since the last
|
||||||
|
@ -45,6 +44,7 @@ class Generation;
|
||||||
class OopsInGenClosure;
|
class OopsInGenClosure;
|
||||||
class DirtyCardToOopClosure;
|
class DirtyCardToOopClosure;
|
||||||
class ClearNoncleanCardWrapper;
|
class ClearNoncleanCardWrapper;
|
||||||
|
class CardTableRS;
|
||||||
|
|
||||||
class CardTableModRefBS: public ModRefBarrierSet {
|
class CardTableModRefBS: public ModRefBarrierSet {
|
||||||
// Some classes get to look at some private stuff.
|
// Some classes get to look at some private stuff.
|
||||||
|
@ -333,15 +333,7 @@ public:
|
||||||
|
|
||||||
template <class T> inline void inline_write_ref_field_pre(T* field, oop newVal) {}
|
template <class T> inline void inline_write_ref_field_pre(T* field, oop newVal) {}
|
||||||
|
|
||||||
template <class T> inline void inline_write_ref_field(T* field, oop newVal, bool release) {
|
template <class T> inline void inline_write_ref_field(T* field, oop newVal, bool release);
|
||||||
jbyte* byte = byte_for((void*)field);
|
|
||||||
if (release) {
|
|
||||||
// Perform a releasing store if requested.
|
|
||||||
OrderAccess::release_store((volatile jbyte*) byte, dirty_card);
|
|
||||||
} else {
|
|
||||||
*byte = dirty_card;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// These are used by G1, when it uses the card table as a temporary data
|
// These are used by G1, when it uses the card table as a temporary data
|
||||||
// structure for card claiming.
|
// structure for card claiming.
|
||||||
|
|
42
hotspot/src/share/vm/memory/cardTableModRefBS.inline.hpp
Normal file
42
hotspot/src/share/vm/memory/cardTableModRefBS.inline.hpp
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
|
*
|
||||||
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License version 2 only, as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
* version 2 for more details (a copy is included in the LICENSE file that
|
||||||
|
* accompanied this code).
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License version
|
||||||
|
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
|
* or visit www.oracle.com if you need additional information or have any
|
||||||
|
* questions.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SHARE_VM_MEMORY_CARDTABLEMODREFBS_INLINE_HPP
|
||||||
|
#define SHARE_VM_MEMORY_CARDTABLEMODREFBS_INLINE_HPP
|
||||||
|
|
||||||
|
#include "memory/cardTableModRefBS.hpp"
|
||||||
|
#include "oops/oopsHierarchy.hpp"
|
||||||
|
#include "runtime/orderAccess.inline.hpp"
|
||||||
|
|
||||||
|
template <class T> inline void CardTableModRefBS::inline_write_ref_field(T* field, oop newVal, bool release) {
|
||||||
|
jbyte* byte = byte_for((void*)field);
|
||||||
|
if (release) {
|
||||||
|
// Perform a releasing store if requested.
|
||||||
|
OrderAccess::release_store((volatile jbyte*) byte, dirty_card);
|
||||||
|
} else {
|
||||||
|
*byte = dirty_card;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // SHARE_VM_MEMORY_CARDTABLEMODREFBS_INLINE_HPP
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -597,7 +597,7 @@ HeapWord* GenCollectorPolicy::mem_allocate_work(size_t size,
|
||||||
HeapWord* result = NULL;
|
HeapWord* result = NULL;
|
||||||
|
|
||||||
// Loop until the allocation is satisfied, or unsatisfied after GC.
|
// Loop until the allocation is satisfied, or unsatisfied after GC.
|
||||||
for (int try_count = 1, gclocker_stalled_count = 0; /* return or throw */; try_count += 1) {
|
for (uint try_count = 1, gclocker_stalled_count = 0; /* return or throw */; try_count += 1) {
|
||||||
HandleMark hm; // Discard any handles allocated in each iteration.
|
HandleMark hm; // Discard any handles allocated in each iteration.
|
||||||
|
|
||||||
// First allocation attempt is lock-free.
|
// First allocation attempt is lock-free.
|
||||||
|
@ -611,7 +611,7 @@ HeapWord* GenCollectorPolicy::mem_allocate_work(size_t size,
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unsigned int gc_count_before; // Read inside the Heap_lock locked region.
|
uint gc_count_before; // Read inside the Heap_lock locked region.
|
||||||
{
|
{
|
||||||
MutexLocker ml(Heap_lock);
|
MutexLocker ml(Heap_lock);
|
||||||
if (PrintGC && Verbose) {
|
if (PrintGC && Verbose) {
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue