Merge
This commit is contained in:
commit
844b1a72d0
@ -400,6 +400,7 @@ ef056360ddf3977d7d2ddbeb456a4d612d19ea05 jdk-9+152
|
||||
8d26916eaa21b689835ffc1c0dbf12470aa9be61 jdk-9+154
|
||||
688a3863c00ebc089ab17ee1fc46272cbbd96815 jdk-9+155
|
||||
783ec7542cf7154e5d2b87f55bb97d28f81e9ada jdk-9+156
|
||||
4df5f619c9ead4604d2f97ed231b3a35ec688c41 jdk-10+1
|
||||
4eb77fb98952dc477a4229575c81d2263a9ce711 jdk-9+157
|
||||
a4087bc10a88a43ea3ad0919b5b4af1c86977221 jdk-9+158
|
||||
fe8466adaef8178dba94be53c789a0aaa87d13bb jdk-9+159
|
||||
@ -410,3 +411,10 @@ c38c6b270ccc8e2b86d1631bcf42248241b54d2c jdk-9+163
|
||||
7810f75d016a52e32295c4233009de5ca90e31af jdk-9+164
|
||||
aff4f339acd40942d3dab499846b52acd87b3af1 jdk-9+165
|
||||
ba5b16c9c6d80632b61959a33d424b1c3398ce62 jdk-9+166
|
||||
35017c286513ddcbcc6b63b99679c604993fc639 jdk-9+167
|
||||
143d4c87bc1ef1ed6dadd613cd9dd4488fdefc29 jdk-9+168
|
||||
9c7248b787c39b034d4f48d4aa48df903836cca7 jdk-10+2
|
||||
06373236a30801f72e2a31ee5c691c2a1e500f57 jdk-10+3
|
||||
8ec175c61fc3f58328a3324f07d7ded00e060be3 jdk-10+4
|
||||
111e2e7d00f45c983cdbc9c59ae40552152fcc23 jdk-10+5
|
||||
03fe61bb7670644cf6e46b5cfafb6b27c0e0157e jdk-10+6
|
@ -1095,6 +1095,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
|
||||
OTOOL="true"
|
||||
fi
|
||||
BASIC_PATH_PROGS(READELF, [greadelf readelf])
|
||||
BASIC_PATH_PROGS(DOT, dot)
|
||||
BASIC_PATH_PROGS(HG, hg)
|
||||
BASIC_PATH_PROGS(STAT, stat)
|
||||
BASIC_PATH_PROGS(TIME, time)
|
||||
|
@ -918,6 +918,7 @@ COMPRESS_JARS
|
||||
INCLUDE_SA
|
||||
UNLIMITED_CRYPTO
|
||||
CACERTS_FILE
|
||||
ENABLE_FULL_DOCS
|
||||
ENABLE_HEADLESS_ONLY
|
||||
DEFAULT_MAKE_TARGET
|
||||
OS_VERSION_MICRO
|
||||
@ -936,6 +937,7 @@ FLOCK
|
||||
TIME
|
||||
STAT
|
||||
HG
|
||||
DOT
|
||||
READELF
|
||||
OTOOL
|
||||
LDD
|
||||
@ -994,9 +996,8 @@ OPENJDK_TARGET_CPU_OSARCH
|
||||
OPENJDK_TARGET_CPU_ISADIR
|
||||
OPENJDK_TARGET_CPU_LEGACY_LIB
|
||||
OPENJDK_TARGET_CPU_LEGACY
|
||||
REQUIRED_OS_VERSION
|
||||
REQUIRED_OS_ARCH
|
||||
REQUIRED_OS_NAME
|
||||
OPENJDK_MODULE_TARGET_OS_ARCH
|
||||
OPENJDK_MODULE_TARGET_OS_NAME
|
||||
COMPILE_TYPE
|
||||
OPENJDK_TARGET_CPU_ENDIAN
|
||||
OPENJDK_TARGET_CPU_BITS
|
||||
@ -1139,6 +1140,7 @@ with_conf_name
|
||||
with_output_sync
|
||||
with_default_make_target
|
||||
enable_headless_only
|
||||
enable_full_docs
|
||||
with_cacerts_file
|
||||
enable_unlimited_crypto
|
||||
with_copyright_year
|
||||
@ -1291,6 +1293,7 @@ ZIPEXE
|
||||
LDD
|
||||
OTOOL
|
||||
READELF
|
||||
DOT
|
||||
HG
|
||||
STAT
|
||||
TIME
|
||||
@ -1972,6 +1975,8 @@ Optional Features:
|
||||
--enable-debug set the debug level to fastdebug (shorthand for
|
||||
--with-debug-level=fastdebug) [disabled]
|
||||
--enable-headless-only only build headless (no GUI) support [disabled]
|
||||
--enable-full-docs build complete documentation [enabled if all tools
|
||||
found]
|
||||
--disable-unlimited-crypto
|
||||
Disable unlimited crypto policy [enabled]
|
||||
--disable-keep-packaged-modules
|
||||
@ -2256,6 +2261,7 @@ Some influential environment variables:
|
||||
LDD Override default value for LDD
|
||||
OTOOL Override default value for OTOOL
|
||||
READELF Override default value for READELF
|
||||
DOT Override default value for DOT
|
||||
HG Override default value for HG
|
||||
STAT Override default value for STAT
|
||||
TIME Override default value for TIME
|
||||
@ -5177,7 +5183,7 @@ VS_SDK_PLATFORM_NAME_2013=
|
||||
#CUSTOM_AUTOCONF_INCLUDE
|
||||
|
||||
# Do not change or remove the following line, it is needed for consistency checks:
|
||||
DATE_WHEN_GENERATED=1490900744
|
||||
DATE_WHEN_GENERATED=1492975963
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
@ -16025,32 +16031,17 @@ $as_echo_n "checking compilation type... " >&6; }
|
||||
$as_echo "$COMPILE_TYPE" >&6; }
|
||||
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
|
||||
REQUIRED_OS_NAME=SunOS
|
||||
REQUIRED_OS_VERSION=5.10
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
|
||||
REQUIRED_OS_NAME=Linux
|
||||
REQUIRED_OS_VERSION=2.6
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
REQUIRED_OS_NAME=Windows
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
|
||||
REQUIRED_OS_VERSION=5.2
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
OPENJDK_MODULE_TARGET_OS_NAME="macos"
|
||||
else
|
||||
REQUIRED_OS_VERSION=5.1
|
||||
OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
|
||||
fi
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
|
||||
REQUIRED_OS_NAME="Mac OS X"
|
||||
REQUIRED_OS_VERSION=11.2
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = "xaix"; then
|
||||
REQUIRED_OS_NAME=AIX
|
||||
REQUIRED_OS_VERSION=7.1
|
||||
fi
|
||||
REQUIRED_OS_ARCH=${OPENJDK_TARGET_CPU}
|
||||
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
||||
OPENJDK_MODULE_TARGET_OS_ARCH="amd64"
|
||||
else
|
||||
OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
@ -22473,6 +22464,203 @@ $as_echo "$tool_specified" >&6; }
|
||||
|
||||
|
||||
|
||||
# Publish this variable in the help.
|
||||
|
||||
|
||||
if [ -z "${DOT+x}" ]; then
|
||||
# The variable is not set by user, try to locate tool using the code snippet
|
||||
for ac_prog in dot
|
||||
do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_path_DOT+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
case $DOT in
|
||||
[\\/]* | ?:[\\/]*)
|
||||
ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
DOT=$ac_cv_path_DOT
|
||||
if test -n "$DOT"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
|
||||
$as_echo "$DOT" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
test -n "$DOT" && break
|
||||
done
|
||||
|
||||
else
|
||||
# The variable is set, but is it from the command line or the environment?
|
||||
|
||||
# Try to remove the string !DOT! from our list.
|
||||
try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DOT!/}
|
||||
if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
|
||||
# If it failed, the variable was not from the command line. Ignore it,
|
||||
# but warn the user (except for BASH, which is always set by the calling BASH).
|
||||
if test "xDOT" != xBASH; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&5
|
||||
$as_echo "$as_me: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&2;}
|
||||
fi
|
||||
# Try to locate tool using the code snippet
|
||||
for ac_prog in dot
|
||||
do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_path_DOT+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
case $DOT in
|
||||
[\\/]* | ?:[\\/]*)
|
||||
ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
DOT=$ac_cv_path_DOT
|
||||
if test -n "$DOT"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
|
||||
$as_echo "$DOT" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
test -n "$DOT" && break
|
||||
done
|
||||
|
||||
else
|
||||
# If it succeeded, then it was overridden by the user. We will use it
|
||||
# for the tool.
|
||||
|
||||
# First remove it from the list of overridden variables, so we can test
|
||||
# for unknown variables in the end.
|
||||
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
|
||||
|
||||
# Check if we try to supply an empty value
|
||||
if test "x$DOT" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DOT= (no value)" >&5
|
||||
$as_echo "$as_me: Setting user supplied tool DOT= (no value)" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
|
||||
$as_echo_n "checking for DOT... " >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
|
||||
$as_echo "disabled" >&6; }
|
||||
else
|
||||
# Check if the provided tool contains a complete path.
|
||||
tool_specified="$DOT"
|
||||
tool_basename="${tool_specified##*/}"
|
||||
if test "x$tool_basename" = "x$tool_specified"; then
|
||||
# A command without a complete path is provided, search $PATH.
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DOT=$tool_basename" >&5
|
||||
$as_echo "$as_me: Will search for user supplied tool DOT=$tool_basename" >&6;}
|
||||
# Extract the first word of "$tool_basename", so it can be a program name with args.
|
||||
set dummy $tool_basename; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_path_DOT+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
case $DOT in
|
||||
[\\/]* | ?:[\\/]*)
|
||||
ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
DOT=$ac_cv_path_DOT
|
||||
if test -n "$DOT"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
|
||||
$as_echo "$DOT" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
if test "x$DOT" = x; then
|
||||
as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
|
||||
fi
|
||||
else
|
||||
# Otherwise we believe it is a complete path. Use it as it is.
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DOT=$tool_specified" >&5
|
||||
$as_echo "$as_me: Will use user supplied tool DOT=$tool_specified" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
|
||||
$as_echo_n "checking for DOT... " >&6; }
|
||||
if test ! -x "$tool_specified"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
|
||||
$as_echo "not found" >&6; }
|
||||
as_fn_error $? "User supplied tool DOT=$tool_specified does not exist or is not executable" "$LINENO" 5
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
|
||||
$as_echo "$tool_specified" >&6; }
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
# Publish this variable in the help.
|
||||
|
||||
|
||||
@ -24723,6 +24911,101 @@ $as_echo "no" >&6; }
|
||||
|
||||
|
||||
|
||||
# Should we build the complete docs, or just a lightweight version?
|
||||
# Check whether --enable-full-docs was given.
|
||||
if test "${enable_full_docs+set}" = set; then :
|
||||
enableval=$enable_full_docs;
|
||||
fi
|
||||
|
||||
|
||||
# Verify dependencies
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for graphviz dot" >&5
|
||||
$as_echo_n "checking for graphviz dot... " >&6; }
|
||||
if test "x$DOT" != "x"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
|
||||
$as_echo "no, cannot generate full docs" >&6; }
|
||||
FULL_DOCS_DEP_MISSING=true
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pandoc" >&5
|
||||
$as_echo_n "checking for pandoc... " >&6; }
|
||||
if test "x$PANDOC" != "x"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
|
||||
$as_echo "no, cannot generate full docs" >&6; }
|
||||
FULL_DOCS_DEP_MISSING=true
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking full docs" >&5
|
||||
$as_echo_n "checking full docs... " >&6; }
|
||||
if test "x$enable_full_docs" = xyes; then
|
||||
if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
|
||||
$as_echo "no, missing dependencies" >&6; }
|
||||
|
||||
# Print a helpful message on how to acquire the necessary build dependency.
|
||||
# dot is the help tag: freetype, cups, alsa etc
|
||||
MISSING_DEPENDENCY=dot
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
cygwin_help $MISSING_DEPENDENCY
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
msys_help $MISSING_DEPENDENCY
|
||||
else
|
||||
PKGHANDLER_COMMAND=
|
||||
|
||||
case $PKGHANDLER in
|
||||
apt-get)
|
||||
apt_help $MISSING_DEPENDENCY ;;
|
||||
yum)
|
||||
yum_help $MISSING_DEPENDENCY ;;
|
||||
brew)
|
||||
brew_help $MISSING_DEPENDENCY ;;
|
||||
port)
|
||||
port_help $MISSING_DEPENDENCY ;;
|
||||
pkgutil)
|
||||
pkgutil_help $MISSING_DEPENDENCY ;;
|
||||
pkgadd)
|
||||
pkgadd_help $MISSING_DEPENDENCY ;;
|
||||
esac
|
||||
|
||||
if test "x$PKGHANDLER_COMMAND" != x; then
|
||||
HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
|
||||
fi
|
||||
fi
|
||||
|
||||
as_fn_error $? "Cannot enable full docs with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
|
||||
else
|
||||
ENABLE_FULL_DOCS=true
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
|
||||
$as_echo "yes, forced" >&6; }
|
||||
fi
|
||||
elif test "x$enable_full_docs" = xno; then
|
||||
ENABLE_FULL_DOCS=false
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
|
||||
$as_echo "no, forced" >&6; }
|
||||
elif test "x$enable_full_docs" = x; then
|
||||
# Check for prerequisites
|
||||
if test "x$FULL_DOCS_DEP_MISSING" = xtrue; then
|
||||
ENABLE_FULL_DOCS=false
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
|
||||
$as_echo "no, missing dependencies" >&6; }
|
||||
else
|
||||
ENABLE_FULL_DOCS=true
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
|
||||
$as_echo "yes, dependencies present" >&6; }
|
||||
fi
|
||||
else
|
||||
as_fn_error $? "--enable-full-docs can only take yes or no" "$LINENO" 5
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Choose cacerts source file
|
||||
|
||||
# Check whether --with-cacerts-file was given.
|
||||
|
@ -154,6 +154,55 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
|
||||
|
||||
AC_SUBST(ENABLE_HEADLESS_ONLY)
|
||||
|
||||
# Should we build the complete docs, or just a lightweight version?
|
||||
AC_ARG_ENABLE([full-docs], [AS_HELP_STRING([--enable-full-docs],
|
||||
[build complete documentation @<:@enabled if all tools found@:>@])])
|
||||
|
||||
# Verify dependencies
|
||||
AC_MSG_CHECKING([for graphviz dot])
|
||||
if test "x$DOT" != "x"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no, cannot generate full docs])
|
||||
FULL_DOCS_DEP_MISSING=true
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for pandoc])
|
||||
if test "x$PANDOC" != "x"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no, cannot generate full docs])
|
||||
FULL_DOCS_DEP_MISSING=true
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([full docs])
|
||||
if test "x$enable_full_docs" = xyes; then
|
||||
if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then
|
||||
AC_MSG_RESULT([no, missing dependencies])
|
||||
HELP_MSG_MISSING_DEPENDENCY([dot])
|
||||
AC_MSG_ERROR([Cannot enable full docs with missing dependencies. See above. $HELP_MSG])
|
||||
else
|
||||
ENABLE_FULL_DOCS=true
|
||||
AC_MSG_RESULT([yes, forced])
|
||||
fi
|
||||
elif test "x$enable_full_docs" = xno; then
|
||||
ENABLE_FULL_DOCS=false
|
||||
AC_MSG_RESULT([no, forced])
|
||||
elif test "x$enable_full_docs" = x; then
|
||||
# Check for prerequisites
|
||||
if test "x$FULL_DOCS_DEP_MISSING" = xtrue; then
|
||||
ENABLE_FULL_DOCS=false
|
||||
AC_MSG_RESULT([no, missing dependencies])
|
||||
else
|
||||
ENABLE_FULL_DOCS=true
|
||||
AC_MSG_RESULT([yes, dependencies present])
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([--enable-full-docs can only take yes or no])
|
||||
fi
|
||||
|
||||
AC_SUBST(ENABLE_FULL_DOCS)
|
||||
|
||||
# Choose cacerts source file
|
||||
AC_ARG_WITH(cacerts-file, [AS_HELP_STRING([--with-cacerts-file],
|
||||
[specify alternative cacerts file])])
|
||||
|
@ -433,37 +433,22 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER],
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES],
|
||||
AC_DEFUN([PLATFORM_SET_MODULE_TARGET_OS_VALUES],
|
||||
[
|
||||
if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
|
||||
REQUIRED_OS_NAME=SunOS
|
||||
REQUIRED_OS_VERSION=5.10
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
|
||||
REQUIRED_OS_NAME=Linux
|
||||
REQUIRED_OS_VERSION=2.6
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
REQUIRED_OS_NAME=Windows
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
|
||||
REQUIRED_OS_VERSION=5.2
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
OPENJDK_MODULE_TARGET_OS_NAME="macos"
|
||||
else
|
||||
REQUIRED_OS_VERSION=5.1
|
||||
OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
|
||||
fi
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
|
||||
REQUIRED_OS_NAME="Mac OS X"
|
||||
REQUIRED_OS_VERSION=11.2
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = "xaix"; then
|
||||
REQUIRED_OS_NAME=AIX
|
||||
REQUIRED_OS_VERSION=7.1
|
||||
fi
|
||||
REQUIRED_OS_ARCH=${OPENJDK_TARGET_CPU}
|
||||
|
||||
AC_SUBST(REQUIRED_OS_NAME)
|
||||
AC_SUBST(REQUIRED_OS_ARCH)
|
||||
AC_SUBST(REQUIRED_OS_VERSION)
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
||||
OPENJDK_MODULE_TARGET_OS_ARCH="amd64"
|
||||
else
|
||||
OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU"
|
||||
fi
|
||||
|
||||
AC_SUBST(OPENJDK_MODULE_TARGET_OS_NAME)
|
||||
AC_SUBST(OPENJDK_MODULE_TARGET_OS_ARCH)
|
||||
])
|
||||
|
||||
#%%% Build and target systems %%%
|
||||
@ -480,7 +465,7 @@ AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET],
|
||||
|
||||
PLATFORM_EXTRACT_TARGET_AND_BUILD
|
||||
PLATFORM_SETUP_TARGET_CPU_BITS
|
||||
PLATFORM_SET_RELEASE_FILE_OS_VALUES
|
||||
PLATFORM_SET_MODULE_TARGET_OS_VALUES
|
||||
PLATFORM_SETUP_LEGACY_VARS
|
||||
])
|
||||
|
||||
|
@ -101,10 +101,9 @@ OPENJDK_BUILD_CPU_ARCH:=@OPENJDK_BUILD_CPU_ARCH@
|
||||
OPENJDK_BUILD_CPU_BITS:=@OPENJDK_BUILD_CPU_BITS@
|
||||
OPENJDK_BUILD_CPU_ENDIAN:=@OPENJDK_BUILD_CPU_ENDIAN@
|
||||
|
||||
# OS values for use in release file.
|
||||
REQUIRED_OS_NAME:=@REQUIRED_OS_NAME@
|
||||
REQUIRED_OS_ARCH:=@REQUIRED_OS_ARCH@
|
||||
REQUIRED_OS_VERSION:=@REQUIRED_OS_VERSION@
|
||||
# OS values for use in ModuleTarget class file attribute.
|
||||
OPENJDK_MODULE_TARGET_OS_NAME:=@OPENJDK_MODULE_TARGET_OS_NAME@
|
||||
OPENJDK_MODULE_TARGET_OS_ARCH:=@OPENJDK_MODULE_TARGET_OS_ARCH@
|
||||
|
||||
LIBM:=@LIBM@
|
||||
LIBDL:=@LIBDL@
|
||||
@ -245,6 +244,8 @@ USE_PRECOMPILED_HEADER := @USE_PRECOMPILED_HEADER@
|
||||
# Only build headless support or not
|
||||
ENABLE_HEADLESS_ONLY := @ENABLE_HEADLESS_ONLY@
|
||||
|
||||
ENABLE_FULL_DOCS := @ENABLE_FULL_DOCS@
|
||||
|
||||
# JDK_OUTPUTDIR specifies where a working jvm is built.
|
||||
# You can run $(JDK_OUTPUTDIR)/bin/java
|
||||
# Though the layout of the contents of $(JDK_OUTPUTDIR) is not
|
||||
@ -679,6 +680,7 @@ OTOOL:=@OTOOL@
|
||||
READELF:=@READELF@
|
||||
EXPR:=@EXPR@
|
||||
FILE:=@FILE@
|
||||
DOT:=@DOT@
|
||||
HG:=@HG@
|
||||
OBJCOPY:=@OBJCOPY@
|
||||
SETFILE:=@SETFILE@
|
||||
@ -842,11 +844,6 @@ JRE_COMPACT3_BUNDLE_NAME := \
|
||||
jre-$(VERSION_SHORT)+$(VERSION_BUILD)-compact3_$(OPENJDK_TARGET_BUNDLE_PLATFORM)_bin$(DEBUG_PART).tar.gz
|
||||
JDK_SYMBOLS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin$(DEBUG_PART)-symbols.tar.gz
|
||||
JRE_SYMBOLS_BUNDLE_NAME := jre-$(BASE_NAME)_bin$(DEBUG_PART)-symbols.tar.gz
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
DEMOS_BUNDLE_NAME := jdk-$(BASE_NAME)_demo$(DEBUG_PART).zip
|
||||
else
|
||||
DEMOS_BUNDLE_NAME := jdk-$(BASE_NAME)_demo$(DEBUG_PART).tar.gz
|
||||
endif
|
||||
TEST_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-tests$(DEBUG_PART).tar.gz
|
||||
DOCS_BUNDLE_NAME := jdk-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
|
||||
|
||||
@ -854,7 +851,6 @@ JDK_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JDK_BUNDLE_NAME)
|
||||
JRE_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JRE_BUNDLE_NAME)
|
||||
JDK_SYMBOLS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JDK_SYMBOLS_BUNDLE_NAME)
|
||||
JRE_SYMBOLS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JRE_SYMBOLS_BUNDLE_NAME)
|
||||
DEMOS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(DEMOS_BUNDLE_NAME)
|
||||
TEST_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(TEST_BUNDLE_NAME)
|
||||
DOCS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(DOCS_BUNDLE_NAME)
|
||||
|
||||
|
@ -38,25 +38,9 @@ fi
|
||||
if [ "$OPENJDK_TARGET_OS" = "linux" ]; then
|
||||
|
||||
STRIP_BEFORE_COMPARE="
|
||||
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/libheapViewer.so
|
||||
./demo/jvmti/minst/lib/libminst.so
|
||||
./demo/jvmti/mtrace/lib/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/libwaiters.so
|
||||
"
|
||||
|
||||
ACCEPTED_BIN_DIFF="
|
||||
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/libheapViewer.so
|
||||
./demo/jvmti/minst/lib/libminst.so
|
||||
./demo/jvmti/mtrace/lib/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/libwaiters.so
|
||||
./lib/client/libjsig.so
|
||||
./lib/client/libjvm.so
|
||||
./lib/libattach.so
|
||||
@ -151,15 +135,6 @@ fi
|
||||
if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "x86_64" ]; then
|
||||
|
||||
STRIP_BEFORE_COMPARE="
|
||||
./demo/jni/Poller/lib/libPoller.so
|
||||
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/libheapViewer.so
|
||||
./demo/jvmti/minst/lib/libminst.so
|
||||
./demo/jvmti/mtrace/lib/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/libwaiters.so
|
||||
"
|
||||
|
||||
SORT_SYMBOLS="
|
||||
@ -174,15 +149,6 @@ if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "x86_64" ];
|
||||
SKIP_BIN_DIFF="true"
|
||||
|
||||
ACCEPTED_SMALL_SIZE_DIFF="
|
||||
./demo/jni/Poller/lib/libPoller.so
|
||||
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/libheapViewer.so
|
||||
./demo/jvmti/minst/lib/libminst.so
|
||||
./demo/jvmti/mtrace/lib/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/libwaiters.so
|
||||
./lib/jli/libjli.so
|
||||
./lib/jspawnhelper
|
||||
./lib/libJdbcOdbc.so
|
||||
@ -279,19 +245,9 @@ fi
|
||||
if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "sparcv9" ]; then
|
||||
|
||||
STRIP_BEFORE_COMPARE="
|
||||
./demo/jni/Poller/lib/libPoller.so
|
||||
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/libheapViewer.so
|
||||
./demo/jvmti/minst/lib/libminst.so
|
||||
./demo/jvmti/mtrace/lib/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/libwaiters.so
|
||||
"
|
||||
|
||||
SORT_SYMBOLS="
|
||||
./demo/jvmti/waiters/lib/libwaiters.so
|
||||
./lib/libjsig.so
|
||||
./lib/libfontmanager.so
|
||||
./lib/libjimage.so
|
||||
@ -305,15 +261,6 @@ if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "sparcv9" ]
|
||||
SKIP_BIN_DIFF="true"
|
||||
|
||||
ACCEPTED_SMALL_SIZE_DIFF="
|
||||
./demo/jni/Poller/lib/libPoller.so
|
||||
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/libheapViewer.so
|
||||
./demo/jvmti/minst/lib/libminst.so
|
||||
./demo/jvmti/mtrace/lib/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/libwaiters.so
|
||||
./lib/client/libjvm.so
|
||||
./lib/jli/libjli.so
|
||||
./lib/jspawnhelper
|
||||
@ -438,9 +385,6 @@ if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
|
||||
|
||||
# Probably should add all libs here
|
||||
ACCEPTED_SMALL_SIZE_DIFF="
|
||||
./demo/jvmti/gctest/lib/gctest.dll
|
||||
./demo/jvmti/heapTracker/lib/heapTracker.dll
|
||||
./demo/jvmti/minst/lib/minst.dll
|
||||
./bin/attach.dll
|
||||
./bin/jsoundds.dll
|
||||
./bin/client/jvm.dll
|
||||
@ -579,14 +523,6 @@ if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
|
||||
./bin/wsgen
|
||||
./bin/wsimport
|
||||
./bin/xjc
|
||||
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.dylib
|
||||
./demo/jvmti/gctest/lib/libgctest.dylib
|
||||
./demo/jvmti/heapTracker/lib/libheapTracker.dylib
|
||||
./demo/jvmti/heapViewer/lib/libheapViewer.dylib
|
||||
./demo/jvmti/minst/lib/libminst.dylib
|
||||
./demo/jvmti/mtrace/lib/libmtrace.dylib
|
||||
./demo/jvmti/versionCheck/lib/libversionCheck.dylib
|
||||
./demo/jvmti/waiters/lib/libwaiters.dylib
|
||||
./Contents/Home/bin/_javaws
|
||||
./Contents/Home/bin/javaws
|
||||
./Contents/Home/bin/idlj
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, 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
|
||||
@ -422,8 +422,9 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
"linux-x64": {
|
||||
target_os: "linux",
|
||||
target_cpu: "x64",
|
||||
dependencies: ["devkit"],
|
||||
configure_args: concat(common.configure_args_64bit, "--with-zlib=system"),
|
||||
dependencies: ["devkit", "graphviz", "pandoc"],
|
||||
configure_args: concat(common.configure_args_64bit,
|
||||
"--enable-full-docs", "--with-zlib=system"),
|
||||
default_make_targets: ["docs-bundles"],
|
||||
},
|
||||
|
||||
@ -964,7 +965,23 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
ext: "tar.gz",
|
||||
revision: "2.7.1-v120+1.0",
|
||||
module: "freetype-" + input.target_platform
|
||||
}
|
||||
},
|
||||
|
||||
graphviz: {
|
||||
organization: common.organization,
|
||||
ext: "tar.gz",
|
||||
revision: "2.38.0-1+1.1",
|
||||
module: "graphviz-" + input.target_platform,
|
||||
configure_args: "DOT=" + input.get("graphviz", "install_path") + "/dot"
|
||||
},
|
||||
|
||||
pandoc: {
|
||||
organization: common.organization,
|
||||
ext: "tar.gz",
|
||||
revision: "1.17.2+1.0",
|
||||
module: "pandoc-" + input.target_platform,
|
||||
configure_args: "PANDOC=" + input.get("pandoc", "install_path") + "/pandoc/pandoc"
|
||||
},
|
||||
};
|
||||
|
||||
return dependencies;
|
||||
|
@ -982,52 +982,6 @@
|
||||
</df>
|
||||
</df>
|
||||
<df name="src">
|
||||
<df name="demo">
|
||||
<df name="share">
|
||||
<df name="jvmti">
|
||||
<df name="agent_util">
|
||||
<in>agent_util.c</in>
|
||||
</df>
|
||||
<df name="compiledMethodLoad">
|
||||
<in>compiledMethodLoad.c</in>
|
||||
</df>
|
||||
<df name="gctest">
|
||||
<in>gctest.c</in>
|
||||
</df>
|
||||
<df name="heapTracker">
|
||||
<in>heapTracker.c</in>
|
||||
</df>
|
||||
<df name="heapViewer">
|
||||
<in>heapViewer.c</in>
|
||||
</df>
|
||||
<df name="java_crw_demo">
|
||||
<in>java_crw_demo.c</in>
|
||||
</df>
|
||||
<df name="minst">
|
||||
<in>minst.c</in>
|
||||
</df>
|
||||
<df name="mtrace">
|
||||
<in>mtrace.c</in>
|
||||
</df>
|
||||
<df name="versionCheck">
|
||||
<in>versionCheck.c</in>
|
||||
</df>
|
||||
<df name="waiters">
|
||||
<in>Agent.cpp</in>
|
||||
<in>Monitor.cpp</in>
|
||||
<in>Thread.cpp</in>
|
||||
<in>waiters.cpp</in>
|
||||
</df>
|
||||
</df>
|
||||
</df>
|
||||
<df name="solaris">
|
||||
<df name="jni">
|
||||
<df name="Poller">
|
||||
<in>Poller.c</in>
|
||||
</df>
|
||||
</df>
|
||||
</df>
|
||||
</df>
|
||||
<df name="java.base">
|
||||
<df name="linux">
|
||||
<df name="native">
|
||||
@ -21533,89 +21487,6 @@
|
||||
</incDir>
|
||||
</ccTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/agent_util/agent_util.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
flavor2="3">
|
||||
<cTool flags="5">
|
||||
</cTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/compiledMethodLoad/compiledMethodLoad.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
flavor2="3">
|
||||
<cTool flags="5">
|
||||
</cTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/gctest/gctest.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
flavor2="3">
|
||||
<cTool flags="5">
|
||||
</cTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/heapTracker/heapTracker.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
flavor2="3">
|
||||
<cTool flags="5">
|
||||
</cTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/heapViewer/heapViewer.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
flavor2="3">
|
||||
<cTool flags="5">
|
||||
</cTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/java_crw_demo/java_crw_demo.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
flavor2="3">
|
||||
<cTool flags="5">
|
||||
</cTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/minst/minst.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
flavor2="3">
|
||||
<cTool flags="5">
|
||||
</cTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/mtrace/mtrace.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
flavor2="3">
|
||||
<cTool flags="5">
|
||||
</cTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/versionCheck/versionCheck.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
flavor2="3">
|
||||
<cTool flags="5">
|
||||
</cTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/waiters/Agent.cpp"
|
||||
ex="false"
|
||||
tool="1"
|
||||
flavor2="4">
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/waiters/Monitor.cpp"
|
||||
ex="false"
|
||||
tool="1"
|
||||
flavor2="4">
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/waiters/Thread.cpp"
|
||||
ex="false"
|
||||
tool="1"
|
||||
flavor2="4">
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/waiters/waiters.cpp"
|
||||
ex="false"
|
||||
tool="1"
|
||||
flavor2="4">
|
||||
</item>
|
||||
<item path="../../jdk/src/java.base/macosx/native/libjava/HostLocaleProviderAdapter_md.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
@ -30509,113 +30380,6 @@
|
||||
</incDir>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo">
|
||||
<cTool>
|
||||
<preprocessorList>
|
||||
<Elem>DEBUG</Elem>
|
||||
</preprocessorList>
|
||||
</cTool>
|
||||
<ccTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/waiters</pElem>
|
||||
<pElem>../../jdk/src/java.base/macosx/native/include</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
<preprocessorList>
|
||||
<Elem>DEBUG</Elem>
|
||||
</preprocessorList>
|
||||
</ccTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo/share/jvmti/agent_util">
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/agent_util</pElem>
|
||||
<pElem>../../jdk/src/java.base/macosx/native/include</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo/share/jvmti/compiledMethodLoad">
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/compiledMethodLoad</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/macosx/native/include</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo/share/jvmti/gctest">
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/macosx/native/include</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/gctest</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo/share/jvmti/heapTracker">
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/macosx/native/include</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/heapTracker</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo/share/jvmti/heapViewer">
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/heapViewer</pElem>
|
||||
<pElem>../../jdk/src/java.base/macosx/native/include</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo/share/jvmti/java_crw_demo">
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/java_crw_demo</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo/share/jvmti/minst">
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/macosx/native/include</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/minst</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo/share/jvmti/mtrace">
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/macosx/native/include</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/mtrace</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo/share/jvmti/versionCheck">
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/versionCheck</pElem>
|
||||
<pElem>../../jdk/src/java.base/macosx/native/include</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/java.base">
|
||||
<cTool>
|
||||
<incDir>
|
||||
@ -36906,106 +36670,6 @@
|
||||
<cTool flags="3">
|
||||
</cTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/agent_util/agent_util.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
flavor2="0">
|
||||
<cTool flags="5">
|
||||
</cTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/compiledMethodLoad/compiledMethodLoad.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
flavor2="0">
|
||||
<cTool flags="5">
|
||||
</cTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/gctest/gctest.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
flavor2="0">
|
||||
<cTool flags="5">
|
||||
</cTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/heapTracker/heapTracker.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
flavor2="0">
|
||||
<cTool flags="5">
|
||||
</cTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/heapViewer/heapViewer.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
flavor2="0">
|
||||
<cTool flags="5">
|
||||
</cTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/java_crw_demo/java_crw_demo.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
flavor2="0">
|
||||
<cTool flags="5">
|
||||
</cTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/minst/minst.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
flavor2="0">
|
||||
<cTool flags="5">
|
||||
</cTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/mtrace/mtrace.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
flavor2="0">
|
||||
<cTool flags="5">
|
||||
</cTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/versionCheck/versionCheck.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
flavor2="0">
|
||||
<cTool flags="5">
|
||||
</cTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/waiters/Agent.cpp"
|
||||
ex="false"
|
||||
tool="1"
|
||||
flavor2="0">
|
||||
<ccTool flags="2">
|
||||
</ccTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/waiters/Monitor.cpp"
|
||||
ex="false"
|
||||
tool="1"
|
||||
flavor2="0">
|
||||
<ccTool flags="2">
|
||||
<preprocessorList>
|
||||
<Elem>THIS_FILE="Monitor.cpp"</Elem>
|
||||
</preprocessorList>
|
||||
</ccTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/waiters/Thread.cpp"
|
||||
ex="false"
|
||||
tool="1"
|
||||
flavor2="0">
|
||||
<ccTool flags="2">
|
||||
<preprocessorList>
|
||||
<Elem>THIS_FILE="Thread.cpp"</Elem>
|
||||
</preprocessorList>
|
||||
</ccTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/waiters/waiters.cpp"
|
||||
ex="false"
|
||||
tool="1"
|
||||
flavor2="0">
|
||||
<ccTool flags="2">
|
||||
<preprocessorList>
|
||||
<Elem>THIS_FILE="waiters.cpp"</Elem>
|
||||
</preprocessorList>
|
||||
</ccTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/java.base/linux/native/libjava/ProcessHandleImpl_linux.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
@ -46197,183 +45861,6 @@
|
||||
</preprocessorList>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo">
|
||||
<cTool>
|
||||
<preprocessorList>
|
||||
<Elem>DEBUG</Elem>
|
||||
</preprocessorList>
|
||||
</cTool>
|
||||
<ccTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/waiters</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/agent_util</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/linux/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/libjava</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
<preprocessorList>
|
||||
<Elem>DEBUG</Elem>
|
||||
</preprocessorList>
|
||||
</ccTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo/share/jvmti/agent_util">
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/heapTracker</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/agent_util</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/java_crw_demo</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/linux/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/libjava</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo/share/jvmti/compiledMethodLoad">
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/compiledMethodLoad</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/agent_util</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/linux/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/libjava</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
<preprocessorList>
|
||||
<Elem>THIS_FILE="compiledMethodLoad.c"</Elem>
|
||||
</preprocessorList>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo/share/jvmti/gctest">
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/gctest</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/agent_util</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/linux/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/libjava</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
<preprocessorList>
|
||||
<Elem>THIS_FILE="gctest.c"</Elem>
|
||||
</preprocessorList>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo/share/jvmti/heapTracker">
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/heapTracker</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/agent_util</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/java_crw_demo</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/linux/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/libjava</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
<preprocessorList>
|
||||
<Elem>THIS_FILE="heapTracker.c"</Elem>
|
||||
</preprocessorList>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo/share/jvmti/heapViewer">
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/heapViewer</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/agent_util</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/linux/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/libjava</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
<preprocessorList>
|
||||
<Elem>THIS_FILE="heapViewer.c"</Elem>
|
||||
</preprocessorList>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo/share/jvmti/java_crw_demo">
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/heapTracker</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/agent_util</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/java_crw_demo</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/linux/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/libjava</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
<preprocessorList>
|
||||
<Elem>THIS_FILE="java_crw_demo.c"</Elem>
|
||||
</preprocessorList>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo/share/jvmti/minst">
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/minst</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/agent_util</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/java_crw_demo</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/linux/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/libjava</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
<preprocessorList>
|
||||
<Elem>THIS_FILE="minst.c"</Elem>
|
||||
</preprocessorList>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo/share/jvmti/mtrace">
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/mtrace</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/agent_util</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/java_crw_demo</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/linux/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/libjava</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
<preprocessorList>
|
||||
<Elem>THIS_FILE="mtrace.c"</Elem>
|
||||
</preprocessorList>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo/share/jvmti/versionCheck">
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/versionCheck</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/agent_util</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/linux/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/libjava</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
<preprocessorList>
|
||||
<Elem>THIS_FILE="versionCheck.c"</Elem>
|
||||
</preprocessorList>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/java.base">
|
||||
<cTool>
|
||||
<preprocessorList>
|
||||
@ -55235,113 +54722,6 @@
|
||||
<ccTool flags="0">
|
||||
</ccTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/agent_util/agent_util.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
flavor2="0">
|
||||
<cTool flags="3">
|
||||
</cTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/compiledMethodLoad/compiledMethodLoad.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
flavor2="0">
|
||||
<cTool flags="3">
|
||||
</cTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/gctest/gctest.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
flavor2="0">
|
||||
<cTool flags="3">
|
||||
</cTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/heapTracker/heapTracker.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
flavor2="0">
|
||||
<cTool flags="3">
|
||||
</cTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/heapViewer/heapViewer.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
flavor2="0">
|
||||
<cTool flags="3">
|
||||
</cTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/java_crw_demo/java_crw_demo.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
flavor2="0">
|
||||
<cTool flags="3">
|
||||
</cTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/minst/minst.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
flavor2="0">
|
||||
<cTool flags="3">
|
||||
</cTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/mtrace/mtrace.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
flavor2="0">
|
||||
<cTool flags="3">
|
||||
</cTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/versionCheck/versionCheck.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
flavor2="0">
|
||||
<cTool flags="3">
|
||||
</cTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/waiters/Agent.cpp"
|
||||
ex="false"
|
||||
tool="1"
|
||||
flavor2="0">
|
||||
<ccTool flags="0">
|
||||
</ccTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/waiters/Monitor.cpp"
|
||||
ex="false"
|
||||
tool="1"
|
||||
flavor2="0">
|
||||
<ccTool flags="0">
|
||||
<preprocessorList>
|
||||
<Elem>THIS_FILE="Monitor.cpp"</Elem>
|
||||
</preprocessorList>
|
||||
</ccTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/waiters/Thread.cpp"
|
||||
ex="false"
|
||||
tool="1"
|
||||
flavor2="0">
|
||||
<ccTool flags="0">
|
||||
<preprocessorList>
|
||||
<Elem>THIS_FILE="Thread.cpp"</Elem>
|
||||
</preprocessorList>
|
||||
</ccTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/share/jvmti/waiters/waiters.cpp"
|
||||
ex="false"
|
||||
tool="1"
|
||||
flavor2="0">
|
||||
<ccTool flags="0">
|
||||
<preprocessorList>
|
||||
<Elem>THIS_FILE="waiters.cpp"</Elem>
|
||||
</preprocessorList>
|
||||
</ccTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/demo/solaris/jni/Poller/Poller.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
flavor2="0">
|
||||
<cTool flags="2">
|
||||
</cTool>
|
||||
</item>
|
||||
<item path="../../jdk/src/java.base/share/native/launcher/main.c"
|
||||
ex="false"
|
||||
tool="0"
|
||||
@ -64674,8 +64054,6 @@
|
||||
</cTool>
|
||||
<ccTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/waiters</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/agent_util</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/solaris/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/include</pElem>
|
||||
@ -64699,189 +64077,6 @@
|
||||
</preprocessorList>
|
||||
</ccTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo">
|
||||
<cTool>
|
||||
<preprocessorList>
|
||||
<Elem>DEBUG</Elem>
|
||||
</preprocessorList>
|
||||
</cTool>
|
||||
<ccTool>
|
||||
<preprocessorList>
|
||||
<Elem>DEBUG</Elem>
|
||||
</preprocessorList>
|
||||
</ccTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo/share/jvmti/agent_util">
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/heapTracker</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/agent_util</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/java_crw_demo</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/solaris/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/libjava</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo/share/jvmti/compiledMethodLoad">
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/compiledMethodLoad</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/agent_util</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/solaris/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/libjava</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
<preprocessorList>
|
||||
<Elem>THIS_FILE="compiledMethodLoad.c"</Elem>
|
||||
</preprocessorList>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo/share/jvmti/gctest">
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/gctest</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/agent_util</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/solaris/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/libjava</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
<preprocessorList>
|
||||
<Elem>THIS_FILE="gctest.c"</Elem>
|
||||
</preprocessorList>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo/share/jvmti/heapTracker">
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/heapTracker</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/agent_util</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/java_crw_demo</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/solaris/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/libjava</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
<preprocessorList>
|
||||
<Elem>THIS_FILE="heapTracker.c"</Elem>
|
||||
</preprocessorList>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo/share/jvmti/heapViewer">
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/heapViewer</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/agent_util</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/solaris/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/libjava</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
<preprocessorList>
|
||||
<Elem>THIS_FILE="heapViewer.c"</Elem>
|
||||
</preprocessorList>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo/share/jvmti/java_crw_demo">
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/heapTracker</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/agent_util</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/java_crw_demo</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/solaris/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/libjava</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
<preprocessorList>
|
||||
<Elem>THIS_FILE="java_crw_demo.c"</Elem>
|
||||
</preprocessorList>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo/share/jvmti/minst">
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/minst</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/agent_util</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/java_crw_demo</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/solaris/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/libjava</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
<preprocessorList>
|
||||
<Elem>THIS_FILE="minst.c"</Elem>
|
||||
</preprocessorList>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo/share/jvmti/mtrace">
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/mtrace</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/agent_util</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/java_crw_demo</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/solaris/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/libjava</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
<preprocessorList>
|
||||
<Elem>THIS_FILE="mtrace.c"</Elem>
|
||||
</preprocessorList>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo/share/jvmti/versionCheck">
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/versionCheck</pElem>
|
||||
<pElem>../../jdk/src/demo/share/jvmti/agent_util</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/solaris/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/libjava</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
<preprocessorList>
|
||||
<Elem>THIS_FILE="versionCheck.c"</Elem>
|
||||
</preprocessorList>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/demo/solaris">
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>../../jdk/src/java.base/share/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/solaris/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/include</pElem>
|
||||
<pElem>../../jdk/src/java.base/share/native/libjava</pElem>
|
||||
<pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
|
||||
<pElem>../../build/support/demos/classes/jni/Poller</pElem>
|
||||
<pElem>../../jdk/make</pElem>
|
||||
</incDir>
|
||||
<preprocessorList>
|
||||
<Elem>THIS_FILE="Poller.c"</Elem>
|
||||
</preprocessorList>
|
||||
</cTool>
|
||||
</folder>
|
||||
<folder path="0/jdk/src/java.base">
|
||||
<cTool>
|
||||
<incDir>
|
||||
|
@ -560,6 +560,7 @@ fc7e94cb748507366b839e859f865f724467446a jdk-10+0
|
||||
a9fdfd55835ef9dccb7f317b07249bd66653b874 jdk-9+154
|
||||
f3b3d77a1751897413aae43ac340a130b6fa2ae1 jdk-9+155
|
||||
43139c588ea48b6504e52b6c3dec530b17b1fdb4 jdk-9+156
|
||||
1ea217626ba0995dd03127f8322ba3687926a085 jdk-10+1
|
||||
b2d0a906afd73dcf27f572217eb1be0f196ec16c jdk-9+157
|
||||
4e78f30935229f13ce7c43089621cf7169f5abac jdk-9+158
|
||||
9211c2e89c1cd11ec2d5752b0f97131a7d7525c7 jdk-9+159
|
||||
@ -570,3 +571,10 @@ b01c519b715ef6f785d0631adee0a6537cf6c12e jdk-9+162
|
||||
0af429be8bbaeaaf0cb838e9af28c953dda6a9c8 jdk-9+164
|
||||
c92c6416ca03b1464d5ed99cf6201e52b5ba0a70 jdk-9+165
|
||||
560d7aa083a24b6a56443feb8de0f40435d33aa9 jdk-9+166
|
||||
48809c513ed5ebb4d4dbf2f454afcce2780db6db jdk-10+2
|
||||
6c3b6b3438c4a63e619f00bd5732d1260ffd5600 jdk-10+3
|
||||
8295ca08f5cb09c090eb048bbdd338d7e270c8bf jdk-10+4
|
||||
7b5ca2ff1f78873ca3ee99b6589d3cb4dde2e454 jdk-10+5
|
||||
762465099d938fd96cd1efda193bc1fa23d070d3 jdk-10+6
|
||||
1ca7ed1b17b5776930d641d1379834f3140a74e4 jdk-9+167
|
||||
fbb9c802649585d19f6d7e81b4a519d44806225a jdk-9+168
|
||||
|
@ -3,7 +3,7 @@
|
||||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
|
||||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
|
||||
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
|
||||
<path>/.mx.jvmci</path>
|
||||
<path>/mx.jvmci</path>
|
||||
</pydev_pathproperty>
|
||||
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
|
||||
<path>/mx</path>
|
||||
|
@ -1221,12 +1221,19 @@ void LIRGenerator::do_CheckCast(CheckCast* x) {
|
||||
obj.load_item();
|
||||
|
||||
// info for exceptions
|
||||
CodeEmitInfo* info_for_exception = state_for(x);
|
||||
CodeEmitInfo* info_for_exception =
|
||||
(x->needs_exception_state() ? state_for(x) :
|
||||
state_for(x, x->state_before(), true /*ignore_xhandler*/));
|
||||
|
||||
CodeStub* stub;
|
||||
if (x->is_incompatible_class_change_check()) {
|
||||
assert(patching_info == NULL, "can't patch this");
|
||||
stub = new SimpleExceptionStub(Runtime1::throw_incompatible_class_change_error_id, LIR_OprFact::illegalOpr, info_for_exception);
|
||||
} else if (x->is_invokespecial_receiver_check()) {
|
||||
assert(patching_info == NULL, "can't patch this");
|
||||
stub = new DeoptimizeStub(info_for_exception,
|
||||
Deoptimization::Reason_class_check,
|
||||
Deoptimization::Action_none);
|
||||
} else {
|
||||
stub = new SimpleExceptionStub(Runtime1::throw_class_cast_exception_id, obj.result(), info_for_exception);
|
||||
}
|
||||
|
@ -34,10 +34,6 @@ const bool CCallingConventionRequiresIntsAsLongs = false;
|
||||
|
||||
#define SUPPORTS_NATIVE_CX8
|
||||
|
||||
// The maximum B/BL offset range on AArch64 is 128MB.
|
||||
#undef CODE_CACHE_DEFAULT_LIMIT
|
||||
#define CODE_CACHE_DEFAULT_LIMIT (128*M)
|
||||
|
||||
// According to the ARMv8 ARM, "Concurrent modification and execution
|
||||
// of instructions can lead to the resulting instruction performing
|
||||
// any behavior that can be achieved by executing any sequence of
|
||||
|
@ -1453,10 +1453,11 @@ void LIR_Assembler::emit_opTypeCheck(LIR_OpTypeCheck* op) {
|
||||
ciKlass* k = op->klass();
|
||||
assert_different_registers(res, k_RInfo, klass_RInfo, Rtemp);
|
||||
|
||||
if (stub->is_simple_exception_stub()) {
|
||||
// TODO: ARM - Late binding is used to prevent confusion of register allocator
|
||||
assert(stub->is_exception_throw_stub(), "must be");
|
||||
((SimpleExceptionStub*)stub)->set_obj(op->result_opr());
|
||||
|
||||
}
|
||||
ciMethodData* md;
|
||||
ciProfileData* data;
|
||||
int mdo_offset_bias = 0;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2016, 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
|
||||
@ -1412,12 +1412,20 @@ void LIRGenerator::do_CheckCast(CheckCast* x) {
|
||||
|
||||
obj.load_item();
|
||||
|
||||
CodeEmitInfo* info_for_exception = state_for(x);
|
||||
CodeEmitInfo* info_for_exception =
|
||||
(x->needs_exception_state() ? state_for(x) :
|
||||
state_for(x, x->state_before(), true /*ignore_xhandler*/));
|
||||
|
||||
CodeStub* stub;
|
||||
if (x->is_incompatible_class_change_check()) {
|
||||
assert(patching_info == NULL, "can't patch this");
|
||||
stub = new SimpleExceptionStub(Runtime1::throw_incompatible_class_change_error_id,
|
||||
LIR_OprFact::illegalOpr, info_for_exception);
|
||||
} else if (x->is_invokespecial_receiver_check()) {
|
||||
assert(patching_info == NULL, "can't patch this");
|
||||
stub = new DeoptimizeStub(info_for_exception,
|
||||
Deoptimization::Reason_class_check,
|
||||
Deoptimization::Action_none);
|
||||
} else {
|
||||
stub = new SimpleExceptionStub(Runtime1::throw_class_cast_exception_id,
|
||||
LIR_OprFact::illegalOpr, info_for_exception);
|
||||
|
@ -1131,12 +1131,19 @@ void LIRGenerator::do_CheckCast(CheckCast* x) {
|
||||
obj.load_item();
|
||||
LIR_Opr out_reg = rlock_result(x);
|
||||
CodeStub* stub;
|
||||
CodeEmitInfo* info_for_exception = state_for(x);
|
||||
CodeEmitInfo* info_for_exception =
|
||||
(x->needs_exception_state() ? state_for(x) :
|
||||
state_for(x, x->state_before(), true /*ignore_xhandler*/));
|
||||
|
||||
if (x->is_incompatible_class_change_check()) {
|
||||
assert(patching_info == NULL, "can't patch this");
|
||||
stub = new SimpleExceptionStub(Runtime1::throw_incompatible_class_change_error_id,
|
||||
LIR_OprFact::illegalOpr, info_for_exception);
|
||||
} else if (x->is_invokespecial_receiver_check()) {
|
||||
assert(patching_info == NULL, "can't patch this");
|
||||
stub = new DeoptimizeStub(info_for_exception,
|
||||
Deoptimization::Reason_class_check,
|
||||
Deoptimization::Action_none);
|
||||
} else {
|
||||
stub = new SimpleExceptionStub(Runtime1::throw_class_cast_exception_id, obj.result(), info_for_exception);
|
||||
}
|
||||
|
@ -993,12 +993,19 @@ void LIRGenerator::do_CheckCast(CheckCast* x) {
|
||||
obj.load_item();
|
||||
|
||||
// info for exceptions
|
||||
CodeEmitInfo* info_for_exception = state_for (x);
|
||||
CodeEmitInfo* info_for_exception =
|
||||
(x->needs_exception_state() ? state_for(x) :
|
||||
state_for(x, x->state_before(), true /*ignore_xhandler*/));
|
||||
|
||||
CodeStub* stub;
|
||||
if (x->is_incompatible_class_change_check()) {
|
||||
assert(patching_info == NULL, "can't patch this");
|
||||
stub = new SimpleExceptionStub(Runtime1::throw_incompatible_class_change_error_id, LIR_OprFact::illegalOpr, info_for_exception);
|
||||
} else if (x->is_invokespecial_receiver_check()) {
|
||||
assert(patching_info == NULL, "can't patch this");
|
||||
stub = new DeoptimizeStub(info_for_exception,
|
||||
Deoptimization::Reason_class_check,
|
||||
Deoptimization::Action_none);
|
||||
} else {
|
||||
stub = new SimpleExceptionStub(Runtime1::throw_class_cast_exception_id, obj.result(), info_for_exception);
|
||||
}
|
||||
|
@ -1196,11 +1196,18 @@ void LIRGenerator::do_CheckCast(CheckCast* x) {
|
||||
obj.load_item();
|
||||
LIR_Opr out_reg = rlock_result(x);
|
||||
CodeStub* stub;
|
||||
CodeEmitInfo* info_for_exception = state_for(x);
|
||||
CodeEmitInfo* info_for_exception =
|
||||
(x->needs_exception_state() ? state_for(x) :
|
||||
state_for(x, x->state_before(), true /*ignore_xhandler*/));
|
||||
|
||||
if (x->is_incompatible_class_change_check()) {
|
||||
assert(patching_info == NULL, "can't patch this");
|
||||
stub = new SimpleExceptionStub(Runtime1::throw_incompatible_class_change_error_id, LIR_OprFact::illegalOpr, info_for_exception);
|
||||
} else if (x->is_invokespecial_receiver_check()) {
|
||||
assert(patching_info == NULL, "can't patch this");
|
||||
stub = new DeoptimizeStub(info_for_exception,
|
||||
Deoptimization::Reason_class_check,
|
||||
Deoptimization::Action_none);
|
||||
} else {
|
||||
stub = new SimpleExceptionStub(Runtime1::throw_class_cast_exception_id, obj.result(), info_for_exception);
|
||||
}
|
||||
|
@ -1429,12 +1429,17 @@ void LIRGenerator::do_CheckCast(CheckCast* x) {
|
||||
obj.load_item();
|
||||
|
||||
// info for exceptions
|
||||
CodeEmitInfo* info_for_exception = state_for(x);
|
||||
CodeEmitInfo* info_for_exception =
|
||||
(x->needs_exception_state() ? state_for(x) :
|
||||
state_for(x, x->state_before(), true /*ignore_xhandler*/));
|
||||
|
||||
CodeStub* stub;
|
||||
if (x->is_incompatible_class_change_check()) {
|
||||
assert(patching_info == NULL, "can't patch this");
|
||||
stub = new SimpleExceptionStub(Runtime1::throw_incompatible_class_change_error_id, LIR_OprFact::illegalOpr, info_for_exception);
|
||||
} else if (x->is_invokespecial_receiver_check()) {
|
||||
assert(patching_info == NULL, "can't patch this");
|
||||
stub = new DeoptimizeStub(info_for_exception, Deoptimization::Reason_class_check, Deoptimization::Action_none);
|
||||
} else {
|
||||
stub = new SimpleExceptionStub(Runtime1::throw_class_cast_exception_id, obj.result(), info_for_exception);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2017, 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
|
||||
@ -763,12 +763,11 @@ void VM_Version::get_processor_features() {
|
||||
FLAG_SET_DEFAULT(UseCRC32Intrinsics, false);
|
||||
}
|
||||
|
||||
if (supports_sse4_2()) {
|
||||
if (supports_sse4_2() && supports_clmul()) {
|
||||
if (FLAG_IS_DEFAULT(UseCRC32CIntrinsics)) {
|
||||
UseCRC32CIntrinsics = true;
|
||||
}
|
||||
}
|
||||
else if (UseCRC32CIntrinsics) {
|
||||
} else if (UseCRC32CIntrinsics) {
|
||||
if (!FLAG_IS_DEFAULT(UseCRC32CIntrinsics)) {
|
||||
warning("CRC32C intrinsics are not available on this CPU");
|
||||
}
|
||||
|
@ -0,0 +1,94 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 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.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.memory;
|
||||
|
||||
public class AltHashing {
|
||||
public static long murmur3_32(long seed, byte[] data) {
|
||||
long h1 = seed;
|
||||
int len = data.length;
|
||||
int count = len;
|
||||
|
||||
int offset = 0;
|
||||
|
||||
// body
|
||||
while (count >= 4) {
|
||||
long k1 = (data[offset] & 0x0FF)
|
||||
| (data[offset + 1] & 0x0FF) << 8
|
||||
| (data[offset + 2] & 0x0FF) << 16
|
||||
| data[offset + 3] << 24;
|
||||
|
||||
count -= 4;
|
||||
offset += 4;
|
||||
|
||||
k1 *= 0xcc9e2d51;
|
||||
k1 = Integer.rotateLeft((int)k1, 15);
|
||||
k1 *= 0x1b873593;
|
||||
k1 &= 0xFFFFFFFFL;
|
||||
|
||||
h1 ^= k1;
|
||||
h1 = Integer.rotateLeft((int)h1, 13);
|
||||
h1 = h1 * 5 + 0xe6546b64;
|
||||
h1 &= 0xFFFFFFFFL;
|
||||
}
|
||||
|
||||
//tail
|
||||
if (count > 0) {
|
||||
long k1 = 0;
|
||||
|
||||
switch (count) {
|
||||
case 3:
|
||||
k1 ^= (data[offset + 2] & 0xff) << 16;
|
||||
// fall through
|
||||
case 2:
|
||||
k1 ^= (data[offset + 1] & 0xff) << 8;
|
||||
// fall through
|
||||
case 1:
|
||||
k1 ^= (data[offset] & 0xff);
|
||||
// fall through
|
||||
default:
|
||||
k1 *= 0xcc9e2d51;
|
||||
k1 = Integer.rotateLeft((int)k1, 15);
|
||||
k1 *= 0x1b873593;
|
||||
k1 &= 0xFFFFFFFFL;
|
||||
h1 ^= k1;
|
||||
h1 &= 0xFFFFFFFFL;
|
||||
}
|
||||
}
|
||||
|
||||
// finalization
|
||||
h1 ^= len;
|
||||
|
||||
// finalization mix force all bits of a hash block to avalanche
|
||||
h1 ^= h1 >> 16;
|
||||
h1 *= 0x85ebca6b;
|
||||
h1 &= 0xFFFFFFFFL;
|
||||
h1 ^= h1 >> 13;
|
||||
h1 *= 0xc2b2ae35;
|
||||
h1 &= 0xFFFFFFFFL;
|
||||
h1 ^= h1 >> 16;
|
||||
|
||||
return h1 & 0xFFFFFFFFL;
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2017, 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
|
||||
@ -45,11 +45,14 @@ public class SymbolTable extends sun.jvm.hotspot.utilities.Hashtable {
|
||||
Type type = db.lookupType("SymbolTable");
|
||||
theTableField = type.getAddressField("_the_table");
|
||||
sharedTableField = type.getAddressField("_shared_table");
|
||||
type = db.lookupType("RehashableSymbolHashtable");
|
||||
seedField = type.getCIntegerField("_seed");
|
||||
}
|
||||
|
||||
// Fields
|
||||
private static AddressField theTableField;
|
||||
private static AddressField sharedTableField;
|
||||
private static CIntegerField seedField;
|
||||
|
||||
private CompactHashTable sharedTable;
|
||||
|
||||
@ -62,6 +65,17 @@ public class SymbolTable extends sun.jvm.hotspot.utilities.Hashtable {
|
||||
return table;
|
||||
}
|
||||
|
||||
public static long getSeed() {
|
||||
return (long) seedField.getValue();
|
||||
}
|
||||
|
||||
public static boolean useAlternateHashcode() {
|
||||
if (getSeed() != 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public SymbolTable(Address addr) {
|
||||
super(addr);
|
||||
}
|
||||
@ -86,11 +100,17 @@ public class SymbolTable extends sun.jvm.hotspot.utilities.Hashtable {
|
||||
public Symbol probe(byte[] name) {
|
||||
long hashValue = hashSymbol(name);
|
||||
|
||||
// shared table does not use alternate hashing algorithm,
|
||||
// it always uses the same original hash code.
|
||||
Symbol s = sharedTable.probe(name, hashValue);
|
||||
if (s != null) {
|
||||
return s;
|
||||
}
|
||||
|
||||
if (useAlternateHashcode()) {
|
||||
hashValue = AltHashing.murmur3_32(getSeed(), name);
|
||||
}
|
||||
|
||||
for (HashtableEntry e = (HashtableEntry) bucket(hashToIndex(hashValue)); e != null; e = (HashtableEntry) e.next()) {
|
||||
if (e.hash() == hashValue) {
|
||||
Symbol sym = Symbol.create(e.literalValue());
|
||||
|
@ -24,7 +24,6 @@ package jdk.vm.ci.hotspot;
|
||||
|
||||
import jdk.vm.ci.hotspot.EmptyEventProvider.EmptyCompilationEvent;
|
||||
import jdk.vm.ci.hotspot.EmptyEventProvider.EmptyCompilerFailureEvent;
|
||||
import jdk.vm.ci.services.JVMCIPermission;
|
||||
|
||||
/**
|
||||
* Service-provider class for logging compiler related events.
|
||||
|
@ -28,9 +28,9 @@ import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.Option;
|
||||
import jdk.vm.ci.runtime.JVMCICompiler;
|
||||
import jdk.vm.ci.runtime.JVMCICompilerFactory;
|
||||
import jdk.vm.ci.runtime.JVMCIRuntime;
|
||||
import jdk.vm.ci.services.JVMCIServiceLocator;
|
||||
import jdk.vm.ci.services.JVMCIPermission;
|
||||
import jdk.vm.ci.services.Services;
|
||||
import jdk.vm.ci.services.JVMCIServiceLocator;
|
||||
import jdk.vm.ci.services.internal.ReflectionAccessJDK;
|
||||
|
||||
final class HotSpotJVMCICompilerConfig {
|
||||
|
||||
@ -47,7 +47,7 @@ final class HotSpotJVMCICompilerConfig {
|
||||
|
||||
@Override
|
||||
public String getCompilerName() {
|
||||
return "<none>";
|
||||
return "null";
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -73,6 +73,9 @@ final class HotSpotJVMCICompilerConfig {
|
||||
JVMCICompilerFactory factory = null;
|
||||
String compilerName = Option.Compiler.getString();
|
||||
if (compilerName != null) {
|
||||
if (compilerName.isEmpty() || compilerName.equals("null")) {
|
||||
factory = new DummyCompilerFactory();
|
||||
} else {
|
||||
for (JVMCICompilerFactory f : JVMCIServiceLocator.getProviders(JVMCICompilerFactory.class)) {
|
||||
if (f.getCompilerName().equals(compilerName)) {
|
||||
factory = f;
|
||||
@ -81,11 +84,12 @@ final class HotSpotJVMCICompilerConfig {
|
||||
if (factory == null) {
|
||||
throw new JVMCIError("JVMCI compiler '%s' not found", compilerName);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Auto select a single available compiler
|
||||
for (JVMCICompilerFactory f : JVMCIServiceLocator.getProviders(JVMCICompilerFactory.class)) {
|
||||
if (factory == null) {
|
||||
Services.exportJVMCITo(f.getClass());
|
||||
ReflectionAccessJDK.openJVMCITo(f.getClass());
|
||||
factory = f;
|
||||
} else {
|
||||
// Multiple factories seen - cancel auto selection
|
||||
|
@ -32,6 +32,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.ServiceLoader;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import jdk.internal.misc.VM;
|
||||
@ -50,7 +51,6 @@ import jdk.vm.ci.runtime.JVMCIBackend;
|
||||
import jdk.vm.ci.runtime.JVMCICompiler;
|
||||
import jdk.vm.ci.runtime.JVMCICompilerFactory;
|
||||
import jdk.vm.ci.services.JVMCIServiceLocator;
|
||||
import jdk.vm.ci.services.Services;
|
||||
|
||||
/**
|
||||
* HotSpot implementation of a JVMCI runtime.
|
||||
@ -88,7 +88,10 @@ public final class HotSpotJVMCIRuntime implements HotSpotJVMCIRuntimeProvider {
|
||||
*/
|
||||
public enum Option {
|
||||
// @formatter:off
|
||||
Compiler(String.class, null, "Selects the system compiler."),
|
||||
Compiler(String.class, null, "Selects the system compiler. This must match the getCompilerName() value returned " +
|
||||
"by a jdk.vm.ci.runtime.JVMCICompilerFactory provider. " +
|
||||
"An empty string or the value \"null\" selects a compiler " +
|
||||
"that will raise an exception upon receiving a compilation request."),
|
||||
// Note: The following one is not used (see InitTimer.ENABLED). It is added here
|
||||
// so that -XX:+JVMCIPrintProperties shows the option.
|
||||
InitTimer(Boolean.class, false, "Specifies if initialization timing is enabled."),
|
||||
@ -208,7 +211,7 @@ public final class HotSpotJVMCIRuntime implements HotSpotJVMCIRuntimeProvider {
|
||||
}
|
||||
|
||||
public static HotSpotJVMCIBackendFactory findFactory(String architecture) {
|
||||
for (HotSpotJVMCIBackendFactory factory : Services.load(HotSpotJVMCIBackendFactory.class)) {
|
||||
for (HotSpotJVMCIBackendFactory factory : ServiceLoader.load(HotSpotJVMCIBackendFactory.class, ClassLoader.getSystemClassLoader())) {
|
||||
if (factory.getArchitecture().equalsIgnoreCase(architecture)) {
|
||||
return factory;
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ class HotSpotMemoryAccessProviderImpl implements HotSpotMemoryAccessProvider {
|
||||
boolean aligned = ((displacement - headerSize) % sizeOfElement) == 0;
|
||||
if (displacement < 0 || displacement > (arrayEnd - sizeOfElement) || (kind == JavaKind.Object && !aligned)) {
|
||||
int index = (int) ((displacement - headerSize) / sizeOfElement);
|
||||
throw new AssertionError("Unsafe array access: reading element of kind " + kind +
|
||||
throw new IllegalArgumentException("Unsafe array access: reading element of kind " + kind +
|
||||
" at offset " + displacement + " (index ~ " + index + ") in " +
|
||||
type.toJavaName() + " object of length " + length);
|
||||
}
|
||||
|
@ -801,8 +801,7 @@ final class HotSpotResolvedObjectTypeImpl extends HotSpotResolvedJavaType implem
|
||||
}
|
||||
if (elementType.getName().startsWith("Ljava/")) {
|
||||
// Classes in a java.* package can only be defined by the
|
||||
// boot class loader. This is enforced by ClassLoader.preDefineClass()
|
||||
assert mirror().getClassLoader() == null;
|
||||
// boot or platform class loader.
|
||||
return true;
|
||||
}
|
||||
ClassLoader thisCl = mirror().getClassLoader();
|
||||
|
@ -24,12 +24,15 @@ package jdk.vm.ci.services;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.ServiceLoader;
|
||||
|
||||
import jdk.vm.ci.services.internal.ReflectionAccessJDK;
|
||||
|
||||
/**
|
||||
* Service-provider class for the runtime to locate providers of JVMCI services where the latter are
|
||||
* not in packages exported by the JVMCI module. As part of instantiating
|
||||
* {@link JVMCIServiceLocator}, all JVMCI packages will be {@linkplain Services#exportJVMCITo(Class)
|
||||
* exported} to the module defining the class of the instantiated object.
|
||||
* not in packages exported by the JVMCI module. As part of instantiating a
|
||||
* {@link JVMCIServiceLocator}, all JVMCI packages will be opened to the module defining the class
|
||||
* of the instantiated object.
|
||||
*
|
||||
* While the {@link #getProvider(Class)} method can be used directly, it's usually easier to use
|
||||
* {@link #getProviders(Class)}.
|
||||
@ -49,30 +52,39 @@ public abstract class JVMCIServiceLocator {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a capability for accessing JVMCI. Once successfully instantiated, JVMCI exports all
|
||||
* its packages to the module defining the type of this object.
|
||||
* Creates a capability for accessing JVMCI. Once successfully instantiated, JVMCI opens all its
|
||||
* packages to the module defining the type of this object.
|
||||
*
|
||||
* @throws SecurityException if a security manager has been installed and it denies
|
||||
* {@link JVMCIPermission}
|
||||
*/
|
||||
protected JVMCIServiceLocator() {
|
||||
this(checkPermission());
|
||||
Services.exportJVMCITo(getClass());
|
||||
Services.checkJVMCIEnabled();
|
||||
ReflectionAccessJDK.openJVMCITo(getClass());
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the provider of the service defined by {@code service} or {@code null} if this object
|
||||
* does not have a provider for {@code service}.
|
||||
*/
|
||||
public abstract <S> S getProvider(Class<S> service);
|
||||
protected abstract <S> S getProvider(Class<S> service);
|
||||
|
||||
/**
|
||||
* Gets the providers of the service defined by {@code service} by querying the
|
||||
* {@link JVMCIServiceLocator} providers obtained by {@link Services#load(Class)}.
|
||||
* Gets the providers of the service defined by {@code service} by querying the available
|
||||
* {@link JVMCIServiceLocator} providers.
|
||||
*
|
||||
* @throws SecurityException if a security manager is present and it denies
|
||||
* {@link JVMCIPermission}
|
||||
*/
|
||||
public static <S> List<S> getProviders(Class<S> service) {
|
||||
Services.checkJVMCIEnabled();
|
||||
SecurityManager sm = System.getSecurityManager();
|
||||
if (sm != null) {
|
||||
sm.checkPermission(new JVMCIPermission());
|
||||
}
|
||||
List<S> providers = new ArrayList<>();
|
||||
for (JVMCIServiceLocator access : Services.load(JVMCIServiceLocator.class)) {
|
||||
for (JVMCIServiceLocator access : ServiceLoader.load(JVMCIServiceLocator.class, ClassLoader.getSystemClassLoader())) {
|
||||
S provider = access.getProvider(service);
|
||||
if (provider != null) {
|
||||
providers.add(provider);
|
||||
|
@ -22,167 +22,64 @@
|
||||
*/
|
||||
package jdk.vm.ci.services;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Formatter;
|
||||
import java.util.Iterator;
|
||||
import java.util.ServiceConfigurationError;
|
||||
import java.util.ServiceLoader;
|
||||
import java.util.Set;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* A mechanism for accessing service providers via JVMCI.
|
||||
* Provides utilities needed by JVMCI clients.
|
||||
*/
|
||||
public final class Services {
|
||||
|
||||
// This class must be compilable and executable on JDK 8 since it's used in annotation
|
||||
// processors while building JDK 9 so use of API added in JDK 9 is made via reflection.
|
||||
|
||||
private Services() {
|
||||
}
|
||||
|
||||
private static int getJavaSpecificationVersion() {
|
||||
String value = System.getProperty("java.specification.version");
|
||||
if (value.startsWith("1.")) {
|
||||
value = value.substring(2);
|
||||
}
|
||||
return Integer.parseInt(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* The integer value corresponding to the value of the {@code java.specification.version} system
|
||||
* property after any leading {@code "1."} has been stripped.
|
||||
*/
|
||||
public static final int JAVA_SPECIFICATION_VERSION = getJavaSpecificationVersion();
|
||||
|
||||
// Use reflection so that this compiles on Java 8
|
||||
private static final Method getModule;
|
||||
private static final Method getPackages;
|
||||
private static final Method addUses;
|
||||
private static final Method isExported;
|
||||
private static final Method addExports;
|
||||
|
||||
static {
|
||||
if (JAVA_SPECIFICATION_VERSION >= 9) {
|
||||
try {
|
||||
getModule = Class.class.getMethod("getModule");
|
||||
Class<?> moduleClass = getModule.getReturnType();
|
||||
getPackages = moduleClass.getMethod("getPackages");
|
||||
addUses = moduleClass.getMethod("addUses", Class.class);
|
||||
isExported = moduleClass.getMethod("isExported", String.class, moduleClass);
|
||||
addExports = moduleClass.getMethod("addExports", String.class, moduleClass);
|
||||
} catch (NoSuchMethodException | SecurityException e) {
|
||||
throw new InternalError(e);
|
||||
}
|
||||
} else {
|
||||
getModule = null;
|
||||
getPackages = null;
|
||||
addUses = null;
|
||||
isExported = null;
|
||||
addExports = null;
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
static <T> T invoke(Method method, Object receiver, Object... args) {
|
||||
private static Map<String, String> initSavedProperties() throws InternalError {
|
||||
try {
|
||||
return (T) method.invoke(receiver, args);
|
||||
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
|
||||
Class<?> vmClass = Class.forName("jdk.internal.misc.VM");
|
||||
Method m = vmClass.getMethod("getSavedProperties");
|
||||
return (Map<String, String>) m.invoke(null);
|
||||
} catch (Exception e) {
|
||||
throw new InternalError(e);
|
||||
}
|
||||
}
|
||||
|
||||
static final Map<String, String> SAVED_PROPERTIES = initSavedProperties();
|
||||
static final boolean JVMCI_ENABLED = Boolean.parseBoolean(SAVED_PROPERTIES.get("jdk.internal.vm.ci.enabled"));
|
||||
|
||||
/**
|
||||
* Performs any required security checks and dynamic reconfiguration to allow the module of a
|
||||
* given class to access the classes in the JVMCI module.
|
||||
*
|
||||
* Note: This API uses {@link Class} instead of {@code Module} to provide backwards
|
||||
* compatibility for JVMCI clients compiled against a JDK release earlier than 9.
|
||||
*
|
||||
* @param requestor a class requesting access to the JVMCI module for its module
|
||||
* @throws SecurityException if a security manager is present and it denies
|
||||
* {@link JVMCIPermission}
|
||||
* Checks that JVMCI is enabled in the VM and throws an error if it isn't.
|
||||
*/
|
||||
public static void exportJVMCITo(Class<?> requestor) {
|
||||
SecurityManager sm = System.getSecurityManager();
|
||||
if (sm != null) {
|
||||
sm.checkPermission(new JVMCIPermission());
|
||||
}
|
||||
if (JAVA_SPECIFICATION_VERSION >= 9) {
|
||||
Object jvmci = invoke(getModule, Services.class);
|
||||
Object requestorModule = invoke(getModule, requestor);
|
||||
if (jvmci != requestorModule) {
|
||||
Set<String> packages = invoke(getPackages, jvmci);
|
||||
for (String pkg : packages) {
|
||||
// Export all JVMCI packages dynamically instead
|
||||
// of requiring a long list of --add-exports
|
||||
// options on the JVM command line.
|
||||
boolean exported = invoke(isExported, jvmci, pkg, requestorModule);
|
||||
if (!exported) {
|
||||
invoke(addExports, jvmci, pkg, requestorModule);
|
||||
}
|
||||
}
|
||||
}
|
||||
static void checkJVMCIEnabled() {
|
||||
if (!JVMCI_ENABLED) {
|
||||
throw new Error("The EnableJVMCI VM option must be true (i.e., -XX:+EnableJVMCI) to use JVMCI");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an {@link Iterable} of the JVMCI providers available for a given service.
|
||||
*
|
||||
* @throws SecurityException if a security manager is present and it denies
|
||||
* {@link JVMCIPermission}
|
||||
* Gets an unmodifiable copy of the system properties saved when {@link System} is initialized.
|
||||
*/
|
||||
public static <S> Iterable<S> load(Class<S> service) {
|
||||
public static Map<String, String> getSavedProperties() {
|
||||
checkJVMCIEnabled();
|
||||
SecurityManager sm = System.getSecurityManager();
|
||||
if (sm != null) {
|
||||
sm.checkPermission(new JVMCIPermission());
|
||||
}
|
||||
if (JAVA_SPECIFICATION_VERSION >= 9) {
|
||||
Object jvmci = invoke(getModule, Services.class);
|
||||
invoke(addUses, jvmci, service);
|
||||
}
|
||||
|
||||
// Restrict JVMCI clients to be on the class path or module path
|
||||
return ServiceLoader.load(service, ClassLoader.getSystemClassLoader());
|
||||
return SAVED_PROPERTIES;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the JVMCI provider for a given service for which at most one provider must be available.
|
||||
*
|
||||
* @param service the service whose provider is being requested
|
||||
* @param required specifies if an {@link InternalError} should be thrown if no provider of
|
||||
* {@code service} is available
|
||||
* @throws SecurityException if a security manager is present and it denies
|
||||
* {@link JVMCIPermission}
|
||||
* Causes the JVMCI subsystem to be initialized if it isn't already initialized.
|
||||
*/
|
||||
public static <S> S loadSingle(Class<S> service, boolean required) {
|
||||
SecurityManager sm = System.getSecurityManager();
|
||||
if (sm != null) {
|
||||
sm.checkPermission(new JVMCIPermission());
|
||||
}
|
||||
if (JAVA_SPECIFICATION_VERSION >= 9) {
|
||||
Object jvmci = invoke(getModule, Services.class);
|
||||
invoke(addUses, jvmci, service);
|
||||
}
|
||||
// Restrict JVMCI clients to be on the class path or module path
|
||||
Iterable<S> providers = ServiceLoader.load(service, ClassLoader.getSystemClassLoader());
|
||||
S singleProvider = null;
|
||||
public static void initializeJVMCI() {
|
||||
checkJVMCIEnabled();
|
||||
try {
|
||||
for (Iterator<S> it = providers.iterator(); it.hasNext();) {
|
||||
singleProvider = it.next();
|
||||
if (it.hasNext()) {
|
||||
throw new InternalError(String.format("Multiple %s providers found", service.getName()));
|
||||
Class.forName("jdk.vm.ci.runtime.JVMCI");
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new InternalError(e);
|
||||
}
|
||||
}
|
||||
} catch (ServiceConfigurationError e) {
|
||||
// If the service is required we will bail out below.
|
||||
}
|
||||
if (singleProvider == null && required) {
|
||||
String javaHome = System.getProperty("java.home");
|
||||
String vmName = System.getProperty("java.vm.name");
|
||||
Formatter errorMessage = new Formatter();
|
||||
errorMessage.format("The VM does not expose required service %s.%n", service.getName());
|
||||
errorMessage.format("Currently used Java home directory is %s.%n", javaHome);
|
||||
errorMessage.format("Currently used VM configuration is: %s", vmName);
|
||||
throw new UnsupportedOperationException(errorMessage.toString());
|
||||
}
|
||||
return singleProvider;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,91 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 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.
|
||||
*/
|
||||
package jdk.vm.ci.services.internal;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Set;
|
||||
|
||||
import jdk.vm.ci.services.Services;
|
||||
|
||||
/**
|
||||
* Reflection based access to API introduced in JDK 9. This allows the API to be used in code that
|
||||
* must be compiled (but not executed) on JDK 8.
|
||||
*/
|
||||
public final class ReflectionAccessJDK {
|
||||
|
||||
/**
|
||||
* {@code Class.getModule()}.
|
||||
*/
|
||||
private static final Method getModule;
|
||||
|
||||
/**
|
||||
* {@code java.lang.Module.addOpens(String, Module)}.
|
||||
*/
|
||||
private static final Method addOpens;
|
||||
|
||||
/**
|
||||
* {@code java.lang.Module.getPackages(Module, String, Module)}.
|
||||
*/
|
||||
private static final Method getPackages;
|
||||
|
||||
/**
|
||||
* {@code java.lang.Module.isOpen(String, Module)}.
|
||||
*/
|
||||
private static final Method isOpenTo;
|
||||
|
||||
/**
|
||||
* Opens all JVMCI packages to the module of a given class.
|
||||
*
|
||||
* @param other all JVMCI packages will be opened to the module of this class
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void openJVMCITo(Class<?> other) {
|
||||
try {
|
||||
Object jvmci = getModule.invoke(Services.class);
|
||||
Object otherModule = getModule.invoke(other);
|
||||
if (jvmci != otherModule) {
|
||||
Set<String> packages = (Set<String>) getPackages.invoke(jvmci);
|
||||
for (String pkg : packages) {
|
||||
boolean opened = (Boolean) isOpenTo.invoke(jvmci, pkg, otherModule);
|
||||
if (!opened) {
|
||||
addOpens.invoke(jvmci, pkg, otherModule);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new InternalError(e);
|
||||
}
|
||||
}
|
||||
|
||||
static {
|
||||
try {
|
||||
getModule = Class.class.getMethod("getModule");
|
||||
Class<?> moduleClass = getModule.getReturnType();
|
||||
getPackages = moduleClass.getMethod("getPackages");
|
||||
isOpenTo = moduleClass.getMethod("isOpen", String.class, moduleClass);
|
||||
addOpens = moduleClass.getDeclaredMethod("addOpens", String.class, moduleClass);
|
||||
} catch (NoSuchMethodException | SecurityException e) {
|
||||
throw new InternalError(e);
|
||||
}
|
||||
}
|
||||
}
|
@ -33,37 +33,4 @@ module jdk.internal.vm.ci {
|
||||
jdk.vm.ci.hotspot.aarch64.AArch64HotSpotJVMCIBackendFactory,
|
||||
jdk.vm.ci.hotspot.amd64.AMD64HotSpotJVMCIBackendFactory,
|
||||
jdk.vm.ci.hotspot.sparc.SPARCHotSpotJVMCIBackendFactory;
|
||||
|
||||
exports jdk.vm.ci.aarch64 to
|
||||
jdk.internal.vm.compiler;
|
||||
exports jdk.vm.ci.amd64 to
|
||||
jdk.aot,
|
||||
jdk.internal.vm.compiler;
|
||||
exports jdk.vm.ci.code to
|
||||
jdk.aot,
|
||||
jdk.internal.vm.compiler;
|
||||
exports jdk.vm.ci.code.site to
|
||||
jdk.aot,
|
||||
jdk.internal.vm.compiler;
|
||||
exports jdk.vm.ci.code.stack to
|
||||
jdk.internal.vm.compiler;
|
||||
exports jdk.vm.ci.common to
|
||||
jdk.internal.vm.compiler;
|
||||
exports jdk.vm.ci.hotspot to
|
||||
jdk.aot,
|
||||
jdk.internal.vm.compiler;
|
||||
exports jdk.vm.ci.hotspot.aarch64 to
|
||||
jdk.internal.vm.compiler;
|
||||
exports jdk.vm.ci.hotspot.amd64 to
|
||||
jdk.internal.vm.compiler;
|
||||
exports jdk.vm.ci.hotspot.sparc to
|
||||
jdk.internal.vm.compiler;
|
||||
exports jdk.vm.ci.meta to
|
||||
jdk.aot,
|
||||
jdk.internal.vm.compiler;
|
||||
exports jdk.vm.ci.runtime to
|
||||
jdk.aot,
|
||||
jdk.internal.vm.compiler;
|
||||
exports jdk.vm.ci.sparc to
|
||||
jdk.internal.vm.compiler;
|
||||
}
|
||||
|
@ -3,9 +3,9 @@
|
||||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
|
||||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
|
||||
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
|
||||
<path>/mx.graal</path>
|
||||
<path>/mx.graal</path>
|
||||
<path>/mx.graal</path>
|
||||
<path>/.mx.graal</path>
|
||||
<path>/.mx.graal</path>
|
||||
<path>/.mx.graal</path>
|
||||
</pydev_pathproperty>
|
||||
|
||||
</pydev_project>
|
||||
|
@ -8,6 +8,36 @@ suite = {
|
||||
# (e.g., macosx-x86_64-normal-server-release).
|
||||
"outputRoot" : "../../../build/mx/hotspot",
|
||||
|
||||
"jdklibraries" : {
|
||||
"JVMCI_SERVICES" : {
|
||||
"path" : "lib/jvmci-services.jar",
|
||||
"sourcePath" : "lib/jvmci-services.src.zip",
|
||||
"optional" : False,
|
||||
"jdkStandardizedSince" : "9",
|
||||
"module" : "jdk.internal.vm.ci"
|
||||
},
|
||||
"JVMCI_API" : {
|
||||
"path" : "lib/jvmci/jvmci-api.jar",
|
||||
"sourcePath" : "lib/jvmci/jvmci-api.src.zip",
|
||||
"dependencies" : [
|
||||
"JVMCI_SERVICES",
|
||||
],
|
||||
"optional" : False,
|
||||
"jdkStandardizedSince" : "9",
|
||||
"module" : "jdk.internal.vm.ci"
|
||||
},
|
||||
"JVMCI_HOTSPOT" : {
|
||||
"path" : "lib/jvmci/jvmci-hotspot.jar",
|
||||
"sourcePath" : "lib/jvmci/jvmci-hotspot.src.zip",
|
||||
"dependencies" : [
|
||||
"JVMCI_API",
|
||||
],
|
||||
"optional" : False,
|
||||
"jdkStandardizedSince" : "9",
|
||||
"module" : "jdk.internal.vm.ci"
|
||||
},
|
||||
},
|
||||
|
||||
"libraries" : {
|
||||
|
||||
# ------------- Libraries -------------
|
||||
@ -17,6 +47,16 @@ suite = {
|
||||
"sha1" : "476d9a44cd19d6b55f81571077dfa972a4f8a083",
|
||||
"bootClassPathAgent" : "true",
|
||||
},
|
||||
"ASM5" : {
|
||||
"sha1" : "0da08b8cce7bbf903602a25a3a163ae252435795",
|
||||
"urls" : ["https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/asm-5.0.4.jar"],
|
||||
},
|
||||
|
||||
"ASM_TREE5" : {
|
||||
"sha1" : "396ce0c07ba2b481f25a70195c7c94922f0d1b0b",
|
||||
"urls" : ["https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/asm-tree-5.0.4.jar"],
|
||||
"dependencies" : ["ASM5"],
|
||||
},
|
||||
},
|
||||
|
||||
"projects" : {
|
||||
@ -32,6 +72,7 @@ suite = {
|
||||
|
||||
"org.graalvm.compiler.serviceprovider" : {
|
||||
"subDir" : "share/classes",
|
||||
"dependencies" : ["JVMCI_SERVICES"],
|
||||
"sourceDirs" : ["src"],
|
||||
"checkstyle" : "org.graalvm.compiler.graph",
|
||||
"javaCompliance" : "1.8",
|
||||
@ -49,6 +90,7 @@ suite = {
|
||||
|
||||
"org.graalvm.compiler.options" : {
|
||||
"subDir" : "share/classes",
|
||||
"dependencies" : ["JVMCI_SERVICES", "JVMCI_API"],
|
||||
"sourceDirs" : ["src"],
|
||||
"checkstyle" : "org.graalvm.compiler.graph",
|
||||
"javaCompliance" : "1.8",
|
||||
@ -83,6 +125,7 @@ suite = {
|
||||
"sourceDirs" : ["src"],
|
||||
"checkstyle" : "org.graalvm.compiler.graph",
|
||||
"dependencies" : [
|
||||
"JVMCI_API",
|
||||
"org.graalvm.compiler.serviceprovider",
|
||||
"org.graalvm.compiler.options"
|
||||
],
|
||||
@ -137,6 +180,7 @@ suite = {
|
||||
"sourceDirs" : ["src"],
|
||||
"checkstyle" : "org.graalvm.compiler.graph",
|
||||
"dependencies" : [
|
||||
"JVMCI_HOTSPOT",
|
||||
"org.graalvm.compiler.core.test",
|
||||
],
|
||||
"javaCompliance" : "1.8",
|
||||
@ -146,6 +190,9 @@ suite = {
|
||||
"org.graalvm.compiler.api.runtime" : {
|
||||
"subDir" : "share/classes",
|
||||
"sourceDirs" : ["src"],
|
||||
"dependencies" : [
|
||||
"JVMCI_API",
|
||||
],
|
||||
"checkstyle" : "org.graalvm.compiler.graph",
|
||||
"javaCompliance" : "1.8",
|
||||
"workingSets" : "API,Graal",
|
||||
@ -156,6 +203,7 @@ suite = {
|
||||
"sourceDirs" : ["src"],
|
||||
"dependencies" : [
|
||||
"mx:JUNIT",
|
||||
"JVMCI_SERVICES",
|
||||
"org.graalvm.compiler.api.runtime",
|
||||
],
|
||||
"checkstyle" : "org.graalvm.compiler.graph",
|
||||
@ -166,6 +214,7 @@ suite = {
|
||||
"org.graalvm.compiler.api.replacements" : {
|
||||
"subDir" : "share/classes",
|
||||
"sourceDirs" : ["src"],
|
||||
"dependencies" : ["JVMCI_API"],
|
||||
"checkstyle" : "org.graalvm.compiler.graph",
|
||||
"javaCompliance" : "1.8",
|
||||
"workingSets" : "API,Graal,Replacements",
|
||||
@ -175,6 +224,7 @@ suite = {
|
||||
"subDir" : "share/classes",
|
||||
"sourceDirs" : ["src"],
|
||||
"dependencies" : [
|
||||
"JVMCI_HOTSPOT",
|
||||
"org.graalvm.compiler.api.runtime",
|
||||
"org.graalvm.compiler.replacements",
|
||||
"org.graalvm.compiler.runtime",
|
||||
@ -261,6 +311,8 @@ suite = {
|
||||
"org.graalvm.compiler.hotspot",
|
||||
"org.graalvm.compiler.lir.jtt",
|
||||
"org.graalvm.compiler.lir.test",
|
||||
"JVMCI_API",
|
||||
"JVMCI_HOTSPOT",
|
||||
],
|
||||
"checkstyle" : "org.graalvm.compiler.graph",
|
||||
"javaCompliance" : "1.8",
|
||||
@ -347,6 +399,9 @@ suite = {
|
||||
"org.graalvm.compiler.asm" : {
|
||||
"subDir" : "share/classes",
|
||||
"sourceDirs" : ["src"],
|
||||
"dependencies" : [
|
||||
"JVMCI_API",
|
||||
],
|
||||
"checkstyle" : "org.graalvm.compiler.graph",
|
||||
"javaCompliance" : "1.8",
|
||||
"workingSets" : "Graal,Assembler",
|
||||
@ -403,6 +458,7 @@ suite = {
|
||||
"org.graalvm.compiler.bytecode" : {
|
||||
"subDir" : "share/classes",
|
||||
"sourceDirs" : ["src"],
|
||||
"dependencies" : ["JVMCI_API"],
|
||||
"checkstyle" : "org.graalvm.compiler.graph",
|
||||
"javaCompliance" : "1.8",
|
||||
"workingSets" : "Graal,Java",
|
||||
@ -774,6 +830,7 @@ suite = {
|
||||
"dependencies" : [
|
||||
"org.graalvm.compiler.lir.jtt",
|
||||
"org.graalvm.compiler.lir.aarch64",
|
||||
"JVMCI_HOTSPOT"
|
||||
],
|
||||
"checkstyle" : "org.graalvm.compiler.graph",
|
||||
"javaCompliance" : "1.8",
|
||||
@ -803,6 +860,7 @@ suite = {
|
||||
"dependencies" : [
|
||||
"org.graalvm.compiler.lir.jtt",
|
||||
"org.graalvm.compiler.lir.amd64",
|
||||
"JVMCI_HOTSPOT"
|
||||
],
|
||||
"checkstyle" : "org.graalvm.compiler.graph",
|
||||
"javaCompliance" : "1.8",
|
||||
@ -831,6 +889,7 @@ suite = {
|
||||
"sourceDirs" : ["src"],
|
||||
"dependencies" : [
|
||||
"org.graalvm.compiler.lir.jtt",
|
||||
"JVMCI_HOTSPOT"
|
||||
],
|
||||
"checkstyle" : "org.graalvm.compiler.graph",
|
||||
"javaCompliance" : "1.8",
|
||||
@ -908,6 +967,7 @@ suite = {
|
||||
"org.graalvm.compiler.graph.test",
|
||||
"org.graalvm.compiler.printer",
|
||||
"JAVA_ALLOCATION_INSTRUMENTER",
|
||||
"ASM_TREE5",
|
||||
],
|
||||
"annotationProcessors" : ["GRAAL_NODEINFO_PROCESSOR"],
|
||||
"checkstyle" : "org.graalvm.compiler.graph",
|
||||
|
@ -40,7 +40,7 @@ public class Graal {
|
||||
private static final GraalRuntime runtime = initializeRuntime();
|
||||
|
||||
private static GraalRuntime initializeRuntime() {
|
||||
Services.exportJVMCITo(Graal.class);
|
||||
Services.initializeJVMCI();
|
||||
JVMCICompiler compiler = JVMCI.getRuntime().getCompiler();
|
||||
if (compiler instanceof GraalJVMCICompiler) {
|
||||
GraalJVMCICompiler graal = (GraalJVMCICompiler) compiler;
|
||||
|
@ -52,11 +52,6 @@ public final class ModuleAPI {
|
||||
*/
|
||||
public static final ModuleAPI getModule;
|
||||
|
||||
/**
|
||||
* {@code jdk.internal.module.Modules.addExports(Module, String, Module)}.
|
||||
*/
|
||||
public static final ModuleAPI addExports;
|
||||
|
||||
/**
|
||||
* {@code java.lang.Module.getResourceAsStream(String)}.
|
||||
*/
|
||||
@ -116,13 +111,11 @@ public final class ModuleAPI {
|
||||
try {
|
||||
getModule = new ModuleAPI(Class.class.getMethod("getModule"));
|
||||
Class<?> moduleClass = getModule.method.getReturnType();
|
||||
Class<?> modulesClass = Class.forName("jdk.internal.module.Modules");
|
||||
getResourceAsStream = new ModuleAPI(moduleClass.getMethod("getResourceAsStream", String.class));
|
||||
canRead = new ModuleAPI(moduleClass.getMethod("canRead", moduleClass));
|
||||
isExported = new ModuleAPI(moduleClass.getMethod("isExported", String.class));
|
||||
isExportedTo = new ModuleAPI(moduleClass.getMethod("isExported", String.class, moduleClass));
|
||||
addExports = new ModuleAPI(modulesClass.getDeclaredMethod("addExports", moduleClass, String.class, moduleClass));
|
||||
} catch (NoSuchMethodException | SecurityException | ClassNotFoundException e) {
|
||||
} catch (NoSuchMethodException | SecurityException e) {
|
||||
throw new InternalError(e);
|
||||
}
|
||||
} else {
|
||||
@ -132,8 +125,6 @@ public final class ModuleAPI {
|
||||
canRead = unavailable;
|
||||
isExported = unavailable;
|
||||
isExportedTo = unavailable;
|
||||
addExports = unavailable;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ public class CheckGraalInvariants extends GraalTest {
|
||||
MetaAccessProvider metaAccess = providers.getMetaAccess();
|
||||
|
||||
PhaseSuite<HighTierContext> graphBuilderSuite = new PhaseSuite<>();
|
||||
Plugins plugins = new Plugins(new InvocationPlugins(metaAccess));
|
||||
Plugins plugins = new Plugins(new InvocationPlugins());
|
||||
GraphBuilderConfiguration config = GraphBuilderConfiguration.getDefault(plugins).withEagerResolving(true);
|
||||
graphBuilderSuite.appendPhase(new GraphBuilderPhase(config));
|
||||
HighTierContext context = new HighTierContext(providers, graphBuilderSuite, OptimisticOptimizations.NONE);
|
||||
|
@ -26,15 +26,14 @@ import java.lang.invoke.MethodHandle;
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.lang.invoke.MethodType;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import org.graalvm.compiler.code.CompilationResult;
|
||||
import org.graalvm.compiler.test.ExportingClassLoader;
|
||||
import org.junit.Test;
|
||||
import org.objectweb.asm.ClassWriter;
|
||||
import org.objectweb.asm.Label;
|
||||
import org.objectweb.asm.MethodVisitor;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
|
||||
import jdk.internal.org.objectweb.asm.ClassWriter;
|
||||
import jdk.internal.org.objectweb.asm.Label;
|
||||
import jdk.internal.org.objectweb.asm.MethodVisitor;
|
||||
import jdk.internal.org.objectweb.asm.Opcodes;
|
||||
import jdk.vm.ci.code.InstalledCode;
|
||||
import jdk.vm.ci.meta.ResolvedJavaMethod;
|
||||
|
||||
|
@ -44,19 +44,17 @@ import java.util.Objects;
|
||||
import java.util.ServiceLoader;
|
||||
import java.util.Set;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import org.graalvm.compiler.options.OptionDescriptor;
|
||||
import org.graalvm.compiler.options.OptionDescriptors;
|
||||
import org.graalvm.compiler.options.OptionValue;
|
||||
import org.graalvm.compiler.test.GraalTest;
|
||||
|
||||
import jdk.internal.org.objectweb.asm.ClassReader;
|
||||
import jdk.internal.org.objectweb.asm.ClassVisitor;
|
||||
import jdk.internal.org.objectweb.asm.Label;
|
||||
import jdk.internal.org.objectweb.asm.MethodVisitor;
|
||||
import jdk.internal.org.objectweb.asm.Opcodes;
|
||||
import jdk.internal.org.objectweb.asm.Type;
|
||||
import org.junit.Test;
|
||||
import org.objectweb.asm.ClassReader;
|
||||
import org.objectweb.asm.ClassVisitor;
|
||||
import org.objectweb.asm.Label;
|
||||
import org.objectweb.asm.MethodVisitor;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import org.objectweb.asm.Type;
|
||||
|
||||
/**
|
||||
* Verifies a class declaring one or more {@linkplain OptionValue options} has a class initializer
|
||||
|
@ -83,7 +83,7 @@ public class StaticInterfaceFieldTest extends GraalTest {
|
||||
MetaAccessProvider metaAccess = providers.getMetaAccess();
|
||||
|
||||
PhaseSuite<HighTierContext> graphBuilderSuite = new PhaseSuite<>();
|
||||
Plugins plugins = new Plugins(new InvocationPlugins(metaAccess));
|
||||
Plugins plugins = new Plugins(new InvocationPlugins());
|
||||
GraphBuilderConfiguration config = GraphBuilderConfiguration.getDefault(plugins).withEagerResolving(true);
|
||||
graphBuilderSuite.appendPhase(new GraphBuilderPhase(config));
|
||||
HighTierContext context = new HighTierContext(providers, graphBuilderSuite, OptimisticOptimizations.NONE);
|
||||
|
@ -24,10 +24,10 @@ package org.graalvm.compiler.core.test;
|
||||
|
||||
import jdk.vm.ci.code.BailoutException;
|
||||
import jdk.vm.ci.meta.ResolvedJavaMethod;
|
||||
import jdk.internal.org.objectweb.asm.ClassWriter;
|
||||
import jdk.internal.org.objectweb.asm.Label;
|
||||
import jdk.internal.org.objectweb.asm.MethodVisitor;
|
||||
import jdk.internal.org.objectweb.asm.Opcodes;
|
||||
import org.objectweb.asm.ClassWriter;
|
||||
import org.objectweb.asm.Label;
|
||||
import org.objectweb.asm.MethodVisitor;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
|
||||
import static org.graalvm.compiler.core.common.CompilationIdentifier.INVALID_COMPILATION_ID;
|
||||
|
||||
@ -86,7 +86,7 @@ public class UnbalancedMonitorsTest extends GraalCompilerTest implements Opcodes
|
||||
ResolvedJavaMethod method = getResolvedJavaMethod(LOADER.findClass(INNER_CLASS_NAME), name);
|
||||
try {
|
||||
StructuredGraph graph = new StructuredGraph(method, AllowAssumptions.NO, INVALID_COMPILATION_ID);
|
||||
Plugins plugins = new Plugins(new InvocationPlugins(getMetaAccess()));
|
||||
Plugins plugins = new Plugins(new InvocationPlugins());
|
||||
GraphBuilderConfiguration graphBuilderConfig = GraphBuilderConfiguration.getDefault(plugins).withEagerResolving(true);
|
||||
OptimisticOptimizations optimisticOpts = OptimisticOptimizations.NONE;
|
||||
|
||||
|
@ -122,7 +122,7 @@ public class VerifyBailoutUsageTest {
|
||||
Providers providers = rt.getHostBackend().getProviders();
|
||||
MetaAccessProvider metaAccess = providers.getMetaAccess();
|
||||
PhaseSuite<HighTierContext> graphBuilderSuite = new PhaseSuite<>();
|
||||
Plugins plugins = new Plugins(new InvocationPlugins(metaAccess));
|
||||
Plugins plugins = new Plugins(new InvocationPlugins());
|
||||
GraphBuilderConfiguration config = GraphBuilderConfiguration.getDefault(plugins).withEagerResolving(true);
|
||||
graphBuilderSuite.appendPhase(new GraphBuilderPhase(config));
|
||||
HighTierContext context = new HighTierContext(providers, graphBuilderSuite, OptimisticOptimizations.NONE);
|
||||
|
@ -300,7 +300,7 @@ public class VerifyDebugUsageTest {
|
||||
Providers providers = rt.getHostBackend().getProviders();
|
||||
MetaAccessProvider metaAccess = providers.getMetaAccess();
|
||||
PhaseSuite<HighTierContext> graphBuilderSuite = new PhaseSuite<>();
|
||||
Plugins plugins = new Plugins(new InvocationPlugins(metaAccess));
|
||||
Plugins plugins = new Plugins(new InvocationPlugins());
|
||||
GraphBuilderConfiguration config = GraphBuilderConfiguration.getDefault(plugins).withEagerResolving(true);
|
||||
graphBuilderSuite.appendPhase(new GraphBuilderPhase(config));
|
||||
HighTierContext context = new HighTierContext(providers, graphBuilderSuite, OptimisticOptimizations.NONE);
|
||||
|
@ -267,7 +267,7 @@ public class VerifyVirtualizableTest {
|
||||
Providers providers = rt.getHostBackend().getProviders();
|
||||
MetaAccessProvider metaAccess = providers.getMetaAccess();
|
||||
PhaseSuite<HighTierContext> graphBuilderSuite = new PhaseSuite<>();
|
||||
Plugins plugins = new Plugins(new InvocationPlugins(metaAccess));
|
||||
Plugins plugins = new Plugins(new InvocationPlugins());
|
||||
GraphBuilderConfiguration config = GraphBuilderConfiguration.getDefault(plugins).withEagerResolving(true);
|
||||
graphBuilderSuite.appendPhase(new GraphBuilderPhase(config));
|
||||
HighTierContext context = new HighTierContext(providers, graphBuilderSuite, OptimisticOptimizations.NONE);
|
||||
|
@ -249,7 +249,7 @@ public class VerifyMethodMetricsTest {
|
||||
Providers providers = rt.getHostBackend().getProviders();
|
||||
MetaAccessProvider metaAccess = providers.getMetaAccess();
|
||||
PhaseSuite<HighTierContext> graphBuilderSuite = new PhaseSuite<>();
|
||||
Plugins plugins = new Plugins(new InvocationPlugins(metaAccess));
|
||||
Plugins plugins = new Plugins(new InvocationPlugins());
|
||||
GraphBuilderConfiguration config = GraphBuilderConfiguration.getDefault(plugins).withEagerResolving(true);
|
||||
graphBuilderSuite.appendPhase(new GraphBuilderPhase(config));
|
||||
HighTierContext context = new HighTierContext(providers, graphBuilderSuite, OptimisticOptimizations.NONE);
|
||||
|
@ -253,7 +253,7 @@ public class StaticAnalysis {
|
||||
* the code before static analysis, the classes would otherwise be not loaded
|
||||
* yet and the bytecode parser would only create a graph.
|
||||
*/
|
||||
Plugins plugins = new Plugins(new InvocationPlugins(metaAccess));
|
||||
Plugins plugins = new Plugins(new InvocationPlugins());
|
||||
GraphBuilderConfiguration graphBuilderConfig = GraphBuilderConfiguration.getDefault(plugins).withEagerResolving(true);
|
||||
/*
|
||||
* For simplicity, we ignore all exception handling during the static analysis.
|
||||
|
@ -29,15 +29,12 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import org.graalvm.compiler.api.test.Graal;
|
||||
import org.graalvm.compiler.hotspot.GraalHotSpotVMConfig;
|
||||
import org.graalvm.compiler.hotspot.HotSpotGraalRuntimeProvider;
|
||||
@ -45,12 +42,15 @@ import org.graalvm.compiler.hotspot.meta.HotSpotProviders;
|
||||
import org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderConfiguration.Plugins;
|
||||
import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugin;
|
||||
import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins;
|
||||
import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins.Binding;
|
||||
import org.graalvm.compiler.runtime.RuntimeProvider;
|
||||
import org.graalvm.compiler.test.GraalTest;
|
||||
import org.junit.Test;
|
||||
|
||||
import jdk.vm.ci.hotspot.HotSpotVMConfigStore;
|
||||
import jdk.vm.ci.hotspot.VMIntrinsicMethod;
|
||||
import jdk.vm.ci.meta.MetaAccessProvider;
|
||||
import jdk.vm.ci.meta.MetaUtil;
|
||||
import jdk.vm.ci.meta.MethodHandleAccessProvider.IntrinsicMethod;
|
||||
import jdk.vm.ci.meta.ResolvedJavaMethod;
|
||||
|
||||
@ -63,11 +63,10 @@ import jdk.vm.ci.meta.ResolvedJavaMethod;
|
||||
*/
|
||||
public class CheckGraalIntrinsics extends GraalTest {
|
||||
|
||||
public static boolean match(ResolvedJavaMethod method, VMIntrinsicMethod intrinsic) {
|
||||
if (intrinsic.name.equals(method.getName())) {
|
||||
if (intrinsic.descriptor.equals(method.getSignature().toMethodDescriptor())) {
|
||||
String declaringClass = method.getDeclaringClass().toClassName().replace('.', '/');
|
||||
if (declaringClass.equals(intrinsic.declaringClass)) {
|
||||
public static boolean match(String type, Binding binding, VMIntrinsicMethod intrinsic) {
|
||||
if (intrinsic.name.equals(binding.name)) {
|
||||
if (intrinsic.descriptor.startsWith(binding.argumentsDescriptor)) {
|
||||
if (type.equals(intrinsic.declaringClass)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -75,16 +74,20 @@ public class CheckGraalIntrinsics extends GraalTest {
|
||||
return false;
|
||||
}
|
||||
|
||||
private static ResolvedJavaMethod findMethod(Set<ResolvedJavaMethod> methods, VMIntrinsicMethod intrinsic) {
|
||||
for (ResolvedJavaMethod method : methods) {
|
||||
if (match(method, intrinsic)) {
|
||||
return method;
|
||||
public static InvocationPlugin findPlugin(Map<String, List<Binding>> bindings, VMIntrinsicMethod intrinsic) {
|
||||
for (Map.Entry<String, List<Binding>> e : bindings.entrySet()) {
|
||||
// Match format of VMIntrinsicMethod.declaringClass
|
||||
String type = MetaUtil.internalNameToJava(e.getKey(), true, false).replace('.', '/');
|
||||
for (Binding binding : e.getValue()) {
|
||||
if (match(type, binding, intrinsic)) {
|
||||
return binding.plugin;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static ResolvedJavaMethod resolveIntrinsic(MetaAccessProvider metaAccess, VMIntrinsicMethod intrinsic) throws ClassNotFoundException {
|
||||
public static ResolvedJavaMethod resolveIntrinsic(MetaAccessProvider metaAccess, VMIntrinsicMethod intrinsic) throws ClassNotFoundException {
|
||||
Class<?> c = Class.forName(intrinsic.declaringClass.replace('/', '.'), false, CheckGraalIntrinsics.class.getClassLoader());
|
||||
for (Method javaMethod : c.getDeclaredMethods()) {
|
||||
if (javaMethod.getName().equals(intrinsic.name)) {
|
||||
@ -425,28 +428,20 @@ public class CheckGraalIntrinsics extends GraalTest {
|
||||
public void test() throws ClassNotFoundException {
|
||||
HotSpotGraalRuntimeProvider rt = (HotSpotGraalRuntimeProvider) Graal.getRequiredCapability(RuntimeProvider.class);
|
||||
HotSpotProviders providers = rt.getHostBackend().getProviders();
|
||||
Map<ResolvedJavaMethod, Object> impl = new HashMap<>();
|
||||
Plugins graphBuilderPlugins = providers.getGraphBuilderPlugins();
|
||||
InvocationPlugins invocationPlugins = graphBuilderPlugins.getInvocationPlugins();
|
||||
for (ResolvedJavaMethod method : invocationPlugins.getMethods()) {
|
||||
InvocationPlugin plugin = invocationPlugins.lookupInvocation(method);
|
||||
assert plugin != null;
|
||||
impl.put(method, plugin);
|
||||
}
|
||||
|
||||
Set<ResolvedJavaMethod> methods = invocationPlugins.getMethods();
|
||||
HotSpotVMConfigStore store = rt.getVMConfig().getStore();
|
||||
List<VMIntrinsicMethod> intrinsics = store.getIntrinsics();
|
||||
|
||||
List<String> missing = new ArrayList<>();
|
||||
Map<String, List<Binding>> bindings = invocationPlugins.getBindings(true);
|
||||
for (VMIntrinsicMethod intrinsic : intrinsics) {
|
||||
ResolvedJavaMethod method = findMethod(methods, intrinsic);
|
||||
if (method == null) {
|
||||
method = resolveIntrinsic(providers.getMetaAccess(), intrinsic);
|
||||
|
||||
IntrinsicMethod intrinsicMethod = null;
|
||||
InvocationPlugin plugin = findPlugin(bindings, intrinsic);
|
||||
if (plugin == null) {
|
||||
ResolvedJavaMethod method = resolveIntrinsic(providers.getMetaAccess(), intrinsic);
|
||||
if (method != null) {
|
||||
intrinsicMethod = providers.getConstantReflection().getMethodHandleAccess().lookupMethodHandleIntrinsic(method);
|
||||
IntrinsicMethod intrinsicMethod = providers.getConstantReflection().getMethodHandleAccess().lookupMethodHandleIntrinsic(method);
|
||||
if (intrinsicMethod != null) {
|
||||
continue;
|
||||
}
|
||||
|
@ -39,9 +39,9 @@ import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
import jdk.internal.org.objectweb.asm.ClassWriter;
|
||||
import jdk.internal.org.objectweb.asm.MethodVisitor;
|
||||
import jdk.internal.org.objectweb.asm.Opcodes;
|
||||
import org.objectweb.asm.ClassWriter;
|
||||
import org.objectweb.asm.MethodVisitor;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import jdk.vm.ci.meta.ResolvedJavaMethod;
|
||||
|
||||
public class ConstantPoolSubstitutionsTests extends GraalCompilerTest implements Opcodes {
|
||||
|
@ -22,13 +22,12 @@
|
||||
*/
|
||||
package org.graalvm.compiler.hotspot.test;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import static org.graalvm.compiler.core.common.CompilationIdentifier.INVALID_COMPILATION_ID;
|
||||
|
||||
import org.junit.Test;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.graalvm.compiler.api.test.Graal;
|
||||
import org.graalvm.compiler.core.common.CompilationIdentifier;
|
||||
import org.graalvm.compiler.core.test.GraalCompilerTest;
|
||||
import org.graalvm.compiler.hotspot.HotSpotGraalCompiler;
|
||||
import org.graalvm.compiler.hotspot.HotSpotGraalRuntimeProvider;
|
||||
@ -37,8 +36,10 @@ import org.graalvm.compiler.nodes.StructuredGraph;
|
||||
import org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderConfiguration.Plugins;
|
||||
import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugin;
|
||||
import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins;
|
||||
import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins.Binding;
|
||||
import org.graalvm.compiler.nodes.graphbuilderconf.MethodSubstitutionPlugin;
|
||||
import org.graalvm.compiler.runtime.RuntimeProvider;
|
||||
import org.junit.Test;
|
||||
|
||||
import jdk.vm.ci.hotspot.HotSpotVMConfigStore;
|
||||
import jdk.vm.ci.hotspot.VMIntrinsicMethod;
|
||||
@ -50,48 +51,29 @@ import jdk.vm.ci.runtime.JVMCI;
|
||||
*/
|
||||
public class TestIntrinsicCompiles extends GraalCompilerTest {
|
||||
|
||||
private static boolean match(ResolvedJavaMethod method, VMIntrinsicMethod intrinsic) {
|
||||
if (intrinsic.name.equals(method.getName())) {
|
||||
if (intrinsic.descriptor.equals(method.getSignature().toMethodDescriptor())) {
|
||||
String declaringClass = method.getDeclaringClass().toClassName().replace('.', '/');
|
||||
if (declaringClass.equals(intrinsic.declaringClass)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static ResolvedJavaMethod findMethod(Set<ResolvedJavaMethod> methods, VMIntrinsicMethod intrinsic) {
|
||||
for (ResolvedJavaMethod method : methods) {
|
||||
if (match(method, intrinsic)) {
|
||||
return method;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("try")
|
||||
public void test() {
|
||||
public void test() throws ClassNotFoundException {
|
||||
HotSpotGraalCompiler compiler = (HotSpotGraalCompiler) JVMCI.getRuntime().getCompiler();
|
||||
HotSpotGraalRuntimeProvider rt = (HotSpotGraalRuntimeProvider) Graal.getRequiredCapability(RuntimeProvider.class);
|
||||
HotSpotProviders providers = rt.getHostBackend().getProviders();
|
||||
Plugins graphBuilderPlugins = providers.getGraphBuilderPlugins();
|
||||
InvocationPlugins invocationPlugins = graphBuilderPlugins.getInvocationPlugins();
|
||||
|
||||
Set<ResolvedJavaMethod> pluginMethods = invocationPlugins.getMethods();
|
||||
Map<String, List<Binding>> bindings = invocationPlugins.getBindings(true);
|
||||
HotSpotVMConfigStore store = rt.getVMConfig().getStore();
|
||||
List<VMIntrinsicMethod> intrinsics = store.getIntrinsics();
|
||||
for (VMIntrinsicMethod intrinsic : intrinsics) {
|
||||
ResolvedJavaMethod method = findMethod(pluginMethods, intrinsic);
|
||||
if (method != null) {
|
||||
InvocationPlugin plugin = invocationPlugins.lookupInvocation(method);
|
||||
if (plugin instanceof MethodSubstitutionPlugin && !method.isNative()) {
|
||||
StructuredGraph graph = compiler.getIntrinsicGraph(method, providers, CompilationIdentifier.INVALID_COMPILATION_ID);
|
||||
InvocationPlugin plugin = CheckGraalIntrinsics.findPlugin(bindings, intrinsic);
|
||||
if (plugin != null) {
|
||||
if (plugin instanceof MethodSubstitutionPlugin) {
|
||||
ResolvedJavaMethod method = CheckGraalIntrinsics.resolveIntrinsic(getMetaAccess(), intrinsic);
|
||||
if (!method.isNative()) {
|
||||
StructuredGraph graph = compiler.getIntrinsicGraph(method, providers, INVALID_COMPILATION_ID);
|
||||
getCode(method, graph);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -102,7 +102,6 @@ import jdk.vm.ci.meta.ConstantPool;
|
||||
import jdk.vm.ci.meta.MetaAccessProvider;
|
||||
import jdk.vm.ci.runtime.JVMCI;
|
||||
import jdk.vm.ci.runtime.JVMCICompiler;
|
||||
import jdk.vm.ci.services.Services;
|
||||
|
||||
/**
|
||||
* This class implements compile-the-world functionality with JVMCI.
|
||||
@ -785,7 +784,6 @@ public final class CompileTheWorld {
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Throwable {
|
||||
Services.exportJVMCITo(CompileTheWorld.class);
|
||||
HotSpotGraalCompiler compiler = (HotSpotGraalCompiler) HotSpotJVMCIRuntime.runtime().getCompiler();
|
||||
compiler.compileTheWorld();
|
||||
}
|
||||
|
@ -22,21 +22,19 @@
|
||||
*/
|
||||
package org.graalvm.compiler.hotspot;
|
||||
|
||||
import static org.graalvm.compiler.core.common.util.Util.Java8OrEarlier;
|
||||
import static org.graalvm.compiler.options.OptionValue.PROFILE_OPTIONVALUE_PROPERTY_NAME;
|
||||
import static jdk.vm.ci.common.InitTimer.timer;
|
||||
import static org.graalvm.compiler.options.OptionValue.PROFILE_OPTIONVALUE_PROPERTY_NAME;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Properties;
|
||||
import java.util.ServiceLoader;
|
||||
|
||||
import org.graalvm.compiler.debug.GraalError;
|
||||
import org.graalvm.compiler.debug.MethodFilter;
|
||||
import org.graalvm.compiler.options.Option;
|
||||
import org.graalvm.compiler.options.OptionDescriptors;
|
||||
@ -46,10 +44,11 @@ import org.graalvm.compiler.options.OptionsParser;
|
||||
import org.graalvm.compiler.phases.tiers.CompilerConfiguration;
|
||||
|
||||
import jdk.vm.ci.common.InitTimer;
|
||||
import jdk.vm.ci.hotspot.HotSpotJVMCICompilerFactory;
|
||||
import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime;
|
||||
import jdk.vm.ci.hotspot.HotSpotSignature;
|
||||
import jdk.vm.ci.hotspot.HotSpotJVMCICompilerFactory;
|
||||
import jdk.vm.ci.runtime.JVMCIRuntime;
|
||||
import jdk.vm.ci.services.Services;
|
||||
|
||||
public final class HotSpotGraalCompilerFactory extends HotSpotJVMCICompilerFactory {
|
||||
|
||||
@ -135,8 +134,8 @@ public final class HotSpotGraalCompilerFactory extends HotSpotJVMCICompilerFacto
|
||||
if (allOptionsSettings == null) {
|
||||
try (InitTimer t = timer("InitializeOptions")) {
|
||||
ServiceLoader<OptionDescriptors> loader = ServiceLoader.load(OptionDescriptors.class, OptionDescriptors.class.getClassLoader());
|
||||
Properties savedProps = getSavedProperties(Java8OrEarlier);
|
||||
String optionsFile = savedProps.getProperty(GRAAL_OPTIONS_FILE_PROPERTY_NAME);
|
||||
Map<String, String> savedProps = Services.getSavedProperties();
|
||||
String optionsFile = savedProps.get(GRAAL_OPTIONS_FILE_PROPERTY_NAME);
|
||||
|
||||
if (optionsFile != null) {
|
||||
File graalOptions = new File(optionsFile);
|
||||
@ -165,15 +164,15 @@ public final class HotSpotGraalCompilerFactory extends HotSpotJVMCICompilerFacto
|
||||
}
|
||||
|
||||
Map<String, String> optionSettings = new HashMap<>();
|
||||
for (Map.Entry<Object, Object> e : savedProps.entrySet()) {
|
||||
String name = (String) e.getKey();
|
||||
for (Entry<String, String> e : savedProps.entrySet()) {
|
||||
String name = e.getKey();
|
||||
if (name.startsWith(GRAAL_OPTION_PROPERTY_PREFIX)) {
|
||||
if (name.equals("graal.PrintFlags") || name.equals("graal.ShowFlags")) {
|
||||
System.err.println("The " + name + " option has been removed and will be ignored. Use -XX:+JVMCIPrintProperties instead.");
|
||||
} else if (name.equals(GRAAL_OPTIONS_FILE_PROPERTY_NAME) || name.equals(GRAAL_VERSION_PROPERTY_NAME) || name.equals(PROFILE_OPTIONVALUE_PROPERTY_NAME)) {
|
||||
// Ignore well known properties that do not denote an option
|
||||
} else {
|
||||
String value = (String) e.getValue();
|
||||
String value = e.getValue();
|
||||
optionSettings.put(name.substring(GRAAL_OPTION_PROPERTY_PREFIX.length()), value);
|
||||
}
|
||||
}
|
||||
@ -206,18 +205,6 @@ public final class HotSpotGraalCompilerFactory extends HotSpotJVMCICompilerFacto
|
||||
}
|
||||
}
|
||||
|
||||
private static Properties getSavedProperties(boolean jdk8OrEarlier) {
|
||||
try {
|
||||
String vmClassName = jdk8OrEarlier ? "sun.misc.VM" : "jdk.internal.misc.VM";
|
||||
Class<?> vmClass = Class.forName(vmClassName);
|
||||
Field savedPropsField = vmClass.getDeclaredField("savedProps");
|
||||
savedPropsField.setAccessible(true);
|
||||
return (Properties) savedPropsField.get(null);
|
||||
} catch (Exception e) {
|
||||
throw new GraalError(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public HotSpotGraalCompiler createCompiler(JVMCIRuntime runtime) {
|
||||
HotSpotGraalCompiler compiler = createCompiler(runtime, CompilerConfigurationFactory.selectFactory(null));
|
||||
|
@ -22,10 +22,6 @@
|
||||
*/
|
||||
package org.graalvm.compiler.hotspot;
|
||||
|
||||
import static org.graalvm.compiler.core.common.util.ModuleAPI.addExports;
|
||||
import static org.graalvm.compiler.core.common.util.ModuleAPI.getModule;
|
||||
import static org.graalvm.compiler.core.common.util.Util.JAVA_SPECIFICATION_VERSION;
|
||||
|
||||
import org.graalvm.compiler.serviceprovider.ServiceProvider;
|
||||
|
||||
import jdk.vm.ci.hotspot.HotSpotVMEventListener;
|
||||
@ -35,43 +31,45 @@ import jdk.vm.ci.services.JVMCIServiceLocator;
|
||||
@ServiceProvider(JVMCIServiceLocator.class)
|
||||
public final class HotSpotGraalJVMCIServiceLocator extends JVMCIServiceLocator {
|
||||
|
||||
private boolean exportsAdded;
|
||||
|
||||
/**
|
||||
* Dynamically exports various internal JDK packages to the Graal module. This requires only
|
||||
* {@code --add-exports=java.base/jdk.internal.module=org.graalvm.compiler.graal_core} on the VM
|
||||
* command line instead of a {@code --add-exports} instance for each JDK internal package used
|
||||
* by Graal.
|
||||
* Holds the state shared between all {@link HotSpotGraalJVMCIServiceLocator} instances. This is
|
||||
* necessary as a service provider instance is created each time the service is loaded.
|
||||
*/
|
||||
private void addExports() {
|
||||
if (JAVA_SPECIFICATION_VERSION >= 9 && !exportsAdded) {
|
||||
Object javaBaseModule = getModule.invoke(String.class);
|
||||
Object graalModule = getModule.invoke(getClass());
|
||||
addExports.invokeStatic(javaBaseModule, "jdk.internal.misc", graalModule);
|
||||
addExports.invokeStatic(javaBaseModule, "jdk.internal.jimage", graalModule);
|
||||
addExports.invokeStatic(javaBaseModule, "com.sun.crypto.provider", graalModule);
|
||||
exportsAdded = true;
|
||||
}
|
||||
}
|
||||
private static final class Shared {
|
||||
static final Shared SINGLETON = new Shared();
|
||||
|
||||
private HotSpotGraalRuntime graalRuntime;
|
||||
|
||||
@Override
|
||||
public <T> T getProvider(Class<T> service) {
|
||||
<T> T getProvider(Class<T> service, HotSpotGraalJVMCIServiceLocator locator) {
|
||||
if (service == JVMCICompilerFactory.class) {
|
||||
addExports();
|
||||
return service.cast(new HotSpotGraalCompilerFactory(this));
|
||||
return service.cast(new HotSpotGraalCompilerFactory(locator));
|
||||
} else if (service == HotSpotVMEventListener.class) {
|
||||
if (graalRuntime != null) {
|
||||
addExports();
|
||||
return service.cast(new HotSpotGraalVMEventListener(graalRuntime));
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void onCompilerCreation(HotSpotGraalCompiler compiler) {
|
||||
private HotSpotGraalRuntime graalRuntime;
|
||||
|
||||
/**
|
||||
* Notifies this object of the compiler created via {@link HotSpotGraalJVMCIServiceLocator}.
|
||||
*/
|
||||
void onCompilerCreation(HotSpotGraalCompiler compiler) {
|
||||
assert this.graalRuntime == null : "only expect a single JVMCICompiler to be created";
|
||||
this.graalRuntime = (HotSpotGraalRuntime) compiler.getGraalRuntime();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T getProvider(Class<T> service) {
|
||||
return Shared.SINGLETON.getProvider(service, this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Notifies this object of the compiler created via {@link HotSpotGraalJVMCIServiceLocator}.
|
||||
*/
|
||||
@SuppressWarnings("static-method")
|
||||
void onCompilerCreation(HotSpotGraalCompiler compiler) {
|
||||
Shared.SINGLETON.onCompilerCreation(compiler);
|
||||
}
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ public class HotSpotGraphBuilderPlugins {
|
||||
*/
|
||||
public static Plugins create(GraalHotSpotVMConfig config, HotSpotWordTypes wordTypes, MetaAccessProvider metaAccess, ConstantReflectionProvider constantReflection,
|
||||
SnippetReflectionProvider snippetReflection, ForeignCallsProvider foreignCalls, StampProvider stampProvider, ReplacementsImpl replacements) {
|
||||
InvocationPlugins invocationPlugins = new HotSpotInvocationPlugins(config, metaAccess);
|
||||
InvocationPlugins invocationPlugins = new HotSpotInvocationPlugins(config);
|
||||
|
||||
Plugins plugins = new Plugins(invocationPlugins);
|
||||
NodeIntrinsificationProvider nodeIntrinsificationProvider = new NodeIntrinsificationProvider(metaAccess, snippetReflection, foreignCalls, wordTypes);
|
||||
|
@ -38,7 +38,6 @@ import org.graalvm.compiler.nodes.type.StampTool;
|
||||
import org.graalvm.compiler.replacements.nodes.MacroNode;
|
||||
|
||||
import jdk.vm.ci.meta.JavaKind;
|
||||
import jdk.vm.ci.meta.MetaAccessProvider;
|
||||
import jdk.vm.ci.meta.ResolvedJavaType;
|
||||
|
||||
/**
|
||||
@ -47,8 +46,7 @@ import jdk.vm.ci.meta.ResolvedJavaType;
|
||||
final class HotSpotInvocationPlugins extends InvocationPlugins {
|
||||
final GraalHotSpotVMConfig config;
|
||||
|
||||
HotSpotInvocationPlugins(GraalHotSpotVMConfig config, MetaAccessProvider metaAccess) {
|
||||
super(metaAccess);
|
||||
HotSpotInvocationPlugins(GraalHotSpotVMConfig config) {
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
|
@ -29,8 +29,6 @@ import static org.graalvm.compiler.nodes.extended.BranchProbabilityNode.VERY_SLO
|
||||
import static org.graalvm.compiler.nodes.extended.BranchProbabilityNode.probability;
|
||||
import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider.getArrayBaseOffset;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import org.graalvm.compiler.api.replacements.ClassSubstitution;
|
||||
import org.graalvm.compiler.api.replacements.MethodSubstitution;
|
||||
import org.graalvm.compiler.core.common.LocationIdentity;
|
||||
@ -61,7 +59,7 @@ public class AESCryptSubstitutions {
|
||||
static final long kOffset;
|
||||
static final long lastKeyOffset;
|
||||
static final Class<?> AESCryptClass;
|
||||
static final int AES_BLOCK_SIZE;
|
||||
static final int AES_BLOCK_SIZE_IN_BYTES;
|
||||
|
||||
static {
|
||||
try {
|
||||
@ -72,9 +70,9 @@ public class AESCryptSubstitutions {
|
||||
AESCryptClass = Class.forName("com.sun.crypto.provider.AESCrypt", true, cl);
|
||||
kOffset = UnsafeAccess.UNSAFE.objectFieldOffset(AESCryptClass.getDeclaredField("K"));
|
||||
lastKeyOffset = UnsafeAccess.UNSAFE.objectFieldOffset(AESCryptClass.getDeclaredField("lastKey"));
|
||||
Field aesBlockSizeField = Class.forName("com.sun.crypto.provider.AESConstants", true, cl).getDeclaredField("AES_BLOCK_SIZE");
|
||||
aesBlockSizeField.setAccessible(true);
|
||||
AES_BLOCK_SIZE = aesBlockSizeField.getInt(null);
|
||||
// Thankfully the AES block size is a constant (128 bits) and so we don't need to
|
||||
// reflect on com.sun.crypto.provider.AESConstants.AES_BLOCK_SIZE.
|
||||
AES_BLOCK_SIZE_IN_BYTES = 16;
|
||||
} catch (Exception ex) {
|
||||
throw new GraalError(ex);
|
||||
}
|
||||
@ -141,7 +139,7 @@ public class AESCryptSubstitutions {
|
||||
* Perform null and array bounds checks for arguments to a cipher operation.
|
||||
*/
|
||||
static void checkArgs(byte[] in, int inOffset, byte[] out, int outOffset) {
|
||||
if (probability(VERY_SLOW_PATH_PROBABILITY, inOffset < 0 || in.length - AES_BLOCK_SIZE < inOffset || outOffset < 0 || out.length - AES_BLOCK_SIZE < outOffset)) {
|
||||
if (probability(VERY_SLOW_PATH_PROBABILITY, inOffset < 0 || in.length - AES_BLOCK_SIZE_IN_BYTES < inOffset || outOffset < 0 || out.length - AES_BLOCK_SIZE_IN_BYTES < outOffset)) {
|
||||
DeoptimizeNode.deopt(DeoptimizationAction.None, DeoptimizationReason.RuntimeConstraint);
|
||||
}
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ public class CRC32Substitutions {
|
||||
return config.crcTableAddress;
|
||||
}
|
||||
|
||||
@MethodSubstitution
|
||||
@MethodSubstitution(optional = true)
|
||||
static int update(int crc, int b) {
|
||||
final long crcTableRawAddress = GraalHotSpotVMConfigNode.crcTableAddress();
|
||||
|
||||
@ -69,7 +69,7 @@ public class CRC32Substitutions {
|
||||
return ~result;
|
||||
}
|
||||
|
||||
@MethodSubstitution
|
||||
@MethodSubstitution(optional = true)
|
||||
static int updateBytes(int crc, byte[] buf, int off, int len) {
|
||||
Word bufAddr = Word.unsigned(ComputeObjectAddressNode.get(buf, arrayBaseOffset(JavaKind.Byte) + off));
|
||||
return updateBytesCRC32(UPDATE_BYTES_CRC32, crc, bufAddr, len);
|
||||
@ -84,7 +84,7 @@ public class CRC32Substitutions {
|
||||
return updateBytesCRC32(UPDATE_BYTES_CRC32, crc, bufAddr, len);
|
||||
}
|
||||
|
||||
@MethodSubstitution
|
||||
@MethodSubstitution(optional = true)
|
||||
static int updateByteBuffer(int crc, long addr, int off, int len) {
|
||||
Word bufAddr = Word.unsigned(addr).add(off);
|
||||
return updateBytesCRC32(UPDATE_BYTES_CRC32, crc, bufAddr, len);
|
||||
|
@ -45,7 +45,7 @@ import org.graalvm.compiler.word.Word;
|
||||
@ClassSubstitution(Thread.class)
|
||||
public class ThreadSubstitutions {
|
||||
|
||||
@MethodSubstitution(isStatic = false)
|
||||
@MethodSubstitution(isStatic = false, optional = true)
|
||||
public static boolean isInterrupted(final Thread thisObject, boolean clearInterrupted) {
|
||||
Word javaThread = CurrentJavaThreadNode.get();
|
||||
Object thread = javaThread.readObject(threadObjectOffset(INJECTED_VMCONFIG), JAVA_THREAD_THREAD_OBJECT_LOCATION);
|
||||
|
@ -40,8 +40,7 @@ public interface InvocationPlugin extends GraphBuilderPlugin {
|
||||
|
||||
/**
|
||||
* The receiver in a non-static method. The class literal for this interface must be used with
|
||||
* {@link InvocationPlugins#put(InvocationPlugin, boolean, boolean, boolean, Class, String, Class...)}
|
||||
* to denote the receiver argument for such a non-static method.
|
||||
* {@link InvocationPlugins#put} to denote the receiver argument for such a non-static method.
|
||||
*/
|
||||
public interface Receiver {
|
||||
/**
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -69,8 +69,7 @@ interface GraphPrinter extends Closeable {
|
||||
void close();
|
||||
|
||||
/**
|
||||
* A JVMCI package {@linkplain Services#exportJVMCITo(Class) dynamically exported} to trusted
|
||||
* modules.
|
||||
* A JVMCI package dynamically exported to trusted modules.
|
||||
*/
|
||||
String JVMCI_RUNTIME_PACKAGE = JVMCI.class.getPackage().getName();
|
||||
|
||||
|
@ -30,10 +30,10 @@ import org.graalvm.compiler.test.ExportingClassLoader;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import jdk.internal.org.objectweb.asm.ClassWriter;
|
||||
import jdk.internal.org.objectweb.asm.Label;
|
||||
import jdk.internal.org.objectweb.asm.MethodVisitor;
|
||||
import jdk.internal.org.objectweb.asm.Opcodes;
|
||||
import org.objectweb.asm.ClassWriter;
|
||||
import org.objectweb.asm.Label;
|
||||
import org.objectweb.asm.MethodVisitor;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import jdk.vm.ci.meta.ResolvedJavaMethod;
|
||||
|
||||
/**
|
||||
|
@ -22,9 +22,17 @@
|
||||
*/
|
||||
package org.graalvm.compiler.serviceprovider;
|
||||
|
||||
import static org.graalvm.compiler.serviceprovider.JDK9Method.Java8OrEarlier;
|
||||
import static org.graalvm.compiler.serviceprovider.JDK9Method.addOpens;
|
||||
import static org.graalvm.compiler.serviceprovider.JDK9Method.getModule;
|
||||
import static org.graalvm.compiler.serviceprovider.JDK9Method.getPackages;
|
||||
import static org.graalvm.compiler.serviceprovider.JDK9Method.isOpenTo;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Iterator;
|
||||
import java.util.ServiceConfigurationError;
|
||||
import java.util.ServiceLoader;
|
||||
import java.util.Set;
|
||||
|
||||
import jdk.vm.ci.services.JVMCIPermission;
|
||||
import jdk.vm.ci.services.Services;
|
||||
@ -32,14 +40,32 @@ import jdk.vm.ci.services.Services;
|
||||
/**
|
||||
* A mechanism for accessing service providers that abstracts over whether Graal is running on
|
||||
* JVMCI-8 or JVMCI-9. In JVMCI-8, a JVMCI specific mechanism is used to lookup services via the
|
||||
* hidden JVMCI class loader. in JVMCI-9, the standard {@link ServiceLoader} mechanism is used.
|
||||
* hidden JVMCI class loader. In JVMCI-9, the standard {@link ServiceLoader} mechanism is used.
|
||||
*/
|
||||
public final class GraalServices {
|
||||
|
||||
private GraalServices() {
|
||||
}
|
||||
|
||||
public static final boolean Java8OrEarlier = System.getProperty("java.specification.version").compareTo("1.9") < 0;
|
||||
/**
|
||||
* Opens all JVMCI packages to the module of a given class. This relies on JVMCI already having
|
||||
* opened all its packages to the module defining {@link GraalServices}.
|
||||
*
|
||||
* @param other all JVMCI packages will be opened to the module defining this class
|
||||
*/
|
||||
public static void openJVMCITo(Class<?> other) {
|
||||
Object jvmci = getModule.invoke(Services.class);
|
||||
Object otherModule = getModule.invoke(other);
|
||||
if (jvmci != otherModule) {
|
||||
Set<String> packages = getPackages.invoke(jvmci);
|
||||
for (String pkg : packages) {
|
||||
boolean opened = isOpenTo.invoke(jvmci, pkg, otherModule);
|
||||
if (!opened) {
|
||||
addOpens.invoke(jvmci, pkg, otherModule);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an {@link Iterable} of the providers available for a given service.
|
||||
@ -50,9 +76,9 @@ public final class GraalServices {
|
||||
public static <S> Iterable<S> load(Class<S> service) {
|
||||
assert !service.getName().startsWith("jdk.vm.ci") : "JVMCI services must be loaded via " + Services.class.getName();
|
||||
if (Java8OrEarlier) {
|
||||
return Services.load(service);
|
||||
return load8(service);
|
||||
}
|
||||
ServiceLoader<S> iterable = ServiceLoader.load(service);
|
||||
Iterable<S> iterable = ServiceLoader.load(service);
|
||||
return new Iterable<S>() {
|
||||
@Override
|
||||
public Iterator<S> iterator() {
|
||||
@ -66,8 +92,8 @@ public final class GraalServices {
|
||||
@Override
|
||||
public S next() {
|
||||
S provider = iterator.next();
|
||||
// Allow Graal extensions to access JVMCI assuming they have JVMCIPermission
|
||||
Services.exportJVMCITo(provider.getClass());
|
||||
// Allow Graal extensions to access JVMCI
|
||||
openJVMCITo(provider.getClass());
|
||||
return provider;
|
||||
}
|
||||
|
||||
@ -80,6 +106,23 @@ public final class GraalServices {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* {@code Services.load(Class)} is only defined in JVMCI-8.
|
||||
*/
|
||||
private static volatile Method loadMethod;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private static <S> Iterable<S> load8(Class<S> service) throws InternalError {
|
||||
try {
|
||||
if (loadMethod == null) {
|
||||
loadMethod = Services.class.getMethod("load", Class.class);
|
||||
}
|
||||
return (Iterable<S>) loadMethod.invoke(null, service);
|
||||
} catch (Exception e) {
|
||||
throw new InternalError(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the provider for a given service for which at most one provider must be available.
|
||||
*
|
||||
@ -92,16 +135,14 @@ public final class GraalServices {
|
||||
*/
|
||||
public static <S> S loadSingle(Class<S> service, boolean required) {
|
||||
assert !service.getName().startsWith("jdk.vm.ci") : "JVMCI services must be loaded via " + Services.class.getName();
|
||||
if (Java8OrEarlier) {
|
||||
return Services.loadSingle(service, required);
|
||||
}
|
||||
Iterable<S> providers = ServiceLoader.load(service);
|
||||
Iterable<S> providers = load(service);
|
||||
S singleProvider = null;
|
||||
try {
|
||||
for (Iterator<S> it = providers.iterator(); it.hasNext();) {
|
||||
singleProvider = it.next();
|
||||
if (it.hasNext()) {
|
||||
throw new InternalError(String.format("Multiple %s providers found", service.getName()));
|
||||
S other = it.next();
|
||||
throw new InternalError(String.format("Multiple %s providers found: %s, %s", service.getName(), singleProvider.getClass().getName(), other.getClass().getName()));
|
||||
}
|
||||
}
|
||||
} catch (ServiceConfigurationError e) {
|
||||
@ -111,9 +152,6 @@ public final class GraalServices {
|
||||
if (required) {
|
||||
throw new InternalError(String.format("No provider for %s found", service.getName()));
|
||||
}
|
||||
} else {
|
||||
// Allow Graal extensions to access JVMCI assuming they have JVMCIPermission
|
||||
Services.exportJVMCITo(singleProvider.getClass());
|
||||
}
|
||||
return singleProvider;
|
||||
}
|
||||
|
@ -0,0 +1,148 @@
|
||||
/*
|
||||
* Copyright (c) 2016, 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.
|
||||
*/
|
||||
package org.graalvm.compiler.serviceprovider;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Modifier;
|
||||
|
||||
/**
|
||||
* Reflection based access to API introduced by JDK 9. This allows the API to be used in code that
|
||||
* must be compiled on a JDK prior to 9.
|
||||
*/
|
||||
public final class JDK9Method {
|
||||
|
||||
private static int getJavaSpecificationVersion() {
|
||||
String value = System.getProperty("java.specification.version");
|
||||
if (value.startsWith("1.")) {
|
||||
value = value.substring(2);
|
||||
}
|
||||
return Integer.parseInt(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* The integer value corresponding to the value of the {@code java.specification.version} system
|
||||
* property after any leading {@code "1."} has been stripped.
|
||||
*/
|
||||
public static final int JAVA_SPECIFICATION_VERSION = getJavaSpecificationVersion();
|
||||
|
||||
public JDK9Method(Class<?> declaringClass, String name, Class<?>... parameterTypes) {
|
||||
try {
|
||||
this.method = declaringClass.getMethod(name, parameterTypes);
|
||||
} catch (Exception e) {
|
||||
throw new InternalError(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if the Java runtime is version 8 or earlier.
|
||||
*/
|
||||
public static final boolean Java8OrEarlier = JAVA_SPECIFICATION_VERSION <= 8;
|
||||
|
||||
public final Method method;
|
||||
|
||||
public Class<?> getReturnType() {
|
||||
return method.getReturnType();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@code Class.getModule()}.
|
||||
*/
|
||||
public static final JDK9Method getModule;
|
||||
|
||||
/**
|
||||
* {@code java.lang.Module.getPackages()}.
|
||||
*/
|
||||
public static final JDK9Method getPackages;
|
||||
|
||||
/**
|
||||
* {@code java.lang.Module.getResourceAsStream(String)}.
|
||||
*/
|
||||
public static final JDK9Method getResourceAsStream;
|
||||
|
||||
/**
|
||||
* {@code java.lang.Module.addOpens(String, Module)}.
|
||||
*/
|
||||
public static final JDK9Method addOpens;
|
||||
|
||||
/**
|
||||
* {@code java.lang.Module.isOpen(String, Module)}.
|
||||
*/
|
||||
public static final JDK9Method isOpenTo;
|
||||
|
||||
/**
|
||||
* Invokes the static Module API method represented by this object.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T invokeStatic(Object... args) {
|
||||
checkAvailability();
|
||||
assert Modifier.isStatic(method.getModifiers());
|
||||
try {
|
||||
return (T) method.invoke(null, args);
|
||||
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
|
||||
throw new InternalError(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Invokes the non-static Module API method represented by this object.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T invoke(Object receiver, Object... args) {
|
||||
checkAvailability();
|
||||
assert !Modifier.isStatic(method.getModifiers());
|
||||
try {
|
||||
return (T) method.invoke(receiver, args);
|
||||
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
|
||||
throw new InternalError(e);
|
||||
}
|
||||
}
|
||||
|
||||
private void checkAvailability() throws InternalError {
|
||||
if (method == null) {
|
||||
throw new InternalError("Cannot use Module API on JDK " + JAVA_SPECIFICATION_VERSION);
|
||||
}
|
||||
}
|
||||
|
||||
static {
|
||||
if (JAVA_SPECIFICATION_VERSION >= 9) {
|
||||
getModule = new JDK9Method(Class.class, "getModule");
|
||||
Class<?> moduleClass = getModule.getReturnType();
|
||||
getPackages = new JDK9Method(moduleClass, "getPackages");
|
||||
addOpens = new JDK9Method(moduleClass, "addOpens", String.class, moduleClass);
|
||||
getResourceAsStream = new JDK9Method(moduleClass, "getResourceAsStream", String.class);
|
||||
isOpenTo = new JDK9Method(moduleClass, "isOpen", String.class, moduleClass);
|
||||
} else {
|
||||
JDK9Method unavailable = new JDK9Method();
|
||||
getModule = unavailable;
|
||||
getPackages = unavailable;
|
||||
addOpens = unavailable;
|
||||
getResourceAsStream = unavailable;
|
||||
isOpenTo = unavailable;
|
||||
}
|
||||
}
|
||||
|
||||
private JDK9Method() {
|
||||
method = null;
|
||||
}
|
||||
}
|
@ -96,6 +96,7 @@ public class JLModule {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Set<String> getPackages() {
|
||||
try {
|
||||
return (Set<String>) getPackagesMethod.invoke(realModule);
|
||||
|
@ -58,6 +58,7 @@ class CodeStub: public CompilationResourceObj {
|
||||
virtual bool is_exception_throw_stub() const { return false; }
|
||||
virtual bool is_range_check_stub() const { return false; }
|
||||
virtual bool is_divbyzero_stub() const { return false; }
|
||||
virtual bool is_simple_exception_stub() const { return false; }
|
||||
#ifndef PRODUCT
|
||||
virtual void print_name(outputStream* out) const = 0;
|
||||
#endif
|
||||
@ -483,6 +484,7 @@ class SimpleExceptionStub: public CodeStub {
|
||||
virtual void emit_code(LIR_Assembler* e);
|
||||
virtual CodeEmitInfo* info() const { return _info; }
|
||||
virtual bool is_exception_throw_stub() const { return true; }
|
||||
virtual bool is_simple_exception_stub() const { return true; }
|
||||
virtual void visit(LIR_OpVisitState* visitor) {
|
||||
if (_obj->is_valid()) visitor->do_input(_obj);
|
||||
visitor->do_slow_case(_info);
|
||||
|
@ -1829,6 +1829,20 @@ void GraphBuilder::invoke(Bytecodes::Code code) {
|
||||
log->identify(target),
|
||||
Bytecodes::name(code));
|
||||
|
||||
// invoke-special-super
|
||||
if (bc_raw == Bytecodes::_invokespecial && !target->is_object_initializer()) {
|
||||
ciInstanceKlass* sender_klass =
|
||||
calling_klass->is_anonymous() ? calling_klass->host_klass() :
|
||||
calling_klass;
|
||||
if (sender_klass->is_interface()) {
|
||||
int index = state()->stack_size() - (target->arg_size_no_receiver() + 1);
|
||||
Value receiver = state()->stack_at(index);
|
||||
CheckCast* c = new CheckCast(sender_klass, receiver, copy_state_before());
|
||||
c->set_invokespecial_receiver_check();
|
||||
state()->stack_at_put(index, append_split(c));
|
||||
}
|
||||
}
|
||||
|
||||
// Some methods are obviously bindable without any type checks so
|
||||
// convert them directly to an invokespecial or invokestatic.
|
||||
if (target->is_loaded() && !target->is_abstract() && target->can_be_statically_bound()) {
|
||||
|
@ -372,6 +372,7 @@ class Instruction: public CompilationResourceObj {
|
||||
UnorderedIsTrueFlag,
|
||||
NeedsPatchingFlag,
|
||||
ThrowIncompatibleClassChangeErrorFlag,
|
||||
InvokeSpecialReceiverCheckFlag,
|
||||
ProfileMDOFlag,
|
||||
IsLinkedInBlockFlag,
|
||||
NeedsRangeCheckFlag,
|
||||
@ -1454,6 +1455,16 @@ LEAF(CheckCast, TypeCheck)
|
||||
bool is_incompatible_class_change_check() const {
|
||||
return check_flag(ThrowIncompatibleClassChangeErrorFlag);
|
||||
}
|
||||
void set_invokespecial_receiver_check() {
|
||||
set_flag(InvokeSpecialReceiverCheckFlag, true);
|
||||
}
|
||||
bool is_invokespecial_receiver_check() const {
|
||||
return check_flag(InvokeSpecialReceiverCheckFlag);
|
||||
}
|
||||
|
||||
virtual bool needs_exception_state() const {
|
||||
return !is_invokespecial_receiver_check();
|
||||
}
|
||||
|
||||
ciType* declared_type() const;
|
||||
};
|
||||
|
@ -595,6 +595,16 @@ ciInstanceKlass* ciInstanceKlass::implementor() {
|
||||
return impl;
|
||||
}
|
||||
|
||||
ciInstanceKlass* ciInstanceKlass::host_klass() {
|
||||
assert(is_loaded(), "must be loaded");
|
||||
if (is_anonymous()) {
|
||||
VM_ENTRY_MARK
|
||||
Klass* host_klass = get_instanceKlass()->host_klass();
|
||||
return CURRENT_ENV->get_instance_klass(host_klass);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Utility class for printing of the contents of the static fields for
|
||||
// use by compilation replay. It only prints out the information that
|
||||
// could be consumed by the compiler, so for primitive types it prints
|
||||
|
@ -260,6 +260,8 @@ public:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ciInstanceKlass* host_klass();
|
||||
|
||||
bool can_be_instantiated() {
|
||||
assert(is_loaded(), "must be loaded");
|
||||
return !is_interface() && !is_abstract();
|
||||
|
@ -951,6 +951,13 @@ bool ciMethod::is_compiled_lambda_form() const {
|
||||
return iid == vmIntrinsics::_compiledLambdaForm;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// ciMethod::is_object_initializer
|
||||
//
|
||||
bool ciMethod::is_object_initializer() const {
|
||||
return name() == ciSymbol::object_initializer_name();
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// ciMethod::has_member_arg
|
||||
//
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2016, 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
|
||||
@ -337,6 +337,7 @@ class ciMethod : public ciMetadata {
|
||||
bool has_reserved_stack_access() const { return _has_reserved_stack_access; }
|
||||
bool is_boxing_method() const;
|
||||
bool is_unboxing_method() const;
|
||||
bool is_object_initializer() const;
|
||||
|
||||
// Replay data methods
|
||||
void dump_name_as_ascii(outputStream* st);
|
||||
|
@ -720,7 +720,8 @@ void InterpreterRuntime::resolve_invoke(JavaThread* thread, Bytecodes::Code byte
|
||||
Thread* THREAD = thread;
|
||||
// extract receiver from the outgoing argument list if necessary
|
||||
Handle receiver(thread, NULL);
|
||||
if (bytecode == Bytecodes::_invokevirtual || bytecode == Bytecodes::_invokeinterface) {
|
||||
if (bytecode == Bytecodes::_invokevirtual || bytecode == Bytecodes::_invokeinterface ||
|
||||
bytecode == Bytecodes::_invokespecial) {
|
||||
ResourceMark rm(thread);
|
||||
methodHandle m (thread, method(thread));
|
||||
Bytecode_invoke call(m, bci(thread));
|
||||
@ -783,16 +784,25 @@ void InterpreterRuntime::resolve_invoke(JavaThread* thread, Bytecodes::Code byte
|
||||
int index = info.resolved_method()->itable_index();
|
||||
assert(info.itable_index() == index, "");
|
||||
}
|
||||
} else if (bytecode == Bytecodes::_invokespecial) {
|
||||
assert(info.call_kind() == CallInfo::direct_call, "must be direct call");
|
||||
} else {
|
||||
assert(info.call_kind() == CallInfo::direct_call ||
|
||||
info.call_kind() == CallInfo::vtable_call, "");
|
||||
}
|
||||
#endif
|
||||
// Get sender or sender's host_klass, and only set cpCache entry to resolved if
|
||||
// it is not an interface. The receiver for invokespecial calls within interface
|
||||
// methods must be checked for every call.
|
||||
InstanceKlass* sender = pool->pool_holder();
|
||||
sender = sender->is_anonymous() ? sender->host_klass() : sender;
|
||||
|
||||
switch (info.call_kind()) {
|
||||
case CallInfo::direct_call:
|
||||
cp_cache_entry->set_direct_call(
|
||||
bytecode,
|
||||
info.resolved_method());
|
||||
info.resolved_method(),
|
||||
sender->is_interface());
|
||||
break;
|
||||
case CallInfo::vtable_call:
|
||||
cp_cache_entry->set_vtable_call(
|
||||
|
@ -1057,12 +1057,14 @@ methodHandle LinkResolver::linktime_resolve_static_method(const LinkInfo& link_i
|
||||
|
||||
|
||||
void LinkResolver::resolve_special_call(CallInfo& result,
|
||||
Handle recv,
|
||||
const LinkInfo& link_info,
|
||||
TRAPS) {
|
||||
methodHandle resolved_method = linktime_resolve_special_method(link_info, CHECK);
|
||||
runtime_resolve_special_method(result, resolved_method,
|
||||
link_info.resolved_klass(),
|
||||
link_info.current_klass(),
|
||||
recv,
|
||||
link_info.check_access(), CHECK);
|
||||
}
|
||||
|
||||
@ -1149,6 +1151,7 @@ void LinkResolver::runtime_resolve_special_method(CallInfo& result,
|
||||
const methodHandle& resolved_method,
|
||||
KlassHandle resolved_klass,
|
||||
KlassHandle current_klass,
|
||||
Handle recv,
|
||||
bool check_access, TRAPS) {
|
||||
|
||||
// resolved method is selected method unless we have an old-style lookup
|
||||
@ -1157,21 +1160,19 @@ void LinkResolver::runtime_resolve_special_method(CallInfo& result,
|
||||
// no checks for shadowing
|
||||
methodHandle sel_method(THREAD, resolved_method());
|
||||
|
||||
// check if this is an old-style super call and do a new lookup if so
|
||||
{ KlassHandle method_klass = KlassHandle(THREAD,
|
||||
resolved_method->method_holder());
|
||||
|
||||
if (check_access &&
|
||||
// check if the method is not <init>
|
||||
resolved_method->name() != vmSymbols::object_initializer_name()) {
|
||||
|
||||
// check if this is an old-style super call and do a new lookup if so
|
||||
// a) check if ACC_SUPER flag is set for the current class
|
||||
(current_klass->is_super() || !AllowNonVirtualCalls) &&
|
||||
if ((current_klass->is_super() || !AllowNonVirtualCalls) &&
|
||||
// b) check if the class of the resolved_klass is a superclass
|
||||
// (not supertype in order to exclude interface classes) of the current class.
|
||||
// This check is not performed for super.invoke for interface methods
|
||||
// in super interfaces.
|
||||
current_klass->is_subclass_of(resolved_klass()) &&
|
||||
current_klass() != resolved_klass() &&
|
||||
// c) check if the method is not <init>
|
||||
resolved_method->name() != vmSymbols::object_initializer_name()) {
|
||||
current_klass() != resolved_klass()) {
|
||||
// Lookup super method
|
||||
KlassHandle super_klass(THREAD, current_klass->super());
|
||||
sel_method = lookup_instance_method_in_klasses(super_klass,
|
||||
@ -1186,6 +1187,27 @@ void LinkResolver::runtime_resolve_special_method(CallInfo& result,
|
||||
resolved_method->signature()));
|
||||
}
|
||||
}
|
||||
|
||||
// Check that the class of objectref (the receiver) is the current class or interface,
|
||||
// or a subtype of the current class or interface (the sender), otherwise invokespecial
|
||||
// throws IllegalAccessError.
|
||||
// The verifier checks that the sender is a subtype of the class in the I/MR operand.
|
||||
// The verifier also checks that the receiver is a subtype of the sender, if the sender is
|
||||
// a class. If the sender is an interface, the check has to be performed at runtime.
|
||||
InstanceKlass* sender = InstanceKlass::cast(current_klass());
|
||||
sender = sender->is_anonymous() ? sender->host_klass() : sender;
|
||||
if (sender->is_interface() && recv.not_null()) {
|
||||
Klass* receiver_klass = recv->klass();
|
||||
if (!receiver_klass->is_subtype_of(sender)) {
|
||||
ResourceMark rm(THREAD);
|
||||
char buf[500];
|
||||
jio_snprintf(buf, sizeof(buf),
|
||||
"Receiver class %s must be the current class or a subtype of interface %s",
|
||||
receiver_klass->name()->as_C_string(),
|
||||
sender->name()->as_C_string());
|
||||
THROW_MSG(vmSymbols::java_lang_IllegalAccessError(), buf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// check if not static
|
||||
@ -1518,7 +1540,7 @@ methodHandle LinkResolver::resolve_static_call_or_null(const LinkInfo& link_info
|
||||
methodHandle LinkResolver::resolve_special_call_or_null(const LinkInfo& link_info) {
|
||||
EXCEPTION_MARK;
|
||||
CallInfo info;
|
||||
resolve_special_call(info, link_info, THREAD);
|
||||
resolve_special_call(info, Handle(), link_info, THREAD);
|
||||
if (HAS_PENDING_EXCEPTION) {
|
||||
CLEAR_PENDING_EXCEPTION;
|
||||
return methodHandle();
|
||||
@ -1534,7 +1556,7 @@ methodHandle LinkResolver::resolve_special_call_or_null(const LinkInfo& link_inf
|
||||
void LinkResolver::resolve_invoke(CallInfo& result, Handle recv, const constantPoolHandle& pool, int index, Bytecodes::Code byte, TRAPS) {
|
||||
switch (byte) {
|
||||
case Bytecodes::_invokestatic : resolve_invokestatic (result, pool, index, CHECK); break;
|
||||
case Bytecodes::_invokespecial : resolve_invokespecial (result, pool, index, CHECK); break;
|
||||
case Bytecodes::_invokespecial : resolve_invokespecial (result, recv, pool, index, CHECK); break;
|
||||
case Bytecodes::_invokevirtual : resolve_invokevirtual (result, recv, pool, index, CHECK); break;
|
||||
case Bytecodes::_invokehandle : resolve_invokehandle (result, pool, index, CHECK); break;
|
||||
case Bytecodes::_invokedynamic : resolve_invokedynamic (result, pool, index, CHECK); break;
|
||||
@ -1563,7 +1585,7 @@ void LinkResolver::resolve_invoke(CallInfo& result, Handle& recv,
|
||||
resolve_static_call(result, link_info, /*initialize_class=*/false, CHECK);
|
||||
break;
|
||||
case Bytecodes::_invokespecial:
|
||||
resolve_special_call(result, link_info, CHECK);
|
||||
resolve_special_call(result, recv, link_info, CHECK);
|
||||
break;
|
||||
default:
|
||||
fatal("bad call: %s", Bytecodes::name(byte));
|
||||
@ -1576,9 +1598,10 @@ void LinkResolver::resolve_invokestatic(CallInfo& result, const constantPoolHand
|
||||
}
|
||||
|
||||
|
||||
void LinkResolver::resolve_invokespecial(CallInfo& result, const constantPoolHandle& pool, int index, TRAPS) {
|
||||
void LinkResolver::resolve_invokespecial(CallInfo& result, Handle recv,
|
||||
const constantPoolHandle& pool, int index, TRAPS) {
|
||||
LinkInfo link_info(pool, index, CHECK);
|
||||
resolve_special_call(result, link_info, CHECK);
|
||||
resolve_special_call(result, recv, link_info, CHECK);
|
||||
}
|
||||
|
||||
|
||||
|
@ -230,6 +230,7 @@ class LinkResolver: AllStatic {
|
||||
const methodHandle& resolved_method,
|
||||
KlassHandle resolved_klass,
|
||||
KlassHandle current_klass,
|
||||
Handle recv,
|
||||
bool check_access, TRAPS);
|
||||
static void runtime_resolve_virtual_method (CallInfo& result,
|
||||
const methodHandle& resolved_method,
|
||||
@ -256,7 +257,7 @@ class LinkResolver: AllStatic {
|
||||
// runtime resolving from constant pool
|
||||
static void resolve_invokestatic (CallInfo& result,
|
||||
const constantPoolHandle& pool, int index, TRAPS);
|
||||
static void resolve_invokespecial (CallInfo& result,
|
||||
static void resolve_invokespecial (CallInfo& result, Handle recv,
|
||||
const constantPoolHandle& pool, int index, TRAPS);
|
||||
static void resolve_invokevirtual (CallInfo& result, Handle recv,
|
||||
const constantPoolHandle& pool, int index, TRAPS);
|
||||
@ -289,6 +290,7 @@ class LinkResolver: AllStatic {
|
||||
const LinkInfo& link_info,
|
||||
bool initialize_klass, TRAPS);
|
||||
static void resolve_special_call (CallInfo& result,
|
||||
Handle recv,
|
||||
const LinkInfo& link_info,
|
||||
TRAPS);
|
||||
static void resolve_virtual_call (CallInfo& result, Handle recv, KlassHandle recv_klass,
|
||||
|
@ -140,7 +140,8 @@ void ConstantPoolCacheEntry::set_parameter_size(int value) {
|
||||
|
||||
void ConstantPoolCacheEntry::set_direct_or_vtable_call(Bytecodes::Code invoke_code,
|
||||
methodHandle method,
|
||||
int vtable_index) {
|
||||
int vtable_index,
|
||||
bool sender_is_interface) {
|
||||
bool is_vtable_call = (vtable_index >= 0); // FIXME: split this method on this boolean
|
||||
assert(method->interpreter_entry() != NULL, "should have been set at this point");
|
||||
assert(!method->is_obsolete(), "attempt to write obsolete method to cpCache");
|
||||
@ -204,7 +205,13 @@ void ConstantPoolCacheEntry::set_direct_or_vtable_call(Bytecodes::Code invoke_co
|
||||
if (byte_no == 1) {
|
||||
assert(invoke_code != Bytecodes::_invokevirtual &&
|
||||
invoke_code != Bytecodes::_invokeinterface, "");
|
||||
// Don't mark invokespecial to method as resolved if sender is an interface. The receiver
|
||||
// has to be checked that it is a subclass of the current class every time this bytecode
|
||||
// is executed.
|
||||
if (invoke_code != Bytecodes::_invokespecial || !sender_is_interface ||
|
||||
method->name() == vmSymbols::object_initializer_name()) {
|
||||
set_bytecode_1(invoke_code);
|
||||
}
|
||||
} else if (byte_no == 2) {
|
||||
if (change_to_virtual) {
|
||||
assert(invoke_code == Bytecodes::_invokeinterface, "");
|
||||
@ -234,17 +241,18 @@ void ConstantPoolCacheEntry::set_direct_or_vtable_call(Bytecodes::Code invoke_co
|
||||
NOT_PRODUCT(verify(tty));
|
||||
}
|
||||
|
||||
void ConstantPoolCacheEntry::set_direct_call(Bytecodes::Code invoke_code, methodHandle method) {
|
||||
void ConstantPoolCacheEntry::set_direct_call(Bytecodes::Code invoke_code, methodHandle method,
|
||||
bool sender_is_interface) {
|
||||
int index = Method::nonvirtual_vtable_index;
|
||||
// index < 0; FIXME: inline and customize set_direct_or_vtable_call
|
||||
set_direct_or_vtable_call(invoke_code, method, index);
|
||||
set_direct_or_vtable_call(invoke_code, method, index, sender_is_interface);
|
||||
}
|
||||
|
||||
void ConstantPoolCacheEntry::set_vtable_call(Bytecodes::Code invoke_code, methodHandle method, int index) {
|
||||
// either the method is a miranda or its holder should accept the given index
|
||||
assert(method->method_holder()->is_interface() || method->method_holder()->verify_vtable_index(index), "");
|
||||
// index >= 0; FIXME: inline and customize set_direct_or_vtable_call
|
||||
set_direct_or_vtable_call(invoke_code, method, index);
|
||||
set_direct_or_vtable_call(invoke_code, method, index, false);
|
||||
}
|
||||
|
||||
void ConstantPoolCacheEntry::set_itable_call(Bytecodes::Code invoke_code, const methodHandle& method, int index) {
|
||||
|
@ -230,13 +230,15 @@ class ConstantPoolCacheEntry VALUE_OBJ_CLASS_SPEC {
|
||||
void set_direct_or_vtable_call(
|
||||
Bytecodes::Code invoke_code, // the bytecode used for invoking the method
|
||||
methodHandle method, // the method/prototype if any (NULL, otherwise)
|
||||
int vtable_index // the vtable index if any, else negative
|
||||
int vtable_index, // the vtable index if any, else negative
|
||||
bool sender_is_interface
|
||||
);
|
||||
|
||||
public:
|
||||
void set_direct_call( // sets entry to exact concrete method entry
|
||||
Bytecodes::Code invoke_code, // the bytecode used for invoking the method
|
||||
methodHandle method // the method to call
|
||||
methodHandle method, // the method to call
|
||||
bool sender_is_interface
|
||||
);
|
||||
|
||||
void set_vtable_call( // sets entry to vtable index
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2016, 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
|
||||
@ -505,6 +505,30 @@ void Parse::do_call() {
|
||||
speculative_receiver_type = receiver_type != NULL ? receiver_type->speculative_type() : NULL;
|
||||
}
|
||||
|
||||
// invoke-super-special
|
||||
if (iter().cur_bc_raw() == Bytecodes::_invokespecial && !orig_callee->is_object_initializer()) {
|
||||
ciInstanceKlass* calling_klass = method()->holder();
|
||||
ciInstanceKlass* sender_klass =
|
||||
calling_klass->is_anonymous() ? calling_klass->host_klass() :
|
||||
calling_klass;
|
||||
if (sender_klass->is_interface()) {
|
||||
Node* receiver_node = stack(sp() - nargs);
|
||||
Node* cls_node = makecon(TypeKlassPtr::make(sender_klass));
|
||||
Node* bad_type_ctrl = NULL;
|
||||
Node* casted_receiver = gen_checkcast(receiver_node, cls_node, &bad_type_ctrl);
|
||||
if (bad_type_ctrl != NULL) {
|
||||
PreserveJVMState pjvms(this);
|
||||
set_control(bad_type_ctrl);
|
||||
uncommon_trap(Deoptimization::Reason_class_check,
|
||||
Deoptimization::Action_none);
|
||||
}
|
||||
if (stopped()) {
|
||||
return; // MUST uncommon-trap?
|
||||
}
|
||||
set_stack(sp() - nargs, casted_receiver);
|
||||
}
|
||||
}
|
||||
|
||||
// Note: It's OK to try to inline a virtual call.
|
||||
// The call generator will not attempt to inline a polymorphic call
|
||||
// unless it knows how to optimize the receiver dispatch.
|
||||
|
@ -61,6 +61,15 @@ const TypePtr *MemNode::adr_type() const {
|
||||
return calculate_adr_type(adr->bottom_type(), cross_check);
|
||||
}
|
||||
|
||||
bool MemNode::check_if_adr_maybe_raw(Node* adr) {
|
||||
if (adr != NULL) {
|
||||
if (adr->bottom_type()->base() == Type::RawPtr || adr->bottom_type()->base() == Type::AnyPtr) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
void MemNode::dump_spec(outputStream *st) const {
|
||||
if (in(Address) == NULL) return; // node is dead
|
||||
@ -560,6 +569,7 @@ Node* MemNode::find_previous_store(PhaseTransform* phase) {
|
||||
if (offset == Type::OffsetBot)
|
||||
return NULL; // cannot unalias unless there are precise offsets
|
||||
|
||||
const bool adr_maybe_raw = check_if_adr_maybe_raw(adr);
|
||||
const TypeOopPtr *addr_t = adr->bottom_type()->isa_oopptr();
|
||||
|
||||
intptr_t size_in_bytes = memory_size();
|
||||
@ -577,6 +587,13 @@ Node* MemNode::find_previous_store(PhaseTransform* phase) {
|
||||
Node* st_base = AddPNode::Ideal_base_and_offset(st_adr, phase, st_offset);
|
||||
if (st_base == NULL)
|
||||
break; // inscrutable pointer
|
||||
|
||||
// For raw accesses it's not enough to prove that constant offsets don't intersect.
|
||||
// We need the bases to be the equal in order for the offset check to make sense.
|
||||
if ((adr_maybe_raw || check_if_adr_maybe_raw(st_adr)) && st_base != base) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (st_offset != offset && st_offset != Type::OffsetBot) {
|
||||
const int MAX_STORE = BytesPerLong;
|
||||
if (st_offset >= offset + size_in_bytes ||
|
||||
|
@ -78,6 +78,7 @@ protected:
|
||||
}
|
||||
|
||||
virtual Node* find_previous_arraycopy(PhaseTransform* phase, Node* ld_alloc, Node*& mem, bool can_see_stored_value) const { return NULL; }
|
||||
static bool check_if_adr_maybe_raw(Node* adr);
|
||||
|
||||
public:
|
||||
// Helpers for the optimizer. Documented in memnode.cpp.
|
||||
|
@ -727,7 +727,7 @@ Handle MethodHandles::resolve_MemberName(Handle mname, KlassHandle caller, TRAPS
|
||||
assert(!is_signature_polymorphic_static(mh_invoke_id), "");
|
||||
LinkResolver::resolve_handle_call(result, link_info, THREAD);
|
||||
} else if (ref_kind == JVM_REF_invokeSpecial) {
|
||||
LinkResolver::resolve_special_call(result,
|
||||
LinkResolver::resolve_special_call(result, Handle(),
|
||||
link_info, THREAD);
|
||||
} else if (ref_kind == JVM_REF_invokeVirtual) {
|
||||
LinkResolver::resolve_virtual_call(result, Handle(), defc,
|
||||
@ -755,7 +755,7 @@ Handle MethodHandles::resolve_MemberName(Handle mname, KlassHandle caller, TRAPS
|
||||
{
|
||||
assert(!HAS_PENDING_EXCEPTION, "");
|
||||
if (name == vmSymbols::object_initializer_name()) {
|
||||
LinkResolver::resolve_special_call(result, link_info, THREAD);
|
||||
LinkResolver::resolve_special_call(result, Handle(), link_info, THREAD);
|
||||
} else {
|
||||
break; // will throw after end of switch
|
||||
}
|
||||
|
@ -375,6 +375,7 @@ static SpecialFlag const special_jvm_flags[] = {
|
||||
// -------------- Deprecated Flags --------------
|
||||
// --- Non-alias flags - sorted by obsolete_in then expired_in:
|
||||
{ "MaxGCMinorPauseMillis", JDK_Version::jdk(8), JDK_Version::undefined(), JDK_Version::undefined() },
|
||||
{ "UseConcMarkSweepGC", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::undefined() },
|
||||
|
||||
// --- Deprecated alias flags (see also aliased_jvm_flags) - sorted by obsolete_in then expired_in:
|
||||
{ "DefaultMaxRAMFraction", JDK_Version::jdk(8), JDK_Version::undefined(), JDK_Version::undefined() },
|
||||
@ -2240,8 +2241,6 @@ jint Arguments::set_aggressive_heap_flags() {
|
||||
if (FLAG_SET_CMDLINE(bool, UseParallelGC, true) != Flag::SUCCESS) {
|
||||
return JNI_EINVAL;
|
||||
}
|
||||
FLAG_SET_DEFAULT(ParallelGCThreads,
|
||||
Abstract_VM_Version::parallel_worker_threads());
|
||||
|
||||
// Encourage steady state memory management
|
||||
if (FLAG_SET_CMDLINE(uintx, ThresholdTolerance, 100) != Flag::SUCCESS) {
|
||||
@ -2440,6 +2439,9 @@ bool Arguments::check_vm_args_consistency() {
|
||||
status = status && check_jvmci_args_consistency();
|
||||
|
||||
if (EnableJVMCI) {
|
||||
PropertyList_unique_add(&_system_properties, "jdk.internal.vm.ci.enabled", "true",
|
||||
AddProperty, UnwriteableProperty, InternalProperty);
|
||||
|
||||
if (!ScavengeRootsInCode) {
|
||||
warning("forcing ScavengeRootsInCode non-zero because JVMCI is enabled");
|
||||
ScavengeRootsInCode = 1;
|
||||
|
@ -221,7 +221,7 @@ void JavaCalls::call_virtual(JavaValue* result, Handle receiver, KlassHandle spe
|
||||
void JavaCalls::call_special(JavaValue* result, KlassHandle klass, Symbol* name, Symbol* signature, JavaCallArguments* args, TRAPS) {
|
||||
CallInfo callinfo;
|
||||
LinkInfo link_info(klass, name, signature);
|
||||
LinkResolver::resolve_special_call(callinfo, link_info, CHECK);
|
||||
LinkResolver::resolve_special_call(callinfo, args->receiver(), link_info, CHECK);
|
||||
methodHandle method = callinfo.selected_method();
|
||||
assert(method.not_null(), "should have thrown exception");
|
||||
|
||||
|
@ -199,6 +199,7 @@ typedef Hashtable<Klass*, mtClass> KlassHashtable;
|
||||
typedef HashtableEntry<Klass*, mtClass> KlassHashtableEntry;
|
||||
typedef TwoOopHashtable<Symbol*, mtClass> SymbolTwoOopHashtable;
|
||||
typedef CompactHashtable<Symbol*, char> SymbolCompactHashTable;
|
||||
typedef RehashableHashtable<Symbol*, mtSymbol> RehashableSymbolHashtable;
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// VM_STRUCTS
|
||||
@ -584,6 +585,7 @@ typedef CompactHashtable<Symbol*, char> SymbolCompactHashTable;
|
||||
\
|
||||
static_field(SymbolTable, _the_table, SymbolTable*) \
|
||||
static_field(SymbolTable, _shared_table, SymbolCompactHashTable) \
|
||||
static_field(RehashableSymbolHashtable, _seed, juint) \
|
||||
\
|
||||
/***************/ \
|
||||
/* StringTable */ \
|
||||
@ -1602,6 +1604,8 @@ typedef CompactHashtable<Symbol*, char> SymbolCompactHashTable;
|
||||
\
|
||||
declare_toplevel_type(BasicHashtable<mtInternal>) \
|
||||
declare_type(IntptrHashtable, BasicHashtable<mtInternal>) \
|
||||
declare_toplevel_type(BasicHashtable<mtSymbol>) \
|
||||
declare_type(RehashableSymbolHashtable, BasicHashtable<mtSymbol>) \
|
||||
declare_type(SymbolTable, SymbolHashtable) \
|
||||
declare_type(StringTable, StringHashtable) \
|
||||
declare_type(LoaderConstraintTable, KlassHashtable) \
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2017, 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
|
||||
@ -294,6 +294,7 @@ protected:
|
||||
};
|
||||
|
||||
template <class T, MEMFLAGS F> class RehashableHashtable : public Hashtable<T, F> {
|
||||
friend class VMStructs;
|
||||
protected:
|
||||
|
||||
enum {
|
||||
|
@ -59,3 +59,6 @@ external.lib.roots = ../../
|
||||
|
||||
# Use new module options
|
||||
useNewOptions=true
|
||||
|
||||
# Use --patch-module instead of -Xmodule:
|
||||
useNewPatchModule=true
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, 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
|
||||
@ -36,7 +36,22 @@ import java.util.zip.CRC32;
|
||||
import java.util.zip.Checksum;
|
||||
|
||||
public class TestCRC32 {
|
||||
public static void main(String[] args) {
|
||||
// standard CRC32 polynomial
|
||||
// coefficients in different forms
|
||||
// normal: polyBits = 0x04c11db7 = 0b0000 0100 1100 0001 0001 1101 1011 0111
|
||||
// reversed: polybits = 0xedb88320 = 0b1110 1101 1011 1000 1000 0011 0010 0000
|
||||
// reversed reciprocal polybits = 0x82608edb = 0b1000 0010 0110 0000 1000 1110 1101 1011
|
||||
//
|
||||
// 0 5 9 13 17 21 25 29
|
||||
// | | | | | | | |
|
||||
// reversed shiftL 1 polyBits = 0x1db710641L = 0b1 1101 1011 0111 0001 0000 0110 0100 0001
|
||||
final static long polyBits = (1L<<(32-32)) + (1L<<(32-26)) + (1L<<(32-23)) + (1L<<(32-22))
|
||||
+ (1L<<(32-16)) + (1L<<(32-12)) + (1L<<(32-11)) + (1L<<(32-10))
|
||||
+ (1L<<(32-8)) + (1L<<(32-7)) + (1L<<(32-5)) + (1L<<(32-4))
|
||||
+ (1L<<(32-2)) + (1L<<(32-1)) + (1L<<(32-0));
|
||||
final static long polyBitsShifted = polyBits>>1;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
int offset = Integer.getInteger("offset", 0);
|
||||
int msgSize = Integer.getInteger("msgSize", 512);
|
||||
boolean multi = false;
|
||||
@ -65,11 +80,14 @@ public class TestCRC32 {
|
||||
|
||||
byte[] b = initializedBytes(msgSize, offset);
|
||||
|
||||
final long crcReference = update_byteLoop(0, b, offset);
|
||||
|
||||
CRC32 crc0 = new CRC32();
|
||||
CRC32 crc1 = new CRC32();
|
||||
CRC32 crc2 = new CRC32();
|
||||
|
||||
crc0.update(b, offset, msgSize);
|
||||
check(crc0, crcReference);
|
||||
|
||||
System.out.println("-------------------------------------------------------");
|
||||
|
||||
@ -77,27 +95,35 @@ public class TestCRC32 {
|
||||
for (int i = 0; i < warmupIters; i++) {
|
||||
crc1.reset();
|
||||
crc1.update(b, offset, msgSize);
|
||||
check(crc1, crcReference);
|
||||
}
|
||||
|
||||
/* measure performance */
|
||||
/* check correctness
|
||||
* Do that before measuring performance
|
||||
* to even better heat up involved methods.
|
||||
*/
|
||||
for (int i = 0; i < iters; i++) {
|
||||
crc1.reset();
|
||||
crc1.update(b, offset, msgSize);
|
||||
check(crc1, crcReference);
|
||||
}
|
||||
report("CRCs", crc1, crcReference);
|
||||
|
||||
/* measure performance
|
||||
* Don't spoil times with error checking.
|
||||
*/
|
||||
long start = System.nanoTime();
|
||||
for (int i = 0; i < iters; i++) {
|
||||
crc1.reset();
|
||||
crc1.update(b, offset, msgSize);
|
||||
}
|
||||
long end = System.nanoTime();
|
||||
|
||||
double total = (double)(end - start)/1e9; // in seconds
|
||||
double thruput = (double)msgSize*iters/1e6/total; // in MB/s
|
||||
System.out.println("CRC32.update(byte[]) runtime = " + total + " seconds");
|
||||
System.out.println("CRC32.update(byte[]) throughput = " + thruput + " MB/s");
|
||||
|
||||
/* check correctness */
|
||||
for (int i = 0; i < iters; i++) {
|
||||
crc1.reset();
|
||||
crc1.update(b, offset, msgSize);
|
||||
if (!check(crc0, crc1)) break;
|
||||
}
|
||||
report("CRCs", crc0, crc1);
|
||||
report("CRCs", crc1, crcReference);
|
||||
|
||||
System.out.println("-------------------------------------------------------");
|
||||
|
||||
@ -110,9 +136,24 @@ public class TestCRC32 {
|
||||
crc2.reset();
|
||||
crc2.update(buf);
|
||||
buf.rewind();
|
||||
check(crc2, crcReference);
|
||||
}
|
||||
|
||||
/* measure performance */
|
||||
/* check correctness
|
||||
* Do that before measuring performance
|
||||
* to even better heat up involved methods.
|
||||
*/
|
||||
for (int i = 0; i < iters; i++) {
|
||||
crc2.reset();
|
||||
crc2.update(buf);
|
||||
buf.rewind();
|
||||
check(crc2, crcReference);
|
||||
}
|
||||
report("CRCs", crc2, crcReference);
|
||||
|
||||
/* measure performance
|
||||
* Don't spoil times with error checking.
|
||||
*/
|
||||
start = System.nanoTime();
|
||||
for (int i = 0; i < iters; i++) {
|
||||
crc2.reset();
|
||||
@ -124,31 +165,57 @@ public class TestCRC32 {
|
||||
thruput = (double)msgSize*iters/1e6/total; // in MB/s
|
||||
System.out.println("CRC32.update(ByteBuffer) runtime = " + total + " seconds");
|
||||
System.out.println("CRC32.update(ByteBuffer) throughput = " + thruput + " MB/s");
|
||||
|
||||
/* check correctness */
|
||||
for (int i = 0; i < iters; i++) {
|
||||
crc2.reset();
|
||||
crc2.update(buf);
|
||||
buf.rewind();
|
||||
if (!check(crc0, crc2)) break;
|
||||
}
|
||||
report("CRCs", crc0, crc2);
|
||||
report("CRCs", crc2, crcReference);
|
||||
|
||||
System.out.println("-------------------------------------------------------");
|
||||
}
|
||||
|
||||
private static void report(String s, Checksum crc0, Checksum crc1) {
|
||||
System.out.printf("%s: crc0 = %08x, crc1 = %08x\n",
|
||||
s, crc0.getValue(), crc1.getValue());
|
||||
// Just a loop over a byte array, updating the CRC byte by byte.
|
||||
public static long update_byteLoop(long crc, byte[] buf, int offset) {
|
||||
return update_byteLoop(crc, buf, offset, buf.length-offset);
|
||||
}
|
||||
|
||||
private static boolean check(Checksum crc0, Checksum crc1) {
|
||||
if (crc0.getValue() != crc1.getValue()) {
|
||||
System.err.printf("ERROR: crc0 = %08x, crc1 = %08x\n",
|
||||
crc0.getValue(), crc1.getValue());
|
||||
return false;
|
||||
// Just a loop over a byte array, with given length, updating the CRC byte by byte.
|
||||
public static long update_byteLoop(long crc, byte[] buf, int offset, int length) {
|
||||
int end = length+offset;
|
||||
for (int i = offset; i < end; i++) {
|
||||
crc = update_singlebyte(crc, polyBitsShifted, buf[i]);
|
||||
}
|
||||
return crc;
|
||||
}
|
||||
|
||||
// Straight-forward implementation of CRC update by one byte.
|
||||
// We use this very basic implementation to calculate reference
|
||||
// results. It is necessary to have full control over how the
|
||||
// reference results are calculated. It is not sufficient to rely
|
||||
// on the interpreter (or c1, or c2) to do the right thing.
|
||||
public static long update_singlebyte(long crc, long polynomial, int val) {
|
||||
crc = (crc ^ -1L) & 0x00000000ffffffffL; // use 1's complement of crc
|
||||
crc = crc ^ (val&0xff); // XOR in next byte from stream
|
||||
for (int i = 0; i < 8; i++) {
|
||||
boolean bitset = (crc & 0x01L) != 0;
|
||||
|
||||
crc = crc>>1;
|
||||
if (bitset) {
|
||||
crc = crc ^ polynomial;
|
||||
crc = crc & 0x00000000ffffffffL;
|
||||
}
|
||||
}
|
||||
crc = (crc ^ -1L) & 0x00000000ffffffffL; // revert taking 1's complement
|
||||
return crc;
|
||||
}
|
||||
|
||||
private static void report(String s, Checksum crc, long crcReference) {
|
||||
System.out.printf("%s: crc = %08x, crcReference = %08x\n",
|
||||
s, crc.getValue(), crcReference);
|
||||
}
|
||||
|
||||
private static void check(Checksum crc, long crcReference) throws Exception {
|
||||
if (crc.getValue() != crcReference) {
|
||||
System.err.printf("ERROR: crc = %08x, crcReference = %08x\n",
|
||||
crc.getValue(), crcReference);
|
||||
throw new Exception("TestCRC32 Error");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private static byte[] initializedBytes(int M, int offset) {
|
||||
@ -162,7 +229,7 @@ public class TestCRC32 {
|
||||
return bytes;
|
||||
}
|
||||
|
||||
private static void test_multi(int iters) {
|
||||
private static void test_multi(int iters) throws Exception {
|
||||
int len1 = 8; // the 8B/iteration loop
|
||||
int len2 = 32; // the 32B/iteration loop
|
||||
int len3 = 4096; // the 4KB/iteration loop
|
||||
@ -185,37 +252,31 @@ public class TestCRC32 {
|
||||
(len1+len2+len3)*2+5, (len1+len2+len3)*2+7,
|
||||
(len1+len2+len3)*3, (len1+len2+len3)*3-1, (len1+len2+len3)*3-3,
|
||||
(len1+len2+len3)*3-5, (len1+len2+len3)*3-7 };
|
||||
CRC32[] crc0 = new CRC32[offsets.length*sizes.length];
|
||||
CRC32[] crc1 = new CRC32[offsets.length*sizes.length];
|
||||
long[] crcReference = new long[offsets.length*sizes.length];
|
||||
int i, j, k;
|
||||
|
||||
System.out.printf("testing %d cases ...\n", offsets.length*sizes.length);
|
||||
|
||||
/* set the result from interpreter as reference */
|
||||
// Initialize CRC32 result arrays, CRC32 reference array.
|
||||
// Reference is calculated using a very basic Java implementation.
|
||||
for (i = 0; i < offsets.length; i++) {
|
||||
for (j = 0; j < sizes.length; j++) {
|
||||
crc0[i*sizes.length + j] = new CRC32();
|
||||
crc1[i*sizes.length + j] = new CRC32();
|
||||
crc0[i*sizes.length + j].update(b, offsets[i], sizes[j]);
|
||||
crcReference[i*sizes.length + j] = update_byteLoop(0, b, offsets[i], sizes[j]);
|
||||
}
|
||||
}
|
||||
|
||||
/* warm up the JIT compiler and get result */
|
||||
// Warm up the JIT compiler. Over time, all methods involved will
|
||||
// be executed by the interpreter, then get compiled by c1 and
|
||||
// finally by c2. Each calculated CRC value must, in each iteration,
|
||||
// be equal to the precalculated reference value for the test to pass.
|
||||
for (k = 0; k < iters; k++) {
|
||||
for (i = 0; i < offsets.length; i++) {
|
||||
for (j = 0; j < sizes.length; j++) {
|
||||
crc1[i*sizes.length + j].reset();
|
||||
crc1[i*sizes.length + j].update(b, offsets[i], sizes[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* check correctness */
|
||||
for (i = 0; i < offsets.length; i++) {
|
||||
for (j = 0; j < sizes.length; j++) {
|
||||
if (!check(crc0[i*sizes.length + j], crc1[i*sizes.length + j])) {
|
||||
System.out.printf("offsets[%d] = %d", i, offsets[i]);
|
||||
System.out.printf("\tsizes[%d] = %d\n", j, sizes[j]);
|
||||
check(crc1[i*sizes.length + j], crcReference[i*sizes.length + j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, 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
|
||||
@ -36,7 +36,23 @@ import java.util.zip.CRC32C;
|
||||
import java.util.zip.Checksum;
|
||||
|
||||
public class TestCRC32C {
|
||||
public static void main(String[] args) {
|
||||
// CRC32C (Castagnoli) polynomial
|
||||
// coefficients in different forms
|
||||
// normal: polyBits = 0x1edc6f41 = 0b0001 1110 1101 1100 0110 1111 0100 0001
|
||||
// reversed: polybits = 0x82f63b78 = 0b1000 0010 1111 0110 0011 1011 0111 1000
|
||||
// reversed reciprocal polybits = 0x8f6e37a0 = 0b1000 1111 0110 1110 0011 0111 1010 0000
|
||||
//
|
||||
// 0 5 9 13 17 21 25 29
|
||||
// | | | | | | | |
|
||||
// reversed shiftL 1 polyBits = 0x105ec76f1L = 0b1 0000 0101 1110 1100 0111 0110 1111 0001
|
||||
final static long polyBits = (1L<<(32-32)) + (1L<<(32-28)) + (1L<<(32-27))
|
||||
+ (1L<<(32-26)) + (1L<<(32-25)) + (1L<<(32-23)) + (1L<<(32-22))
|
||||
+ (1L<<(32-20)) + (1L<<(32-19)) + (1L<<(32-18)) + (1L<<(32-14))
|
||||
+ (1L<<(32-13)) + (1L<<(32-11)) + (1L<<(32-10)) + (1L<<(32-9))
|
||||
+ (1L<<(32-8)) + (1L<<(32-6)) + (1L<<(32-0));
|
||||
final static long polyBitsShifted = polyBits>>1;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
int offset = Integer.getInteger("offset", 0);
|
||||
int msgSize = Integer.getInteger("msgSize", 512);
|
||||
boolean multi = false;
|
||||
@ -65,11 +81,14 @@ public class TestCRC32C {
|
||||
|
||||
byte[] b = initializedBytes(msgSize, offset);
|
||||
|
||||
final long crcReference = update_byteLoop(0, b, offset);
|
||||
|
||||
CRC32C crc0 = new CRC32C();
|
||||
CRC32C crc1 = new CRC32C();
|
||||
CRC32C crc2 = new CRC32C();
|
||||
|
||||
crc0.update(b, offset, msgSize);
|
||||
check(crc0, crcReference);
|
||||
|
||||
System.out.println("-------------------------------------------------------");
|
||||
|
||||
@ -77,27 +96,35 @@ public class TestCRC32C {
|
||||
for (int i = 0; i < warmupIters; i++) {
|
||||
crc1.reset();
|
||||
crc1.update(b, offset, msgSize);
|
||||
check(crc1, crcReference);
|
||||
}
|
||||
|
||||
/* measure performance */
|
||||
/* check correctness
|
||||
* Do that before measuring performance
|
||||
* to even better heat up involved methods.
|
||||
*/
|
||||
for (int i = 0; i < iters; i++) {
|
||||
crc1.reset();
|
||||
crc1.update(b, offset, msgSize);
|
||||
check(crc1, crcReference);
|
||||
}
|
||||
report("CRCs", crc1, crcReference);
|
||||
|
||||
/* measure performance
|
||||
* Don't spoil times with error checking.
|
||||
*/
|
||||
long start = System.nanoTime();
|
||||
for (int i = 0; i < iters; i++) {
|
||||
crc1.reset();
|
||||
crc1.update(b, offset, msgSize);
|
||||
}
|
||||
long end = System.nanoTime();
|
||||
|
||||
double total = (double)(end - start)/1e9; // in seconds
|
||||
double thruput = (double)msgSize*iters/1e6/total; // in MB/s
|
||||
System.out.println("CRC32C.update(byte[]) runtime = " + total + " seconds");
|
||||
System.out.println("CRC32C.update(byte[]) throughput = " + thruput + " MB/s");
|
||||
|
||||
/* check correctness */
|
||||
for (int i = 0; i < iters; i++) {
|
||||
crc1.reset();
|
||||
crc1.update(b, offset, msgSize);
|
||||
if (!check(crc0, crc1)) break;
|
||||
}
|
||||
report("CRCs", crc0, crc1);
|
||||
report("CRCs", crc1, crcReference);
|
||||
|
||||
System.out.println("-------------------------------------------------------");
|
||||
|
||||
@ -110,9 +137,24 @@ public class TestCRC32C {
|
||||
crc2.reset();
|
||||
crc2.update(buf);
|
||||
buf.rewind();
|
||||
check(crc2, crcReference);
|
||||
}
|
||||
|
||||
/* measure performance */
|
||||
/* check correctness
|
||||
* Do that before measuring performance
|
||||
* to even better heat up involved methods.
|
||||
*/
|
||||
for (int i = 0; i < iters; i++) {
|
||||
crc2.reset();
|
||||
crc2.update(buf);
|
||||
buf.rewind();
|
||||
check(crc2, crcReference);
|
||||
}
|
||||
report("CRCs", crc2, crcReference);
|
||||
|
||||
/* measure performance
|
||||
* Don't spoil times with error checking.
|
||||
*/
|
||||
start = System.nanoTime();
|
||||
for (int i = 0; i < iters; i++) {
|
||||
crc2.reset();
|
||||
@ -124,31 +166,57 @@ public class TestCRC32C {
|
||||
thruput = (double)msgSize*iters/1e6/total; // in MB/s
|
||||
System.out.println("CRC32C.update(ByteBuffer) runtime = " + total + " seconds");
|
||||
System.out.println("CRC32C.update(ByteBuffer) throughput = " + thruput + " MB/s");
|
||||
|
||||
/* check correctness */
|
||||
for (int i = 0; i < iters; i++) {
|
||||
crc2.reset();
|
||||
crc2.update(buf);
|
||||
buf.rewind();
|
||||
if (!check(crc0, crc2)) break;
|
||||
}
|
||||
report("CRCs", crc0, crc2);
|
||||
report("CRCs", crc2, crcReference);
|
||||
|
||||
System.out.println("-------------------------------------------------------");
|
||||
}
|
||||
|
||||
private static void report(String s, Checksum crc0, Checksum crc1) {
|
||||
System.out.printf("%s: crc0 = %08x, crc1 = %08x\n",
|
||||
s, crc0.getValue(), crc1.getValue());
|
||||
// Just a loop over a byte array, updating the CRC byte by byte.
|
||||
public static long update_byteLoop(long crc, byte[] buf, int offset) {
|
||||
return update_byteLoop(crc, buf, offset, buf.length-offset);
|
||||
}
|
||||
|
||||
private static boolean check(Checksum crc0, Checksum crc1) {
|
||||
if (crc0.getValue() != crc1.getValue()) {
|
||||
System.err.printf("ERROR: crc0 = %08x, crc1 = %08x\n",
|
||||
crc0.getValue(), crc1.getValue());
|
||||
return false;
|
||||
// Just a loop over a byte array, with given length, updating the CRC byte by byte.
|
||||
public static long update_byteLoop(long crc, byte[] buf, int offset, int length) {
|
||||
int end = length+offset;
|
||||
for (int i = offset; i < end; i++) {
|
||||
crc = update_singlebyte(crc, polyBitsShifted, buf[i]);
|
||||
}
|
||||
return crc;
|
||||
}
|
||||
|
||||
// Straight-forward implementation of CRC update by one byte.
|
||||
// We use this very basic implementation to calculate reference
|
||||
// results. It is necessary to have full control over how the
|
||||
// reference results are calculated. It is not sufficient to rely
|
||||
// on the interpreter (or c1, or c2) to do the right thing.
|
||||
public static long update_singlebyte(long crc, long polynomial, int val) {
|
||||
crc = (crc ^ -1L) & 0x00000000ffffffffL; // use 1's complement of crc
|
||||
crc = crc ^ (val&0xff); // XOR in next byte from stream
|
||||
for (int i = 0; i < 8; i++) {
|
||||
boolean bitset = (crc & 0x01L) != 0;
|
||||
|
||||
crc = crc>>1;
|
||||
if (bitset) {
|
||||
crc = crc ^ polynomial;
|
||||
crc = crc & 0x00000000ffffffffL;
|
||||
}
|
||||
}
|
||||
crc = (crc ^ -1L) & 0x00000000ffffffffL; // revert taking 1's complement
|
||||
return crc;
|
||||
}
|
||||
|
||||
private static void report(String s, Checksum crc, long crcReference) {
|
||||
System.out.printf("%s: crc = %08x, crcReference = %08x\n",
|
||||
s, crc.getValue(), crcReference);
|
||||
}
|
||||
|
||||
private static void check(Checksum crc, long crcReference) throws Exception {
|
||||
if (crc.getValue() != crcReference) {
|
||||
System.err.printf("ERROR: crc = %08x, crcReference = %08x\n",
|
||||
crc.getValue(), crcReference);
|
||||
throw new Exception("TestCRC32C Error");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private static byte[] initializedBytes(int M, int offset) {
|
||||
@ -162,7 +230,7 @@ public class TestCRC32C {
|
||||
return bytes;
|
||||
}
|
||||
|
||||
private static void test_multi(int iters) {
|
||||
private static void test_multi(int iters) throws Exception {
|
||||
int len1 = 8; // the 8B/iteration loop
|
||||
int len2 = 32; // the 32B/iteration loop
|
||||
int len3 = 4096; // the 4KB/iteration loop
|
||||
@ -185,37 +253,31 @@ public class TestCRC32C {
|
||||
(len1+len2+len3)*2+5, (len1+len2+len3)*2+7,
|
||||
(len1+len2+len3)*3, (len1+len2+len3)*3-1, (len1+len2+len3)*3-3,
|
||||
(len1+len2+len3)*3-5, (len1+len2+len3)*3-7 };
|
||||
CRC32C[] crc0 = new CRC32C[offsets.length*sizes.length];
|
||||
CRC32C[] crc1 = new CRC32C[offsets.length*sizes.length];
|
||||
long[] crcReference = new long[offsets.length*sizes.length];
|
||||
int i, j, k;
|
||||
|
||||
System.out.printf("testing %d cases ...\n", offsets.length*sizes.length);
|
||||
|
||||
/* set the result from interpreter as reference */
|
||||
// Initialize CRC32C result arrays, CRC32C reference array.
|
||||
// Reference is calculated using a very basic Java implementation.
|
||||
for (i = 0; i < offsets.length; i++) {
|
||||
for (j = 0; j < sizes.length; j++) {
|
||||
crc0[i*sizes.length + j] = new CRC32C();
|
||||
crc1[i*sizes.length + j] = new CRC32C();
|
||||
crc0[i*sizes.length + j].update(b, offsets[i], sizes[j]);
|
||||
crcReference[i*sizes.length + j] = update_byteLoop(0, b, offsets[i], sizes[j]);
|
||||
}
|
||||
}
|
||||
|
||||
/* warm up the JIT compiler and get result */
|
||||
// Warm up the JIT compiler. Over time, all methods involved will
|
||||
// be executed by the interpreter, then get compiled by c1 and
|
||||
// finally by c2. Each calculated CRC value must, in each iteration,
|
||||
// be equal to the precalculated reference value for the test to pass.
|
||||
for (k = 0; k < iters; k++) {
|
||||
for (i = 0; i < offsets.length; i++) {
|
||||
for (j = 0; j < sizes.length; j++) {
|
||||
crc1[i*sizes.length + j].reset();
|
||||
crc1[i*sizes.length + j].update(b, offsets[i], sizes[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* check correctness */
|
||||
for (i = 0; i < offsets.length; i++) {
|
||||
for (j = 0; j < sizes.length; j++) {
|
||||
if (!check(crc0[i*sizes.length + j], crc1[i*sizes.length + j])) {
|
||||
System.out.printf("offsets[%d] = %d", i, offsets[i]);
|
||||
System.out.printf("\tsizes[%d] = %d\n", j, sizes[j]);
|
||||
check(crc1[i*sizes.length + j], crcReference[i*sizes.length + j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,7 @@
|
||||
* @modules jdk.internal.vm.ci/jdk.vm.ci.runtime
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions
|
||||
* -Dcompiler.jvmci.JVM_GetJVMCIRuntimeTest.positive=true
|
||||
* -XX:+EnableJVMCI
|
||||
* -XX:+EnableJVMCI -Djvmci.Compiler=null
|
||||
* compiler.jvmci.JVM_GetJVMCIRuntimeTest
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions
|
||||
* -Dcompiler.jvmci.JVM_GetJVMCIRuntimeTest.positive=false
|
||||
@ -39,7 +39,7 @@
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions
|
||||
* -Dcompiler.jvmci.JVM_GetJVMCIRuntimeTest.positive=true
|
||||
* -Dcompiler.jvmci.JVM_GetJVMCIRuntimeTest.threaded=true
|
||||
* -XX:+EnableJVMCI
|
||||
* -XX:+EnableJVMCI -Djvmci.Compiler=null
|
||||
* compiler.jvmci.JVM_GetJVMCIRuntimeTest
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions
|
||||
* -Dcompiler.jvmci.JVM_GetJVMCIRuntimeTest.positive=false
|
||||
|
@ -36,11 +36,11 @@ public class TestJVMCIPrintProperties {
|
||||
public static void main(String[] args) throws Exception {
|
||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
||||
"-XX:+UnlockExperimentalVMOptions",
|
||||
"-XX:+EnableJVMCI",
|
||||
"-XX:+EnableJVMCI", "-Djvmci.Compiler=null",
|
||||
"-XX:+JVMCIPrintProperties");
|
||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||
output.shouldContain("[JVMCI properties]"); // expected message
|
||||
output.shouldContain("jvmci.Compiler = null"); // expected message
|
||||
output.shouldContain("jvmci.Compiler := \"null\""); // expected message
|
||||
output.shouldContain("jvmci.InitTimer = false"); // expected message
|
||||
output.shouldContain("jvmci.PrintConfig = false"); // expected message
|
||||
output.shouldContain("jvmci.TraceMethodDataFilter = null"); // expected message
|
||||
|
@ -34,7 +34,7 @@
|
||||
* jdk.internal.vm.ci/jdk.vm.ci.code
|
||||
* jdk.internal.vm.ci/jdk.vm.ci.meta
|
||||
* @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null
|
||||
* compiler.jvmci.compilerToVM.AsResolvedJavaMethodTest
|
||||
*/
|
||||
|
||||
|
@ -39,6 +39,7 @@
|
||||
* @run main/othervm -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
|
||||
* -Djvmci.Compiler=null
|
||||
* compiler.jvmci.compilerToVM.DoNotInlineOrCompileTest
|
||||
*/
|
||||
|
||||
|
@ -36,6 +36,7 @@
|
||||
* jdk.internal.vm.ci/jdk.vm.ci.runtime
|
||||
* @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
|
||||
* -Djvmci.Compiler=null
|
||||
* compiler.jvmci.compilerToVM.FindUniqueConcreteMethodTest
|
||||
*/
|
||||
|
||||
|
@ -34,6 +34,7 @@
|
||||
* jdk.internal.vm.ci/jdk.vm.ci.code
|
||||
* @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
|
||||
* -Djvmci.Compiler=null
|
||||
* compiler.jvmci.compilerToVM.GetBytecodeTest
|
||||
*/
|
||||
|
||||
|
@ -31,6 +31,7 @@
|
||||
* @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot
|
||||
* @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
|
||||
* -Djvmci.Compiler=null
|
||||
* compiler.jvmci.compilerToVM.GetClassInitializerTest
|
||||
*/
|
||||
|
||||
|
@ -38,6 +38,7 @@
|
||||
* @run main/othervm -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions
|
||||
* -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
|
||||
* -Djvmci.Compiler=null
|
||||
* compiler.jvmci.compilerToVM.GetConstantPoolTest
|
||||
*/
|
||||
package compiler.jvmci.compilerToVM;
|
||||
|
@ -34,6 +34,7 @@
|
||||
* jdk.internal.vm.ci/jdk.vm.ci.code
|
||||
* @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
|
||||
* -Djvmci.Compiler=null
|
||||
* compiler.jvmci.compilerToVM.GetExceptionTableTest
|
||||
*/
|
||||
|
||||
@ -137,4 +138,3 @@ public class GetExceptionTableTest {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,6 +31,7 @@
|
||||
* @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot
|
||||
* @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
|
||||
* -Djvmci.Compiler=null
|
||||
* compiler.jvmci.compilerToVM.GetImplementorTest
|
||||
*/
|
||||
|
||||
|
@ -35,6 +35,7 @@
|
||||
* jdk.internal.vm.ci/jdk.vm.ci.code
|
||||
* @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
|
||||
* -Djvmci.Compiler=null
|
||||
* compiler.jvmci.compilerToVM.GetLineNumberTableTest
|
||||
*/
|
||||
|
||||
|
@ -38,6 +38,7 @@
|
||||
* @compile -g DummyClass.java
|
||||
* @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
|
||||
* -Djvmci.Compiler=null
|
||||
* compiler.jvmci.compilerToVM.GetLocalVariableTableTest
|
||||
* @clean compiler.jvmci.compilerToVM.*
|
||||
*/
|
||||
|
@ -35,6 +35,7 @@
|
||||
* jdk.internal.vm.ci/jdk.vm.ci.meta
|
||||
* @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
|
||||
* -Djvmci.Compiler=null
|
||||
* compiler.jvmci.compilerToVM.GetNextStackFrameTest
|
||||
*/
|
||||
|
||||
|
@ -38,6 +38,7 @@
|
||||
* @run main/othervm -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
|
||||
* -Djvmci.Compiler=null
|
||||
* compiler.jvmci.compilerToVM.GetResolvedJavaMethodTest
|
||||
*/
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user