mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
Merge
This commit is contained in:
commit
063286a618
2585 changed files with 38813 additions and 83044 deletions
5
.hgtags
5
.hgtags
|
@ -1,3 +1,6 @@
|
|||
c7efde2b60fc1ec04630be769d9ad60efb39c39c jdk-9+169
|
||||
8fd0a4569191f33c98ee90c2709174a342fefb0d jdk-9+167
|
||||
fcabc74bd44e56c7419d111d59b95669ecb33c55 jdk-9+168
|
||||
d3e973f1809606c67412361041ad197e50fe8cec jdk-9+166
|
||||
3965b747cfe1e6cbd66b8739da5a1ea6ec6985e9 jdk-9+165
|
||||
d16aebbb56d37f12e0c0b0a4fb427db65e1fb1a8 jdk-9+162
|
||||
|
@ -415,3 +418,5 @@ f4aff695ffe05cfdb69d8af25a4ddc6a029754ea jdk-9+155
|
|||
d1cab6c7e608479be4ebfad48a25b0ed48600f62 jdk-10+3
|
||||
02253db2ace1422f576f58502fc7831ead77424b jdk-10+4
|
||||
f113ce12fe24fbd24acf02711372d9f1e1c12426 jdk-10+5
|
||||
1407b19a2ddf6baae162f5a1a5b96af473f4d7d1 jdk-10+6
|
||||
30e75693ae99fd8e47fd2f5116527aff1b59aff9 jdk-10+7
|
||||
|
|
|
@ -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,12 @@ 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
|
||||
b25838a28195f4b6dab34668411eedd2d366a16c jdk-9+169
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -318,7 +318,7 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
|
|||
AC_SUBST(JAVAC_FLAGS)
|
||||
|
||||
# Check if the boot jdk is 32 or 64 bit
|
||||
if "$JAVA" -d64 -version > /dev/null 2>&1; then
|
||||
if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
|
||||
BOOT_JDK_BITS="64"
|
||||
else
|
||||
BOOT_JDK_BITS="32"
|
||||
|
|
|
@ -1,5 +1,28 @@
|
|||
#!/bin/sh
|
||||
echo >&2 "No suitable 'install' command found.'"
|
||||
echo >&2 "If automake is installed, running 'automake -fa'"
|
||||
echo >&2 "(and ignoring the errors) might produce one."
|
||||
exit 1
|
||||
#!/bin/bash
|
||||
#
|
||||
# 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. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# This file is empty on purpose. It's a placeholder which is required by
|
||||
# autoconf, but it serves no purpose for us.
|
||||
|
|
|
@ -417,10 +417,8 @@ AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC],
|
|||
AC_SUBST(SJAVAC_SERVER_JAVA)
|
||||
|
||||
if test "$MEMORY_SIZE" -gt "3000"; then
|
||||
ADD_JVM_ARG_IF_OK([-d64],SJAVAC_SERVER_JAVA_FLAGS,[$SJAVAC_SERVER_JAVA])
|
||||
if test "$JVM_ARG_OK" = true; then
|
||||
if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
|
||||
JVM_64BIT=true
|
||||
JVM_ARG_OK=false
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -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,9 @@ 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
|
||||
RELEASE_FILE_OS_ARCH
|
||||
RELEASE_FILE_OS_NAME
|
||||
OPENJDK_MODULE_TARGET_PLATFORM
|
||||
COMPILE_TYPE
|
||||
OPENJDK_TARGET_CPU_ENDIAN
|
||||
OPENJDK_TARGET_CPU_BITS
|
||||
|
@ -1139,6 +1141,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 +1294,7 @@ ZIPEXE
|
|||
LDD
|
||||
OTOOL
|
||||
READELF
|
||||
DOT
|
||||
HG
|
||||
STAT
|
||||
TIME
|
||||
|
@ -1972,6 +1976,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 +2262,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
|
||||
|
@ -4894,6 +4901,8 @@ VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
#%%% Build and target systems %%%
|
||||
|
||||
|
||||
|
@ -5177,7 +5186,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=1494615666
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
|
@ -16025,32 +16034,38 @@ $as_echo_n "checking compilation type... " >&6; }
|
|||
$as_echo "$COMPILE_TYPE" >&6; }
|
||||
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
OPENJDK_MODULE_TARGET_OS_NAME="macos"
|
||||
else
|
||||
OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
|
||||
fi
|
||||
|
||||
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
|
||||
|
||||
OPENJDK_MODULE_TARGET_PLATFORM="${OPENJDK_MODULE_TARGET_OS_NAME}-${OPENJDK_MODULE_TARGET_OS_ARCH}"
|
||||
|
||||
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
|
||||
REQUIRED_OS_NAME=SunOS
|
||||
REQUIRED_OS_VERSION=5.10
|
||||
RELEASE_FILE_OS_NAME=SunOS
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
|
||||
REQUIRED_OS_NAME=Linux
|
||||
REQUIRED_OS_VERSION=2.6
|
||||
RELEASE_FILE_OS_NAME=Linux
|
||||
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
|
||||
else
|
||||
REQUIRED_OS_VERSION=5.1
|
||||
fi
|
||||
RELEASE_FILE_OS_NAME=Windows
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
|
||||
REQUIRED_OS_NAME="Mac OS X"
|
||||
REQUIRED_OS_VERSION=11.2
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
RELEASE_FILE_OS_NAME="Darwin"
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = "xaix"; then
|
||||
REQUIRED_OS_NAME=AIX
|
||||
REQUIRED_OS_VERSION=7.1
|
||||
RELEASE_FILE_OS_NAME="AIX"
|
||||
fi
|
||||
REQUIRED_OS_ARCH=${OPENJDK_TARGET_CPU}
|
||||
|
||||
RELEASE_FILE_OS_ARCH=${OPENJDK_TARGET_CPU}
|
||||
|
||||
|
||||
|
||||
|
@ -22473,6 +22488,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 +24935,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.
|
||||
|
@ -31109,7 +31416,7 @@ $as_echo "no" >&6; }
|
|||
|
||||
|
||||
# Check if the boot jdk is 32 or 64 bit
|
||||
if "$JAVA" -d64 -version > /dev/null 2>&1; then
|
||||
if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
|
||||
BOOT_JDK_BITS="64"
|
||||
else
|
||||
BOOT_JDK_BITS="32"
|
||||
|
@ -65627,24 +65934,8 @@ fi
|
|||
|
||||
|
||||
if test "$MEMORY_SIZE" -gt "3000"; then
|
||||
|
||||
$ECHO "Check if jvm arg is ok: -d64" >&5
|
||||
$ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
|
||||
OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
|
||||
FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
|
||||
FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
|
||||
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
|
||||
SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
|
||||
JVM_ARG_OK=true
|
||||
else
|
||||
$ECHO "Arg failed:" >&5
|
||||
$ECHO "$OUTPUT" >&5
|
||||
JVM_ARG_OK=false
|
||||
fi
|
||||
|
||||
if test "$JVM_ARG_OK" = true; then
|
||||
if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
|
||||
JVM_64BIT=true
|
||||
JVM_ARG_OK=false
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -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])])
|
||||
|
|
|
@ -436,34 +436,42 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER],
|
|||
AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES],
|
||||
[
|
||||
if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
|
||||
REQUIRED_OS_NAME=SunOS
|
||||
REQUIRED_OS_VERSION=5.10
|
||||
RELEASE_FILE_OS_NAME=SunOS
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
|
||||
REQUIRED_OS_NAME=Linux
|
||||
REQUIRED_OS_VERSION=2.6
|
||||
RELEASE_FILE_OS_NAME=Linux
|
||||
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
|
||||
else
|
||||
REQUIRED_OS_VERSION=5.1
|
||||
fi
|
||||
RELEASE_FILE_OS_NAME=Windows
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
|
||||
REQUIRED_OS_NAME="Mac OS X"
|
||||
REQUIRED_OS_VERSION=11.2
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
RELEASE_FILE_OS_NAME="Darwin"
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = "xaix"; then
|
||||
REQUIRED_OS_NAME=AIX
|
||||
REQUIRED_OS_VERSION=7.1
|
||||
RELEASE_FILE_OS_NAME="AIX"
|
||||
fi
|
||||
REQUIRED_OS_ARCH=${OPENJDK_TARGET_CPU}
|
||||
RELEASE_FILE_OS_ARCH=${OPENJDK_TARGET_CPU}
|
||||
|
||||
AC_SUBST(REQUIRED_OS_NAME)
|
||||
AC_SUBST(REQUIRED_OS_ARCH)
|
||||
AC_SUBST(REQUIRED_OS_VERSION)
|
||||
AC_SUBST(RELEASE_FILE_OS_NAME)
|
||||
AC_SUBST(RELEASE_FILE_OS_ARCH)
|
||||
])
|
||||
|
||||
AC_DEFUN([PLATFORM_SET_MODULE_TARGET_OS_VALUES],
|
||||
[
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
OPENJDK_MODULE_TARGET_OS_NAME="macos"
|
||||
else
|
||||
OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
|
||||
fi
|
||||
|
||||
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
|
||||
|
||||
OPENJDK_MODULE_TARGET_PLATFORM="${OPENJDK_MODULE_TARGET_OS_NAME}-${OPENJDK_MODULE_TARGET_OS_ARCH}"
|
||||
AC_SUBST(OPENJDK_MODULE_TARGET_PLATFORM)
|
||||
])
|
||||
|
||||
#%%% Build and target systems %%%
|
||||
|
@ -480,6 +488,7 @@ AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET],
|
|||
|
||||
PLATFORM_EXTRACT_TARGET_AND_BUILD
|
||||
PLATFORM_SETUP_TARGET_CPU_BITS
|
||||
PLATFORM_SET_MODULE_TARGET_OS_VALUES
|
||||
PLATFORM_SET_RELEASE_FILE_OS_VALUES
|
||||
PLATFORM_SETUP_LEGACY_VARS
|
||||
])
|
||||
|
|
|
@ -101,10 +101,12 @@ 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@
|
||||
# Target platform value in ModuleTarget class file attribute.
|
||||
OPENJDK_MODULE_TARGET_PLATFORM:=@OPENJDK_MODULE_TARGET_PLATFORM@
|
||||
|
||||
# OS_* properties in release file
|
||||
RELEASE_FILE_OS_NAME:=@RELEASE_FILE_OS_NAME@
|
||||
RELEASE_FILE_OS_ARCH:=@RELEASE_FILE_OS_ARCH@
|
||||
|
||||
LIBM:=@LIBM@
|
||||
LIBDL:=@LIBDL@
|
||||
|
@ -245,6 +247,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 +683,7 @@ OTOOL:=@OTOOL@
|
|||
READELF:=@READELF@
|
||||
EXPR:=@EXPR@
|
||||
FILE:=@FILE@
|
||||
DOT:=@DOT@
|
||||
HG:=@HG@
|
||||
OBJCOPY:=@OBJCOPY@
|
||||
SETFILE:=@SETFILE@
|
||||
|
@ -842,11 +847,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 +854,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
|
||||
|
@ -239,11 +239,8 @@ var getJibProfilesCommon = function (input, data) {
|
|||
common.main_profile_base = {
|
||||
dependencies: ["boot_jdk", "gnumake", "jtreg"],
|
||||
default_make_targets: ["product-bundles", "test-bundles"],
|
||||
configure_args: [
|
||||
"--with-version-opt=" + common.build_id,
|
||||
"--enable-jtreg-failure-handler",
|
||||
"--with-version-build=" + common.build_number
|
||||
]
|
||||
configure_args: concat(["--enable-jtreg-failure-handler"],
|
||||
versionArgs(input, common))
|
||||
};
|
||||
// Extra settings for debug profiles
|
||||
common.debug_suffix = "-debug";
|
||||
|
@ -269,10 +266,12 @@ var getJibProfilesCommon = function (input, data) {
|
|||
|
||||
/**
|
||||
* Define common artifacts template for all main profiles
|
||||
* @param pf - Name of platform in bundle names
|
||||
* @param demo_ext - Type of extension for demo bundle
|
||||
* @param o - Object containing data for artifacts
|
||||
*/
|
||||
common.main_profile_artifacts = function (pf, demo_ext) {
|
||||
common.main_profile_artifacts = function (o) {
|
||||
var jdk_subdir = (o.jdk_subdir != null ? o.jdk_subdir : "jdk-" + data.version);
|
||||
var jre_subdir = (o.jre_subdir != null ? o.jre_subdir : "jre-" + data.version);
|
||||
var pf = o.platform
|
||||
return {
|
||||
artifacts: {
|
||||
jdk: {
|
||||
|
@ -281,7 +280,7 @@ var getJibProfilesCommon = function (input, data) {
|
|||
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin.tar.gz",
|
||||
"bundles/" + pf + "/\\1"
|
||||
],
|
||||
subdir: "jdk-" + data.version,
|
||||
subdir: jdk_subdir,
|
||||
exploded: "images/jdk"
|
||||
},
|
||||
jre: {
|
||||
|
@ -290,7 +289,7 @@ var getJibProfilesCommon = function (input, data) {
|
|||
"bundles/" + pf + "/jre-" + data.version + "_" + pf + "_bin.tar.gz",
|
||||
"bundles/" + pf + "/\\1"
|
||||
],
|
||||
subdir: "jre-" + data.version,
|
||||
subdir: jre_subdir,
|
||||
exploded: "images/jre"
|
||||
},
|
||||
test: {
|
||||
|
@ -307,7 +306,7 @@ var getJibProfilesCommon = function (input, data) {
|
|||
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-symbols.tar.gz",
|
||||
"bundles/" + pf + "/\\1"
|
||||
],
|
||||
subdir: "jdk-" + data.version,
|
||||
subdir: jdk_subdir,
|
||||
exploded: "images/jdk"
|
||||
},
|
||||
jre_symbols: {
|
||||
|
@ -316,15 +315,8 @@ var getJibProfilesCommon = function (input, data) {
|
|||
"bundles/" + pf + "/jre-" + data.version + "_" + pf + "_bin-symbols.tar.gz",
|
||||
"bundles/" + pf + "/\\1"
|
||||
],
|
||||
subdir: "jre-" + data.version,
|
||||
subdir: jre_subdir,
|
||||
exploded: "images/jre"
|
||||
},
|
||||
demo: {
|
||||
local: "bundles/\\(jdk.*demo." + demo_ext + "\\)",
|
||||
remote: [
|
||||
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_demo." + demo_ext,
|
||||
"bundles/" + pf + "/\\1"
|
||||
],
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -333,9 +325,12 @@ var getJibProfilesCommon = function (input, data) {
|
|||
|
||||
/**
|
||||
* Define common artifacts template for all debug profiles
|
||||
* @param pf - Name of platform in bundle names
|
||||
* @param o - Object containing data for artifacts
|
||||
*/
|
||||
common.debug_profile_artifacts = function (pf) {
|
||||
common.debug_profile_artifacts = function (o) {
|
||||
var jdk_subdir = "jdk-" + data.version + "/fastdebug";
|
||||
var jre_subdir = "jre-" + data.version + "/fastdebug";
|
||||
var pf = o.platform
|
||||
return {
|
||||
artifacts: {
|
||||
jdk: {
|
||||
|
@ -344,7 +339,7 @@ var getJibProfilesCommon = function (input, data) {
|
|||
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-debug.tar.gz",
|
||||
"bundles/" + pf + "/\\1"
|
||||
],
|
||||
subdir: "jdk-" + data.version,
|
||||
subdir: jdk_subdir,
|
||||
exploded: "images/jdk"
|
||||
},
|
||||
jre: {
|
||||
|
@ -353,7 +348,7 @@ var getJibProfilesCommon = function (input, data) {
|
|||
"bundles/" + pf + "/jre-" + data.version + "_" + pf + "_bin-debug.tar.gz",
|
||||
"bundles/" + pf + "/\\1"
|
||||
],
|
||||
subdir: "jre-" + data.version,
|
||||
subdir: jre_subdir,
|
||||
exploded: "images/jre"
|
||||
},
|
||||
test: {
|
||||
|
@ -370,7 +365,7 @@ var getJibProfilesCommon = function (input, data) {
|
|||
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-debug-symbols.tar.gz",
|
||||
"bundles/" + pf + "/\\1"
|
||||
],
|
||||
subdir: "jdk-" + data.version,
|
||||
subdir: jdk_subdir,
|
||||
exploded: "images/jdk"
|
||||
},
|
||||
jre_symbols: {
|
||||
|
@ -379,7 +374,7 @@ var getJibProfilesCommon = function (input, data) {
|
|||
"bundles/" + pf + "/jre-" + data.version + "_" + pf + "_bin-debug-symbols.tar.gz",
|
||||
"bundles/" + pf + "/\\1"
|
||||
],
|
||||
subdir: "jre-" + data.version,
|
||||
subdir: jre_subdir,
|
||||
exploded: "images/jre"
|
||||
}
|
||||
}
|
||||
|
@ -422,8 +417,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"],
|
||||
},
|
||||
|
||||
|
@ -664,61 +660,53 @@ var getJibProfilesProfiles = function (input, common, data) {
|
|||
//
|
||||
// Define artifacts for profiles
|
||||
//
|
||||
// Macosx bundles are named osx and Windows demo bundles use zip instead of
|
||||
// Macosx bundles are named osx
|
||||
// tar.gz.
|
||||
var artifactData = {
|
||||
"linux-x64": {
|
||||
platform: "linux-x64",
|
||||
demo_ext: "tar.gz"
|
||||
},
|
||||
"linux-x86": {
|
||||
platform: "linux-x86",
|
||||
demo_ext: "tar.gz"
|
||||
},
|
||||
"macosx-x64": {
|
||||
platform: "osx-x64",
|
||||
demo_ext: "tar.gz"
|
||||
jdk_subdir: "jdk-" + data.version + ".jdk/Contents/Home",
|
||||
jre_subdir: "jre-" + data.version + ".jre/Contents/Home"
|
||||
},
|
||||
"solaris-x64": {
|
||||
platform: "solaris-x64",
|
||||
demo_ext: "tar.gz"
|
||||
},
|
||||
"solaris-sparcv9": {
|
||||
platform: "solaris-sparcv9",
|
||||
demo_ext: "tar.gz"
|
||||
},
|
||||
"windows-x64": {
|
||||
platform: "windows-x64",
|
||||
demo_ext: "zip"
|
||||
},
|
||||
"windows-x86": {
|
||||
platform: "windows-x86",
|
||||
demo_ext: "zip"
|
||||
},
|
||||
"linux-arm64": {
|
||||
platform: "linux-arm64-vfp-hflt",
|
||||
demo_ext: "tar.gz"
|
||||
},
|
||||
"linux-arm-vfp-hflt": {
|
||||
platform: "linux-arm32-vfp-hflt",
|
||||
demo_ext: "tar.gz"
|
||||
},
|
||||
"linux-arm-vfp-hflt-dyn": {
|
||||
platform: "linux-arm32-vfp-hflt-dyn",
|
||||
demo_ext: "tar.gz"
|
||||
}
|
||||
}
|
||||
// Generate common artifacts for all main profiles
|
||||
Object.keys(artifactData).forEach(function (name) {
|
||||
profiles[name] = concatObjects(profiles[name],
|
||||
common.main_profile_artifacts(artifactData[name].platform, artifactData[name].demo_ext));
|
||||
common.main_profile_artifacts(artifactData[name]));
|
||||
});
|
||||
|
||||
// Generate common artifacts for all debug profiles
|
||||
Object.keys(artifactData).forEach(function (name) {
|
||||
var debugName = name + common.debug_suffix;
|
||||
profiles[debugName] = concatObjects(profiles[debugName],
|
||||
common.debug_profile_artifacts(artifactData[name].platform));
|
||||
common.debug_profile_artifacts(artifactData[name]));
|
||||
});
|
||||
|
||||
// Extra profile specific artifacts
|
||||
|
@ -739,7 +727,12 @@ var getJibProfilesProfiles = function (input, common, data) {
|
|||
artifacts: {
|
||||
jdk: {
|
||||
local: "bundles/\\(jdk.*bin.tar.gz\\)",
|
||||
remote: "bundles/openjdk/GPL/linux-x64/\\1",
|
||||
remote: [
|
||||
"bundles/openjdk/GPL/linux-x64/jdk-" + data.version
|
||||
+ "_linux-x64_bin.tar.gz",
|
||||
"bundles/openjdk/GPL/linux-x64/\\1"
|
||||
],
|
||||
subdir: "jdk-" + data.version
|
||||
},
|
||||
jre: {
|
||||
local: "bundles/\\(jre.*bin.tar.gz\\)",
|
||||
|
@ -747,20 +740,25 @@ var getJibProfilesProfiles = function (input, common, data) {
|
|||
},
|
||||
test: {
|
||||
local: "bundles/\\(jdk.*bin-tests.tar.gz\\)",
|
||||
remote: "bundles/openjdk/GPL/linux-x64/\\1",
|
||||
remote: [
|
||||
"bundles/openjdk/GPL/linux-x64/jdk-" + data.version
|
||||
+ "_linux-x64_bin-tests.tar.gz",
|
||||
"bundles/openjdk/GPL/linux-x64/\\1"
|
||||
]
|
||||
},
|
||||
jdk_symbols: {
|
||||
local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)",
|
||||
remote: "bundles/openjdk/GPL/linux-x64/\\1",
|
||||
remote: [
|
||||
"bundles/openjdk/GPL/linux-x64/jdk-" + data.version
|
||||
+ "_linux-x64_bin-symbols.tar.gz",
|
||||
"bundles/openjdk/GPL/linux-x64/\\1"
|
||||
],
|
||||
subdir: "jdk-" + data.version
|
||||
},
|
||||
jre_symbols: {
|
||||
local: "bundles/\\(jre.*bin-symbols.tar.gz\\)",
|
||||
remote: "bundles/openjdk/GPL/linux-x64/\\1",
|
||||
},
|
||||
demo: {
|
||||
local: "bundles/\\(jdk.*demo.tar.gz\\)",
|
||||
remote: "bundles/openjdk/GPL/linux-x64/\\1",
|
||||
},
|
||||
doc_api_spec: {
|
||||
local: "bundles/\\(jdk.*doc-api-spec.tar.gz\\)",
|
||||
remote: "bundles/openjdk/GPL/linux-x64/\\1",
|
||||
|
@ -772,11 +770,29 @@ var getJibProfilesProfiles = function (input, common, data) {
|
|||
artifacts: {
|
||||
jdk: {
|
||||
local: "bundles/\\(jdk.*bin.tar.gz\\)",
|
||||
remote: "bundles/openjdk/GPL/profile/linux-x86/\\1",
|
||||
remote: [
|
||||
"bundles/openjdk/GPL/linux-x86/jdk-" + data.version
|
||||
+ "_linux-x86_bin.tar.gz",
|
||||
"bundles/openjdk/GPL/linux-x86/\\1"
|
||||
],
|
||||
subdir: "jdk-" + data.version
|
||||
},
|
||||
jdk_symbols: {
|
||||
local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)",
|
||||
remote: "bundles/openjdk/GPL/profile/linux-x86/\\1",
|
||||
remote: [
|
||||
"bundles/openjdk/GPL/linux-x86/jdk-" + data.version
|
||||
+ "_linux-x86_bin-symbols.tar.gz",
|
||||
"bundles/openjdk/GPL/linux-x86/\\1"
|
||||
],
|
||||
subdir: "jdk-" + data.version
|
||||
},
|
||||
test: {
|
||||
local: "bundles/\\(jdk.*bin-tests.tar.gz\\)",
|
||||
remote: [
|
||||
"bundles/openjdk/GPL/linux-x86/jdk-" + data.version
|
||||
+ "_linux-x86_bin-tests.tar.gz",
|
||||
"bundles/openjdk/GPL/linux-x86/\\1"
|
||||
]
|
||||
},
|
||||
jre: {
|
||||
// This regexp needs to not match the compact* files below
|
||||
|
@ -802,7 +818,12 @@ var getJibProfilesProfiles = function (input, common, data) {
|
|||
artifacts: {
|
||||
jdk: {
|
||||
local: "bundles/\\(jdk.*bin.tar.gz\\)",
|
||||
remote: "bundles/openjdk/GPL/windows-x86/\\1",
|
||||
remote: [
|
||||
"bundles/openjdk/GPL/windows-x86/jdk-" + data.version
|
||||
+ "_windows-x86_bin.tar.gz",
|
||||
"bundles/openjdk/GPL/windows-x86/\\1"
|
||||
],
|
||||
subdir: "jdk-" + data.version
|
||||
},
|
||||
jre: {
|
||||
local: "bundles/\\(jre.*bin.tar.gz\\)",
|
||||
|
@ -810,19 +831,24 @@ var getJibProfilesProfiles = function (input, common, data) {
|
|||
},
|
||||
test: {
|
||||
local: "bundles/\\(jdk.*bin-tests.tar.gz\\)",
|
||||
remote: "bundles/openjdk/GPL/windows-x86/\\1",
|
||||
remote: [
|
||||
"bundles/openjdk/GPL/windows-x86/jdk-" + data.version
|
||||
+ "_windows-x86_bin-tests.tar.gz",
|
||||
"bundles/openjdk/GPL/windows-x86/\\1"
|
||||
]
|
||||
},
|
||||
jdk_symbols: {
|
||||
local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)",
|
||||
remote: "bundles/openjdk/GPL/windows-x86/\\1"
|
||||
remote: [
|
||||
"bundles/openjdk/GPL/windows-x86/jdk-" + data.version
|
||||
+ "_windows-x86_bin-symbols.tar.gz",
|
||||
"bundles/openjdk/GPL/windows-x86/\\1"
|
||||
],
|
||||
subdir: "jdk-" + data.version
|
||||
},
|
||||
jre_symbols: {
|
||||
local: "bundles/\\(jre.*bin-symbols.tar.gz\\)",
|
||||
remote: "bundles/openjdk/GPL/windows-x86/\\1",
|
||||
},
|
||||
demo: {
|
||||
local: "bundles/\\(jdk.*demo.zip\\)",
|
||||
remote: "bundles/openjdk/GPL/windows-x86/\\1",
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -964,7 +990,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;
|
||||
|
@ -1137,6 +1179,23 @@ var getVersion = function (major, minor, security, patch) {
|
|||
return version;
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructs the common version configure args based on build type and
|
||||
* other version inputs
|
||||
*/
|
||||
var versionArgs = function(input, common) {
|
||||
var args = ["--with-version-build=" + common.build_number];
|
||||
if (input.build_type == "promoted") {
|
||||
args = concat(args,
|
||||
// This needs to be changed when we start building release candidates
|
||||
"--with-version-pre=ea",
|
||||
"--without-version-opt");
|
||||
} else {
|
||||
args = concat(args, "--with-version-opt=" + common.build_id);
|
||||
}
|
||||
return args;
|
||||
}
|
||||
|
||||
// Properties representation of the common/autoconf/version-numbers file. Lazily
|
||||
// initiated by the function below.
|
||||
var version_numbers;
|
||||
|
|
|
@ -199,9 +199,8 @@ Additional options to the Gtest test framework.
|
|||
Use `GTEST="OPTIONS=--help"` to see all available Gtest options.
|
||||
|
||||
---
|
||||
# Override some definitions in http://openjdk.java.net/page.css that are
|
||||
# unsuitable for this document.
|
||||
# Override some definitions in the global css file that are not optimal for
|
||||
# this document.
|
||||
header-includes:
|
||||
- '<style type="text/css">pre, code, tt { color: #1d6ae5; }</style>'
|
||||
- '<style type="text/css">pre { font-size: 10pt; }</style>'
|
||||
---
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -400,6 +400,7 @@ d66f97a610a6beac987740edc2bf6a70f46ba574 jdk-10+0
|
|||
078ebe23b584466dc8346e620d7821d91751e5a9 jdk-9+154
|
||||
a545f54babfa31aa7eb611f36031609acd617cbc jdk-9+155
|
||||
907c26240cd481579e919bfd23740797ff8ce1c8 jdk-9+156
|
||||
37c9962586a4d3498fa673d93eab1a336acd7652 jdk-10+1
|
||||
9383da04b385cca46b7ca67f3a39ac1b673e09fe jdk-9+157
|
||||
de6bdf38935fa753183ca288bed5c06a23c0bb12 jdk-9+158
|
||||
6feea77d2083c99e44aa3e272d07b7fb3b801683 jdk-9+159
|
||||
|
@ -410,3 +411,11 @@ c7688f2fa07936b089ca0e9a0a0eff68ff37a542 jdk-9+160
|
|||
965bbae3072702f7c0d95c240523b65e6bb19261 jdk-9+164
|
||||
a510b2201154abdd12ede42788086b5283bfb9a6 jdk-9+165
|
||||
934c18145915b06d3fcc0de1a30f91f5aab8a192 jdk-9+166
|
||||
56a8bf5322684e9a31cda64c336c32bcdb592211 jdk-10+2
|
||||
3813c94c8585dd7507887916c6943f45051f1b55 jdk-10+3
|
||||
5d6d891bb36dbeeacaffa06b5a3e3b4e44b35fbd jdk-10+4
|
||||
7c5328012799923d45d1cf87e8725e725b3d298b jdk-10+5
|
||||
c7358d703e1282af3dcd8af6c037dc4342de9054 jdk-10+6
|
||||
43de67f51801b9e16507865fcb7e8344f4ca4aa9 jdk-9+167
|
||||
03a2cc9c8a1e8f87924c9863e917bc8b91770d5f jdk-9+168
|
||||
b2218d41edef02ee8f94bb438f885b2ba79bfa08 jdk-9+169
|
||||
|
|
|
@ -576,3 +576,6 @@ c92c6416ca03b1464d5ed99cf6201e52b5ba0a70 jdk-9+165
|
|||
8295ca08f5cb09c090eb048bbdd338d7e270c8bf jdk-10+4
|
||||
7b5ca2ff1f78873ca3ee99b6589d3cb4dde2e454 jdk-10+5
|
||||
762465099d938fd96cd1efda193bc1fa23d070d3 jdk-10+6
|
||||
1ca7ed1b17b5776930d641d1379834f3140a74e4 jdk-9+167
|
||||
fbb9c802649585d19f6d7e81b4a519d44806225a jdk-9+168
|
||||
16d692be099c5c38eb48cc9aca78b0c900910d5b jdk-9+169
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -577,7 +577,7 @@ reg_class no_special_reg32_with_fp(
|
|||
R26
|
||||
/* R27, */ // heapbase
|
||||
/* R28, */ // thread
|
||||
/* R29, */ // fp
|
||||
R29, // fp
|
||||
/* R30, */ // lr
|
||||
/* R31 */ // sp
|
||||
);
|
||||
|
@ -646,7 +646,7 @@ reg_class no_special_reg_with_fp(
|
|||
R26, R26_H,
|
||||
/* R27, R27_H, */ // heapbase
|
||||
/* R28, R28_H, */ // thread
|
||||
/* R29, R29_H, */ // fp
|
||||
R29, R29_H, // fp
|
||||
/* R30, R30_H, */ // lr
|
||||
/* R31, R31_H */ // sp
|
||||
);
|
||||
|
@ -14021,10 +14021,12 @@ instruct clearArray_reg_reg(iRegL_R11 cnt, iRegP_R10 base, Universe dummy, rFlag
|
|||
ins_pipe(pipe_class_memory);
|
||||
%}
|
||||
|
||||
instruct clearArray_imm_reg(immL cnt, iRegP_R10 base, iRegL_R11 tmp, Universe dummy, rFlagsReg cr)
|
||||
instruct clearArray_imm_reg(immL cnt, iRegP_R10 base, Universe dummy, rFlagsReg cr)
|
||||
%{
|
||||
predicate((u_int64_t)n->in(2)->get_long()
|
||||
< (u_int64_t)(BlockZeroingLowLimit >> LogBytesPerWord));
|
||||
match(Set dummy (ClearArray cnt base));
|
||||
effect(USE_KILL base, TEMP tmp);
|
||||
effect(USE_KILL base);
|
||||
|
||||
ins_cost(4 * INSN_COST);
|
||||
format %{ "ClearArray $cnt, $base" %}
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights All rights reserved.
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
* reserved. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE
|
||||
* HEADER.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
|
@ -21,7 +20,6 @@
|
|||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -698,6 +698,7 @@ void MacroAssembler::call_VM_helper(Register oop_result, address entry_point, in
|
|||
// trampolines won't be emitted.
|
||||
|
||||
address MacroAssembler::trampoline_call(Address entry, CodeBuffer *cbuf) {
|
||||
assert(JavaThread::current()->is_Compiler_thread(), "just checking");
|
||||
assert(entry.rspec().type() == relocInfo::runtime_call_type
|
||||
|| entry.rspec().type() == relocInfo::opt_virtual_call_type
|
||||
|| entry.rspec().type() == relocInfo::static_call_type
|
||||
|
@ -4950,34 +4951,67 @@ void MacroAssembler::arrays_equals(Register a1, Register a2,
|
|||
}
|
||||
|
||||
|
||||
// base: Address of a buffer to be zeroed, 8 bytes aligned.
|
||||
// cnt: Count in HeapWords.
|
||||
// is_large: True when 'cnt' is known to be >= BlockZeroingLowLimit.
|
||||
void MacroAssembler::zero_words(Register base, Register cnt)
|
||||
// The size of the blocks erased by the zero_blocks stub. We must
|
||||
// handle anything smaller than this ourselves in zero_words().
|
||||
const int MacroAssembler::zero_words_block_size = 8;
|
||||
|
||||
// zero_words() is used by C2 ClearArray patterns. It is as small as
|
||||
// possible, handling small word counts locally and delegating
|
||||
// anything larger to the zero_blocks stub. It is expanded many times
|
||||
// in compiled code, so it is important to keep it short.
|
||||
|
||||
// ptr: Address of a buffer to be zeroed.
|
||||
// cnt: Count in HeapWords.
|
||||
//
|
||||
// ptr, cnt, rscratch1, and rscratch2 are clobbered.
|
||||
void MacroAssembler::zero_words(Register ptr, Register cnt)
|
||||
{
|
||||
if (UseBlockZeroing) {
|
||||
block_zero(base, cnt);
|
||||
} else {
|
||||
fill_words(base, cnt, zr);
|
||||
assert(is_power_of_2(zero_words_block_size), "adjust this");
|
||||
assert(ptr == r10 && cnt == r11, "mismatch in register usage");
|
||||
|
||||
BLOCK_COMMENT("zero_words {");
|
||||
cmp(cnt, zero_words_block_size);
|
||||
Label around, done, done16;
|
||||
br(LO, around);
|
||||
{
|
||||
RuntimeAddress zero_blocks = RuntimeAddress(StubRoutines::aarch64::zero_blocks());
|
||||
assert(zero_blocks.target() != NULL, "zero_blocks stub has not been generated");
|
||||
if (StubRoutines::aarch64::complete()) {
|
||||
trampoline_call(zero_blocks);
|
||||
} else {
|
||||
bl(zero_blocks);
|
||||
}
|
||||
}
|
||||
bind(around);
|
||||
for (int i = zero_words_block_size >> 1; i > 1; i >>= 1) {
|
||||
Label l;
|
||||
tbz(cnt, exact_log2(i), l);
|
||||
for (int j = 0; j < i; j += 2) {
|
||||
stp(zr, zr, post(ptr, 16));
|
||||
}
|
||||
bind(l);
|
||||
}
|
||||
{
|
||||
Label l;
|
||||
tbz(cnt, 0, l);
|
||||
str(zr, Address(ptr));
|
||||
bind(l);
|
||||
}
|
||||
BLOCK_COMMENT("} zero_words");
|
||||
}
|
||||
|
||||
// r10 = base: Address of a buffer to be zeroed, 8 bytes aligned.
|
||||
// base: Address of a buffer to be zeroed, 8 bytes aligned.
|
||||
// cnt: Immediate count in HeapWords.
|
||||
// r11 = tmp: For use as cnt if we need to call out
|
||||
#define ShortArraySize (18 * BytesPerLong)
|
||||
#define SmallArraySize (18 * BytesPerLong)
|
||||
void MacroAssembler::zero_words(Register base, u_int64_t cnt)
|
||||
{
|
||||
Register tmp = r11;
|
||||
BLOCK_COMMENT("zero_words {");
|
||||
int i = cnt & 1; // store any odd word to start
|
||||
if (i) str(zr, Address(base));
|
||||
|
||||
if (cnt <= ShortArraySize / BytesPerLong) {
|
||||
if (cnt <= SmallArraySize / BytesPerLong) {
|
||||
for (; i < (int)cnt; i += 2)
|
||||
stp(zr, zr, Address(base, i * wordSize));
|
||||
} else if (UseBlockZeroing && cnt >= (u_int64_t)(BlockZeroingLowLimit >> LogBytesPerWord)) {
|
||||
mov(tmp, cnt);
|
||||
block_zero(base, tmp, true);
|
||||
} else {
|
||||
const int unroll = 4; // Number of stp(zr, zr) instructions we'll unroll
|
||||
int remainder = cnt % (2 * unroll);
|
||||
|
@ -4998,6 +5032,51 @@ void MacroAssembler::zero_words(Register base, u_int64_t cnt)
|
|||
stp(zr, zr, Address(pre(loop_base, 2 * unroll * wordSize)));
|
||||
cbnz(cnt_reg, loop);
|
||||
}
|
||||
BLOCK_COMMENT("} zero_words");
|
||||
}
|
||||
|
||||
// Zero blocks of memory by using DC ZVA.
|
||||
//
|
||||
// Aligns the base address first sufficently for DC ZVA, then uses
|
||||
// DC ZVA repeatedly for every full block. cnt is the size to be
|
||||
// zeroed in HeapWords. Returns the count of words left to be zeroed
|
||||
// in cnt.
|
||||
//
|
||||
// NOTE: This is intended to be used in the zero_blocks() stub. If
|
||||
// you want to use it elsewhere, note that cnt must be >= 2*zva_length.
|
||||
void MacroAssembler::zero_dcache_blocks(Register base, Register cnt) {
|
||||
Register tmp = rscratch1;
|
||||
Register tmp2 = rscratch2;
|
||||
int zva_length = VM_Version::zva_length();
|
||||
Label initial_table_end, loop_zva;
|
||||
Label fini;
|
||||
|
||||
// Base must be 16 byte aligned. If not just return and let caller handle it
|
||||
tst(base, 0x0f);
|
||||
br(Assembler::NE, fini);
|
||||
// Align base with ZVA length.
|
||||
neg(tmp, base);
|
||||
andr(tmp, tmp, zva_length - 1);
|
||||
|
||||
// tmp: the number of bytes to be filled to align the base with ZVA length.
|
||||
add(base, base, tmp);
|
||||
sub(cnt, cnt, tmp, Assembler::ASR, 3);
|
||||
adr(tmp2, initial_table_end);
|
||||
sub(tmp2, tmp2, tmp, Assembler::LSR, 2);
|
||||
br(tmp2);
|
||||
|
||||
for (int i = -zva_length + 16; i < 0; i += 16)
|
||||
stp(zr, zr, Address(base, i));
|
||||
bind(initial_table_end);
|
||||
|
||||
sub(cnt, cnt, zva_length >> 3);
|
||||
bind(loop_zva);
|
||||
dc(Assembler::ZVA, base);
|
||||
subs(cnt, cnt, zva_length >> 3);
|
||||
add(base, base, zva_length);
|
||||
br(Assembler::GE, loop_zva);
|
||||
add(cnt, cnt, zva_length >> 3); // count not zeroed by DC ZVA
|
||||
bind(fini);
|
||||
}
|
||||
|
||||
// base: Address of a buffer to be filled, 8 bytes aligned.
|
||||
|
@ -5058,69 +5137,6 @@ void MacroAssembler::fill_words(Register base, Register cnt, Register value)
|
|||
bind(fini);
|
||||
}
|
||||
|
||||
// Use DC ZVA to do fast zeroing.
|
||||
// base: Address of a buffer to be zeroed, 8 bytes aligned.
|
||||
// cnt: Count in HeapWords.
|
||||
// is_large: True when 'cnt' is known to be >= BlockZeroingLowLimit.
|
||||
void MacroAssembler::block_zero(Register base, Register cnt, bool is_large)
|
||||
{
|
||||
Label small;
|
||||
Label store_pair, loop_store_pair, done;
|
||||
Label base_aligned;
|
||||
|
||||
assert_different_registers(base, cnt, rscratch1);
|
||||
guarantee(base == r10 && cnt == r11, "fix register usage");
|
||||
|
||||
Register tmp = rscratch1;
|
||||
Register tmp2 = rscratch2;
|
||||
int zva_length = VM_Version::zva_length();
|
||||
|
||||
// Ensure ZVA length can be divided by 16. This is required by
|
||||
// the subsequent operations.
|
||||
assert (zva_length % 16 == 0, "Unexpected ZVA Length");
|
||||
|
||||
if (!is_large) cbz(cnt, done);
|
||||
tbz(base, 3, base_aligned);
|
||||
str(zr, Address(post(base, 8)));
|
||||
sub(cnt, cnt, 1);
|
||||
bind(base_aligned);
|
||||
|
||||
// Ensure count >= zva_length * 2 so that it still deserves a zva after
|
||||
// alignment.
|
||||
if (!is_large || !(BlockZeroingLowLimit >= zva_length * 2)) {
|
||||
int low_limit = MAX2(zva_length * 2, (int)BlockZeroingLowLimit);
|
||||
subs(tmp, cnt, low_limit >> 3);
|
||||
br(Assembler::LT, small);
|
||||
}
|
||||
|
||||
far_call(StubRoutines::aarch64::get_zero_longs());
|
||||
|
||||
bind(small);
|
||||
|
||||
const int unroll = 8; // Number of stp instructions we'll unroll
|
||||
Label small_loop, small_table_end;
|
||||
|
||||
andr(tmp, cnt, (unroll-1) * 2);
|
||||
sub(cnt, cnt, tmp);
|
||||
add(base, base, tmp, Assembler::LSL, 3);
|
||||
adr(tmp2, small_table_end);
|
||||
sub(tmp2, tmp2, tmp, Assembler::LSL, 1);
|
||||
br(tmp2);
|
||||
|
||||
bind(small_loop);
|
||||
add(base, base, unroll * 16);
|
||||
for (int i = -unroll; i < 0; i++)
|
||||
stp(zr, zr, Address(base, i * 16));
|
||||
bind(small_table_end);
|
||||
subs(cnt, cnt, unroll * 2);
|
||||
br(Assembler::GE, small_loop);
|
||||
|
||||
tbz(cnt, 0, done);
|
||||
str(zr, Address(post(base, 8)));
|
||||
|
||||
bind(done);
|
||||
}
|
||||
|
||||
// Intrinsic for sun/nio/cs/ISO_8859_1$Encoder.implEncodeISOArray and
|
||||
// java/lang/StringUTF16.compress.
|
||||
void MacroAssembler::encode_iso_array(Register src, Register dst,
|
||||
|
|
|
@ -1215,8 +1215,10 @@ public:
|
|||
|
||||
void fill_words(Register base, Register cnt, Register value);
|
||||
void zero_words(Register base, u_int64_t cnt);
|
||||
void zero_words(Register base, Register cnt);
|
||||
void block_zero(Register base, Register cnt, bool is_large = false);
|
||||
void zero_words(Register ptr, Register cnt);
|
||||
void zero_dcache_blocks(Register base, Register cnt);
|
||||
|
||||
static const int zero_words_block_size;
|
||||
|
||||
void byte_array_inflate(Register src, Register dst, Register len,
|
||||
FloatRegister vtmp1, FloatRegister vtmp2,
|
||||
|
|
|
@ -719,48 +719,74 @@ class StubGenerator: public StubCodeGenerator {
|
|||
}
|
||||
}
|
||||
|
||||
address generate_zero_longs(Register base, Register cnt) {
|
||||
Register tmp = rscratch1;
|
||||
Register tmp2 = rscratch2;
|
||||
int zva_length = VM_Version::zva_length();
|
||||
Label initial_table_end, loop_zva;
|
||||
Label fini;
|
||||
// The inner part of zero_words(). This is the bulk operation,
|
||||
// zeroing words in blocks, possibly using DC ZVA to do it. The
|
||||
// caller is responsible for zeroing the last few words.
|
||||
//
|
||||
// Inputs:
|
||||
// r10: the HeapWord-aligned base address of an array to zero.
|
||||
// r11: the count in HeapWords, r11 > 0.
|
||||
//
|
||||
// Returns r10 and r11, adjusted for the caller to clear.
|
||||
// r10: the base address of the tail of words left to clear.
|
||||
// r11: the number of words in the tail.
|
||||
// r11 < MacroAssembler::zero_words_block_size.
|
||||
|
||||
address generate_zero_blocks() {
|
||||
Label store_pair, loop_store_pair, done;
|
||||
Label base_aligned;
|
||||
|
||||
Register base = r10, cnt = r11;
|
||||
|
||||
__ align(CodeEntryAlignment);
|
||||
StubCodeMark mark(this, "StubRoutines", "zero_longs");
|
||||
StubCodeMark mark(this, "StubRoutines", "zero_blocks");
|
||||
address start = __ pc();
|
||||
|
||||
// Base must be 16 byte aligned. If not just return and let caller handle it
|
||||
__ tst(base, 0x0f);
|
||||
__ br(Assembler::NE, fini);
|
||||
// Align base with ZVA length.
|
||||
__ neg(tmp, base);
|
||||
__ andr(tmp, tmp, zva_length - 1);
|
||||
if (UseBlockZeroing) {
|
||||
int zva_length = VM_Version::zva_length();
|
||||
|
||||
// tmp: the number of bytes to be filled to align the base with ZVA length.
|
||||
__ add(base, base, tmp);
|
||||
__ sub(cnt, cnt, tmp, Assembler::ASR, 3);
|
||||
__ adr(tmp2, initial_table_end);
|
||||
__ sub(tmp2, tmp2, tmp, Assembler::LSR, 2);
|
||||
__ br(tmp2);
|
||||
// Ensure ZVA length can be divided by 16. This is required by
|
||||
// the subsequent operations.
|
||||
assert (zva_length % 16 == 0, "Unexpected ZVA Length");
|
||||
|
||||
for (int i = -zva_length + 16; i < 0; i += 16)
|
||||
__ stp(zr, zr, Address(base, i));
|
||||
__ bind(initial_table_end);
|
||||
__ tbz(base, 3, base_aligned);
|
||||
__ str(zr, Address(__ post(base, 8)));
|
||||
__ sub(cnt, cnt, 1);
|
||||
__ bind(base_aligned);
|
||||
|
||||
// Ensure count >= zva_length * 2 so that it still deserves a zva after
|
||||
// alignment.
|
||||
Label small;
|
||||
int low_limit = MAX2(zva_length * 2, (int)BlockZeroingLowLimit);
|
||||
__ cmp(cnt, low_limit >> 3);
|
||||
__ br(Assembler::LT, small);
|
||||
__ zero_dcache_blocks(base, cnt);
|
||||
__ bind(small);
|
||||
}
|
||||
|
||||
{
|
||||
// Number of stp instructions we'll unroll
|
||||
const int unroll =
|
||||
MacroAssembler::zero_words_block_size / 2;
|
||||
// Clear the remaining blocks.
|
||||
Label loop;
|
||||
__ subs(cnt, cnt, unroll * 2);
|
||||
__ br(Assembler::LT, done);
|
||||
__ bind(loop);
|
||||
for (int i = 0; i < unroll; i++)
|
||||
__ stp(zr, zr, __ post(base, 16));
|
||||
__ subs(cnt, cnt, unroll * 2);
|
||||
__ br(Assembler::GE, loop);
|
||||
__ bind(done);
|
||||
__ add(cnt, cnt, unroll * 2);
|
||||
}
|
||||
|
||||
__ sub(cnt, cnt, zva_length >> 3);
|
||||
__ bind(loop_zva);
|
||||
__ dc(Assembler::ZVA, base);
|
||||
__ subs(cnt, cnt, zva_length >> 3);
|
||||
__ add(base, base, zva_length);
|
||||
__ br(Assembler::GE, loop_zva);
|
||||
__ add(cnt, cnt, zva_length >> 3); // count not zeroed by DC ZVA
|
||||
__ bind(fini);
|
||||
__ ret(lr);
|
||||
|
||||
return start;
|
||||
}
|
||||
|
||||
|
||||
typedef enum {
|
||||
copy_forwards = 1,
|
||||
copy_backwards = -1
|
||||
|
@ -2346,20 +2372,16 @@ class StubGenerator: public StubCodeGenerator {
|
|||
__ subw(count, count, cnt_words, Assembler::LSL, 3 - shift);
|
||||
if (UseBlockZeroing) {
|
||||
Label non_block_zeroing, rest;
|
||||
Register tmp = rscratch1;
|
||||
// count >= BlockZeroingLowLimit && value == 0
|
||||
__ subs(tmp, cnt_words, BlockZeroingLowLimit >> 3);
|
||||
__ ccmp(value, 0 /* comparing value */, 0 /* NZCV */, Assembler::GE);
|
||||
__ br(Assembler::NE, non_block_zeroing);
|
||||
// If the fill value is zero we can use the fast zero_words().
|
||||
__ cbnz(value, non_block_zeroing);
|
||||
__ mov(bz_base, to);
|
||||
__ block_zero(bz_base, cnt_words, true);
|
||||
__ mov(to, bz_base);
|
||||
__ add(to, to, cnt_words, Assembler::LSL, LogBytesPerWord);
|
||||
__ zero_words(bz_base, cnt_words);
|
||||
__ b(rest);
|
||||
__ bind(non_block_zeroing);
|
||||
__ fill_words(to, cnt_words, value);
|
||||
__ bind(rest);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
__ fill_words(to, cnt_words, value);
|
||||
}
|
||||
|
||||
|
@ -2420,7 +2442,7 @@ class StubGenerator: public StubCodeGenerator {
|
|||
generate_copy_longs(copy_f, r0, r1, rscratch2, copy_forwards);
|
||||
generate_copy_longs(copy_b, r0, r1, rscratch2, copy_backwards);
|
||||
|
||||
StubRoutines::aarch64::_zero_longs = generate_zero_longs(r10, r11);
|
||||
StubRoutines::aarch64::_zero_blocks = generate_zero_blocks();
|
||||
|
||||
//*** jbyte
|
||||
// Always need aligned and unaligned versions
|
||||
|
@ -4769,6 +4791,7 @@ class StubGenerator: public StubCodeGenerator {
|
|||
&StubRoutines::_safefetchN_fault_pc,
|
||||
&StubRoutines::_safefetchN_continuation_pc);
|
||||
#endif
|
||||
StubRoutines::aarch64::set_completed();
|
||||
}
|
||||
|
||||
public:
|
||||
|
|
|
@ -43,7 +43,8 @@ address StubRoutines::aarch64::_float_sign_mask = NULL;
|
|||
address StubRoutines::aarch64::_float_sign_flip = NULL;
|
||||
address StubRoutines::aarch64::_double_sign_mask = NULL;
|
||||
address StubRoutines::aarch64::_double_sign_flip = NULL;
|
||||
address StubRoutines::aarch64::_zero_longs = NULL;
|
||||
address StubRoutines::aarch64::_zero_blocks = NULL;
|
||||
bool StubRoutines::aarch64::_completed = false;
|
||||
|
||||
/**
|
||||
* crc_table[] from jdk/src/share/native/java/util/zip/zlib-1.2.5/crc32.h
|
||||
|
|
|
@ -61,7 +61,8 @@ class aarch64 {
|
|||
static address _double_sign_mask;
|
||||
static address _double_sign_flip;
|
||||
|
||||
static address _zero_longs;
|
||||
static address _zero_blocks;
|
||||
static bool _completed;
|
||||
|
||||
public:
|
||||
|
||||
|
@ -115,12 +116,19 @@ class aarch64 {
|
|||
return _double_sign_flip;
|
||||
}
|
||||
|
||||
static address get_zero_longs()
|
||||
{
|
||||
return _zero_longs;
|
||||
static address zero_blocks() {
|
||||
return _zero_blocks;
|
||||
}
|
||||
|
||||
private:
|
||||
static bool complete() {
|
||||
return _completed;
|
||||
}
|
||||
|
||||
static void set_completed() {
|
||||
_completed = true;
|
||||
}
|
||||
|
||||
private:
|
||||
static juint _crc_table[];
|
||||
|
||||
};
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -1119,12 +1119,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);
|
||||
}
|
||||
|
|
|
@ -979,12 +979,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);
|
||||
}
|
||||
|
|
|
@ -1194,11 +1194,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
|
||||
|
@ -790,12 +790,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");
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 20014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 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
|
||||
|
|
|
@ -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,19 +73,23 @@ final class HotSpotJVMCICompilerConfig {
|
|||
JVMCICompilerFactory factory = null;
|
||||
String compilerName = Option.Compiler.getString();
|
||||
if (compilerName != null) {
|
||||
for (JVMCICompilerFactory f : JVMCIServiceLocator.getProviders(JVMCICompilerFactory.class)) {
|
||||
if (f.getCompilerName().equals(compilerName)) {
|
||||
factory = f;
|
||||
if (compilerName.isEmpty() || compilerName.equals("null")) {
|
||||
factory = new DummyCompilerFactory();
|
||||
} else {
|
||||
for (JVMCICompilerFactory f : JVMCIServiceLocator.getProviders(JVMCICompilerFactory.class)) {
|
||||
if (f.getCompilerName().equals(compilerName)) {
|
||||
factory = f;
|
||||
}
|
||||
}
|
||||
if (factory == null) {
|
||||
throw new JVMCIError("JVMCI compiler '%s' not found", compilerName);
|
||||
}
|
||||
}
|
||||
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()));
|
||||
}
|
||||
}
|
||||
} catch (ServiceConfigurationError e) {
|
||||
// If the service is required we will bail out below.
|
||||
Class.forName("jdk.vm.ci.runtime.JVMCI");
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new InternalError(e);
|
||||
}
|
||||
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 -------------
|
||||
|
@ -36,6 +66,7 @@ suite = {
|
|||
|
||||
"org.graalvm.compiler.serviceprovider" : {
|
||||
"subDir" : "share/classes",
|
||||
"dependencies" : ["JVMCI_SERVICES"],
|
||||
"sourceDirs" : ["src"],
|
||||
"checkstyle" : "org.graalvm.compiler.graph",
|
||||
"javaCompliance" : "1.8",
|
||||
|
@ -53,6 +84,7 @@ suite = {
|
|||
|
||||
"org.graalvm.compiler.options" : {
|
||||
"subDir" : "share/classes",
|
||||
"dependencies" : ["JVMCI_SERVICES", "JVMCI_API"],
|
||||
"sourceDirs" : ["src"],
|
||||
"dependencies" : ["org.graalvm.util"],
|
||||
"checkstyle" : "org.graalvm.compiler.graph",
|
||||
|
@ -94,6 +126,7 @@ suite = {
|
|||
"org.graalvm.compiler.debug.TTYStreamProvider",
|
||||
],
|
||||
"dependencies" : [
|
||||
"JVMCI_API",
|
||||
"org.graalvm.compiler.serviceprovider",
|
||||
"org.graalvm.compiler.options"
|
||||
],
|
||||
|
@ -159,6 +192,7 @@ suite = {
|
|||
"sourceDirs" : ["src"],
|
||||
"checkstyle" : "org.graalvm.compiler.graph",
|
||||
"dependencies" : [
|
||||
"JVMCI_HOTSPOT",
|
||||
"org.graalvm.compiler.core.test",
|
||||
],
|
||||
"javaCompliance" : "1.8",
|
||||
|
@ -168,6 +202,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",
|
||||
|
@ -178,6 +215,7 @@ suite = {
|
|||
"sourceDirs" : ["src"],
|
||||
"dependencies" : [
|
||||
"mx:JUNIT",
|
||||
"JVMCI_SERVICES",
|
||||
"org.graalvm.compiler.api.runtime",
|
||||
],
|
||||
"checkstyle" : "org.graalvm.compiler.graph",
|
||||
|
@ -188,6 +226,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",
|
||||
|
@ -197,6 +236,7 @@ suite = {
|
|||
"subDir" : "share/classes",
|
||||
"sourceDirs" : ["src"],
|
||||
"dependencies" : [
|
||||
"JVMCI_HOTSPOT",
|
||||
"org.graalvm.compiler.api.runtime",
|
||||
"org.graalvm.compiler.replacements",
|
||||
"org.graalvm.compiler.printer",
|
||||
|
@ -289,6 +329,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",
|
||||
|
@ -375,6 +417,7 @@ suite = {
|
|||
"subDir" : "share/classes",
|
||||
"sourceDirs" : ["src"],
|
||||
"dependencies" : [
|
||||
"JVMCI_API",
|
||||
"org.graalvm.compiler.core.common"
|
||||
],
|
||||
"checkstyle" : "org.graalvm.compiler.graph",
|
||||
|
@ -430,6 +473,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",
|
||||
|
@ -814,6 +858,7 @@ suite = {
|
|||
"dependencies" : [
|
||||
"org.graalvm.compiler.lir.jtt",
|
||||
"org.graalvm.compiler.lir.aarch64",
|
||||
"JVMCI_HOTSPOT"
|
||||
],
|
||||
"checkstyle" : "org.graalvm.compiler.graph",
|
||||
"javaCompliance" : "1.8",
|
||||
|
@ -843,6 +888,7 @@ suite = {
|
|||
"dependencies" : [
|
||||
"org.graalvm.compiler.lir.jtt",
|
||||
"org.graalvm.compiler.lir.amd64",
|
||||
"JVMCI_HOTSPOT"
|
||||
],
|
||||
"checkstyle" : "org.graalvm.compiler.graph",
|
||||
"javaCompliance" : "1.8",
|
||||
|
@ -871,6 +917,7 @@ suite = {
|
|||
"sourceDirs" : ["src"],
|
||||
"dependencies" : [
|
||||
"org.graalvm.compiler.lir.jtt",
|
||||
"JVMCI_HOTSPOT"
|
||||
],
|
||||
"checkstyle" : "org.graalvm.compiler.graph",
|
||||
"javaCompliance" : "1.8",
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 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
|
||||
|
@ -108,7 +108,7 @@ bool Compiler::is_intrinsic_supported(const methodHandle& method) {
|
|||
}
|
||||
|
||||
switch (id) {
|
||||
case vmIntrinsics::_compareAndSwapLong:
|
||||
case vmIntrinsics::_compareAndSetLong:
|
||||
if (!VM_Version::supports_cx8()) return false;
|
||||
break;
|
||||
case vmIntrinsics::_getAndAddInt:
|
||||
|
@ -217,8 +217,8 @@ bool Compiler::is_intrinsic_supported(const methodHandle& method) {
|
|||
case vmIntrinsics::_updateDirectByteBufferCRC32C:
|
||||
#endif
|
||||
case vmIntrinsics::_vectorizedMismatch:
|
||||
case vmIntrinsics::_compareAndSwapInt:
|
||||
case vmIntrinsics::_compareAndSwapObject:
|
||||
case vmIntrinsics::_compareAndSetInt:
|
||||
case vmIntrinsics::_compareAndSetObject:
|
||||
case vmIntrinsics::_getCharStringU:
|
||||
case vmIntrinsics::_putCharStringU:
|
||||
#ifdef TRACE_HAVE_INTRINSICS
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 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
|
||||
|
@ -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()) {
|
||||
|
@ -3486,9 +3500,9 @@ void GraphBuilder::build_graph_for_intrinsic(ciMethod* callee, bool ignore_retur
|
|||
case vmIntrinsics::_putLongVolatile : append_unsafe_put_obj(callee, T_LONG, true); return;
|
||||
case vmIntrinsics::_putFloatVolatile : append_unsafe_put_obj(callee, T_FLOAT, true); return;
|
||||
case vmIntrinsics::_putDoubleVolatile : append_unsafe_put_obj(callee, T_DOUBLE, true); return;
|
||||
case vmIntrinsics::_compareAndSwapLong:
|
||||
case vmIntrinsics::_compareAndSwapInt:
|
||||
case vmIntrinsics::_compareAndSwapObject: append_unsafe_CAS(callee); return;
|
||||
case vmIntrinsics::_compareAndSetLong:
|
||||
case vmIntrinsics::_compareAndSetInt:
|
||||
case vmIntrinsics::_compareAndSetObject: append_unsafe_CAS(callee); return;
|
||||
case vmIntrinsics::_getAndAddInt:
|
||||
case vmIntrinsics::_getAndAddLong : append_unsafe_get_and_set_obj(callee, true); return;
|
||||
case vmIntrinsics::_getAndSetInt :
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 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
|
||||
|
@ -3212,13 +3212,13 @@ void LIRGenerator::do_Intrinsic(Intrinsic* x) {
|
|||
// java.nio.Buffer.checkIndex
|
||||
case vmIntrinsics::_checkIndex: do_NIOCheckIndex(x); break;
|
||||
|
||||
case vmIntrinsics::_compareAndSwapObject:
|
||||
case vmIntrinsics::_compareAndSetObject:
|
||||
do_CompareAndSwap(x, objectType);
|
||||
break;
|
||||
case vmIntrinsics::_compareAndSwapInt:
|
||||
case vmIntrinsics::_compareAndSetInt:
|
||||
do_CompareAndSwap(x, intType);
|
||||
break;
|
||||
case vmIntrinsics::_compareAndSwapLong:
|
||||
case vmIntrinsics::_compareAndSetLong:
|
||||
do_CompareAndSwap(x, longType);
|
||||
break;
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -952,6 +952,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);
|
||||
|
|
|
@ -164,10 +164,10 @@ void ModuleEntry::set_read_walk_required(ClassLoaderData* m_loader_data) {
|
|||
loader_data() != m_loader_data &&
|
||||
!m_loader_data->is_builtin_class_loader_data()) {
|
||||
_must_walk_reads = true;
|
||||
if (log_is_enabled(Trace, modules)) {
|
||||
if (log_is_enabled(Trace, module)) {
|
||||
ResourceMark rm;
|
||||
log_trace(modules)("ModuleEntry::set_read_walk_required(): module %s reads list must be walked",
|
||||
(name() != NULL) ? name()->as_C_string() : UNNAMED_MODULE);
|
||||
log_trace(module)("ModuleEntry::set_read_walk_required(): module %s reads list must be walked",
|
||||
(name() != NULL) ? name()->as_C_string() : UNNAMED_MODULE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -194,10 +194,10 @@ void ModuleEntry::purge_reads() {
|
|||
// on the remaining live modules on the reads list.
|
||||
_must_walk_reads = false;
|
||||
|
||||
if (log_is_enabled(Trace, modules)) {
|
||||
if (log_is_enabled(Trace, module)) {
|
||||
ResourceMark rm;
|
||||
log_trace(modules)("ModuleEntry::purge_reads(): module %s reads list being walked",
|
||||
(name() != NULL) ? name()->as_C_string() : UNNAMED_MODULE);
|
||||
log_trace(module)("ModuleEntry::purge_reads(): module %s reads list being walked",
|
||||
(name() != NULL) ? name()->as_C_string() : UNNAMED_MODULE);
|
||||
}
|
||||
|
||||
// Go backwards because this removes entries that are dead.
|
||||
|
@ -306,8 +306,11 @@ ModuleEntryTable::~ModuleEntryTable() {
|
|||
m = m->next();
|
||||
|
||||
ResourceMark rm;
|
||||
log_debug(modules)("ModuleEntryTable: deleting module: %s", to_remove->name() != NULL ?
|
||||
to_remove->name()->as_C_string() : UNNAMED_MODULE);
|
||||
if (to_remove->name() != NULL) {
|
||||
log_info(module, unload)("unloading module %s", to_remove->name()->as_C_string());
|
||||
}
|
||||
log_debug(module)("ModuleEntryTable: deleting module: %s", to_remove->name() != NULL ?
|
||||
to_remove->name()->as_C_string() : UNNAMED_MODULE);
|
||||
|
||||
// Clean out the C heap allocated reads list first before freeing the entry
|
||||
to_remove->delete_reads();
|
||||
|
@ -363,9 +366,9 @@ ModuleEntry* ModuleEntryTable::new_entry(unsigned int hash, Handle module_handle
|
|||
|
||||
if (ClassLoader::is_in_patch_mod_entries(name)) {
|
||||
entry->set_is_patched();
|
||||
if (log_is_enabled(Trace, modules, patch)) {
|
||||
if (log_is_enabled(Trace, module, patch)) {
|
||||
ResourceMark rm;
|
||||
log_trace(modules, patch)("Marked module %s as patched from --patch-module", name->as_C_string());
|
||||
log_trace(module, patch)("Marked module %s as patched from --patch-module", name->as_C_string());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -231,17 +231,19 @@ static void define_javabase_module(jobject module, jstring version,
|
|||
// Patch any previously loaded class's module field with java.base's java.lang.Module.
|
||||
ModuleEntryTable::patch_javabase_entries(module_handle);
|
||||
|
||||
log_debug(modules)("define_javabase_module(): Definition of module: "
|
||||
JAVA_BASE_NAME ", version: %s, location: %s, package #: %d",
|
||||
module_version != NULL ? module_version : "NULL",
|
||||
module_location != NULL ? module_location : "NULL",
|
||||
pkg_list->length());
|
||||
log_info(module, load)(JAVA_BASE_NAME " location: %s",
|
||||
module_location != NULL ? module_location : "NULL");
|
||||
log_debug(module)("define_javabase_module(): Definition of module: "
|
||||
JAVA_BASE_NAME ", version: %s, location: %s, package #: %d",
|
||||
module_version != NULL ? module_version : "NULL",
|
||||
module_location != NULL ? module_location : "NULL",
|
||||
pkg_list->length());
|
||||
|
||||
// packages defined to java.base
|
||||
if (log_is_enabled(Trace, modules)) {
|
||||
if (log_is_enabled(Trace, module)) {
|
||||
for (int x = 0; x < pkg_list->length(); x++) {
|
||||
log_trace(modules)("define_javabase_module(): creation of package %s for module " JAVA_BASE_NAME,
|
||||
(pkg_list->at(x))->as_C_string());
|
||||
log_trace(module)("define_javabase_module(): creation of package %s for module " JAVA_BASE_NAME,
|
||||
(pkg_list->at(x))->as_C_string());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -431,23 +433,24 @@ void Modules::define_module(jobject module, jboolean is_open, jstring version,
|
|||
throw_dup_pkg_exception(module_name, existing_pkg, CHECK);
|
||||
}
|
||||
|
||||
if (log_is_enabled(Debug, modules)) {
|
||||
outputStream* logst = Log(modules)::debug_stream();
|
||||
log_info(module, load)("%s location: %s", module_name,
|
||||
module_location != NULL ? module_location : "NULL");
|
||||
if (log_is_enabled(Debug, module)) {
|
||||
outputStream* logst = Log(module)::debug_stream();
|
||||
logst->print("define_module(): creation of module: %s, version: %s, location: %s, ",
|
||||
module_name, module_version != NULL ? module_version : "NULL",
|
||||
module_location != NULL ? module_location : "NULL");
|
||||
loader_data->print_value_on(logst);
|
||||
logst->print_cr(", package #: %d", pkg_list->length());
|
||||
for (int y = 0; y < pkg_list->length(); y++) {
|
||||
log_trace(modules)("define_module(): creation of package %s for module %s",
|
||||
(pkg_list->at(y))->as_C_string(), module_name);
|
||||
log_trace(module)("define_module(): creation of package %s for module %s",
|
||||
(pkg_list->at(y))->as_C_string(), module_name);
|
||||
}
|
||||
}
|
||||
|
||||
// If the module is defined to the boot loader and an exploded build is being
|
||||
// used, prepend <java.home>/modules/modules_name, if it exists, to the system boot class path.
|
||||
if (loader == NULL &&
|
||||
!Universe::is_module_initialized() &&
|
||||
!ClassLoader::has_jrt_entry()) {
|
||||
ClassLoader::add_to_exploded_build_list(module_symbol, CHECK);
|
||||
}
|
||||
|
@ -480,7 +483,7 @@ void Modules::set_bootloader_unnamed_module(jobject module, TRAPS) {
|
|||
}
|
||||
Handle h_loader(THREAD, loader);
|
||||
|
||||
log_debug(modules)("set_bootloader_unnamed_module(): recording unnamed module for boot loader");
|
||||
log_debug(module)("set_bootloader_unnamed_module(): recording unnamed module for boot loader");
|
||||
|
||||
// Set java.lang.Module for the boot loader's unnamed module
|
||||
ClassLoaderData* boot_loader_data = ClassLoaderData::the_null_class_loader_data();
|
||||
|
@ -536,10 +539,10 @@ void Modules::add_module_exports(jobject from_module, const char* package_name,
|
|||
from_module_entry->name()->as_C_string()));
|
||||
}
|
||||
|
||||
log_debug(modules)("add_module_exports(): package %s in module %s is exported to module %s",
|
||||
package_entry->name()->as_C_string(),
|
||||
from_module_entry->name()->as_C_string(),
|
||||
to_module_entry == NULL ? "NULL" :
|
||||
log_debug(module)("add_module_exports(): package %s in module %s is exported to module %s",
|
||||
package_entry->name()->as_C_string(),
|
||||
from_module_entry->name()->as_C_string(),
|
||||
to_module_entry == NULL ? "NULL" :
|
||||
to_module_entry->is_named() ?
|
||||
to_module_entry->name()->as_C_string() : UNNAMED_MODULE);
|
||||
|
||||
|
@ -583,12 +586,12 @@ void Modules::add_reads_module(jobject from_module, jobject to_module, TRAPS) {
|
|||
}
|
||||
|
||||
ResourceMark rm(THREAD);
|
||||
log_debug(modules)("add_reads_module(): Adding read from module %s to module %s",
|
||||
from_module_entry->is_named() ?
|
||||
from_module_entry->name()->as_C_string() : UNNAMED_MODULE,
|
||||
to_module_entry == NULL ? "all unnamed" :
|
||||
(to_module_entry->is_named() ?
|
||||
to_module_entry->name()->as_C_string() : UNNAMED_MODULE));
|
||||
log_debug(module)("add_reads_module(): Adding read from module %s to module %s",
|
||||
from_module_entry->is_named() ?
|
||||
from_module_entry->name()->as_C_string() : UNNAMED_MODULE,
|
||||
to_module_entry == NULL ? "all unnamed" :
|
||||
(to_module_entry->is_named() ?
|
||||
to_module_entry->name()->as_C_string() : UNNAMED_MODULE));
|
||||
|
||||
// if modules are the same or if from_module is unnamed then no need to add the read.
|
||||
if (from_module_entry != to_module_entry && from_module_entry->is_named()) {
|
||||
|
@ -607,7 +610,7 @@ jobject Modules::get_module(jclass clazz, TRAPS) {
|
|||
}
|
||||
oop mirror = JNIHandles::resolve_non_null(clazz);
|
||||
if (mirror == NULL) {
|
||||
log_debug(modules)("get_module(): no mirror, returning NULL");
|
||||
log_debug(module)("get_module(): no mirror, returning NULL");
|
||||
return NULL;
|
||||
}
|
||||
if (!java_lang_Class::is_instance(mirror)) {
|
||||
|
@ -620,9 +623,9 @@ jobject Modules::get_module(jclass clazz, TRAPS) {
|
|||
assert(module != NULL, "java.lang.Class module field not set");
|
||||
assert(java_lang_Module::is_instance(module), "module is not an instance of type java.lang.Module");
|
||||
|
||||
if (log_is_enabled(Debug, modules)) {
|
||||
if (log_is_enabled(Debug, module)) {
|
||||
ResourceMark rm(THREAD);
|
||||
outputStream* logst = Log(modules)::debug_stream();
|
||||
outputStream* logst = Log(module)::debug_stream();
|
||||
Klass* klass = java_lang_Class::as_Klass(mirror);
|
||||
oop module_name = java_lang_Module::name(module);
|
||||
if (module_name != NULL) {
|
||||
|
@ -722,8 +725,8 @@ void Modules::add_module_package(jobject module, const char* package_name, TRAPS
|
|||
THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), message);
|
||||
}
|
||||
|
||||
log_debug(modules)("add_module_package(): Adding package %s to module %s",
|
||||
package_name, module_entry->name()->as_C_string());
|
||||
log_debug(module)("add_module_package(): Adding package %s to module %s",
|
||||
package_name, module_entry->name()->as_C_string());
|
||||
|
||||
TempNewSymbol pkg_symbol = SymbolTable::new_symbol(package_name, CHECK);
|
||||
PackageEntryTable* package_table = loader_data->packages();
|
||||
|
@ -778,8 +781,8 @@ void Modules::add_module_exports_to_all_unnamed(jobject module, const char* pack
|
|||
module_entry->name()->as_C_string()));
|
||||
}
|
||||
|
||||
log_debug(modules)("add_module_exports_to_all_unnamed(): package %s in module"
|
||||
" %s is exported to all unnamed modules",
|
||||
log_debug(module)("add_module_exports_to_all_unnamed(): package %s in module"
|
||||
" %s is exported to all unnamed modules",
|
||||
package_entry->name()->as_C_string(),
|
||||
module_entry->name()->as_C_string());
|
||||
|
||||
|
|
|
@ -77,13 +77,13 @@ void PackageEntry::set_export_walk_required(ClassLoaderData* m_loader_data) {
|
|||
(this_pkg_mod == NULL || this_pkg_mod->loader_data() != m_loader_data) &&
|
||||
!m_loader_data->is_builtin_class_loader_data()) {
|
||||
_must_walk_exports = true;
|
||||
if (log_is_enabled(Trace, modules)) {
|
||||
if (log_is_enabled(Trace, module)) {
|
||||
ResourceMark rm;
|
||||
assert(name() != NULL, "PackageEntry without a valid name");
|
||||
log_trace(modules)("PackageEntry::set_export_walk_required(): package %s defined in module %s, exports list must be walked",
|
||||
name()->as_C_string(),
|
||||
(this_pkg_mod == NULL || this_pkg_mod->name() == NULL) ?
|
||||
UNNAMED_MODULE : this_pkg_mod->name()->as_C_string());
|
||||
log_trace(module)("PackageEntry::set_export_walk_required(): package %s defined in module %s, exports list must be walked",
|
||||
name()->as_C_string(),
|
||||
(this_pkg_mod == NULL || this_pkg_mod->name() == NULL) ?
|
||||
UNNAMED_MODULE : this_pkg_mod->name()->as_C_string());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -136,13 +136,13 @@ void PackageEntry::purge_qualified_exports() {
|
|||
// on the remaining live modules on the exports list.
|
||||
_must_walk_exports = false;
|
||||
|
||||
if (log_is_enabled(Trace, modules)) {
|
||||
if (log_is_enabled(Trace, module)) {
|
||||
ResourceMark rm;
|
||||
assert(name() != NULL, "PackageEntry without a valid name");
|
||||
ModuleEntry* pkg_mod = module();
|
||||
log_trace(modules)("PackageEntry::purge_qualified_exports(): package %s defined in module %s, exports list being walked",
|
||||
name()->as_C_string(),
|
||||
(pkg_mod == NULL || pkg_mod->name() == NULL) ? UNNAMED_MODULE : pkg_mod->name()->as_C_string());
|
||||
log_trace(module)("PackageEntry::purge_qualified_exports(): package %s defined in module %s, exports list being walked",
|
||||
name()->as_C_string(),
|
||||
(pkg_mod == NULL || pkg_mod->name() == NULL) ? UNNAMED_MODULE : pkg_mod->name()->as_C_string());
|
||||
}
|
||||
|
||||
// Go backwards because this removes entries that are dead.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2015, 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
|
||||
|
@ -632,25 +632,28 @@ bool vmIntrinsics::is_disabled_by_flags(vmIntrinsics::ID id) {
|
|||
case vmIntrinsics::_loadFence:
|
||||
case vmIntrinsics::_storeFence:
|
||||
case vmIntrinsics::_fullFence:
|
||||
case vmIntrinsics::_compareAndSwapLong:
|
||||
case vmIntrinsics::_weakCompareAndSwapLong:
|
||||
case vmIntrinsics::_weakCompareAndSwapLongAcquire:
|
||||
case vmIntrinsics::_weakCompareAndSwapLongRelease:
|
||||
case vmIntrinsics::_compareAndSwapInt:
|
||||
case vmIntrinsics::_weakCompareAndSwapInt:
|
||||
case vmIntrinsics::_weakCompareAndSwapIntAcquire:
|
||||
case vmIntrinsics::_weakCompareAndSwapIntRelease:
|
||||
case vmIntrinsics::_compareAndSwapObject:
|
||||
case vmIntrinsics::_weakCompareAndSwapObject:
|
||||
case vmIntrinsics::_weakCompareAndSwapObjectAcquire:
|
||||
case vmIntrinsics::_weakCompareAndSwapObjectRelease:
|
||||
case vmIntrinsics::_compareAndExchangeIntVolatile:
|
||||
case vmIntrinsics::_compareAndSetLong:
|
||||
case vmIntrinsics::_weakCompareAndSetLong:
|
||||
case vmIntrinsics::_weakCompareAndSetLongPlain:
|
||||
case vmIntrinsics::_weakCompareAndSetLongAcquire:
|
||||
case vmIntrinsics::_weakCompareAndSetLongRelease:
|
||||
case vmIntrinsics::_compareAndSetInt:
|
||||
case vmIntrinsics::_weakCompareAndSetInt:
|
||||
case vmIntrinsics::_weakCompareAndSetIntPlain:
|
||||
case vmIntrinsics::_weakCompareAndSetIntAcquire:
|
||||
case vmIntrinsics::_weakCompareAndSetIntRelease:
|
||||
case vmIntrinsics::_compareAndSetObject:
|
||||
case vmIntrinsics::_weakCompareAndSetObject:
|
||||
case vmIntrinsics::_weakCompareAndSetObjectPlain:
|
||||
case vmIntrinsics::_weakCompareAndSetObjectAcquire:
|
||||
case vmIntrinsics::_weakCompareAndSetObjectRelease:
|
||||
case vmIntrinsics::_compareAndExchangeInt:
|
||||
case vmIntrinsics::_compareAndExchangeIntAcquire:
|
||||
case vmIntrinsics::_compareAndExchangeIntRelease:
|
||||
case vmIntrinsics::_compareAndExchangeLongVolatile:
|
||||
case vmIntrinsics::_compareAndExchangeLong:
|
||||
case vmIntrinsics::_compareAndExchangeLongAcquire:
|
||||
case vmIntrinsics::_compareAndExchangeLongRelease:
|
||||
case vmIntrinsics::_compareAndExchangeObjectVolatile:
|
||||
case vmIntrinsics::_compareAndExchangeObject:
|
||||
case vmIntrinsics::_compareAndExchangeObjectAcquire:
|
||||
case vmIntrinsics::_compareAndExchangeObjectRelease:
|
||||
if (!InlineUnsafeOps) return true;
|
||||
|
|
|
@ -650,6 +650,8 @@
|
|||
template(addUses_signature, "(Ljava/lang/Module;Ljava/lang/Class;)V") \
|
||||
template(addProvides_name, "addProvides") \
|
||||
template(addProvides_signature, "(Ljava/lang/Module;Ljava/lang/Class;Ljava/lang/Class;)V") \
|
||||
template(loadModule_name, "loadModule") \
|
||||
template(loadModule_signature, "(Ljava/lang/String;)Ljava/lang/Module;") \
|
||||
template(transformedByAgent_name, "transformedByAgent") \
|
||||
template(transformedByAgent_signature, "(Ljava/lang/Module;)V") \
|
||||
template(appendToClassPathForInstrumentation_name, "appendToClassPathForInstrumentation") \
|
||||
|
@ -1242,100 +1244,100 @@
|
|||
do_intrinsic(_putIntUnaligned, jdk_internal_misc_Unsafe, putIntUnaligned_name, putInt_signature, F_R) \
|
||||
do_intrinsic(_putLongUnaligned, jdk_internal_misc_Unsafe, putLongUnaligned_name, putLong_signature, F_R) \
|
||||
\
|
||||
do_signature(compareAndSwapObject_signature, "(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z") \
|
||||
do_signature(compareAndSetObject_signature, "(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z") \
|
||||
do_signature(compareAndExchangeObject_signature, "(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;") \
|
||||
do_signature(compareAndSwapLong_signature, "(Ljava/lang/Object;JJJ)Z") \
|
||||
do_signature(compareAndSetLong_signature, "(Ljava/lang/Object;JJJ)Z") \
|
||||
do_signature(compareAndExchangeLong_signature, "(Ljava/lang/Object;JJJ)J") \
|
||||
do_signature(compareAndSwapInt_signature, "(Ljava/lang/Object;JII)Z") \
|
||||
do_signature(compareAndSetInt_signature, "(Ljava/lang/Object;JII)Z") \
|
||||
do_signature(compareAndExchangeInt_signature, "(Ljava/lang/Object;JII)I") \
|
||||
do_signature(compareAndSwapByte_signature, "(Ljava/lang/Object;JBB)Z") \
|
||||
do_signature(compareAndSetByte_signature, "(Ljava/lang/Object;JBB)Z") \
|
||||
do_signature(compareAndExchangeByte_signature, "(Ljava/lang/Object;JBB)B") \
|
||||
do_signature(compareAndSwapShort_signature, "(Ljava/lang/Object;JSS)Z") \
|
||||
do_signature(compareAndSetShort_signature, "(Ljava/lang/Object;JSS)Z") \
|
||||
do_signature(compareAndExchangeShort_signature, "(Ljava/lang/Object;JSS)S") \
|
||||
\
|
||||
do_name(compareAndSwapObject_name, "compareAndSwapObject") \
|
||||
do_name(compareAndExchangeObjectVolatile_name, "compareAndExchangeObjectVolatile") \
|
||||
do_name(compareAndSetObject_name, "compareAndSetObject") \
|
||||
do_name(compareAndExchangeObject_name, "compareAndExchangeObject") \
|
||||
do_name(compareAndExchangeObjectAcquire_name, "compareAndExchangeObjectAcquire") \
|
||||
do_name(compareAndExchangeObjectRelease_name, "compareAndExchangeObjectRelease") \
|
||||
do_name(compareAndSwapLong_name, "compareAndSwapLong") \
|
||||
do_name(compareAndExchangeLongVolatile_name, "compareAndExchangeLongVolatile") \
|
||||
do_name(compareAndSetLong_name, "compareAndSetLong") \
|
||||
do_name(compareAndExchangeLong_name, "compareAndExchangeLong") \
|
||||
do_name(compareAndExchangeLongAcquire_name, "compareAndExchangeLongAcquire") \
|
||||
do_name(compareAndExchangeLongRelease_name, "compareAndExchangeLongRelease") \
|
||||
do_name(compareAndSwapInt_name, "compareAndSwapInt") \
|
||||
do_name(compareAndExchangeIntVolatile_name, "compareAndExchangeIntVolatile") \
|
||||
do_name(compareAndSetInt_name, "compareAndSetInt") \
|
||||
do_name(compareAndExchangeInt_name, "compareAndExchangeInt") \
|
||||
do_name(compareAndExchangeIntAcquire_name, "compareAndExchangeIntAcquire") \
|
||||
do_name(compareAndExchangeIntRelease_name, "compareAndExchangeIntRelease") \
|
||||
do_name(compareAndSwapByte_name, "compareAndSwapByte") \
|
||||
do_name(compareAndExchangeByteVolatile_name, "compareAndExchangeByteVolatile") \
|
||||
do_name(compareAndSetByte_name, "compareAndSetByte") \
|
||||
do_name(compareAndExchangeByte_name, "compareAndExchangeByte") \
|
||||
do_name(compareAndExchangeByteAcquire_name, "compareAndExchangeByteAcquire") \
|
||||
do_name(compareAndExchangeByteRelease_name, "compareAndExchangeByteRelease") \
|
||||
do_name(compareAndSwapShort_name, "compareAndSwapShort") \
|
||||
do_name(compareAndExchangeShortVolatile_name, "compareAndExchangeShortVolatile") \
|
||||
do_name(compareAndSetShort_name, "compareAndSetShort") \
|
||||
do_name(compareAndExchangeShort_name, "compareAndExchangeShort") \
|
||||
do_name(compareAndExchangeShortAcquire_name, "compareAndExchangeShortAcquire") \
|
||||
do_name(compareAndExchangeShortRelease_name, "compareAndExchangeShortRelease") \
|
||||
\
|
||||
do_name(weakCompareAndSwapObject_name, "weakCompareAndSwapObject") \
|
||||
do_name(weakCompareAndSwapObjectAcquire_name, "weakCompareAndSwapObjectAcquire") \
|
||||
do_name(weakCompareAndSwapObjectRelease_name, "weakCompareAndSwapObjectRelease") \
|
||||
do_name(weakCompareAndSwapObjectVolatile_name, "weakCompareAndSwapObjectVolatile") \
|
||||
do_name(weakCompareAndSwapLong_name, "weakCompareAndSwapLong") \
|
||||
do_name(weakCompareAndSwapLongAcquire_name, "weakCompareAndSwapLongAcquire") \
|
||||
do_name(weakCompareAndSwapLongRelease_name, "weakCompareAndSwapLongRelease") \
|
||||
do_name(weakCompareAndSwapLongVolatile_name, "weakCompareAndSwapLongVolatile") \
|
||||
do_name(weakCompareAndSwapInt_name, "weakCompareAndSwapInt") \
|
||||
do_name(weakCompareAndSwapIntAcquire_name, "weakCompareAndSwapIntAcquire") \
|
||||
do_name(weakCompareAndSwapIntRelease_name, "weakCompareAndSwapIntRelease") \
|
||||
do_name(weakCompareAndSwapIntVolatile_name, "weakCompareAndSwapIntVolatile") \
|
||||
do_name(weakCompareAndSwapByte_name, "weakCompareAndSwapByte") \
|
||||
do_name(weakCompareAndSwapByteAcquire_name, "weakCompareAndSwapByteAcquire") \
|
||||
do_name(weakCompareAndSwapByteRelease_name, "weakCompareAndSwapByteRelease") \
|
||||
do_name(weakCompareAndSwapByteVolatile_name, "weakCompareAndSwapByteVolatile") \
|
||||
do_name(weakCompareAndSwapShort_name, "weakCompareAndSwapShort") \
|
||||
do_name(weakCompareAndSwapShortAcquire_name, "weakCompareAndSwapShortAcquire") \
|
||||
do_name(weakCompareAndSwapShortRelease_name, "weakCompareAndSwapShortRelease") \
|
||||
do_name(weakCompareAndSwapShortVolatile_name, "weakCompareAndSwapShortVolatile") \
|
||||
do_name(weakCompareAndSetObjectPlain_name, "weakCompareAndSetObjectPlain") \
|
||||
do_name(weakCompareAndSetObjectAcquire_name, "weakCompareAndSetObjectAcquire") \
|
||||
do_name(weakCompareAndSetObjectRelease_name, "weakCompareAndSetObjectRelease") \
|
||||
do_name(weakCompareAndSetObject_name, "weakCompareAndSetObject") \
|
||||
do_name(weakCompareAndSetLongPlain_name, "weakCompareAndSetLongPlain") \
|
||||
do_name(weakCompareAndSetLongAcquire_name, "weakCompareAndSetLongAcquire") \
|
||||
do_name(weakCompareAndSetLongRelease_name, "weakCompareAndSetLongRelease") \
|
||||
do_name(weakCompareAndSetLong_name, "weakCompareAndSetLong") \
|
||||
do_name(weakCompareAndSetIntPlain_name, "weakCompareAndSetIntPlain") \
|
||||
do_name(weakCompareAndSetIntAcquire_name, "weakCompareAndSetIntAcquire") \
|
||||
do_name(weakCompareAndSetIntRelease_name, "weakCompareAndSetIntRelease") \
|
||||
do_name(weakCompareAndSetInt_name, "weakCompareAndSetInt") \
|
||||
do_name(weakCompareAndSetBytePlain_name, "weakCompareAndSetBytePlain") \
|
||||
do_name(weakCompareAndSetByteAcquire_name, "weakCompareAndSetByteAcquire") \
|
||||
do_name(weakCompareAndSetByteRelease_name, "weakCompareAndSetByteRelease") \
|
||||
do_name(weakCompareAndSetByte_name, "weakCompareAndSetByte") \
|
||||
do_name(weakCompareAndSetShortPlain_name, "weakCompareAndSetShortPlain") \
|
||||
do_name(weakCompareAndSetShortAcquire_name, "weakCompareAndSetShortAcquire") \
|
||||
do_name(weakCompareAndSetShortRelease_name, "weakCompareAndSetShortRelease") \
|
||||
do_name(weakCompareAndSetShort_name, "weakCompareAndSetShort") \
|
||||
\
|
||||
do_intrinsic(_compareAndSwapObject, jdk_internal_misc_Unsafe, compareAndSwapObject_name, compareAndSwapObject_signature, F_RN) \
|
||||
do_intrinsic(_compareAndExchangeObjectVolatile, jdk_internal_misc_Unsafe, compareAndExchangeObjectVolatile_name, compareAndExchangeObject_signature, F_RN) \
|
||||
do_intrinsic(_compareAndSetObject, jdk_internal_misc_Unsafe, compareAndSetObject_name, compareAndSetObject_signature, F_RN) \
|
||||
do_intrinsic(_compareAndExchangeObject, jdk_internal_misc_Unsafe, compareAndExchangeObject_name, compareAndExchangeObject_signature, F_RN) \
|
||||
do_intrinsic(_compareAndExchangeObjectAcquire, jdk_internal_misc_Unsafe, compareAndExchangeObjectAcquire_name, compareAndExchangeObject_signature, F_R) \
|
||||
do_intrinsic(_compareAndExchangeObjectRelease, jdk_internal_misc_Unsafe, compareAndExchangeObjectRelease_name, compareAndExchangeObject_signature, F_R) \
|
||||
do_intrinsic(_compareAndSwapLong, jdk_internal_misc_Unsafe, compareAndSwapLong_name, compareAndSwapLong_signature, F_RN) \
|
||||
do_intrinsic(_compareAndExchangeLongVolatile, jdk_internal_misc_Unsafe, compareAndExchangeLongVolatile_name, compareAndExchangeLong_signature, F_RN) \
|
||||
do_intrinsic(_compareAndSetLong, jdk_internal_misc_Unsafe, compareAndSetLong_name, compareAndSetLong_signature, F_RN) \
|
||||
do_intrinsic(_compareAndExchangeLong, jdk_internal_misc_Unsafe, compareAndExchangeLong_name, compareAndExchangeLong_signature, F_RN) \
|
||||
do_intrinsic(_compareAndExchangeLongAcquire, jdk_internal_misc_Unsafe, compareAndExchangeLongAcquire_name, compareAndExchangeLong_signature, F_R) \
|
||||
do_intrinsic(_compareAndExchangeLongRelease, jdk_internal_misc_Unsafe, compareAndExchangeLongRelease_name, compareAndExchangeLong_signature, F_R) \
|
||||
do_intrinsic(_compareAndSwapInt, jdk_internal_misc_Unsafe, compareAndSwapInt_name, compareAndSwapInt_signature, F_RN) \
|
||||
do_intrinsic(_compareAndExchangeIntVolatile, jdk_internal_misc_Unsafe, compareAndExchangeIntVolatile_name, compareAndExchangeInt_signature, F_RN) \
|
||||
do_intrinsic(_compareAndSetInt, jdk_internal_misc_Unsafe, compareAndSetInt_name, compareAndSetInt_signature, F_RN) \
|
||||
do_intrinsic(_compareAndExchangeInt, jdk_internal_misc_Unsafe, compareAndExchangeInt_name, compareAndExchangeInt_signature, F_RN) \
|
||||
do_intrinsic(_compareAndExchangeIntAcquire, jdk_internal_misc_Unsafe, compareAndExchangeIntAcquire_name, compareAndExchangeInt_signature, F_R) \
|
||||
do_intrinsic(_compareAndExchangeIntRelease, jdk_internal_misc_Unsafe, compareAndExchangeIntRelease_name, compareAndExchangeInt_signature, F_R) \
|
||||
do_intrinsic(_compareAndSwapByte, jdk_internal_misc_Unsafe, compareAndSwapByte_name, compareAndSwapByte_signature, F_R) \
|
||||
do_intrinsic(_compareAndExchangeByteVolatile, jdk_internal_misc_Unsafe, compareAndExchangeByteVolatile_name, compareAndExchangeByte_signature, F_R) \
|
||||
do_intrinsic(_compareAndSetByte, jdk_internal_misc_Unsafe, compareAndSetByte_name, compareAndSetByte_signature, F_R) \
|
||||
do_intrinsic(_compareAndExchangeByte, jdk_internal_misc_Unsafe, compareAndExchangeByte_name, compareAndExchangeByte_signature, F_R) \
|
||||
do_intrinsic(_compareAndExchangeByteAcquire, jdk_internal_misc_Unsafe, compareAndExchangeByteAcquire_name, compareAndExchangeByte_signature, F_R) \
|
||||
do_intrinsic(_compareAndExchangeByteRelease, jdk_internal_misc_Unsafe, compareAndExchangeByteRelease_name, compareAndExchangeByte_signature, F_R) \
|
||||
do_intrinsic(_compareAndSwapShort, jdk_internal_misc_Unsafe, compareAndSwapShort_name, compareAndSwapShort_signature, F_R) \
|
||||
do_intrinsic(_compareAndExchangeShortVolatile, jdk_internal_misc_Unsafe, compareAndExchangeShortVolatile_name, compareAndExchangeShort_signature, F_R) \
|
||||
do_intrinsic(_compareAndSetShort, jdk_internal_misc_Unsafe, compareAndSetShort_name, compareAndSetShort_signature, F_R) \
|
||||
do_intrinsic(_compareAndExchangeShort, jdk_internal_misc_Unsafe, compareAndExchangeShort_name, compareAndExchangeShort_signature, F_R) \
|
||||
do_intrinsic(_compareAndExchangeShortAcquire, jdk_internal_misc_Unsafe, compareAndExchangeShortAcquire_name, compareAndExchangeShort_signature, F_R) \
|
||||
do_intrinsic(_compareAndExchangeShortRelease, jdk_internal_misc_Unsafe, compareAndExchangeShortRelease_name, compareAndExchangeShort_signature, F_R) \
|
||||
\
|
||||
do_intrinsic(_weakCompareAndSwapObject, jdk_internal_misc_Unsafe, weakCompareAndSwapObject_name, compareAndSwapObject_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSwapObjectAcquire, jdk_internal_misc_Unsafe, weakCompareAndSwapObjectAcquire_name, compareAndSwapObject_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSwapObjectRelease, jdk_internal_misc_Unsafe, weakCompareAndSwapObjectRelease_name, compareAndSwapObject_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSwapObjectVolatile, jdk_internal_misc_Unsafe, weakCompareAndSwapObjectVolatile_name, compareAndSwapObject_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSwapLong, jdk_internal_misc_Unsafe, weakCompareAndSwapLong_name, compareAndSwapLong_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSwapLongAcquire, jdk_internal_misc_Unsafe, weakCompareAndSwapLongAcquire_name, compareAndSwapLong_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSwapLongRelease, jdk_internal_misc_Unsafe, weakCompareAndSwapLongRelease_name, compareAndSwapLong_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSwapLongVolatile, jdk_internal_misc_Unsafe, weakCompareAndSwapLongVolatile_name, compareAndSwapLong_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSwapInt, jdk_internal_misc_Unsafe, weakCompareAndSwapInt_name, compareAndSwapInt_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSwapIntAcquire, jdk_internal_misc_Unsafe, weakCompareAndSwapIntAcquire_name, compareAndSwapInt_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSwapIntRelease, jdk_internal_misc_Unsafe, weakCompareAndSwapIntRelease_name, compareAndSwapInt_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSwapIntVolatile, jdk_internal_misc_Unsafe, weakCompareAndSwapIntVolatile_name, compareAndSwapInt_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSwapByte, jdk_internal_misc_Unsafe, weakCompareAndSwapByte_name, compareAndSwapByte_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSwapByteAcquire, jdk_internal_misc_Unsafe, weakCompareAndSwapByteAcquire_name, compareAndSwapByte_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSwapByteRelease, jdk_internal_misc_Unsafe, weakCompareAndSwapByteRelease_name, compareAndSwapByte_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSwapByteVolatile, jdk_internal_misc_Unsafe, weakCompareAndSwapByteVolatile_name, compareAndSwapByte_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSwapShort, jdk_internal_misc_Unsafe, weakCompareAndSwapShort_name, compareAndSwapShort_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSwapShortAcquire, jdk_internal_misc_Unsafe, weakCompareAndSwapShortAcquire_name, compareAndSwapShort_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSwapShortRelease, jdk_internal_misc_Unsafe, weakCompareAndSwapShortRelease_name, compareAndSwapShort_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSwapShortVolatile, jdk_internal_misc_Unsafe, weakCompareAndSwapShortVolatile_name, compareAndSwapShort_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSetObjectPlain, jdk_internal_misc_Unsafe, weakCompareAndSetObjectPlain_name, compareAndSetObject_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSetObjectAcquire, jdk_internal_misc_Unsafe, weakCompareAndSetObjectAcquire_name, compareAndSetObject_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSetObjectRelease, jdk_internal_misc_Unsafe, weakCompareAndSetObjectRelease_name, compareAndSetObject_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSetObject, jdk_internal_misc_Unsafe, weakCompareAndSetObject_name, compareAndSetObject_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSetLongPlain, jdk_internal_misc_Unsafe, weakCompareAndSetLongPlain_name, compareAndSetLong_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSetLongAcquire, jdk_internal_misc_Unsafe, weakCompareAndSetLongAcquire_name, compareAndSetLong_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSetLongRelease, jdk_internal_misc_Unsafe, weakCompareAndSetLongRelease_name, compareAndSetLong_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSetLong, jdk_internal_misc_Unsafe, weakCompareAndSetLong_name, compareAndSetLong_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSetIntPlain, jdk_internal_misc_Unsafe, weakCompareAndSetIntPlain_name, compareAndSetInt_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSetIntAcquire, jdk_internal_misc_Unsafe, weakCompareAndSetIntAcquire_name, compareAndSetInt_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSetIntRelease, jdk_internal_misc_Unsafe, weakCompareAndSetIntRelease_name, compareAndSetInt_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSetInt, jdk_internal_misc_Unsafe, weakCompareAndSetInt_name, compareAndSetInt_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSetBytePlain, jdk_internal_misc_Unsafe, weakCompareAndSetBytePlain_name, compareAndSetByte_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSetByteAcquire, jdk_internal_misc_Unsafe, weakCompareAndSetByteAcquire_name, compareAndSetByte_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSetByteRelease, jdk_internal_misc_Unsafe, weakCompareAndSetByteRelease_name, compareAndSetByte_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSetByte, jdk_internal_misc_Unsafe, weakCompareAndSetByte_name, compareAndSetByte_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSetShortPlain, jdk_internal_misc_Unsafe, weakCompareAndSetShortPlain_name, compareAndSetShort_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSetShortAcquire, jdk_internal_misc_Unsafe, weakCompareAndSetShortAcquire_name, compareAndSetShort_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSetShortRelease, jdk_internal_misc_Unsafe, weakCompareAndSetShortRelease_name, compareAndSetShort_signature, F_R) \
|
||||
do_intrinsic(_weakCompareAndSetShort, jdk_internal_misc_Unsafe, weakCompareAndSetShort_name, compareAndSetShort_signature, F_R) \
|
||||
\
|
||||
do_intrinsic(_getAndAddInt, jdk_internal_misc_Unsafe, getAndAddInt_name, getAndAddInt_signature, F_R) \
|
||||
do_name( getAndAddInt_name, "getAndAddInt") \
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -1053,12 +1053,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);
|
||||
}
|
||||
|
||||
|
@ -1146,6 +1148,7 @@ void LinkResolver::runtime_resolve_special_method(CallInfo& result,
|
|||
const methodHandle& resolved_method,
|
||||
Klass* resolved_klass,
|
||||
Klass* current_klass,
|
||||
Handle recv,
|
||||
bool check_access, TRAPS) {
|
||||
|
||||
// resolved method is selected method unless we have an old-style lookup
|
||||
|
@ -1154,30 +1157,53 @@ 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
|
||||
if (check_access &&
|
||||
// a) check if ACC_SUPER flag is set for the current class
|
||||
(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>
|
||||
// check if the method is not <init>
|
||||
resolved_method->name() != vmSymbols::object_initializer_name()) {
|
||||
// Lookup super method
|
||||
Klass* super_klass = current_klass->super();
|
||||
sel_method = lookup_instance_method_in_klasses(super_klass,
|
||||
resolved_method->name(),
|
||||
resolved_method->signature(), CHECK);
|
||||
// check if found
|
||||
if (sel_method.is_null()) {
|
||||
ResourceMark rm(THREAD);
|
||||
THROW_MSG(vmSymbols::java_lang_AbstractMethodError(),
|
||||
Method::name_and_sig_as_C_string(resolved_klass,
|
||||
resolved_method->name(),
|
||||
resolved_method->signature()));
|
||||
|
||||
// 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
|
||||
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) {
|
||||
// Lookup super method
|
||||
Klass* super_klass = current_klass->super();
|
||||
sel_method = lookup_instance_method_in_klasses(super_klass,
|
||||
resolved_method->name(),
|
||||
resolved_method->signature(), CHECK);
|
||||
// check if found
|
||||
if (sel_method.is_null()) {
|
||||
ResourceMark rm(THREAD);
|
||||
THROW_MSG(vmSymbols::java_lang_AbstractMethodError(),
|
||||
Method::name_and_sig_as_C_string(resolved_klass,
|
||||
resolved_method->name(),
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1511,7 +1537,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();
|
||||
|
@ -1527,7 +1553,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;
|
||||
|
@ -1556,7 +1582,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));
|
||||
|
@ -1569,9 +1595,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,
|
||||
Klass* resolved_klass,
|
||||
Klass* 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, Klass* recv_klass,
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
LOG_TAG(metadata) \
|
||||
LOG_TAG(metaspace) \
|
||||
LOG_TAG(mmu) \
|
||||
LOG_TAG(modules) \
|
||||
LOG_TAG(module) \
|
||||
LOG_TAG(monitorinflation) \
|
||||
LOG_TAG(monitormismatch) \
|
||||
LOG_TAG(nmethod) \
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -2302,21 +2302,21 @@ void InstanceKlass::set_package(ClassLoaderData* loader_data, TRAPS) {
|
|||
name()->as_C_string(), loader_data->loader_name());
|
||||
}
|
||||
|
||||
if (log_is_enabled(Debug, modules)) {
|
||||
if (log_is_enabled(Debug, module)) {
|
||||
ResourceMark rm;
|
||||
ModuleEntry* m = _package_entry->module();
|
||||
log_trace(modules)("Setting package: class: %s, package: %s, loader: %s, module: %s",
|
||||
external_name(),
|
||||
pkg_name->as_C_string(),
|
||||
loader_data->loader_name(),
|
||||
(m->is_named() ? m->name()->as_C_string() : UNNAMED_MODULE));
|
||||
log_trace(module)("Setting package: class: %s, package: %s, loader: %s, module: %s",
|
||||
external_name(),
|
||||
pkg_name->as_C_string(),
|
||||
loader_data->loader_name(),
|
||||
(m->is_named() ? m->name()->as_C_string() : UNNAMED_MODULE));
|
||||
}
|
||||
} else {
|
||||
ResourceMark rm;
|
||||
log_trace(modules)("Setting package: class: %s, package: unnamed, loader: %s, module: %s",
|
||||
external_name(),
|
||||
(loader_data != NULL) ? loader_data->loader_name() : "NULL",
|
||||
UNNAMED_MODULE);
|
||||
log_trace(module)("Setting package: class: %s, package: unnamed, loader: %s, module: %s",
|
||||
external_name(),
|
||||
(loader_data != NULL) ? loader_data->loader_name() : "NULL",
|
||||
UNNAMED_MODULE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 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
|
||||
|
@ -244,8 +244,8 @@ bool C2Compiler::is_intrinsic_supported(const methodHandle& method, bool is_virt
|
|||
if (!Matcher::match_rule_supported(Op_ReverseBytesL)) return false;
|
||||
break;
|
||||
|
||||
/* CompareAndSwap, Object: */
|
||||
case vmIntrinsics::_compareAndSwapObject:
|
||||
/* CompareAndSet, Object: */
|
||||
case vmIntrinsics::_compareAndSetObject:
|
||||
#ifdef _LP64
|
||||
if ( UseCompressedOops && !Matcher::match_rule_supported(Op_CompareAndSwapN)) return false;
|
||||
if (!UseCompressedOops && !Matcher::match_rule_supported(Op_CompareAndSwapP)) return false;
|
||||
|
@ -253,10 +253,10 @@ bool C2Compiler::is_intrinsic_supported(const methodHandle& method, bool is_virt
|
|||
if (!Matcher::match_rule_supported(Op_CompareAndSwapP)) return false;
|
||||
#endif
|
||||
break;
|
||||
case vmIntrinsics::_weakCompareAndSwapObject:
|
||||
case vmIntrinsics::_weakCompareAndSwapObjectAcquire:
|
||||
case vmIntrinsics::_weakCompareAndSwapObjectRelease:
|
||||
case vmIntrinsics::_weakCompareAndSwapObjectVolatile:
|
||||
case vmIntrinsics::_weakCompareAndSetObjectPlain:
|
||||
case vmIntrinsics::_weakCompareAndSetObjectAcquire:
|
||||
case vmIntrinsics::_weakCompareAndSetObjectRelease:
|
||||
case vmIntrinsics::_weakCompareAndSetObject:
|
||||
#ifdef _LP64
|
||||
if ( UseCompressedOops && !Matcher::match_rule_supported(Op_WeakCompareAndSwapN)) return false;
|
||||
if (!UseCompressedOops && !Matcher::match_rule_supported(Op_WeakCompareAndSwapP)) return false;
|
||||
|
@ -264,52 +264,52 @@ bool C2Compiler::is_intrinsic_supported(const methodHandle& method, bool is_virt
|
|||
if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapP)) return false;
|
||||
#endif
|
||||
break;
|
||||
/* CompareAndSwap, Long: */
|
||||
case vmIntrinsics::_compareAndSwapLong:
|
||||
/* CompareAndSet, Long: */
|
||||
case vmIntrinsics::_compareAndSetLong:
|
||||
if (!Matcher::match_rule_supported(Op_CompareAndSwapL)) return false;
|
||||
break;
|
||||
case vmIntrinsics::_weakCompareAndSwapLong:
|
||||
case vmIntrinsics::_weakCompareAndSwapLongAcquire:
|
||||
case vmIntrinsics::_weakCompareAndSwapLongRelease:
|
||||
case vmIntrinsics::_weakCompareAndSwapLongVolatile:
|
||||
case vmIntrinsics::_weakCompareAndSetLongPlain:
|
||||
case vmIntrinsics::_weakCompareAndSetLongAcquire:
|
||||
case vmIntrinsics::_weakCompareAndSetLongRelease:
|
||||
case vmIntrinsics::_weakCompareAndSetLong:
|
||||
if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapL)) return false;
|
||||
break;
|
||||
|
||||
/* CompareAndSwap, Int: */
|
||||
case vmIntrinsics::_compareAndSwapInt:
|
||||
/* CompareAndSet, Int: */
|
||||
case vmIntrinsics::_compareAndSetInt:
|
||||
if (!Matcher::match_rule_supported(Op_CompareAndSwapI)) return false;
|
||||
break;
|
||||
case vmIntrinsics::_weakCompareAndSwapInt:
|
||||
case vmIntrinsics::_weakCompareAndSwapIntAcquire:
|
||||
case vmIntrinsics::_weakCompareAndSwapIntRelease:
|
||||
case vmIntrinsics::_weakCompareAndSwapIntVolatile:
|
||||
case vmIntrinsics::_weakCompareAndSetIntPlain:
|
||||
case vmIntrinsics::_weakCompareAndSetIntAcquire:
|
||||
case vmIntrinsics::_weakCompareAndSetIntRelease:
|
||||
case vmIntrinsics::_weakCompareAndSetInt:
|
||||
if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapL)) return false;
|
||||
break;
|
||||
|
||||
/* CompareAndSwap, Byte: */
|
||||
case vmIntrinsics::_compareAndSwapByte:
|
||||
/* CompareAndSet, Byte: */
|
||||
case vmIntrinsics::_compareAndSetByte:
|
||||
if (!Matcher::match_rule_supported(Op_CompareAndSwapB)) return false;
|
||||
break;
|
||||
case vmIntrinsics::_weakCompareAndSwapByte:
|
||||
case vmIntrinsics::_weakCompareAndSwapByteAcquire:
|
||||
case vmIntrinsics::_weakCompareAndSwapByteRelease:
|
||||
case vmIntrinsics::_weakCompareAndSwapByteVolatile:
|
||||
case vmIntrinsics::_weakCompareAndSetBytePlain:
|
||||
case vmIntrinsics::_weakCompareAndSetByteAcquire:
|
||||
case vmIntrinsics::_weakCompareAndSetByteRelease:
|
||||
case vmIntrinsics::_weakCompareAndSetByte:
|
||||
if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapB)) return false;
|
||||
break;
|
||||
|
||||
/* CompareAndSwap, Short: */
|
||||
case vmIntrinsics::_compareAndSwapShort:
|
||||
/* CompareAndSet, Short: */
|
||||
case vmIntrinsics::_compareAndSetShort:
|
||||
if (!Matcher::match_rule_supported(Op_CompareAndSwapS)) return false;
|
||||
break;
|
||||
case vmIntrinsics::_weakCompareAndSwapShort:
|
||||
case vmIntrinsics::_weakCompareAndSwapShortAcquire:
|
||||
case vmIntrinsics::_weakCompareAndSwapShortRelease:
|
||||
case vmIntrinsics::_weakCompareAndSwapShortVolatile:
|
||||
case vmIntrinsics::_weakCompareAndSetShortPlain:
|
||||
case vmIntrinsics::_weakCompareAndSetShortAcquire:
|
||||
case vmIntrinsics::_weakCompareAndSetShortRelease:
|
||||
case vmIntrinsics::_weakCompareAndSetShort:
|
||||
if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapS)) return false;
|
||||
break;
|
||||
|
||||
/* CompareAndExchange, Object: */
|
||||
case vmIntrinsics::_compareAndExchangeObjectVolatile:
|
||||
case vmIntrinsics::_compareAndExchangeObject:
|
||||
case vmIntrinsics::_compareAndExchangeObjectAcquire:
|
||||
case vmIntrinsics::_compareAndExchangeObjectRelease:
|
||||
#ifdef _LP64
|
||||
|
@ -321,28 +321,28 @@ bool C2Compiler::is_intrinsic_supported(const methodHandle& method, bool is_virt
|
|||
break;
|
||||
|
||||
/* CompareAndExchange, Long: */
|
||||
case vmIntrinsics::_compareAndExchangeLongVolatile:
|
||||
case vmIntrinsics::_compareAndExchangeLong:
|
||||
case vmIntrinsics::_compareAndExchangeLongAcquire:
|
||||
case vmIntrinsics::_compareAndExchangeLongRelease:
|
||||
if (!Matcher::match_rule_supported(Op_CompareAndExchangeL)) return false;
|
||||
break;
|
||||
|
||||
/* CompareAndExchange, Int: */
|
||||
case vmIntrinsics::_compareAndExchangeIntVolatile:
|
||||
case vmIntrinsics::_compareAndExchangeInt:
|
||||
case vmIntrinsics::_compareAndExchangeIntAcquire:
|
||||
case vmIntrinsics::_compareAndExchangeIntRelease:
|
||||
if (!Matcher::match_rule_supported(Op_CompareAndExchangeI)) return false;
|
||||
break;
|
||||
|
||||
/* CompareAndExchange, Byte: */
|
||||
case vmIntrinsics::_compareAndExchangeByteVolatile:
|
||||
case vmIntrinsics::_compareAndExchangeByte:
|
||||
case vmIntrinsics::_compareAndExchangeByteAcquire:
|
||||
case vmIntrinsics::_compareAndExchangeByteRelease:
|
||||
if (!Matcher::match_rule_supported(Op_CompareAndExchangeB)) return false;
|
||||
break;
|
||||
|
||||
/* CompareAndExchange, Short: */
|
||||
case vmIntrinsics::_compareAndExchangeShortVolatile:
|
||||
case vmIntrinsics::_compareAndExchangeShort:
|
||||
case vmIntrinsics::_compareAndExchangeShortAcquire:
|
||||
case vmIntrinsics::_compareAndExchangeShortRelease:
|
||||
if (!Matcher::match_rule_supported(Op_CompareAndExchangeS)) return false;
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -671,46 +671,46 @@ bool LibraryCallKit::try_to_inline(int predicate) {
|
|||
case vmIntrinsics::_putFloatOpaque: return inline_unsafe_access( is_store, T_FLOAT, Opaque, false);
|
||||
case vmIntrinsics::_putDoubleOpaque: return inline_unsafe_access( is_store, T_DOUBLE, Opaque, false);
|
||||
|
||||
case vmIntrinsics::_compareAndSwapObject: return inline_unsafe_load_store(T_OBJECT, LS_cmp_swap, Volatile);
|
||||
case vmIntrinsics::_compareAndSwapByte: return inline_unsafe_load_store(T_BYTE, LS_cmp_swap, Volatile);
|
||||
case vmIntrinsics::_compareAndSwapShort: return inline_unsafe_load_store(T_SHORT, LS_cmp_swap, Volatile);
|
||||
case vmIntrinsics::_compareAndSwapInt: return inline_unsafe_load_store(T_INT, LS_cmp_swap, Volatile);
|
||||
case vmIntrinsics::_compareAndSwapLong: return inline_unsafe_load_store(T_LONG, LS_cmp_swap, Volatile);
|
||||
case vmIntrinsics::_compareAndSetObject: return inline_unsafe_load_store(T_OBJECT, LS_cmp_swap, Volatile);
|
||||
case vmIntrinsics::_compareAndSetByte: return inline_unsafe_load_store(T_BYTE, LS_cmp_swap, Volatile);
|
||||
case vmIntrinsics::_compareAndSetShort: return inline_unsafe_load_store(T_SHORT, LS_cmp_swap, Volatile);
|
||||
case vmIntrinsics::_compareAndSetInt: return inline_unsafe_load_store(T_INT, LS_cmp_swap, Volatile);
|
||||
case vmIntrinsics::_compareAndSetLong: return inline_unsafe_load_store(T_LONG, LS_cmp_swap, Volatile);
|
||||
|
||||
case vmIntrinsics::_weakCompareAndSwapObject: return inline_unsafe_load_store(T_OBJECT, LS_cmp_swap_weak, Relaxed);
|
||||
case vmIntrinsics::_weakCompareAndSwapObjectAcquire: return inline_unsafe_load_store(T_OBJECT, LS_cmp_swap_weak, Acquire);
|
||||
case vmIntrinsics::_weakCompareAndSwapObjectRelease: return inline_unsafe_load_store(T_OBJECT, LS_cmp_swap_weak, Release);
|
||||
case vmIntrinsics::_weakCompareAndSwapObjectVolatile: return inline_unsafe_load_store(T_OBJECT, LS_cmp_swap_weak, Volatile);
|
||||
case vmIntrinsics::_weakCompareAndSwapByte: return inline_unsafe_load_store(T_BYTE, LS_cmp_swap_weak, Relaxed);
|
||||
case vmIntrinsics::_weakCompareAndSwapByteAcquire: return inline_unsafe_load_store(T_BYTE, LS_cmp_swap_weak, Acquire);
|
||||
case vmIntrinsics::_weakCompareAndSwapByteRelease: return inline_unsafe_load_store(T_BYTE, LS_cmp_swap_weak, Release);
|
||||
case vmIntrinsics::_weakCompareAndSwapByteVolatile: return inline_unsafe_load_store(T_BYTE, LS_cmp_swap_weak, Volatile);
|
||||
case vmIntrinsics::_weakCompareAndSwapShort: return inline_unsafe_load_store(T_SHORT, LS_cmp_swap_weak, Relaxed);
|
||||
case vmIntrinsics::_weakCompareAndSwapShortAcquire: return inline_unsafe_load_store(T_SHORT, LS_cmp_swap_weak, Acquire);
|
||||
case vmIntrinsics::_weakCompareAndSwapShortRelease: return inline_unsafe_load_store(T_SHORT, LS_cmp_swap_weak, Release);
|
||||
case vmIntrinsics::_weakCompareAndSwapShortVolatile: return inline_unsafe_load_store(T_SHORT, LS_cmp_swap_weak, Volatile);
|
||||
case vmIntrinsics::_weakCompareAndSwapInt: return inline_unsafe_load_store(T_INT, LS_cmp_swap_weak, Relaxed);
|
||||
case vmIntrinsics::_weakCompareAndSwapIntAcquire: return inline_unsafe_load_store(T_INT, LS_cmp_swap_weak, Acquire);
|
||||
case vmIntrinsics::_weakCompareAndSwapIntRelease: return inline_unsafe_load_store(T_INT, LS_cmp_swap_weak, Release);
|
||||
case vmIntrinsics::_weakCompareAndSwapIntVolatile: return inline_unsafe_load_store(T_INT, LS_cmp_swap_weak, Volatile);
|
||||
case vmIntrinsics::_weakCompareAndSwapLong: return inline_unsafe_load_store(T_LONG, LS_cmp_swap_weak, Relaxed);
|
||||
case vmIntrinsics::_weakCompareAndSwapLongAcquire: return inline_unsafe_load_store(T_LONG, LS_cmp_swap_weak, Acquire);
|
||||
case vmIntrinsics::_weakCompareAndSwapLongRelease: return inline_unsafe_load_store(T_LONG, LS_cmp_swap_weak, Release);
|
||||
case vmIntrinsics::_weakCompareAndSwapLongVolatile: return inline_unsafe_load_store(T_LONG, LS_cmp_swap_weak, Volatile);
|
||||
case vmIntrinsics::_weakCompareAndSetObjectPlain: return inline_unsafe_load_store(T_OBJECT, LS_cmp_swap_weak, Relaxed);
|
||||
case vmIntrinsics::_weakCompareAndSetObjectAcquire: return inline_unsafe_load_store(T_OBJECT, LS_cmp_swap_weak, Acquire);
|
||||
case vmIntrinsics::_weakCompareAndSetObjectRelease: return inline_unsafe_load_store(T_OBJECT, LS_cmp_swap_weak, Release);
|
||||
case vmIntrinsics::_weakCompareAndSetObject: return inline_unsafe_load_store(T_OBJECT, LS_cmp_swap_weak, Volatile);
|
||||
case vmIntrinsics::_weakCompareAndSetBytePlain: return inline_unsafe_load_store(T_BYTE, LS_cmp_swap_weak, Relaxed);
|
||||
case vmIntrinsics::_weakCompareAndSetByteAcquire: return inline_unsafe_load_store(T_BYTE, LS_cmp_swap_weak, Acquire);
|
||||
case vmIntrinsics::_weakCompareAndSetByteRelease: return inline_unsafe_load_store(T_BYTE, LS_cmp_swap_weak, Release);
|
||||
case vmIntrinsics::_weakCompareAndSetByte: return inline_unsafe_load_store(T_BYTE, LS_cmp_swap_weak, Volatile);
|
||||
case vmIntrinsics::_weakCompareAndSetShortPlain: return inline_unsafe_load_store(T_SHORT, LS_cmp_swap_weak, Relaxed);
|
||||
case vmIntrinsics::_weakCompareAndSetShortAcquire: return inline_unsafe_load_store(T_SHORT, LS_cmp_swap_weak, Acquire);
|
||||
case vmIntrinsics::_weakCompareAndSetShortRelease: return inline_unsafe_load_store(T_SHORT, LS_cmp_swap_weak, Release);
|
||||
case vmIntrinsics::_weakCompareAndSetShort: return inline_unsafe_load_store(T_SHORT, LS_cmp_swap_weak, Volatile);
|
||||
case vmIntrinsics::_weakCompareAndSetIntPlain: return inline_unsafe_load_store(T_INT, LS_cmp_swap_weak, Relaxed);
|
||||
case vmIntrinsics::_weakCompareAndSetIntAcquire: return inline_unsafe_load_store(T_INT, LS_cmp_swap_weak, Acquire);
|
||||
case vmIntrinsics::_weakCompareAndSetIntRelease: return inline_unsafe_load_store(T_INT, LS_cmp_swap_weak, Release);
|
||||
case vmIntrinsics::_weakCompareAndSetInt: return inline_unsafe_load_store(T_INT, LS_cmp_swap_weak, Volatile);
|
||||
case vmIntrinsics::_weakCompareAndSetLongPlain: return inline_unsafe_load_store(T_LONG, LS_cmp_swap_weak, Relaxed);
|
||||
case vmIntrinsics::_weakCompareAndSetLongAcquire: return inline_unsafe_load_store(T_LONG, LS_cmp_swap_weak, Acquire);
|
||||
case vmIntrinsics::_weakCompareAndSetLongRelease: return inline_unsafe_load_store(T_LONG, LS_cmp_swap_weak, Release);
|
||||
case vmIntrinsics::_weakCompareAndSetLong: return inline_unsafe_load_store(T_LONG, LS_cmp_swap_weak, Volatile);
|
||||
|
||||
case vmIntrinsics::_compareAndExchangeObjectVolatile: return inline_unsafe_load_store(T_OBJECT, LS_cmp_exchange, Volatile);
|
||||
case vmIntrinsics::_compareAndExchangeObject: return inline_unsafe_load_store(T_OBJECT, LS_cmp_exchange, Volatile);
|
||||
case vmIntrinsics::_compareAndExchangeObjectAcquire: return inline_unsafe_load_store(T_OBJECT, LS_cmp_exchange, Acquire);
|
||||
case vmIntrinsics::_compareAndExchangeObjectRelease: return inline_unsafe_load_store(T_OBJECT, LS_cmp_exchange, Release);
|
||||
case vmIntrinsics::_compareAndExchangeByteVolatile: return inline_unsafe_load_store(T_BYTE, LS_cmp_exchange, Volatile);
|
||||
case vmIntrinsics::_compareAndExchangeByte: return inline_unsafe_load_store(T_BYTE, LS_cmp_exchange, Volatile);
|
||||
case vmIntrinsics::_compareAndExchangeByteAcquire: return inline_unsafe_load_store(T_BYTE, LS_cmp_exchange, Acquire);
|
||||
case vmIntrinsics::_compareAndExchangeByteRelease: return inline_unsafe_load_store(T_BYTE, LS_cmp_exchange, Release);
|
||||
case vmIntrinsics::_compareAndExchangeShortVolatile: return inline_unsafe_load_store(T_SHORT, LS_cmp_exchange, Volatile);
|
||||
case vmIntrinsics::_compareAndExchangeShort: return inline_unsafe_load_store(T_SHORT, LS_cmp_exchange, Volatile);
|
||||
case vmIntrinsics::_compareAndExchangeShortAcquire: return inline_unsafe_load_store(T_SHORT, LS_cmp_exchange, Acquire);
|
||||
case vmIntrinsics::_compareAndExchangeShortRelease: return inline_unsafe_load_store(T_SHORT, LS_cmp_exchange, Release);
|
||||
case vmIntrinsics::_compareAndExchangeIntVolatile: return inline_unsafe_load_store(T_INT, LS_cmp_exchange, Volatile);
|
||||
case vmIntrinsics::_compareAndExchangeInt: return inline_unsafe_load_store(T_INT, LS_cmp_exchange, Volatile);
|
||||
case vmIntrinsics::_compareAndExchangeIntAcquire: return inline_unsafe_load_store(T_INT, LS_cmp_exchange, Acquire);
|
||||
case vmIntrinsics::_compareAndExchangeIntRelease: return inline_unsafe_load_store(T_INT, LS_cmp_exchange, Release);
|
||||
case vmIntrinsics::_compareAndExchangeLongVolatile: return inline_unsafe_load_store(T_LONG, LS_cmp_exchange, Volatile);
|
||||
case vmIntrinsics::_compareAndExchangeLong: return inline_unsafe_load_store(T_LONG, LS_cmp_exchange, Volatile);
|
||||
case vmIntrinsics::_compareAndExchangeLongAcquire: return inline_unsafe_load_store(T_LONG, LS_cmp_exchange, Acquire);
|
||||
case vmIntrinsics::_compareAndExchangeLongRelease: return inline_unsafe_load_store(T_LONG, LS_cmp_exchange, Release);
|
||||
|
||||
|
@ -2609,23 +2609,26 @@ bool LibraryCallKit::inline_unsafe_access(bool is_store, const BasicType type, c
|
|||
//
|
||||
// LS_cmp_swap:
|
||||
//
|
||||
// boolean compareAndSwapObject(Object o, long offset, Object expected, Object x);
|
||||
// boolean compareAndSwapInt( Object o, long offset, int expected, int x);
|
||||
// boolean compareAndSwapLong( Object o, long offset, long expected, long x);
|
||||
// boolean compareAndSetObject(Object o, long offset, Object expected, Object x);
|
||||
// boolean compareAndSetInt( Object o, long offset, int expected, int x);
|
||||
// boolean compareAndSetLong( Object o, long offset, long expected, long x);
|
||||
//
|
||||
// LS_cmp_swap_weak:
|
||||
//
|
||||
// boolean weakCompareAndSwapObject( Object o, long offset, Object expected, Object x);
|
||||
// boolean weakCompareAndSwapObjectAcquire(Object o, long offset, Object expected, Object x);
|
||||
// boolean weakCompareAndSwapObjectRelease(Object o, long offset, Object expected, Object x);
|
||||
// boolean weakCompareAndSetObject( Object o, long offset, Object expected, Object x);
|
||||
// boolean weakCompareAndSetObjectPlain( Object o, long offset, Object expected, Object x);
|
||||
// boolean weakCompareAndSetObjectAcquire(Object o, long offset, Object expected, Object x);
|
||||
// boolean weakCompareAndSetObjectRelease(Object o, long offset, Object expected, Object x);
|
||||
//
|
||||
// boolean weakCompareAndSwapInt( Object o, long offset, int expected, int x);
|
||||
// boolean weakCompareAndSwapIntAcquire( Object o, long offset, int expected, int x);
|
||||
// boolean weakCompareAndSwapIntRelease( Object o, long offset, int expected, int x);
|
||||
// boolean weakCompareAndSetInt( Object o, long offset, int expected, int x);
|
||||
// boolean weakCompareAndSetIntPlain( Object o, long offset, int expected, int x);
|
||||
// boolean weakCompareAndSetIntAcquire( Object o, long offset, int expected, int x);
|
||||
// boolean weakCompareAndSetIntRelease( Object o, long offset, int expected, int x);
|
||||
//
|
||||
// boolean weakCompareAndSwapLong( Object o, long offset, long expected, long x);
|
||||
// boolean weakCompareAndSwapLongAcquire( Object o, long offset, long expected, long x);
|
||||
// boolean weakCompareAndSwapLongRelease( Object o, long offset, long expected, long x);
|
||||
// boolean weakCompareAndSetLong( Object o, long offset, long expected, long x);
|
||||
// boolean weakCompareAndSetLongPlain( Object o, long offset, long expected, long x);
|
||||
// boolean weakCompareAndSetLongAcquire( Object o, long offset, long expected, long x);
|
||||
// boolean weakCompareAndSetLongRelease( Object o, long offset, long expected, long x);
|
||||
//
|
||||
// LS_cmp_exchange:
|
||||
//
|
||||
|
@ -4987,7 +4990,7 @@ bool LibraryCallKit::inline_arraycopy() {
|
|||
// See arraycopy_restore_alloc_state() comment
|
||||
// if alloc == NULL we don't have to worry about a tightly coupled allocation so we can emit all needed guards
|
||||
// if saved_jvms != NULL (then alloc != NULL) then we can handle guards and a tightly coupled allocation
|
||||
// if saved_jvms == NULL and alloc != NULL, we can’t emit any guards
|
||||
// if saved_jvms == NULL and alloc != NULL, we can't emit any guards
|
||||
bool can_emit_guards = (alloc == NULL || saved_jvms != NULL);
|
||||
|
||||
// The following tests must be performed
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -146,8 +146,16 @@ void Parse::do_field_access(bool is_get, bool is_field) {
|
|||
|
||||
|
||||
void Parse::do_get_xxx(Node* obj, ciField* field, bool is_field) {
|
||||
BasicType bt = field->layout_type();
|
||||
|
||||
// Does this field have a constant value? If so, just push the value.
|
||||
if (field->is_constant()) {
|
||||
if (field->is_constant() &&
|
||||
// Keep consistent with types found by ciTypeFlow: for an
|
||||
// unloaded field type, ciTypeFlow::StateVector::do_getstatic()
|
||||
// speculates the field is null. The code in the rest of this
|
||||
// method does the same. We must not bypass it and use a non
|
||||
// null constant here.
|
||||
(bt != T_OBJECT || field->type()->is_loaded())) {
|
||||
// final or stable field
|
||||
Node* con = make_constant_from_field(field, obj);
|
||||
if (con != NULL) {
|
||||
|
@ -163,7 +171,6 @@ void Parse::do_get_xxx(Node* obj, ciField* field, bool is_field) {
|
|||
int offset = field->offset_in_bytes();
|
||||
const TypePtr* adr_type = C->alias_type(field)->adr_type();
|
||||
Node *adr = basic_plus_adr(obj, obj, offset);
|
||||
BasicType bt = field->layout_type();
|
||||
|
||||
// Build the resultant type of the load
|
||||
const Type *type;
|
||||
|
|
|
@ -6814,7 +6814,9 @@ class C2 extends C1 implements I2 {
|
|||
<functionlink id="AddModuleReads"/>, <functionlink id="AddModuleExports"/>,
|
||||
<functionlink id="AddModuleOpens"/>, <functionlink id="AddModuleUses"/>,
|
||||
and <functionlink id="AddModuleProvides"/>. If a module is not modifiable
|
||||
then the module can not be updated with these functions.
|
||||
then the module can not be updated with these functions. The result of
|
||||
this function is always <code>JNI_TRUE</code> when called to determine
|
||||
if an unnamed module is modifiable.
|
||||
</description>
|
||||
<origin>new</origin>
|
||||
<capabilities>
|
||||
|
|
|
@ -54,7 +54,6 @@
|
|||
#include "runtime/os.inline.hpp"
|
||||
#include "runtime/thread.inline.hpp"
|
||||
#include "runtime/vframe.hpp"
|
||||
#include "services/attachListener.hpp"
|
||||
#include "services/serviceUtil.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
#if INCLUDE_ALL_GCS
|
||||
|
@ -2474,15 +2473,6 @@ extern "C" {
|
|||
typedef jint (JNICALL *OnAttachEntry_t)(JavaVM*, char *, void *);
|
||||
}
|
||||
|
||||
jint JvmtiExport::load_agent_library(AttachOperation* op, outputStream* st) {
|
||||
// get agent name and options
|
||||
const char* agent = op->arg(0);
|
||||
const char* absParam = op->arg(1);
|
||||
const char* options = op->arg(2);
|
||||
|
||||
return load_agent_library(agent, absParam, options, st);
|
||||
}
|
||||
|
||||
jint JvmtiExport::load_agent_library(const char *agent, const char *absParam,
|
||||
const char *options, outputStream* st) {
|
||||
char ebuf[1024];
|
||||
|
|
|
@ -45,7 +45,6 @@ class JvmtiEventControllerPrivate;
|
|||
class JvmtiManageCapabilities;
|
||||
class JvmtiEnv;
|
||||
class JvmtiThreadState;
|
||||
class AttachOperation;
|
||||
|
||||
#define JVMTI_SUPPORT_FLAG(key) \
|
||||
private: \
|
||||
|
@ -396,7 +395,6 @@ class JvmtiExport : public AllStatic {
|
|||
#if INCLUDE_SERVICES
|
||||
// attach support
|
||||
static jint load_agent_library(const char *agent, const char *absParam, const char *options, outputStream* out) NOT_JVMTI_RETURN_(JNI_ERR);
|
||||
static jint load_agent_library(AttachOperation* op, outputStream* out) NOT_JVMTI_RETURN_(JNI_ERR);
|
||||
#endif
|
||||
|
||||
// SetNativeMethodPrefix support
|
||||
|
|
|
@ -727,7 +727,7 @@ Handle MethodHandles::resolve_MemberName(Handle mname, Klass* 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, Klass* 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
|
||||
}
|
||||
|
|
|
@ -378,7 +378,7 @@ UNSAFE_ENTRY(jobject, Unsafe_GetUncompressedObject(JNIEnv *env, jobject unsafe,
|
|||
// On platforms which do not support atomic compare-and-swap of jlong (8 byte)
|
||||
// values we have to use a lock-based scheme to enforce atomicity. This has to be
|
||||
// applied to all Unsafe operations that set the value of a jlong field. Even so
|
||||
// the compareAndSwapLong operation will not be atomic with respect to direct stores
|
||||
// the compareAndSetLong operation will not be atomic with respect to direct stores
|
||||
// to the field from Java code. It is important therefore that any Java code that
|
||||
// utilizes these Unsafe jlong operations does not perform direct stores. To permit
|
||||
// direct loads of the field from Java code we must also use Atomic::store within the
|
||||
|
@ -1012,7 +1012,7 @@ UNSAFE_ENTRY(jlong, Unsafe_CompareAndExchangeLong(JNIEnv *env, jobject unsafe, j
|
|||
#endif
|
||||
} UNSAFE_END
|
||||
|
||||
UNSAFE_ENTRY(jboolean, Unsafe_CompareAndSwapObject(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jobject e_h, jobject x_h)) {
|
||||
UNSAFE_ENTRY(jboolean, Unsafe_CompareAndSetObject(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jobject e_h, jobject x_h)) {
|
||||
oop x = JNIHandles::resolve(x_h);
|
||||
oop e = JNIHandles::resolve(e_h);
|
||||
oop p = JNIHandles::resolve(obj);
|
||||
|
@ -1027,14 +1027,14 @@ UNSAFE_ENTRY(jboolean, Unsafe_CompareAndSwapObject(JNIEnv *env, jobject unsafe,
|
|||
return true;
|
||||
} UNSAFE_END
|
||||
|
||||
UNSAFE_ENTRY(jboolean, Unsafe_CompareAndSwapInt(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jint e, jint x)) {
|
||||
UNSAFE_ENTRY(jboolean, Unsafe_CompareAndSetInt(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jint e, jint x)) {
|
||||
oop p = JNIHandles::resolve(obj);
|
||||
jint* addr = (jint *)index_oop_from_field_offset_long(p, offset);
|
||||
|
||||
return (jint)(Atomic::cmpxchg(x, addr, e)) == e;
|
||||
} UNSAFE_END
|
||||
|
||||
UNSAFE_ENTRY(jboolean, Unsafe_CompareAndSwapLong(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jlong e, jlong x)) {
|
||||
UNSAFE_ENTRY(jboolean, Unsafe_CompareAndSetLong(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jlong e, jlong x)) {
|
||||
Handle p(THREAD, JNIHandles::resolve(obj));
|
||||
jlong* addr = (jlong*)index_oop_from_field_offset_long(p(), offset);
|
||||
|
||||
|
@ -1193,12 +1193,12 @@ static JNINativeMethod jdk_internal_misc_Unsafe_methods[] = {
|
|||
{CC "defineClass0", CC "(" DC_Args ")" CLS, FN_PTR(Unsafe_DefineClass0)},
|
||||
{CC "allocateInstance", CC "(" CLS ")" OBJ, FN_PTR(Unsafe_AllocateInstance)},
|
||||
{CC "throwException", CC "(" THR ")V", FN_PTR(Unsafe_ThrowException)},
|
||||
{CC "compareAndSwapObject", CC "(" OBJ "J" OBJ "" OBJ ")Z", FN_PTR(Unsafe_CompareAndSwapObject)},
|
||||
{CC "compareAndSwapInt", CC "(" OBJ "J""I""I"")Z", FN_PTR(Unsafe_CompareAndSwapInt)},
|
||||
{CC "compareAndSwapLong", CC "(" OBJ "J""J""J"")Z", FN_PTR(Unsafe_CompareAndSwapLong)},
|
||||
{CC "compareAndExchangeObjectVolatile", CC "(" OBJ "J" OBJ "" OBJ ")" OBJ, FN_PTR(Unsafe_CompareAndExchangeObject)},
|
||||
{CC "compareAndExchangeIntVolatile", CC "(" OBJ "J""I""I"")I", FN_PTR(Unsafe_CompareAndExchangeInt)},
|
||||
{CC "compareAndExchangeLongVolatile", CC "(" OBJ "J""J""J"")J", FN_PTR(Unsafe_CompareAndExchangeLong)},
|
||||
{CC "compareAndSetObject",CC "(" OBJ "J" OBJ "" OBJ ")Z", FN_PTR(Unsafe_CompareAndSetObject)},
|
||||
{CC "compareAndSetInt", CC "(" OBJ "J""I""I"")Z", FN_PTR(Unsafe_CompareAndSetInt)},
|
||||
{CC "compareAndSetLong", CC "(" OBJ "J""J""J"")Z", FN_PTR(Unsafe_CompareAndSetLong)},
|
||||
{CC "compareAndExchangeObject", CC "(" OBJ "J" OBJ "" OBJ ")" OBJ, FN_PTR(Unsafe_CompareAndExchangeObject)},
|
||||
{CC "compareAndExchangeInt", CC "(" OBJ "J""I""I"")I", FN_PTR(Unsafe_CompareAndExchangeInt)},
|
||||
{CC "compareAndExchangeLong", CC "(" OBJ "J""J""J"")J", FN_PTR(Unsafe_CompareAndExchangeLong)},
|
||||
|
||||
{CC "park", CC "(ZJ)V", FN_PTR(Unsafe_Park)},
|
||||
{CC "unpark", CC "(" OBJ ")V", FN_PTR(Unsafe_Unpark)},
|
||||
|
|
|
@ -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() },
|
||||
|
@ -2243,8 +2244,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) {
|
||||
|
@ -2443,6 +2442,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;
|
||||
|
@ -2770,11 +2772,14 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m
|
|||
build_jvm_args(option->optionString);
|
||||
}
|
||||
|
||||
// -verbose:[class/gc/jni]
|
||||
// -verbose:[class/module/gc/jni]
|
||||
if (match_option(option, "-verbose", &tail)) {
|
||||
if (!strcmp(tail, ":class") || !strcmp(tail, "")) {
|
||||
LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(class, load));
|
||||
LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(class, unload));
|
||||
} else if (!strcmp(tail, ":module")) {
|
||||
LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(module, load));
|
||||
LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(module, unload));
|
||||
} else if (!strcmp(tail, ":gc")) {
|
||||
LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(gc));
|
||||
} else if (!strcmp(tail, ":jni")) {
|
||||
|
|
|
@ -3848,6 +3848,9 @@ public:
|
|||
product(bool, StartAttachListener, false, \
|
||||
"Always start Attach Listener at VM startup") \
|
||||
\
|
||||
product(bool, EnableDynamicAgentLoading, true, \
|
||||
"Allow tools to load agents with the attach mechanism") \
|
||||
\
|
||||
manageable(bool, PrintConcurrentLocks, false, \
|
||||
"Print java.util.concurrent locks in thread dump") \
|
||||
\
|
||||
|
|
|
@ -221,7 +221,7 @@ void JavaCalls::call_virtual(JavaValue* result, Handle receiver, Klass* spec_kla
|
|||
void JavaCalls::call_special(JavaValue* result, Klass* 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");
|
||||
|
||||
|
|
|
@ -3404,7 +3404,7 @@ static void call_initPhase1(TRAPS) {
|
|||
//
|
||||
// After phase 2, The VM will begin search classes from -Xbootclasspath/a.
|
||||
static void call_initPhase2(TRAPS) {
|
||||
TraceTime timer("Phase2 initialization", TRACETIME_LOG(Info, modules, startuptime));
|
||||
TraceTime timer("Phase2 initialization", TRACETIME_LOG(Info, module, startuptime));
|
||||
|
||||
Klass* klass = SystemDictionary::resolve_or_fail(vmSymbols::java_lang_System(), true, CHECK);
|
||||
|
||||
|
|
|
@ -99,6 +99,36 @@ static jint get_properties(AttachOperation* op, outputStream* out, Symbol* seria
|
|||
return JNI_OK;
|
||||
}
|
||||
|
||||
// Implementation of "load" command.
|
||||
static jint load_agent(AttachOperation* op, outputStream* out) {
|
||||
// get agent name and options
|
||||
const char* agent = op->arg(0);
|
||||
const char* absParam = op->arg(1);
|
||||
const char* options = op->arg(2);
|
||||
|
||||
// If loading a java agent then need to ensure that the java.instrument module is loaded
|
||||
if (strcmp(agent, "instrument") == 0) {
|
||||
Thread* THREAD = Thread::current();
|
||||
ResourceMark rm(THREAD);
|
||||
HandleMark hm(THREAD);
|
||||
JavaValue result(T_OBJECT);
|
||||
Handle h_module_name = java_lang_String::create_from_str("java.instrument", THREAD);
|
||||
JavaCalls::call_static(&result,
|
||||
SystemDictionary::module_Modules_klass(),
|
||||
vmSymbols::loadModule_name(),
|
||||
vmSymbols::loadModule_signature(),
|
||||
h_module_name,
|
||||
THREAD);
|
||||
if (HAS_PENDING_EXCEPTION) {
|
||||
java_lang_Throwable::print(PENDING_EXCEPTION, out);
|
||||
CLEAR_PENDING_EXCEPTION;
|
||||
return JNI_ERR;
|
||||
}
|
||||
}
|
||||
|
||||
return JvmtiExport::load_agent_library(agent, absParam, options, out);
|
||||
}
|
||||
|
||||
// Implementation of "properties" command.
|
||||
// See also: PrintSystemPropertiesDCmd class
|
||||
static jint get_system_properties(AttachOperation* op, outputStream* out) {
|
||||
|
@ -281,7 +311,7 @@ static AttachOperationFunctionInfo funcs[] = {
|
|||
{ "agentProperties", get_agent_properties },
|
||||
{ "datadump", data_dump },
|
||||
{ "dumpheap", dump_heap },
|
||||
{ "load", JvmtiExport::load_agent_library },
|
||||
{ "load", load_agent },
|
||||
{ "properties", get_system_properties },
|
||||
{ "threaddump", thread_dump },
|
||||
{ "inspectheap", heap_inspection },
|
||||
|
@ -320,6 +350,10 @@ static void attach_listener_thread_entry(JavaThread* thread, TRAPS) {
|
|||
// handle special detachall operation
|
||||
if (strcmp(op->name(), AttachOperation::detachall_operation_name()) == 0) {
|
||||
AttachListener::detachall();
|
||||
} else if (!EnableDynamicAgentLoading && strcmp(op->name(), "load") == 0) {
|
||||
st.print("Dynamic agent loading is not enabled. "
|
||||
"Use -XX:+EnableDynamicAgentLoading to launch target VM.");
|
||||
res = JNI_ERR;
|
||||
} else {
|
||||
// find the function to dispatch too
|
||||
AttachOperationFunctionInfo* info = NULL;
|
||||
|
|
|
@ -42,6 +42,21 @@
|
|||
#include "utilities/macros.hpp"
|
||||
#include "oops/objArrayOop.inline.hpp"
|
||||
|
||||
|
||||
static void loadAgentModule(TRAPS) {
|
||||
ResourceMark rm(THREAD);
|
||||
HandleMark hm(THREAD);
|
||||
|
||||
JavaValue result(T_OBJECT);
|
||||
Handle h_module_name = java_lang_String::create_from_str("jdk.management.agent", CHECK);
|
||||
JavaCalls::call_static(&result,
|
||||
SystemDictionary::module_Modules_klass(),
|
||||
vmSymbols::loadModule_name(),
|
||||
vmSymbols::loadModule_signature(),
|
||||
h_module_name,
|
||||
THREAD);
|
||||
}
|
||||
|
||||
void DCmdRegistrant::register_dcmds(){
|
||||
// Registration of the diagnostic commands
|
||||
// First argument specifies which interfaces will export the command
|
||||
|
@ -749,6 +764,7 @@ void JMXStartRemoteDCmd::execute(DCmdSource source, TRAPS) {
|
|||
// the remote management server.
|
||||
// throw java.lang.NoSuchMethodError if the method doesn't exist
|
||||
|
||||
loadAgentModule(CHECK);
|
||||
Handle loader = Handle(THREAD, SystemDictionary::java_system_loader());
|
||||
Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::jdk_internal_agent_Agent(), loader, Handle(), true, CHECK);
|
||||
|
||||
|
@ -821,6 +837,7 @@ void JMXStartLocalDCmd::execute(DCmdSource source, TRAPS) {
|
|||
// the local management server
|
||||
// throw java.lang.NoSuchMethodError if method doesn't exist
|
||||
|
||||
loadAgentModule(CHECK);
|
||||
Handle loader = Handle(THREAD, SystemDictionary::java_system_loader());
|
||||
Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::jdk_internal_agent_Agent(), loader, Handle(), true, CHECK);
|
||||
|
||||
|
@ -837,6 +854,7 @@ void JMXStopRemoteDCmd::execute(DCmdSource source, TRAPS) {
|
|||
// management server
|
||||
// throw java.lang.NoSuchMethodError if method doesn't exist
|
||||
|
||||
loadAgentModule(CHECK);
|
||||
Handle loader = Handle(THREAD, SystemDictionary::java_system_loader());
|
||||
Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::jdk_internal_agent_Agent(), loader, Handle(), true, CHECK);
|
||||
|
||||
|
@ -857,6 +875,7 @@ void JMXStatusDCmd::execute(DCmdSource source, TRAPS) {
|
|||
// invoke getManagementAgentStatus() method to generate the status info
|
||||
// throw java.lang.NoSuchMethodError if method doesn't exist
|
||||
|
||||
loadAgentModule(CHECK);
|
||||
Handle loader = Handle(THREAD, SystemDictionary::java_system_loader());
|
||||
Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::jdk_internal_agent_Agent(), loader, Handle(), true, CHECK);
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2009 Red Hat, Inc.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
|
@ -66,7 +66,7 @@ bool SharkIntrinsics::is_intrinsic(ciMethod *target) {
|
|||
return true;
|
||||
|
||||
// Unsafe
|
||||
case vmIntrinsics::_compareAndSwapInt:
|
||||
case vmIntrinsics::_compareAndSetInt:
|
||||
return true;
|
||||
|
||||
default:
|
||||
|
@ -140,8 +140,8 @@ void SharkIntrinsics::do_intrinsic() {
|
|||
break;
|
||||
|
||||
// Unsafe
|
||||
case vmIntrinsics::_compareAndSwapInt:
|
||||
do_Unsafe_compareAndSwapInt();
|
||||
case vmIntrinsics::_compareAndSetInt:
|
||||
do_Unsafe_compareAndSetInt();
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -241,7 +241,7 @@ void SharkIntrinsics::do_Thread_currentThread() {
|
|||
true));
|
||||
}
|
||||
|
||||
void SharkIntrinsics::do_Unsafe_compareAndSwapInt() {
|
||||
void SharkIntrinsics::do_Unsafe_compareAndSetInt() {
|
||||
// Pop the arguments
|
||||
Value *x = state()->pop()->jint_value();
|
||||
Value *e = state()->pop()->jint_value();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2009 Red Hat, Inc.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
|
@ -58,7 +58,7 @@ class SharkIntrinsics : public SharkTargetInvariants {
|
|||
void do_Object_getClass();
|
||||
void do_System_currentTimeMillis();
|
||||
void do_Thread_currentThread();
|
||||
void do_Unsafe_compareAndSwapInt();
|
||||
void do_Unsafe_compareAndSetInt();
|
||||
};
|
||||
|
||||
#endif // SHARE_VM_SHARK_SHARKINTRINSICS_HPP
|
||||
|
|
|
@ -59,3 +59,6 @@ external.lib.roots = ../../
|
|||
|
||||
# Use new module options
|
||||
useNewOptions=true
|
||||
|
||||
# Use --patch-module instead of -Xmodule:
|
||||
useNewPatchModule=true
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, Red Hat, Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
|
@ -53,7 +54,7 @@ public class TestCAEAntiDep {
|
|||
}
|
||||
|
||||
static int m(TestCAEAntiDep test, Object expected, Object x) {
|
||||
C old = (C)UNSAFE.compareAndExchangeObjectVolatile(test, O_OFFSET, expected, x);
|
||||
C old = (C)UNSAFE.compareAndExchangeObject(test, O_OFFSET, expected, x);
|
||||
int res = old.f1;
|
||||
old.f1 = 0x42;
|
||||
return res;
|
||||
|
|
|
@ -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
|
||||
|
@ -72,9 +72,8 @@ public class UnsafeTwoCASLong {
|
|||
}
|
||||
|
||||
static void testAccess(Object base, long offset) {
|
||||
UNSAFE.compareAndSwapLong(base, offset, 1L, 2L);
|
||||
UNSAFE.compareAndSwapLong(base, offset, 2L, 1L);
|
||||
UNSAFE.compareAndSetLong(base, offset, 1L, 2L);
|
||||
UNSAFE.compareAndSetLong(base, offset, 2L, 1L);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
* java.management
|
||||
* jdk.attach
|
||||
*
|
||||
* @run main/othervm compiler.jsr292.RedefineMethodUsedByMultipleMethodHandles
|
||||
* @run main/othervm -Djdk.attach.allowAttachSelf compiler.jsr292.RedefineMethodUsedByMultipleMethodHandles
|
||||
*/
|
||||
|
||||
package compiler.jsr292;
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue