This commit is contained in:
J. Duke 2017-07-05 19:29:41 +02:00
commit fb2cc9ef15
1279 changed files with 37602 additions and 35699 deletions

View File

@ -244,3 +244,4 @@ a4afb0a8d55ef75aef5b0d77b434070468fb89f8 jdk8-b117
cd3825b2983045784d6fc6d1729c799b08215752 jdk8-b120
1e1f86d5d4e22c15a9bf9f1581acddb8c59abae2 jdk9-b00
50669e45cec4491de0d921d3118a3fe2e767020a jdk9-b01
135f0c7af57ebace31383d8877f47e32172759ff jdk9-b02

View File

@ -236,35 +236,119 @@ AC_DEFUN_ONCE([BASIC_INIT],
# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
# $1: variable to check
# $2: executable name to print in warning (optional)
AC_DEFUN([BASIC_CHECK_NONEMPTY],
[
if test "x[$]$1" = x; then
if test "x$2" = x; then
PROG_NAME=translit($1,A-Z,a-z)
else
PROG_NAME=$2
fi
AC_MSG_NOTICE([Could not find $PROG_NAME!])
AC_MSG_ERROR([Cannot continue])
AC_MSG_ERROR([Could not find required tool for $1])
fi
])
# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
# Arguments as AC_PATH_PROG:
# $1: variable to set
# $2: executable name to look for
AC_DEFUN([BASIC_REQUIRE_PROG],
# Check that there are no unprocessed overridden variables left.
# If so, they are an incorrect argument and we will exit with an error.
AC_DEFUN([BASIC_CHECK_LEFTOVER_OVERRIDDEN],
[
AC_PATH_PROGS($1, $2)
BASIC_CHECK_NONEMPTY($1, $2)
if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
# Replace the separating ! with spaces before presenting for end user.
unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
AC_MSG_WARN([The following variables might be unknown to configure: $unknown_variables])
fi
])
# Setup a tool for the given variable. If correctly specified by the user,
# use that value, otherwise search for the tool using the supplied code snippet.
# $1: variable to set
# $2: code snippet to call to look for the tool
AC_DEFUN([BASIC_SETUP_TOOL],
[
# Publish this variable in the help.
AC_ARG_VAR($1, [Override default value for $1])
if test "x[$]$1" = x; then
# The variable is not set by user, try to locate tool using the code snippet
$2
else
# The variable is set, but is it from the command line or the environment?
# Try to remove the string !$1! from our list.
try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!$1!/}
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 "x$1" != xBASH; then
AC_MSG_WARN([Ignoring value of $1 from the environment. Use command line variables instead.])
fi
# Try to locate tool using the code snippet
$2
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 the provided tool contains a complete path.
tool_specified="[$]$1"
tool_basename="${tool_specified##*/}"
if test "x$tool_basename" = "x$tool_specified"; then
# A command without a complete path is provided, search $PATH.
AC_MSG_NOTICE([Will search for user supplied tool $1=$tool_basename])
AC_PATH_PROG($1, $tool_basename)
if test "x[$]$1" = x; then
AC_MSG_ERROR([User supplied tool $tool_basename could not be found])
fi
else
# Otherwise we believe it is a complete path. Use it as it is.
AC_MSG_NOTICE([Will use user supplied tool $1=$tool_specified])
AC_MSG_CHECKING([for $1])
if test ! -x "$tool_specified"; then
AC_MSG_RESULT([not found])
AC_MSG_ERROR([User supplied tool $1=$tool_specified does not exist or is not executable])
fi
AC_MSG_RESULT([$tool_specified])
fi
fi
fi
])
# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
# $1: variable to set
# $2: executable name (or list of names) to look for
AC_DEFUN([BASIC_PATH_PROGS],
[
BASIC_SETUP_TOOL($1, [AC_PATH_PROGS($1, $2)])
])
# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
# $1: variable to set
# $2: executable name (or list of names) to look for
AC_DEFUN([BASIC_CHECK_TOOLS],
[
BASIC_SETUP_TOOL($1, [AC_CHECK_TOOLS($1, $2)])
])
# Like BASIC_PATH_PROGS but fails if no tool was found.
# $1: variable to set
# $2: executable name (or list of names) to look for
AC_DEFUN([BASIC_REQUIRE_PROGS],
[
BASIC_PATH_PROGS($1, $2)
BASIC_CHECK_NONEMPTY($1)
])
# Like BASIC_SETUP_TOOL but fails if no tool was found.
# $1: variable to set
# $2: autoconf macro to call to look for the special tool
AC_DEFUN([BASIC_REQUIRE_SPECIAL],
[
BASIC_SETUP_TOOL($1, [$2])
BASIC_CHECK_NONEMPTY($1)
])
# Setup the most fundamental tools that relies on not much else to set up,
# but is used by much of the early bootstrap code.
AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
[
# Start with tools that do not need have cross compilation support
# and can be expected to be found in the default PATH. These tools are
# used by configure. Nor are these tools expected to be found in the
@ -272,57 +356,50 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
# needed to download the devkit.
# First are all the simple required tools.
BASIC_REQUIRE_PROG(BASENAME, basename)
BASIC_REQUIRE_PROG(BASH, bash)
BASIC_REQUIRE_PROG(CAT, cat)
BASIC_REQUIRE_PROG(CHMOD, chmod)
BASIC_REQUIRE_PROG(CMP, cmp)
BASIC_REQUIRE_PROG(COMM, comm)
BASIC_REQUIRE_PROG(CP, cp)
BASIC_REQUIRE_PROG(CPIO, cpio)
BASIC_REQUIRE_PROG(CUT, cut)
BASIC_REQUIRE_PROG(DATE, date)
BASIC_REQUIRE_PROG(DIFF, [gdiff diff])
BASIC_REQUIRE_PROG(DIRNAME, dirname)
BASIC_REQUIRE_PROG(ECHO, echo)
BASIC_REQUIRE_PROG(EXPR, expr)
BASIC_REQUIRE_PROG(FILE, file)
BASIC_REQUIRE_PROG(FIND, find)
BASIC_REQUIRE_PROG(HEAD, head)
BASIC_REQUIRE_PROG(LN, ln)
BASIC_REQUIRE_PROG(LS, ls)
BASIC_REQUIRE_PROG(MKDIR, mkdir)
BASIC_REQUIRE_PROG(MKTEMP, mktemp)
BASIC_REQUIRE_PROG(MV, mv)
BASIC_REQUIRE_PROG(PRINTF, printf)
BASIC_REQUIRE_PROG(RM, rm)
BASIC_REQUIRE_PROG(SH, sh)
BASIC_REQUIRE_PROG(SORT, sort)
BASIC_REQUIRE_PROG(TAIL, tail)
BASIC_REQUIRE_PROG(TAR, tar)
BASIC_REQUIRE_PROG(TEE, tee)
BASIC_REQUIRE_PROG(TOUCH, touch)
BASIC_REQUIRE_PROG(TR, tr)
BASIC_REQUIRE_PROG(UNAME, uname)
BASIC_REQUIRE_PROG(UNIQ, uniq)
BASIC_REQUIRE_PROG(WC, wc)
BASIC_REQUIRE_PROG(WHICH, which)
BASIC_REQUIRE_PROG(XARGS, xargs)
BASIC_REQUIRE_PROGS(BASENAME, basename)
BASIC_REQUIRE_PROGS(BASH, bash)
BASIC_REQUIRE_PROGS(CAT, cat)
BASIC_REQUIRE_PROGS(CHMOD, chmod)
BASIC_REQUIRE_PROGS(CMP, cmp)
BASIC_REQUIRE_PROGS(COMM, comm)
BASIC_REQUIRE_PROGS(CP, cp)
BASIC_REQUIRE_PROGS(CPIO, cpio)
BASIC_REQUIRE_PROGS(CUT, cut)
BASIC_REQUIRE_PROGS(DATE, date)
BASIC_REQUIRE_PROGS(DIFF, [gdiff diff])
BASIC_REQUIRE_PROGS(DIRNAME, dirname)
BASIC_REQUIRE_PROGS(ECHO, echo)
BASIC_REQUIRE_PROGS(EXPR, expr)
BASIC_REQUIRE_PROGS(FILE, file)
BASIC_REQUIRE_PROGS(FIND, find)
BASIC_REQUIRE_PROGS(HEAD, head)
BASIC_REQUIRE_PROGS(LN, ln)
BASIC_REQUIRE_PROGS(LS, ls)
BASIC_REQUIRE_PROGS(MKDIR, mkdir)
BASIC_REQUIRE_PROGS(MKTEMP, mktemp)
BASIC_REQUIRE_PROGS(MV, mv)
BASIC_REQUIRE_PROGS(NAWK, [nawk gawk awk])
BASIC_REQUIRE_PROGS(PRINTF, printf)
BASIC_REQUIRE_PROGS(RM, rm)
BASIC_REQUIRE_PROGS(SH, sh)
BASIC_REQUIRE_PROGS(SORT, sort)
BASIC_REQUIRE_PROGS(TAIL, tail)
BASIC_REQUIRE_PROGS(TAR, tar)
BASIC_REQUIRE_PROGS(TEE, tee)
BASIC_REQUIRE_PROGS(TOUCH, touch)
BASIC_REQUIRE_PROGS(TR, tr)
BASIC_REQUIRE_PROGS(UNAME, uname)
BASIC_REQUIRE_PROGS(UNIQ, uniq)
BASIC_REQUIRE_PROGS(WC, wc)
BASIC_REQUIRE_PROGS(WHICH, which)
BASIC_REQUIRE_PROGS(XARGS, xargs)
# Then required tools that require some special treatment.
AC_PROG_AWK
BASIC_CHECK_NONEMPTY(AWK)
AC_PROG_GREP
BASIC_CHECK_NONEMPTY(GREP)
AC_PROG_EGREP
BASIC_CHECK_NONEMPTY(EGREP)
AC_PROG_FGREP
BASIC_CHECK_NONEMPTY(FGREP)
AC_PROG_SED
BASIC_CHECK_NONEMPTY(SED)
AC_PATH_PROGS(NAWK, [nawk gawk awk])
BASIC_CHECK_NONEMPTY(NAWK)
BASIC_REQUIRE_SPECIAL(AWK, [AC_PROG_AWK])
BASIC_REQUIRE_SPECIAL(GREP, [AC_PROG_GREP])
BASIC_REQUIRE_SPECIAL(EGREP, [AC_PROG_EGREP])
BASIC_REQUIRE_SPECIAL(FGREP, [AC_PROG_FGREP])
BASIC_REQUIRE_SPECIAL(SED, [AC_PROG_SED])
# Always force rm.
RM="$RM -f"
@ -332,10 +409,10 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
THEPWDCMD=pwd
# These are not required on all platforms
AC_PATH_PROG(CYGPATH, cygpath)
AC_PATH_PROG(READLINK, readlink)
AC_PATH_PROG(DF, df)
AC_PATH_PROG(SETFILE, SetFile)
BASIC_PATH_PROGS(CYGPATH, cygpath)
BASIC_PATH_PROGS(READLINK, [greadlink readlink])
BASIC_PATH_PROGS(DF, df)
BASIC_PATH_PROGS(SETFILE, SetFile)
])
# Setup basic configuration paths, and platform-specific stuff related to PATHs.
@ -622,26 +699,26 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
# These tools might not be installed by default,
# need hint on how to install them.
BASIC_REQUIRE_PROG(UNZIP, unzip)
BASIC_REQUIRE_PROG(ZIP, zip)
BASIC_REQUIRE_PROGS(UNZIP, unzip)
BASIC_REQUIRE_PROGS(ZIP, zip)
# Non-required basic tools
AC_PATH_PROG(LDD, ldd)
BASIC_PATH_PROGS(LDD, ldd)
if test "x$LDD" = "x"; then
# List shared lib dependencies is used for
# debug output and checking for forbidden dependencies.
# We can build without it.
LDD="true"
fi
AC_PATH_PROG(OTOOL, otool)
BASIC_PATH_PROGS(OTOOL, otool)
if test "x$OTOOL" = "x"; then
OTOOL="true"
fi
AC_PATH_PROGS(READELF, [readelf greadelf])
AC_PATH_PROG(HG, hg)
AC_PATH_PROG(STAT, stat)
AC_PATH_PROG(TIME, time)
BASIC_PATH_PROGS(READELF, [greadelf readelf])
BASIC_PATH_PROGS(HG, hg)
BASIC_PATH_PROGS(STAT, stat)
BASIC_PATH_PROGS(TIME, time)
# Check if it's GNU time
IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
if test "x$IS_GNU_TIME" != x; then
@ -652,13 +729,13 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
AC_SUBST(IS_GNU_TIME)
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
BASIC_REQUIRE_PROG(COMM, comm)
BASIC_REQUIRE_PROGS(COMM, comm)
fi
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
BASIC_REQUIRE_PROG(DSYMUTIL, dsymutil)
BASIC_REQUIRE_PROG(XATTR, xattr)
AC_PATH_PROG(CODESIGN, codesign)
BASIC_REQUIRE_PROGS(DSYMUTIL, dsymutil)
BASIC_REQUIRE_PROGS(XATTR, xattr)
BASIC_PATH_PROGS(CODESIGN, codesign)
if test "x$CODESIGN" != "x"; then
# Verify that the openjdk_codesign certificate is present
AC_MSG_CHECKING([if openjdk_codesign certificate is present])
@ -720,6 +797,9 @@ AC_DEFUN_ONCE([BASIC_CHECK_SRC_PERMS],
AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES],
[
# Did user specify any unknown variables?
BASIC_CHECK_LEFTOVER_OVERRIDDEN
AC_MSG_CHECKING([if build directory is on local disk])
BASIC_CHECK_DIR_ON_LOCAL_DISK($OUTPUT_ROOT,
[OUTPUT_DIR_IS_LOCAL="yes"],
@ -738,12 +818,4 @@ AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES],
else
IS_RECONFIGURE=no
fi
if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
HIDE_PERFORMANCE_HINTS=yes
else
HIDE_PERFORMANCE_HINTS=no
# Hide it the next time around...
$TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
fi
])

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 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
@ -23,6 +23,34 @@
# questions.
#
########################################################################
# This file handles detection of the Boot JDK. The Boot JDK detection
# process has been developed as a response to solve a complex real-world
# problem. Initially, it was simple, but it has grown as platform after
# platform, idiosyncracy after idiosyncracy has been supported.
#
# The basic idea is this:
# 1) You need an acceptable *) JDK to use as a Boot JDK
# 2) There are several ways to locate a JDK, that are mostly platform
# dependent **)
# 3) You can have multiple JDKs installed
# 4) If possible, configure should try to dig out an acceptable JDK
# automatically, without having to resort to command-line options
#
# *) acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
# javac) and not a JRE, etc.
#
# **) On Windows we typically use a well-known path.
# On MacOSX we typically use the tool java_home.
# On Linux we typically find javac in the $PATH, and then follow a
# chain of symlinks that often ends up in a real JDK.
#
# This leads to the code where we check in different ways to locate a
# JDK, and if one is found, check if it is acceptable. If not, we print
# our reasons for rejecting it (useful when debugging non-working
# configure situations) and continue checking the next one.
########################################################################
# Execute the check given as argument, and verify the result
# If the Boot JDK was previously found, do nothing
# $1 A command line (typically autoconf macro) to execute
@ -54,10 +82,10 @@ AC_DEFUN([BOOTJDK_DO_CHECK],
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
# Extra M4 quote needed to protect [] in grep expression.
[FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`]
if test "x$FOUND_VERSION_78" = x; then
[FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[789]\.'`]
if test "x$FOUND_CORRECT_VERSION" = x; then
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring])
AC_MSG_NOTICE([(Your Boot JDK must be version 7 or 8)])
AC_MSG_NOTICE([(Your Boot JDK must be version 7, 8 or 9)])
BOOT_JDK_FOUND=no
else
# We're done! :-)
@ -136,12 +164,26 @@ AC_DEFUN([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK],
])
# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
# $1: Argument to the java_home binary (optional)
AC_DEFUN([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME],
[
if test -x /usr/libexec/java_home; then
BOOT_JDK=`/usr/libexec/java_home`
BOOT_JDK=`/usr/libexec/java_home $1`
BOOT_JDK_FOUND=maybe
AC_MSG_NOTICE([Found potential Boot JDK using /usr/libexec/java_home])
AC_MSG_NOTICE([Found potential Boot JDK using /usr/libexec/java_home $1])
fi
])
# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
AC_DEFUN([BOOTJDK_CHECK_MACOSX_JAVA_LOCATOR],
[
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
# First check at user selected default
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME()])
# If that did not work out (e.g. too old), try explicit versions instead
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME([-v 1.9])])
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME([-v 1.8])])
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME([-v 1.7])])
fi
])
@ -201,14 +243,19 @@ AC_DEFUN([BOOTJDK_CHECK_WELL_KNOWN_LOCATIONS],
# $2 = name of binary
AC_DEFUN([BOOTJDK_CHECK_TOOL_IN_BOOTJDK],
[
AC_MSG_CHECKING([for $2 in Boot JDK])
$1=$BOOT_JDK/bin/$2
if test ! -x [$]$1; then
AC_MSG_RESULT(not found)
AC_MSG_NOTICE([Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk])
AC_MSG_ERROR([Could not find $2 in the Boot JDK])
fi
AC_MSG_RESULT(ok)
# Use user overridden value if available, otherwise locate tool in the Boot JDK.
BASIC_SETUP_TOOL($1,
[
AC_MSG_CHECKING([for $2 in Boot JDK])
$1=$BOOT_JDK/bin/$2
if test ! -x [$]$1; then
AC_MSG_RESULT(not found)
AC_MSG_NOTICE([Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk])
AC_MSG_ERROR([Could not find $2 in the Boot JDK])
fi
AC_MSG_RESULT(ok)
AC_SUBST($1)
])
])
###############################################################################
@ -238,12 +285,12 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
# Test: Is bootjdk available from builddeps?
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_BUILDDEPS])
# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_MACOSX_JAVA_LOCATOR])
# Test: Is $JAVA_HOME set?
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_HOME])
# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME])
# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK])
@ -275,13 +322,12 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
AC_SUBST(BOOT_JDK)
# Setup tools from the Boot JDK.
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVA,java)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAC,javac)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAH,javah)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAP,javap)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAR,jar)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(RMIC,rmic)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(NATIVE2ASCII,native2ascii)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVA, java)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAC, javac)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAH, javah)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAR, jar)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(NATIVE2ASCII, native2ascii)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JARSIGNER, jarsigner)
# Finally, set some other options...
@ -316,7 +362,7 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
# Minimum amount of heap memory.
ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs,[$JAVA])
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_CPU" = "xppc64" ; then
# Why does macosx need more heap? Its the huge JDK batch.
ADD_JVM_ARG_IF_OK([-Xmx1600M],boot_jdk_jvmargs,[$JAVA])
else

View File

@ -60,4 +60,20 @@ if test $? = 0; then
esac
fi
# Test and fix architecture string on AIX
# On AIX 'config.guess' returns 'powerpc' as architecture but 'powerpc' is
# implicitely handled as 32-bit architecture in 'platform.m4' so we check
# for the kernel mode rewrite it to 'powerpc64' if we'Re running in 64-bit mode.
# The check could also be done with `/usr/sbin/prtconf | grep "Kernel Type" | grep "64-bit"`
echo $OUT | grep powerpc-ibm-aix > /dev/null 2> /dev/null
if test $? = 0; then
if [ -x /bin/getconf ] ; then
KERNEL_BITMODE=`getconf KERNEL_BITMODE`
if [ "$KERNEL_BITMODE" = "32" ]; then
KERNEL_BITMODE=""
fi
fi
OUT=powerpc$KERNEL_BITMODE`echo $OUT | sed -e 's/[^-]*//'`
fi
echo $OUT

View File

@ -41,6 +41,9 @@ AC_DEFUN([BPERF_CHECK_CORES],
# Looks like a MacOSX system
NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print [$]5}'`
FOUND_CORES=yes
elif test "x$OPENJDK_BUILD_OS" = xaix ; then
NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print [$]4 }'`
FOUND_CORES=yes
elif test -n "$NUMBER_OF_PROCESSORS"; then
# On windows, look in the env
NUM_CORES=$NUMBER_OF_PROCESSORS
@ -68,8 +71,8 @@ AC_DEFUN([BPERF_CHECK_MEMORY_SIZE],
MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
FOUND_MEM=yes
elif test -x /usr/sbin/prtconf; then
# Looks like a Solaris system
MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print [$]3 }'`
# Looks like a Solaris or AIX system
MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [[Ss]]ize" | awk '{ print [$]3 }'`
FOUND_MEM=yes
elif test -x /usr/sbin/system_profiler; then
# Looks like a MacOSX system
@ -157,20 +160,28 @@ AC_DEFUN_ONCE([BPERF_SETUP_BUILD_JOBS],
AC_DEFUN([BPERF_SETUP_CCACHE],
[
AC_ARG_ENABLE([ccache],
[AS_HELP_STRING([--disable-ccache],
[disable using ccache to speed up recompilations @<:@enabled@:>@])],
[ENABLE_CCACHE=${enable_ccache}], [ENABLE_CCACHE=yes])
if test "x$ENABLE_CCACHE" = xyes; then
[AS_HELP_STRING([--enable-ccache],
[enable using ccache to speed up recompilations @<:@disabled@:>@])])
CCACHE=
AC_MSG_CHECKING([is ccache enabled])
ENABLE_CCACHE=$enable_ccache
if test "x$enable_ccache" = xyes; then
AC_MSG_RESULT([yes])
OLD_PATH="$PATH"
if test "x$TOOLS_DIR" != x; then
PATH=$TOOLS_DIR:$PATH
fi
AC_PATH_PROG(CCACHE, ccache)
BASIC_REQUIRE_PROGS(CCACHE, ccache)
CCACHE_STATUS="enabled"
PATH="$OLD_PATH"
elif test "x$enable_ccache" = xno; then
AC_MSG_RESULT([no, explicitly disabled])
elif test "x$enable_ccache" = x; then
AC_MSG_RESULT([no])
else
AC_MSG_CHECKING([for ccache])
AC_MSG_RESULT([explicitly disabled])
CCACHE=
AC_MSG_RESULT([unknown])
AC_MSG_ERROR([--enable-ccache does not accept any parameters])
fi
AC_SUBST(CCACHE)
@ -182,8 +193,11 @@ AC_DEFUN([BPERF_SETUP_CCACHE],
# When using a non home ccache directory, assume the use is to share ccache files
# with other users. Thus change the umask.
SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
if test "x$CCACHE" = x; then
AC_MSG_WARN([--with-ccache-dir has no meaning when ccache is not enabled])
fi
fi
CCACHE_FOUND=""
if test "x$CCACHE" != x; then
BPERF_SETUP_CCACHE_USAGE
fi
@ -192,7 +206,6 @@ AC_DEFUN([BPERF_SETUP_CCACHE],
AC_DEFUN([BPERF_SETUP_CCACHE_USAGE],
[
if test "x$CCACHE" != x; then
CCACHE_FOUND="true"
# Only use ccache if it is 3.1.4 or later, which supports
# precompiled headers.
AC_MSG_CHECKING([if ccache supports precompiled headers])
@ -200,6 +213,7 @@ AC_DEFUN([BPERF_SETUP_CCACHE_USAGE],
if test "x$HAS_GOOD_CCACHE" = x; then
AC_MSG_RESULT([no, disabling ccache])
CCACHE=
CCACHE_STATUS="disabled"
else
AC_MSG_RESULT([yes])
AC_MSG_CHECKING([if C-compiler supports ccache precompiled headers])
@ -212,6 +226,7 @@ AC_DEFUN([BPERF_SETUP_CCACHE_USAGE],
else
AC_MSG_RESULT([no, disabling ccaching of precompiled headers])
CCACHE=
CCACHE_STATUS="disabled"
fi
fi
fi

View File

@ -121,15 +121,23 @@ do
case $conf_option in
--openjdk-target=*)
conf_openjdk_target=`expr "X$conf_option" : '[^=]*=\(.*\)'`
continue ;;
;;
--debug-configure)
if test "x$conf_debug_configure" != xrecursive; then
conf_debug_configure=true
export conf_debug_configure
fi
continue ;;
;;
[^-]*=*)
# Add name of variable to CONFIGURE_OVERRIDDEN_VARIABLES list inside !...!.
conf_env_var=`expr "x$conf_option" : 'x\([^=]*\)='`
CONFIGURE_OVERRIDDEN_VARIABLES="$CONFIGURE_OVERRIDDEN_VARIABLES!$conf_env_var!"
# ... and then process argument as usual
conf_processed_arguments=("${conf_processed_arguments[@]}" "$conf_option")
;;
*)
conf_processed_arguments=("${conf_processed_arguments[@]}" "$conf_option") ;;
conf_processed_arguments=("${conf_processed_arguments[@]}" "$conf_option")
;;
esac
case $conf_option in
@ -212,6 +220,9 @@ Additional (non-autoconf) OpenJDK Options:
Please be aware that, when cross-compiling, the OpenJDK configure script will
generally use 'target' where autoconf traditionally uses 'host'.
Also note that variables must be passed on the command line. Variables in the
environment will generally be ignored, unlike traditional autoconf scripts.
EOT
fi
else

View File

@ -88,6 +88,7 @@ JDKOPT_SETUP_OPEN_OR_CUSTOM
# These are needed to be able to create a configuration name (and thus the output directory)
JDKOPT_SETUP_JDK_VARIANT
JDKOPT_SETUP_JVM_INTERPRETER
JDKOPT_SETUP_JVM_VARIANTS
JDKOPT_SETUP_DEBUG_LEVEL

File diff suppressed because it is too large Load Diff

View File

@ -52,8 +52,6 @@ AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
pkgutil_help $MISSING_DEPENDENCY ;;
pkgadd)
pkgadd_help $MISSING_DEPENDENCY ;;
* )
break ;;
esac
if test "x$PKGHANDLER_COMMAND" != x; then
@ -92,8 +90,6 @@ http://www.freetype.org/
If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
fi
;;
* )
break ;;
esac
}
@ -119,8 +115,6 @@ apt_help() {
PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
ccache)
PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
* )
break ;;
esac
}
@ -142,8 +136,6 @@ yum_help() {
PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
ccache)
PKGHANDLER_COMMAND="sudo yum install ccache" ;;
* )
break ;;
esac
}
@ -163,22 +155,6 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
[
# Finally output some useful information to the user
if test "x$CCACHE_FOUND" != x; then
if test "x$HAS_GOOD_CCACHE" = x; then
CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
else
CCACHE_STATUS="installed and in use"
fi
else
if test "x$GCC" = xyes; then
CCACHE_STATUS="not installed (consider installing)"
CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
else
CCACHE_STATUS="not available for your system"
fi
fi
printf "\n"
printf "====================================================\n"
printf "A new configuration has been successfully created in\n"
@ -209,16 +185,10 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
printf "Build performance summary:\n"
printf "* Cores to use: $JOBS\n"
printf "* Memory limit: $MEMORY_SIZE MB\n"
printf "* ccache status: $CCACHE_STATUS\n"
printf "\n"
if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
printf "$CCACHE_HELP_MSG\n"
HELP_MSG_MISSING_DEPENDENCY([ccache])
printf "$HELP_MSG\n"
printf "\n"
if test "x$CCACHE_STATUS" != "x"; then
printf "* ccache status: $CCACHE_STATUS\n"
fi
printf "\n"
if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
printf "NOTE: You have requested to build more than one version of the JVM, which\n"

View File

@ -91,6 +91,11 @@ LLVM_LDFLAGS=@LLVM_LDFLAGS@
ALT_OUTPUTDIR=$(HOTSPOT_OUTPUTDIR)
ALT_EXPORT_PATH=$(HOTSPOT_DIST)
JVM_INTERPRETER:=@JVM_INTERPRETER@
ifeq ($(JVM_INTERPRETER), cpp)
CC_INTERP=true
endif
HOTSPOT_MAKE_ARGS:=@HOTSPOT_MAKE_ARGS@ @STATIC_CXX_SETTING@
# This is used from the libjvm build for C/C++ code.
HOTSPOT_BUILD_JOBS:=$(JOBS)

View File

@ -51,6 +51,33 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VARIANT],
AC_MSG_RESULT([$JDK_VARIANT])
])
AC_DEFUN_ONCE([JDKOPT_SETUP_JVM_INTERPRETER],
[
###############################################################################
#
# Check which interpreter of the JVM we want to build.
# Currently we have:
# template: Template interpreter (the default)
# cpp : C++ interpreter
AC_MSG_CHECKING([which interpreter of the JVM to build])
AC_ARG_WITH([jvm-interpreter], [AS_HELP_STRING([--with-jvm-interpreter],
[JVM interpreter to build (template, cpp) @<:@template@:>@])])
if test "x$with_jvm_interpreter" = x; then
with_jvm_interpreter="template"
fi
JVM_INTERPRETER="$with_jvm_interpreter"
if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
AC_MSG_ERROR([The available JVM interpreters are: template, cpp])
fi
AC_SUBST(JVM_INTERPRETER)
AC_MSG_RESULT([$with_jvm_interpreter])
])
AC_DEFUN_ONCE([JDKOPT_SETUP_JVM_VARIANTS],
[
@ -65,19 +92,20 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JVM_VARIANTS],
# ie normal interpreter and C1, only the serial GC, kernel jvmti etc
# zero: no machine code interpreter, no compiler
# zeroshark: zero interpreter and shark/llvm compiler backend
# core: interpreter only, no compiler (only works on some platforms)
AC_MSG_CHECKING([which variants of the JVM to build])
AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants],
[JVM variants (separated by commas) to build (server, client, minimal1, kernel, zero, zeroshark) @<:@server@:>@])])
[JVM variants (separated by commas) to build (server, client, minimal1, kernel, zero, zeroshark, core) @<:@server@:>@])])
if test "x$with_jvm_variants" = x; then
with_jvm_variants="server"
fi
JVM_VARIANTS=",$with_jvm_variants,"
TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
if test "x$TEST_VARIANTS" != "x,"; then
AC_MSG_ERROR([The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark])
AC_MSG_ERROR([The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core])
fi
AC_MSG_RESULT([$with_jvm_variants])
@ -87,6 +115,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JVM_VARIANTS],
JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
if test "x$JVM_VARIANT_CLIENT" = xtrue; then
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
@ -106,7 +135,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JVM_VARIANTS],
# Replace the commas with AND for use in the build directory name.
ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
if test "x$COUNT_VARIANTS" != "x,1"; then
BUILDING_MULTIPLE_JVM_VARIANTS=yes
else
@ -120,6 +149,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JVM_VARIANTS],
AC_SUBST(JVM_VARIANT_KERNEL)
AC_SUBST(JVM_VARIANT_ZERO)
AC_SUBST(JVM_VARIANT_ZEROSHARK)
AC_SUBST(JVM_VARIANT_CORE)
INCLUDE_SA=true
if test "x$JVM_VARIANT_ZERO" = xtrue ; then
@ -128,6 +158,9 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JVM_VARIANTS],
if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
INCLUDE_SA=false
fi
if test "x$VAR_CPU" = xppc64 ; then
INCLUDE_SA=false
fi
AC_SUBST(INCLUDE_SA)
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
@ -236,6 +269,10 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_LEVEL],
HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
fi
if test "x$JVM_VARIANT_CORE" = xtrue; then
HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
fi
HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
# On Macosx universal binaries are produced, but they only contain

View File

@ -43,6 +43,14 @@ AC_DEFUN_ONCE([LIB_SETUP_INIT],
AC_MSG_RESULT([alsa pulse])
fi
if test "x$OPENJDK_TARGET_OS" = xaix; then
AC_MSG_CHECKING([what is not needed on AIX?])
ALSA_NOT_NEEDED=yes
PULSE_NOT_NEEDED=yes
AC_MSG_RESULT([alsa pulse])
fi
if test "x$OPENJDK_TARGET_OS" = xwindows; then
AC_MSG_CHECKING([what is not needed on Windows?])
CUPS_NOT_NEEDED=yes

View File

@ -126,6 +126,11 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS],
VAR_OS_API=winapi
VAR_OS_ENV=windows.msys
;;
*aix*)
VAR_OS=aix
VAR_OS_API=posix
VAR_OS_ENV=aix
;;
*)
AC_MSG_ERROR([unsupported operating system $1])
;;
@ -432,9 +437,9 @@ AC_DEFUN([PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS],
# keep track of these additions in ADDED_CFLAGS etc. These
# will later be checked to make sure only controlled additions
# have been made to CFLAGS etc.
ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
@ -454,8 +459,9 @@ AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_BITS],
# is made at runtime.)
#
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
# Always specify -m flags on Solaris
if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
# Always specify -m flag on Solaris
# And -q on AIX because otherwise the compiler produces 32-bit objects by default
PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
elif test "x$COMPILE_TYPE" = xreduced; then
if test "x$OPENJDK_TARGET_OS" != xwindows; then
@ -477,19 +483,34 @@ AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_BITS],
AC_CHECK_SIZEOF([int *], [1111])
if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
# Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
SIZEOF_INT_P="$ac_cv_sizeof_int_p"
fi
if test "x$SIZEOF_INT_P" = x; then
# AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
if test "x$ac_cv_sizeof_int_p" = x; then
# The test failed, lets stick to the assumed value.
AC_MSG_WARN([The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS.])
else
TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
AC_MSG_ERROR([The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)])
# This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
# Let's try to implicitely set the compilers target architecture and retry the test
AC_MSG_NOTICE([The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS).])
AC_MSG_NOTICE([I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}])
PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
# We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
unset ac_cv_sizeof_int_p
# And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
cat >>confdefs.h <<_ACEOF
#undef SIZEOF_INT_P
_ACEOF
AC_CHECK_SIZEOF([int *], [1111])
TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
AC_MSG_ERROR([The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)])
fi
fi
fi

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 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
@ -37,6 +37,8 @@ X:=
SPACE:=$(X) $(X)
COMMA:=,
HASH:=\#
LEFT_PAREN:=(
RIGHT_PAREN:=)
SQUOTE:='
#'
DQUOTE:="
@ -208,6 +210,7 @@ JVM_VARIANT_MINIMAL1:=@JVM_VARIANT_MINIMAL1@
JVM_VARIANT_KERNEL:=@JVM_VARIANT_KERNEL@
JVM_VARIANT_ZERO:=@JVM_VARIANT_ZERO@
JVM_VARIANT_ZEROSHARK:=@JVM_VARIANT_ZEROSHARK@
JVM_VARIANT_CORE:=@JVM_VARIANT_CORE@
# Universal binaries on macosx
MACOSX_UNIVERSAL=@MACOSX_UNIVERSAL@
@ -297,6 +300,8 @@ MACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@
COMPILER_TYPE:=@COMPILER_TYPE@
COMPILER_NAME:=@COMPILER_NAME@
# Option used to tell the compiler whether to create 32- or 64-bit executables
COMPILER_TARGET_BITS_FLAG:=@COMPILER_TARGET_BITS_FLAG@
COMPILER_SUPPORTS_TARGET_BITS_FLAG=@COMPILER_SUPPORTS_TARGET_BITS_FLAG@
CC_OUT_OPTION:=@CC_OUT_OPTION@
@ -340,6 +345,11 @@ CPP:=@FIXPATH@ @CPP@
# The linker can be gcc or ld on posix systems, or link.exe on windows systems.
LD:=@FIXPATH@ @LD@
# The linker on older SuSE distros (e.g. on SLES 10) complains with:
# "Invalid version tag `SUNWprivate_1.1'. Only anonymous version tag is allowed in executable."
# if feeded with a version script which contains named tags.
USING_BROKEN_SUSE_LD:=@USING_BROKEN_SUSE_LD@
# LDFLAGS used to link the jdk native libraries (C-code)
LDFLAGS_JDKLIB:=@LDFLAGS_JDKLIB@
LDFLAGS_JDKLIB_SUFFIX:=@LDFLAGS_JDKLIB_SUFFIX@
@ -430,28 +440,29 @@ POST_MCS_CMD:=@POST_MCS_CMD@
JAVA_FLAGS:=@BOOT_JDK_JVMARGS@
JAVA=@FIXPATH@ $(BOOT_JDK)/bin/java $(JAVA_FLAGS)
JAVA=@FIXPATH@ @JAVA@ $(JAVA_FLAGS)
JAVAC=@FIXPATH@ $(BOOT_JDK)/bin/javac
JAVAC:=@FIXPATH@ @JAVAC@
# Hotspot sets this variable before reading the SPEC when compiling sa-jdi.jar. Avoid
# overriding that value by using ?=.
JAVAC_FLAGS?=@JAVAC_FLAGS@
JAVAH=@FIXPATH@ $(BOOT_JDK)/bin/javah
JAVAH:=@FIXPATH@ @JAVAH@
JAR=@FIXPATH@ $(BOOT_JDK)/bin/jar
JAR:=@FIXPATH@ @JAR@
RMIC=@FIXPATH@ $(BOOT_JDK)/bin/rmic
NATIVE2ASCII:=@FIXPATH@ @NATIVE2ASCII@
NATIVE2ASCII=@FIXPATH@ $(BOOT_JDK)/bin/native2ascii
JARSIGNER=@FIXPATH@ $(BOOT_JDK)/bin/jarsigner
JARSIGNER:=@FIXPATH@ @JARSIGNER@
# You run the new javac using the boot jdk with $(BOOT_JDK)/bin/java $(NEW_JAVAC) ...
BOOTSTRAP_JAVAC_JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar
BOOTSTRAP_JAVAC_ARGS:="-Xbootclasspath/p:$(BOOTSTRAP_JAVAC_JAR)" -cp $(BOOTSTRAP_JAVAC_JAR)
NEW_JAVAC = $(BOOTSTRAP_JAVAC_ARGS) com.sun.tools.javac.Main
NEW_JAVADOC = $(BOOTSTRAP_JAVAC_ARGS) com.sun.tools.javadoc.Main
INTERIM_LANGTOOLS_JAR := $(LANGTOOLS_OUTPUTDIR)/dist/interim_langtools.jar
INTERIM_LANGTOOLS_ARGS := "-Xbootclasspath/p:$(INTERIM_LANGTOOLS_JAR)" -cp $(INTERIM_LANGTOOLS_JAR)
NEW_JAVAC = $(INTERIM_LANGTOOLS_ARGS) com.sun.tools.javac.Main
NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) com.sun.tools.javadoc.Main
# The interim corba jar is needed for running rmic
INTERIM_CORBA_JAR := $(CORBA_OUTPUTDIR)/dist/interim_corba.jar
# Base flags for RC
# Guarding this against resetting value. Legacy make files include spec multiple

View File

@ -44,6 +44,15 @@ AC_DEFUN([TOOLCHAIN_CHECK_COMPILER_VERSION],
COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*@<:@ ,\t@:>@$COMPILER_NAME@<:@ ,\t@:>@\(@<:@1-9@:>@\.@<:@0-9@:>@@<:@0-9@:>@*\).*/\1/p"`
COMPILER_VENDOR="Sun Studio"
fi
elif test "x$OPENJDK_TARGET_OS" = xaix; then
COMPILER_VERSION_TEST=`$COMPILER -qversion 2>&1 | $TAIL -n 1`
$ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
if test $? -ne 0; then
AC_MSG_ERROR([Failed to detect the compiler version of $COMPILER ....])
else
COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \([0-9][0-9]\.[0-9][0-9]*\).*/\1/p'`
COMPILER_VENDOR='IBM'
fi
elif test "x$OPENJDK_TARGET_OS" = xwindows; then
# First line typically looks something like:
# Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
@ -113,34 +122,62 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_SYSROOT_AND_OUT_OPTIONS],
AC_DEFUN([TOOLCHAIN_FIND_COMPILER],
[
COMPILER_NAME=$2
SEARCH_LIST="$3"
$1=
# If TOOLS_DIR is set, check for all compiler names in there first
# before checking the rest of the PATH.
if test -n "$TOOLS_DIR"; then
PATH_save="$PATH"
PATH="$TOOLS_DIR"
AC_PATH_PROGS(TOOLS_DIR_$1, $3)
$1=$TOOLS_DIR_$1
PATH="$PATH_save"
if test "x[$]$1" != x; then
# User has supplied compiler name already, always let that override.
AC_MSG_NOTICE([Will use user supplied compiler $1=[$]$1])
if test "x`basename [$]$1`" = "x[$]$1"; then
# A command without a complete path is provided, search $PATH.
AC_PATH_PROGS(POTENTIAL_$1, [$]$1)
if test "x$POTENTIAL_$1" != x; then
$1=$POTENTIAL_$1
else
AC_MSG_ERROR([User supplied compiler $1=[$]$1 could not be found])
fi
else
# Otherwise it might already be a complete path
if test ! -x "[$]$1"; then
AC_MSG_ERROR([User supplied compiler $1=[$]$1 does not exist])
fi
fi
else
# No user supplied value. Locate compiler ourselves
$1=
# If TOOLS_DIR is set, check for all compiler names in there first
# before checking the rest of the PATH.
if test -n "$TOOLS_DIR"; then
PATH_save="$PATH"
PATH="$TOOLS_DIR"
AC_PATH_PROGS(TOOLS_DIR_$1, $SEARCH_LIST)
$1=$TOOLS_DIR_$1
PATH="$PATH_save"
fi
# AC_PATH_PROGS can't be run multiple times with the same variable,
# so create a new name for this run.
if test "x[$]$1" = x; then
AC_PATH_PROGS(POTENTIAL_$1, $SEARCH_LIST)
$1=$POTENTIAL_$1
fi
if test "x[$]$1" = x; then
HELP_MSG_MISSING_DEPENDENCY([devkit])
AC_MSG_ERROR([Could not find a $COMPILER_NAME compiler. $HELP_MSG])
fi
fi
# AC_PATH_PROGS can't be run multiple times with the same variable,
# so create a new name for this run.
if test "x[$]$1" = x; then
AC_PATH_PROGS(POTENTIAL_$1, $3)
$1=$POTENTIAL_$1
fi
if test "x[$]$1" = x; then
HELP_MSG_MISSING_DEPENDENCY([devkit])
AC_MSG_ERROR([Could not find a $COMPILER_NAME compiler. $HELP_MSG])
fi
# Now we have a compiler binary in $1. Make sure it's okay.
BASIC_FIXUP_EXECUTABLE($1)
AC_MSG_CHECKING([resolved symbolic links for $1])
TEST_COMPILER="[$]$1"
BASIC_REMOVE_SYMBOLIC_LINKS(TEST_COMPILER)
AC_MSG_RESULT([$TEST_COMPILER])
# Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
# to 'xlc' but it is crucial that we invoke the compiler with the right name!
if test "x$OPENJDK_BUILD_OS" != xaix; then
AC_MSG_CHECKING([resolved symbolic links for $1])
BASIC_REMOVE_SYMBOLIC_LINKS(TEST_COMPILER)
AC_MSG_RESULT([$TEST_COMPILER])
fi
AC_MSG_CHECKING([if $1 is disguised ccache])
COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
@ -201,11 +238,11 @@ AC_DEFUN([TOOLCHAIN_SETUP_PATHS],
# otherwise we might pick up cross-compilers which don't use standard naming.
# Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
# to wait until they are properly discovered.
AC_PATH_PROGS(BUILD_CC, [cl cc gcc])
BASIC_PATH_PROGS(BUILD_CC, [cl cc gcc])
BASIC_FIXUP_EXECUTABLE(BUILD_CC)
AC_PATH_PROGS(BUILD_CXX, [cl CC g++])
BASIC_PATH_PROGS(BUILD_CXX, [cl CC g++])
BASIC_FIXUP_EXECUTABLE(BUILD_CXX)
AC_PATH_PROG(BUILD_LD, ld)
BASIC_PATH_PROGS(BUILD_LD, ld)
BASIC_FIXUP_EXECUTABLE(BUILD_LD)
fi
AC_SUBST(BUILD_CC)
@ -248,12 +285,13 @@ AC_DEFUN([TOOLCHAIN_SETUP_PATHS],
# On Solaris, cc is preferred to gcc.
# Elsewhere, gcc is preferred to cc.
if test "x$CC" != x; then
COMPILER_CHECK_LIST="$CC"
elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
COMPILER_CHECK_LIST="cl"
elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
COMPILER_CHECK_LIST="cc gcc"
elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
# Do not probe for cc on AIX.
COMPILER_CHECK_LIST="xlc_r"
else
COMPILER_CHECK_LIST="gcc cc"
fi
@ -262,14 +300,23 @@ AC_DEFUN([TOOLCHAIN_SETUP_PATHS],
# Now that we have resolved CC ourself, let autoconf have its go at it
AC_PROG_CC([$CC])
# Option used to tell the compiler whether to create 32- or 64-bit executables
# Notice that CC contains the full compiler path at this point.
case $CC in
*xlc_r) COMPILER_TARGET_BITS_FLAG="-q";;
*) COMPILER_TARGET_BITS_FLAG="-m";;
esac
AC_SUBST(COMPILER_TARGET_BITS_FLAG)
### Locate C++ compiler (CXX)
if test "x$CXX" != x; then
COMPILER_CHECK_LIST="$CXX"
elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
COMPILER_CHECK_LIST="cl"
elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
COMPILER_CHECK_LIST="CC g++"
elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
# Do not probe for CC on AIX .
COMPILER_CHECK_LIST="xlC_r"
else
COMPILER_CHECK_LIST="g++ CC"
fi
@ -306,11 +353,13 @@ AC_DEFUN([TOOLCHAIN_SETUP_PATHS],
AC_SUBST(LDEXECXX)
if test "x$OPENJDK_TARGET_OS" != xwindows; then
AC_CHECK_TOOL(AR, ar)
BASIC_CHECK_TOOLS(AR, ar)
BASIC_FIXUP_EXECUTABLE(AR)
fi
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
ARFLAGS="-r"
elif test "x$OPENJDK_TARGET_OS" = xaix; then
ARFLAGS="-X64"
else
ARFLAGS=""
fi
@ -431,7 +480,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_PATHS],
# Find the right assembler.
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
AC_PATH_PROG(AS, as)
BASIC_PATH_PROGS(AS, as)
BASIC_FIXUP_EXECUTABLE(AS)
else
AS="$CC -c"
@ -439,41 +488,41 @@ AC_DEFUN([TOOLCHAIN_SETUP_PATHS],
AC_SUBST(AS)
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
AC_PATH_PROG(NM, nm)
BASIC_PATH_PROGS(NM, nm)
BASIC_FIXUP_EXECUTABLE(NM)
AC_PATH_PROG(GNM, gnm)
BASIC_PATH_PROGS(GNM, gnm)
BASIC_FIXUP_EXECUTABLE(GNM)
AC_PATH_PROG(STRIP, strip)
BASIC_PATH_PROGS(STRIP, strip)
BASIC_FIXUP_EXECUTABLE(STRIP)
AC_PATH_PROG(MCS, mcs)
BASIC_PATH_PROGS(MCS, mcs)
BASIC_FIXUP_EXECUTABLE(MCS)
elif test "x$OPENJDK_TARGET_OS" != xwindows; then
AC_CHECK_TOOL(NM, nm)
BASIC_CHECK_TOOLS(NM, nm)
BASIC_FIXUP_EXECUTABLE(NM)
GNM="$NM"
AC_SUBST(GNM)
AC_CHECK_TOOL(STRIP, strip)
BASIC_CHECK_TOOLS(STRIP, strip)
BASIC_FIXUP_EXECUTABLE(STRIP)
fi
# objcopy is used for moving debug symbols to separate files when
# full debug symbols are enabled.
if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
AC_CHECK_TOOLS(OBJCOPY, [gobjcopy objcopy])
BASIC_CHECK_TOOLS(OBJCOPY, [gobjcopy objcopy])
# Only call fixup if objcopy was found.
if test -n "$OBJCOPY"; then
BASIC_FIXUP_EXECUTABLE(OBJCOPY)
fi
fi
AC_CHECK_TOOLS(OBJDUMP, [gobjdump objdump])
BASIC_CHECK_TOOLS(OBJDUMP, [gobjdump objdump])
if test "x$OBJDUMP" != x; then
# Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
BASIC_FIXUP_EXECUTABLE(OBJDUMP)
fi
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
AC_PATH_PROG(LIPO, lipo)
BASIC_PATH_PROGS(LIPO, lipo)
BASIC_FIXUP_EXECUTABLE(LIPO)
fi
@ -554,6 +603,29 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_LIBS],
POST_STRIP_CMD="$STRIP -x"
POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
fi
if test "x$OPENJDK_TARGET_OS" = xaix; then
COMPILER_NAME=xlc
PICFLAG="-qpic=large"
LIBRARY_PREFIX=lib
SHARED_LIBRARY='lib[$]1.so'
STATIC_LIBRARY='lib[$]1.a'
SHARED_LIBRARY_FLAGS="-qmkshrobj"
SHARED_LIBRARY_SUFFIX='.so'
STATIC_LIBRARY_SUFFIX='.a'
OBJ_SUFFIX='.o'
EXE_SUFFIX=''
SET_SHARED_LIBRARY_NAME=''
SET_SHARED_LIBRARY_MAPFILE=''
C_FLAG_REORDER=''
CXX_FLAG_REORDER=''
SET_SHARED_LIBRARY_ORIGIN=''
SET_EXECUTABLE_ORIGIN=""
CFLAGS_JDK=""
CXXFLAGS_JDK=""
CFLAGS_JDKLIB_EXTRA=''
POST_STRIP_CMD="$STRIP -X32_64"
POST_MCS_CMD=""
fi
if test "x$OPENJDK_TARGET_OS" = xwindows; then
# If it is not gcc, then assume it is the MS Visual Studio compiler
COMPILER_NAME=cl
@ -730,6 +802,24 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION],
CFLAGS_DEBUG_SYMBOLS="-g -xs"
CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
;;
xlc )
C_FLAG_DEPS="-qmakedep=gcc -MF"
CXX_FLAG_DEPS="-qmakedep=gcc -MF"
C_O_FLAG_HIGHEST="-O3"
C_O_FLAG_HI="-O3 -qstrict"
C_O_FLAG_NORM="-O2"
C_O_FLAG_NONE=""
CXX_O_FLAG_HIGHEST="-O3"
CXX_O_FLAG_HI="-O3 -qstrict"
CXX_O_FLAG_NORM="-O2"
CXX_O_FLAG_NONE=""
CFLAGS_DEBUG_SYMBOLS="-g"
CXXFLAGS_DEBUG_SYMBOLS="-g"
LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
;;
esac
;;
CL )
@ -840,6 +930,13 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK],
LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
;;
xlc )
CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
LDFLAGS_JDK="$LDFLAGS_JDK"
LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK"
;;
cl )
CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
@ -909,6 +1006,9 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK],
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
fi
if test "x$OPENJDK_TARGET_OS" = xaix; then
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DAIX -DPPC64"
fi
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
# Setting these parameters makes it an error to link to macosx APIs that are
@ -1076,20 +1176,38 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_MISC],
# ZERO_ARCHFLAG tells the compiler which mode to build for
case "${OPENJDK_TARGET_CPU}" in
s390)
ZERO_ARCHFLAG="-m31"
ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
;;
*)
ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
esac
TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([$ZERO_ARCHFLAG], [], [ZERO_ARCHFLAG=""])
AC_SUBST(ZERO_ARCHFLAG)
# Check that the compiler supports -mX flags
# Check that the compiler supports -mX (or -qX on AIX) flags
# Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([-m${OPENJDK_TARGET_CPU_BITS}],
TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}],
[COMPILER_SUPPORTS_TARGET_BITS_FLAG=true],
[COMPILER_SUPPORTS_TARGET_BITS_FLAG=false])
AC_SUBST(COMPILER_SUPPORTS_TARGET_BITS_FLAG)
# Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed in executable.'
USING_BROKEN_SUSE_LD=no
if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$GCC" = xyes; then
AC_MSG_CHECKING([for broken SuSE 'ld' which only understands anonymous version tags in executables])
echo "SUNWprivate_1.1 { local: *; };" > version-script.map
echo "int main() { }" > main.c
if $CXX -Xlinker -version-script=version-script.map main.c 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD; then
AC_MSG_RESULT(no)
USING_BROKEN_SUSE_LD=no
else
AC_MSG_RESULT(yes)
USING_BROKEN_SUSE_LD=yes
fi
rm -rf version-script.map main.c
fi
AC_SUBST(USING_BROKEN_SUSE_LD)
])
# Setup the JTREG paths
@ -1126,7 +1244,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JTREG],
AC_MSG_RESULT($JTREGEXE)
else
# try to find jtreg on path
BASIC_REQUIRE_PROG(JTREGEXE, jtreg)
BASIC_REQUIRE_PROGS(JTREGEXE, jtreg)
JT_HOME="`$DIRNAME $JTREGEXE`"
fi
fi

View File

@ -244,3 +244,4 @@ d6820a414f182a011a53a29a52370c696cd58dab jdk8-b118
53fd772d28c8a9f0f43adfc06f75f6b3cfa93cb5 jdk8-b120
a7d3638deb2f4e33217b1ecf889479e90f9e5b50 jdk9-b00
79a8136b18c1c6848f500088f5a4b39f262f082d jdk9-b01
8394993063135a42b63a94473280399fb2a13aa7 jdk9-b02

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,53 @@
#
# 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
# 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.
#
################################################################################
# The Corba sources are old and generates a LOT of warnings.
# Disable these using Xlint, until someone cares to fix them.
DISABLE_CORBA_WARNINGS := -Xlint:all,-deprecation,-unchecked,-serial,-fallthrough,-cast,-rawtypes,-static,-dep-ann
# The "generate old bytecode" javac setup uses the new compiler to compile for the
# boot jdk to generate tools that need to be run with the boot jdk.
# Thus we force the target bytecode to the boot jdk bytecode.
$(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE, \
JVM := $(JAVA), \
JAVAC := $(NEW_JAVAC), \
FLAGS := $(BOOT_JDK_SOURCETARGET) \
-bootclasspath "$(BOOT_RTJAR)$(PATH_SEP)$(BOOT_TOOLSJAR)" \
$(DISABLE_CORBA_WARNINGS), \
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
# The "generate new bytecode" uses the new compiler to generate bytecode
# for the new jdk that is being built. The code compiled by this setup
# cannot necessarily be run with the boot jdk.
$(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE, \
JVM := $(JAVA), \
JAVAC := $(NEW_JAVAC), \
FLAGS := -cp $(BOOT_TOOLSJAR) -XDignore.symbol.file=true $(DISABLE_CORBA_WARNINGS), \
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
################################################################################

View File

@ -0,0 +1,87 @@
#
# 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
# 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 must be the first rule
default: all
include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
include CommonCorba.gmk
################################################################################
$(eval $(call SetupJavaCompilation,BUILD_CORBA, \
SETUP := GENERATE_NEWBYTECODE, \
SRC := $(CORBA_TOPDIR)/src/share/classes $(CORBA_OUTPUTDIR)/gensrc, \
EXCLUDES := com/sun/corba/se/PortableActivationIDL \
com/sun/tools/corba/se/logutil, \
EXCLUDE_FILES := com/sun/corba/se/impl/presentation/rmi/JNDIStateFactoryImpl.java \
com/sun/corba/se/spi/presentation/rmi/StubWrapper.java \
com/sun/org/omg/CORBA/IDLTypeOperations.java \
com/sun/org/omg/CORBA/IRObjectOperations.java \
org/omg/PortableInterceptor/UNKNOWN.java \
com/sun/tools/corba/se/idl/ResourceBundleUtil.java \
com/sun/corba/se/impl/presentation/rmi/jndi.properties, \
COPY := .prp LogStrings.properties, \
BIN := $(CORBA_OUTPUTDIR)/classes, \
JAR := $(CORBA_OUTPUTDIR)/dist/lib/classes.jar))
$(eval $(call SetupJavaCompilation,BUILD_INTERIM_CORBA, \
SETUP := GENERATE_OLDBYTECODE, \
SRC := $(BUILD_CORBA_SRC), \
EXCLUDES := $(BUILD_CORBA_EXCLUDES), \
EXCLUDE_FILES := $(BUILD_CORBA_EXCLUDE_FILES), \
COPY := $(BUILD_CORBA_COPY), \
BIN := $(CORBA_OUTPUTDIR)/interim_classes, \
JAR := $(INTERIM_CORBA_JAR)))
# Separate src.zip call to include sources that were excluded in the build to
# mimic behavior in old build system.
$(eval $(call SetupZipArchive,ARCHIVE_CORBA_SRC, \
SRC := $(CORBA_TOPDIR)/src/share/classes $(CORBA_OUTPUTDIR)/gensrc, \
ZIP := $(CORBA_OUTPUTDIR)/dist/lib/src.zip))
JAR := $(CORBA_OUTPUTDIR)/dist/lib/classes.jar))
################################################################################
# Create bin.zip containing the corba specific binaries: orb.idl, ir.idl
BIN_FILES := $(CORBA_TOPDIR)/src/share/classes/com/sun/tools/corba/se/idl/orb.idl \
$(CORBA_TOPDIR)/src/share/classes/com/sun/tools/corba/se/idl/ir.idl
$(CORBA_OUTPUTDIR)/dist/lib/bin.zip: $(BIN_FILES)
$(MKDIR) -p $(CORBA_OUTPUTDIR)/dist/lib
$(MKDIR) -p $(CORBA_OUTPUTDIR)/lib
$(RM) -f $@
$(ECHO) Creating `basename $@`
$(CP) $(BIN_FILES) $(CORBA_OUTPUTDIR)/lib
$(CHMOD) ug+w $(CORBA_OUTPUTDIR)/lib/*
(cd $(CORBA_OUTPUTDIR); $(ZIP) -q $@ lib/orb.idl lib/ir.idl)
################################################################################
all: $(BUILD_CORBA) $(BUILD_INTERIM_CORBA) $(ARCHIVE_CORBA_SRC) \
$(CORBA_OUTPUTDIR)/dist/lib/bin.zip

153
corba/make/GensrcCorba.gmk Normal file

File diff suppressed because one or more lines are too long

View File

@ -404,3 +404,4 @@ ce42d815dd2130250acf6132b51b624001638f0d jdk8-b119
fca262db9c4309f99d2f5542ab0780e45c2f1578 jdk8-b120
ce2d7e46f3c7e41241f3b407705a4071323a11ab jdk9-b00
050a626a88951140df874f7b163e304d07b6c296 jdk9-b01
b188446de75bda5fc52d102cddf242c3ef5ecbdf jdk9-b02

View File

@ -27,7 +27,9 @@ jar -cvf $SA_NAME/sa.jar -C ../build/classes .
cp ../src/os/solaris/proc/amd64/libsaproc.so $SA_NAME/solaris/amd64
cp ../src/os/solaris/proc/sparc/libsaproc.so $SA_NAME/solaris/sparc
cp ../src/os/solaris/proc/sparc/libsaproc_audit.so $SA_NAME/solaris/sparc
cp ../src/os/solaris/proc/sparcv9/libsaproc.so $SA_NAME/solaris/sparcv9
cp ../src/os/solaris/proc/sparcv9/libsaproc_audit.so $SA_NAME/solaris/sparcv9
cp ../src/os/solaris/proc/i386/libsaproc.so $SA_NAME/solaris/i386
cp ../src/os/linux/i386/libsaproc.so $SA_NAME/linux/i386
cp ../src/os/linux/ia64/libsaproc.so $SA_NAME/linux/ia64

View File

@ -48,16 +48,17 @@ if [ "$OS" = "Linux" ]; then
CPU=i386
fi
else
# configure audit helper library if SA_ALTROOT is set
if [ -n "$SA_ALTROOT" ]; then
LD_AUDIT_32=$STARTDIR/../src/os/solaris/proc/`uname -p`/libsaproc_audit.so
export LD_AUDIT_32
if [ ! -f $LD_AUDIT_32 ]; then
echo "SA_ALTROOT is set and can't find libsaproc_audit.so."
echo "Make sure to build it with 'make natives'."
exit 1
fi
# configure audit helper library for solaris
LD_AUDIT_32=$STARTDIR/../src/os/solaris/proc/`uname -p`/libsaproc_audit.so
if [ ! -f $LD_AUDIT_32 ]; then
LD_AUDIT_32=$STARTDIR/solaris/`uname -p`/libsaproc_audit.so
fi
if [ ! -f $LD_AUDIT_32 ]; then
echo "Can't find libsaproc_audit.so."
echo "Make sure to build it with 'make natives'."
exit 1
fi
export LD_AUDIT_32
SA_LIBPATH=$STARTDIR/../src/os/solaris/proc/`uname -p`:$STARTDIR/solaris/`uname -p`
OPTIONS="-Dsa.library.path=$SA_LIBPATH -Dsun.jvm.hotspot.debugger.useProcDebugger"
CPU=sparc

View File

@ -43,16 +43,19 @@ else
fi
fi
# configure audit helper library if SA_ALTROOT is set
if [ -n "$SA_ALTROOT" ]; then
LD_AUDIT_64=$STARTDIR/../src/os/solaris/proc/$CPU/libsaproc_audit.so
export LD_AUDIT_64
if [ ! -f $LD_AUDIT_64 ]; then
echo "SA_ALTROOT is set and can't find libsaproc_audit.so."
echo "Make sure to build it with 'make natives'."
exit 1
fi
# configure audit helper library
LD_AUDIT_64=$STARTDIR/../src/os/solaris/proc/$CPU/libsaproc_audit.so
if [ ! -f $LD_AUDIT_64 ]; then
LD_AUDIT_64=$STARTDIR/solaris/$CPU/libsaproc_audit.so
fi
if [ ! -f $LD_AUDIT_64 ]; then
echo "Can't find libsaproc_audit.so."
echo "Make sure to build it with 'make natives'."
exit 1
fi
export LD_AUDIT_64
SA_LIBPATH=$STARTDIR/../src/os/solaris/proc/$CPU:$STARTDIR/solaris/$CPU
OPTIONS="-Dsa.library.path=$SA_LIBPATH -Dsun.jvm.hotspot.debugger.useProcDebugger"

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 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
@ -152,7 +152,7 @@ public class ConstantPool extends Metadata implements ClassConstants {
private long indexOffset(long index) {
if (Assert.ASSERTS_ENABLED) {
Assert.that(index > 0 && index < getLength(), "invalid cp index " + index + " " + getLength());
Assert.that(index >= 0 && index < getLength(), "invalid cp index " + index + " " + getLength());
}
return (index * getElementSize()) + headerSize;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 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
@ -98,11 +98,14 @@ public class ByteCodeRewriter
break;
default: throw new IllegalArgumentException();
}
if (cpCache == null) {
return (short) cpCacheIndex;
} else if (fmt.indexOf("JJJJ") >= 0) {
// change byte-ordering and go via secondary cache entry
throw new InternalError("unimplemented");
// Invokedynamic require special handling
cpCacheIndex = ~cpCacheIndex;
cpCacheIndex = bytes.swapInt(cpCacheIndex);
return (short) cpCache.getEntryAt(cpCacheIndex).getConstantPoolIndex();
} else if (fmt.indexOf("JJ") >= 0) {
// change byte-ordering and go via cache
return (short) cpCache.getEntryAt((int) (0xFFFF & bytes.swapShort((short)cpCacheIndex))).getConstantPoolIndex();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 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
@ -61,8 +61,9 @@ public class Hashtable extends BasicHashtable {
long h = 0;
int s = 0;
int len = buf.length;
// Emulate the unsigned int in java_lang_String::hash_code
while (len-- > 0) {
h = 31*h + (0xFFL & buf[s]);
h = 31*h + (0xFFFFFFFFL & buf[s]);
s++;
}
return h & 0xFFFFFFFFL;

View File

@ -64,7 +64,7 @@ MFLAGS=`
echo "$MFLAGS" \
| sed '
s/^-/ -/
s/ -\([^ ][^ ]*\)j/ -\1 -j/
s/ -\([^ I][^ I]*\)j/ -\1 -j/
s/ -j[0-9][0-9]*/ -j/
s/ -j\([^ ]\)/ -j -\1/
s/ -j/ -j'${HOTSPOT_BUILD_JOBS:-${default_build_jobs}}'/

View File

@ -36,6 +36,9 @@ CFLAGS += $(DEBUG_CFLAGS/BYFILE) -D_NMT_NOINLINE_
# Linker mapfile
MAPFILE = $(GAMMADIR)/make/bsd/makefiles/mapfile-vers-debug
ifeq ($(OS_VENDOR), Darwin)
MAPFILE = $(GAMMADIR)/make/bsd/makefiles/mapfile-vers-darwin-debug
endif
VERSION = debug
SYSDEFS += -DASSERT

View File

@ -68,11 +68,9 @@ endif
# Use mapfile with libjvm_db.so
LIBJVM_DB_MAPFILE = # no mapfile for usdt2 # $(MAKEFILES_DIR)/mapfile-vers-jvm_db
#LFLAGS_JVM_DB += $(MAPFLAG:FILENAME=$(LIBJVM_DB_MAPFILE))
# Use mapfile with libjvm_dtrace.so
LIBJVM_DTRACE_MAPFILE = # no mapfile for usdt2 # $(MAKEFILES_DIR)/mapfile-vers-jvm_dtrace
#LFLAGS_JVM_DTRACE += $(MAPFLAG:FILENAME=$(LIBJVM_DTRACE_MAPFILE))
LFLAGS_JVM_DB += $(PICFLAG) # -D_REENTRANT
LFLAGS_JVM_DTRACE += $(PICFLAG) # -D_REENTRANT
@ -260,9 +258,6 @@ ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
endif
endif
#$(DTRACE).d: $(DTRACE_SRCDIR)/hotspot.d $(DTRACE_SRCDIR)/hotspot_jni.d \
# $(DTRACE_SRCDIR)/hs_private.d $(DTRACE_SRCDIR)/jhelper.d
# $(QUIETLY) cat $^ > $@
$(DtraceOutDir):
mkdir $(DtraceOutDir)
@ -276,100 +271,25 @@ $(DtraceOutDir)/hotspot_jni.h: $(DTRACE_SRCDIR)/hotspot_jni.d | $(DtraceOutDir)
$(DtraceOutDir)/hs_private.h: $(DTRACE_SRCDIR)/hs_private.d | $(DtraceOutDir)
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hs_private.d
$(DtraceOutDir)/jhelper.h: $(DTRACE_SRCDIR)/jhelper.d $(JVMOFFS).o | $(DtraceOutDir)
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/jhelper.d
# jhelper currently disabled
dtrace_gen_headers: $(DtraceOutDir)/hotspot.h $(DtraceOutDir)/hotspot_jni.h $(DtraceOutDir)/hs_private.h
DTraced_Files = ciEnv.o \
classLoadingService.o \
compileBroker.o \
hashtable.o \
instanceKlass.o \
java.o \
jni.o \
jvm.o \
memoryManager.o \
nmethod.o \
objectMonitor.o \
runtimeService.o \
sharedRuntime.o \
synchronizer.o \
thread.o \
unsafe.o \
vmThread.o \
vmCMSOperations.o \
vmPSOperations.o \
vmGCOperations.o \
# Dtrace is available, so we build $(DTRACE.o)
#$(DTRACE.o): $(DTRACE).d $(JVMOFFS).h $(JVMOFFS)Index.h $(DTraced_Files)
# @echo Compiling $(DTRACE).d
# $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -G -xlazyload -o $@ -s $(DTRACE).d \
# $(DTraced_Files) ||\
# STATUS=$$?;\
# if [ x"$$STATUS" = x"1" -a \
# x`uname -r` = x"5.10" -a \
# x`uname -p` = x"sparc" ]; then\
# echo "*****************************************************************";\
# echo "* If you are building server compiler, and the error message is ";\
# echo "* \"incorrect ELF machine type...\", you have run into solaris bug ";\
# echo "* 6213962, \"dtrace -G doesn't work on sparcv8+ object files\".";\
# echo "* Either patch/upgrade your system (>= S10u1_15), or set the ";\
# echo "* environment variable HOTSPOT_DISABLE_DTRACE_PROBES to disable ";\
# echo "* dtrace probes for this build.";\
# echo "*****************************************************************";\
# fi;\
# exit $$STATUS
# Since some DTraced_Files are in LIBJVM.o and they are touched by this
# command, and libgenerateJvmOffsets.so depends on LIBJVM.o, 'make' will
# think it needs to rebuild libgenerateJvmOffsets.so and thus JvmOffsets*
# files, but it doesn't, so we touch the necessary files to prevent later
# recompilation. Note: we only touch the necessary files if they already
# exist in order to close a race where an empty file can be created
# before the real build rule is executed.
# But, we can't touch the *.h files: This rule depends
# on them, and that would cause an infinite cycle of rebuilding.
# Neither the *.h or *.ccp files need to be touched, since they have
# rules which do not update them when the generator file has not
# changed their contents.
# $(QUIETLY) if [ -f lib$(GENOFFS).so ]; then touch lib$(GENOFFS).so; fi
# $(QUIETLY) if [ -f $(GENOFFS) ]; then touch $(GENOFFS); fi
# $(QUIETLY) if [ -f $(JVMOFFS.o) ]; then touch $(JVMOFFS.o); fi
.PHONY: dtraceCheck
#SYSTEM_DTRACE_H = /usr/include/dtrace.h
SYSTEM_DTRACE_PROG = /usr/sbin/dtrace
#PATCH_DTRACE_PROG = /opt/SUNWdtrd/sbin/dtrace
systemDtraceFound := $(wildcard ${SYSTEM_DTRACE_PROG})
#patchDtraceFound := $(wildcard ${PATCH_DTRACE_PROG})
#systemDtraceHdrFound := $(wildcard $(SYSTEM_DTRACE_H))
#ifneq ("$(systemDtraceHdrFound)", "")
#CFLAGS += -DHAVE_DTRACE_H
#endif
#ifneq ("$(patchDtraceFound)", "")
#DTRACE_PROG=$(PATCH_DTRACE_PROG)
#DTRACE_INCL=-I/opt/SUNWdtrd/include
#else
ifneq ("$(systemDtraceFound)", "")
DTRACE_PROG=$(SYSTEM_DTRACE_PROG)
else
endif # ifneq ("$(systemDtraceFound)", "")
#endif # ifneq ("$(patchDtraceFound)", "")
endif
ifneq ("${DTRACE_PROG}", "")
ifeq ("${HOTSPOT_DISABLE_DTRACE_PROBES}", "")
DTRACE_OBJS = $(DTRACE.o) #$(JVMOFFS.o)
CFLAGS += -DDTRACE_ENABLED #$(DTRACE_INCL)
#clangCFLAGS += -DDTRACE_ENABLED -fno-optimize-sibling-calls
#MAPFILE_DTRACE_OPT = $(MAPFILE_DTRACE)
dtraceCheck:

View File

@ -57,6 +57,9 @@ CFLAGS$(HOTSPARC_GENERIC) += $(OPT_CFLAGS/BYFILE)
# Linker mapfile
MAPFILE = $(GAMMADIR)/make/bsd/makefiles/mapfile-vers-debug
ifeq ($(OS_VENDOR), Darwin)
MAPFILE = $(GAMMADIR)/make/bsd/makefiles/mapfile-vers-darwin-debug
endif
VERSION = fastdebug
SYSDEFS += -DASSERT -DCHECK_UNHANDLED_OOPS

View File

@ -0,0 +1,256 @@
#
# Copyright (c) 2002, 2013, 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.
#
#
# Only used for OSX/Darwin builds
# Define public interface.
# _JNI
_JNI_CreateJavaVM
_JNI_GetCreatedJavaVMs
_JNI_GetDefaultJavaVMInitArgs
# _JVM
_JVM_Accept
_JVM_ActiveProcessorCount
_JVM_AllocateNewArray
_JVM_AllocateNewObject
_JVM_ArrayCopy
_JVM_AssertionStatusDirectives
_JVM_Available
_JVM_Bind
_JVM_ClassDepth
_JVM_ClassLoaderDepth
_JVM_Clone
_JVM_Close
_JVM_CX8Field
_JVM_CompileClass
_JVM_CompileClasses
_JVM_CompilerCommand
_JVM_Connect
_JVM_ConstantPoolGetClassAt
_JVM_ConstantPoolGetClassAtIfLoaded
_JVM_ConstantPoolGetDoubleAt
_JVM_ConstantPoolGetFieldAt
_JVM_ConstantPoolGetFieldAtIfLoaded
_JVM_ConstantPoolGetFloatAt
_JVM_ConstantPoolGetIntAt
_JVM_ConstantPoolGetLongAt
_JVM_ConstantPoolGetMethodAt
_JVM_ConstantPoolGetMethodAtIfLoaded
_JVM_ConstantPoolGetMemberRefInfoAt
_JVM_ConstantPoolGetSize
_JVM_ConstantPoolGetStringAt
_JVM_ConstantPoolGetUTF8At
_JVM_CountStackFrames
_JVM_CurrentClassLoader
_JVM_CurrentLoadedClass
_JVM_CurrentThread
_JVM_CurrentTimeMillis
_JVM_DefineClass
_JVM_DefineClassWithSource
_JVM_DefineClassWithSourceCond
_JVM_DesiredAssertionStatus
_JVM_DisableCompiler
_JVM_DoPrivileged
_JVM_DTraceGetVersion
_JVM_DTraceActivate
_JVM_DTraceIsProbeEnabled
_JVM_DTraceIsSupported
_JVM_DTraceDispose
_JVM_DumpAllStacks
_JVM_DumpThreads
_JVM_EnableCompiler
_JVM_Exit
_JVM_FillInStackTrace
_JVM_FindClassFromClass
_JVM_FindClassFromClassLoader
_JVM_FindClassFromBootLoader
_JVM_FindLibraryEntry
_JVM_FindLoadedClass
_JVM_FindPrimitiveClass
_JVM_FindSignal
_JVM_FreeMemory
_JVM_GC
_JVM_GetAllThreads
_JVM_GetArrayElement
_JVM_GetArrayLength
_JVM_GetCPClassNameUTF
_JVM_GetCPFieldClassNameUTF
_JVM_GetCPFieldModifiers
_JVM_GetCPFieldNameUTF
_JVM_GetCPFieldSignatureUTF
_JVM_GetCPMethodClassNameUTF
_JVM_GetCPMethodModifiers
_JVM_GetCPMethodNameUTF
_JVM_GetCPMethodSignatureUTF
_JVM_GetCallerClass
_JVM_GetClassAccessFlags
_JVM_GetClassAnnotations
_JVM_GetClassCPEntriesCount
_JVM_GetClassCPTypes
_JVM_GetClassConstantPool
_JVM_GetClassContext
_JVM_GetClassDeclaredConstructors
_JVM_GetClassDeclaredFields
_JVM_GetClassDeclaredMethods
_JVM_GetClassFieldsCount
_JVM_GetClassInterfaces
_JVM_GetClassLoader
_JVM_GetClassMethodsCount
_JVM_GetClassModifiers
_JVM_GetClassName
_JVM_GetClassNameUTF
_JVM_GetClassSignature
_JVM_GetClassSigners
_JVM_GetClassTypeAnnotations
_JVM_GetComponentType
_JVM_GetDeclaredClasses
_JVM_GetDeclaringClass
_JVM_GetEnclosingMethodInfo
_JVM_GetFieldAnnotations
_JVM_GetFieldIxModifiers
_JVM_GetFieldTypeAnnotations
_JVM_GetHostName
_JVM_GetInheritedAccessControlContext
_JVM_GetInterfaceVersion
_JVM_GetLastErrorString
_JVM_GetManagement
_JVM_GetMethodAnnotations
_JVM_GetMethodDefaultAnnotationValue
_JVM_GetMethodIxArgsSize
_JVM_GetMethodIxByteCode
_JVM_GetMethodIxByteCodeLength
_JVM_GetMethodIxExceptionIndexes
_JVM_GetMethodIxExceptionTableEntry
_JVM_GetMethodIxExceptionTableLength
_JVM_GetMethodIxExceptionsCount
_JVM_GetMethodIxLocalsCount
_JVM_GetMethodIxMaxStack
_JVM_GetMethodIxModifiers
_JVM_GetMethodIxNameUTF
_JVM_GetMethodIxSignatureUTF
_JVM_GetMethodParameterAnnotations
_JVM_GetMethodParameters
_JVM_GetMethodTypeAnnotations
_JVM_GetPrimitiveArrayElement
_JVM_GetProtectionDomain
_JVM_GetSockName
_JVM_GetSockOpt
_JVM_GetStackAccessControlContext
_JVM_GetStackTraceDepth
_JVM_GetStackTraceElement
_JVM_GetSystemPackage
_JVM_GetSystemPackages
_JVM_GetThreadStateNames
_JVM_GetThreadStateValues
_JVM_GetVersionInfo
_JVM_Halt
_JVM_HoldsLock
_JVM_IHashCode
_JVM_InitAgentProperties
_JVM_InitProperties
_JVM_InitializeCompiler
_JVM_InitializeSocketLibrary
_JVM_InternString
_JVM_Interrupt
_JVM_InvokeMethod
_JVM_IsArrayClass
_JVM_IsConstructorIx
_JVM_IsInterface
_JVM_IsInterrupted
_JVM_IsNaN
_JVM_IsPrimitiveClass
_JVM_IsSameClassPackage
_JVM_IsSilentCompiler
_JVM_IsSupportedJNIVersion
_JVM_IsThreadAlive
_JVM_IsVMGeneratedMethodIx
_JVM_LatestUserDefinedLoader
_JVM_Listen
_JVM_LoadClass0
_JVM_LoadLibrary
_JVM_Lseek
_JVM_MaxObjectInspectionAge
_JVM_MaxMemory
_JVM_MonitorNotify
_JVM_MonitorNotifyAll
_JVM_MonitorWait
_JVM_NanoTime
_JVM_NativePath
_JVM_NewArray
_JVM_NewInstanceFromConstructor
_JVM_NewMultiArray
_JVM_OnExit
_JVM_Open
_JVM_RaiseSignal
_JVM_RawMonitorCreate
_JVM_RawMonitorDestroy
_JVM_RawMonitorEnter
_JVM_RawMonitorExit
_JVM_Read
_JVM_Recv
_JVM_RecvFrom
_JVM_RegisterSignal
_JVM_ReleaseUTF
_JVM_ResolveClass
_JVM_ResumeThread
_JVM_Send
_JVM_SendTo
_JVM_SetArrayElement
_JVM_SetClassSigners
_JVM_SetLength
_JVM_SetNativeThreadName
_JVM_SetPrimitiveArrayElement
_JVM_SetSockOpt
_JVM_SetThreadPriority
_JVM_Sleep
_JVM_Socket
_JVM_SocketAvailable
_JVM_SocketClose
_JVM_SocketShutdown
_JVM_StartThread
_JVM_StopThread
_JVM_SuspendThread
_JVM_SupportsCX8
_JVM_Sync
_JVM_Timeout
_JVM_TotalMemory
_JVM_TraceInstructions
_JVM_TraceMethodCalls
_JVM_UnloadLibrary
_JVM_Write
_JVM_Yield
_JVM_handle_bsd_signal
# miscellaneous functions
_jio_fprintf
_jio_printf
_jio_snprintf
_jio_vfprintf
_jio_vsnprintf
# This is for Forte Analyzer profiling support.
_AsyncGetCallTrace
# INSERT VTABLE SYMBOLS HERE

View File

@ -0,0 +1,256 @@
#
# Copyright (c) 2002, 2013, 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.
#
#
# Only used for OSX/Darwin builds
# Define public interface.
# _JNI
_JNI_CreateJavaVM
_JNI_GetCreatedJavaVMs
_JNI_GetDefaultJavaVMInitArgs
# _JVM
_JVM_Accept
_JVM_ActiveProcessorCount
_JVM_AllocateNewArray
_JVM_AllocateNewObject
_JVM_ArrayCopy
_JVM_AssertionStatusDirectives
_JVM_Available
_JVM_Bind
_JVM_ClassDepth
_JVM_ClassLoaderDepth
_JVM_Clone
_JVM_Close
_JVM_CX8Field
_JVM_CompileClass
_JVM_CompileClasses
_JVM_CompilerCommand
_JVM_Connect
_JVM_ConstantPoolGetClassAt
_JVM_ConstantPoolGetClassAtIfLoaded
_JVM_ConstantPoolGetDoubleAt
_JVM_ConstantPoolGetFieldAt
_JVM_ConstantPoolGetFieldAtIfLoaded
_JVM_ConstantPoolGetFloatAt
_JVM_ConstantPoolGetIntAt
_JVM_ConstantPoolGetLongAt
_JVM_ConstantPoolGetMethodAt
_JVM_ConstantPoolGetMethodAtIfLoaded
_JVM_ConstantPoolGetMemberRefInfoAt
_JVM_ConstantPoolGetSize
_JVM_ConstantPoolGetStringAt
_JVM_ConstantPoolGetUTF8At
_JVM_CountStackFrames
_JVM_CurrentClassLoader
_JVM_CurrentLoadedClass
_JVM_CurrentThread
_JVM_CurrentTimeMillis
_JVM_DefineClass
_JVM_DefineClassWithSource
_JVM_DefineClassWithSourceCond
_JVM_DesiredAssertionStatus
_JVM_DisableCompiler
_JVM_DoPrivileged
_JVM_DTraceGetVersion
_JVM_DTraceActivate
_JVM_DTraceIsProbeEnabled
_JVM_DTraceIsSupported
_JVM_DTraceDispose
_JVM_DumpAllStacks
_JVM_DumpThreads
_JVM_EnableCompiler
_JVM_Exit
_JVM_FillInStackTrace
_JVM_FindClassFromClass
_JVM_FindClassFromClassLoader
_JVM_FindClassFromBootLoader
_JVM_FindLibraryEntry
_JVM_FindLoadedClass
_JVM_FindPrimitiveClass
_JVM_FindSignal
_JVM_FreeMemory
_JVM_GC
_JVM_GetAllThreads
_JVM_GetArrayElement
_JVM_GetArrayLength
_JVM_GetCPClassNameUTF
_JVM_GetCPFieldClassNameUTF
_JVM_GetCPFieldModifiers
_JVM_GetCPFieldNameUTF
_JVM_GetCPFieldSignatureUTF
_JVM_GetCPMethodClassNameUTF
_JVM_GetCPMethodModifiers
_JVM_GetCPMethodNameUTF
_JVM_GetCPMethodSignatureUTF
_JVM_GetCallerClass
_JVM_GetClassAccessFlags
_JVM_GetClassAnnotations
_JVM_GetClassCPEntriesCount
_JVM_GetClassCPTypes
_JVM_GetClassConstantPool
_JVM_GetClassContext
_JVM_GetClassDeclaredConstructors
_JVM_GetClassDeclaredFields
_JVM_GetClassDeclaredMethods
_JVM_GetClassFieldsCount
_JVM_GetClassInterfaces
_JVM_GetClassLoader
_JVM_GetClassMethodsCount
_JVM_GetClassModifiers
_JVM_GetClassName
_JVM_GetClassNameUTF
_JVM_GetClassSignature
_JVM_GetClassSigners
_JVM_GetClassTypeAnnotations
_JVM_GetComponentType
_JVM_GetDeclaredClasses
_JVM_GetDeclaringClass
_JVM_GetEnclosingMethodInfo
_JVM_GetFieldAnnotations
_JVM_GetFieldIxModifiers
_JVM_GetFieldTypeAnnotations
_JVM_GetHostName
_JVM_GetInheritedAccessControlContext
_JVM_GetInterfaceVersion
_JVM_GetLastErrorString
_JVM_GetManagement
_JVM_GetMethodAnnotations
_JVM_GetMethodDefaultAnnotationValue
_JVM_GetMethodIxArgsSize
_JVM_GetMethodIxByteCode
_JVM_GetMethodIxByteCodeLength
_JVM_GetMethodIxExceptionIndexes
_JVM_GetMethodIxExceptionTableEntry
_JVM_GetMethodIxExceptionTableLength
_JVM_GetMethodIxExceptionsCount
_JVM_GetMethodIxLocalsCount
_JVM_GetMethodIxMaxStack
_JVM_GetMethodIxModifiers
_JVM_GetMethodIxNameUTF
_JVM_GetMethodIxSignatureUTF
_JVM_GetMethodParameterAnnotations
_JVM_GetMethodParameters
_JVM_GetMethodTypeAnnotations
_JVM_GetPrimitiveArrayElement
_JVM_GetProtectionDomain
_JVM_GetSockName
_JVM_GetSockOpt
_JVM_GetStackAccessControlContext
_JVM_GetStackTraceDepth
_JVM_GetStackTraceElement
_JVM_GetSystemPackage
_JVM_GetSystemPackages
_JVM_GetThreadStateNames
_JVM_GetThreadStateValues
_JVM_GetVersionInfo
_JVM_Halt
_JVM_HoldsLock
_JVM_IHashCode
_JVM_InitAgentProperties
_JVM_InitProperties
_JVM_InitializeCompiler
_JVM_InitializeSocketLibrary
_JVM_InternString
_JVM_Interrupt
_JVM_InvokeMethod
_JVM_IsArrayClass
_JVM_IsConstructorIx
_JVM_IsInterface
_JVM_IsInterrupted
_JVM_IsNaN
_JVM_IsPrimitiveClass
_JVM_IsSameClassPackage
_JVM_IsSilentCompiler
_JVM_IsSupportedJNIVersion
_JVM_IsThreadAlive
_JVM_IsVMGeneratedMethodIx
_JVM_LatestUserDefinedLoader
_JVM_Listen
_JVM_LoadClass0
_JVM_LoadLibrary
_JVM_Lseek
_JVM_MaxObjectInspectionAge
_JVM_MaxMemory
_JVM_MonitorNotify
_JVM_MonitorNotifyAll
_JVM_MonitorWait
_JVM_NanoTime
_JVM_NativePath
_JVM_NewArray
_JVM_NewInstanceFromConstructor
_JVM_NewMultiArray
_JVM_OnExit
_JVM_Open
_JVM_RaiseSignal
_JVM_RawMonitorCreate
_JVM_RawMonitorDestroy
_JVM_RawMonitorEnter
_JVM_RawMonitorExit
_JVM_Read
_JVM_Recv
_JVM_RecvFrom
_JVM_RegisterSignal
_JVM_ReleaseUTF
_JVM_ResolveClass
_JVM_ResumeThread
_JVM_Send
_JVM_SendTo
_JVM_SetArrayElement
_JVM_SetClassSigners
_JVM_SetLength
_JVM_SetNativeThreadName
_JVM_SetPrimitiveArrayElement
_JVM_SetSockOpt
_JVM_SetThreadPriority
_JVM_Sleep
_JVM_Socket
_JVM_SocketAvailable
_JVM_SocketClose
_JVM_SocketShutdown
_JVM_StartThread
_JVM_StopThread
_JVM_SuspendThread
_JVM_SupportsCX8
_JVM_Sync
_JVM_Timeout
_JVM_TotalMemory
_JVM_TraceInstructions
_JVM_TraceMethodCalls
_JVM_UnloadLibrary
_JVM_Write
_JVM_Yield
_JVM_handle_bsd_signal
# miscellaneous functions
_jio_fprintf
_jio_printf
_jio_snprintf
_jio_vfprintf
_jio_vsnprintf
# This is for Forte Analyzer profiling support.
_AsyncGetCallTrace
# INSERT VTABLE SYMBOLS HERE

View File

@ -19,238 +19,250 @@
# 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.
#
#
#
# Only used for OSX/Darwin builds
# Define public interface.
# _JNI
_JNI_CreateJavaVM
_JNI_GetCreatedJavaVMs
_JNI_GetDefaultJavaVMInitArgs
# _JVM
_JVM_Accept
_JVM_ActiveProcessorCount
_JVM_AllocateNewArray
_JVM_AllocateNewObject
_JVM_ArrayCopy
_JVM_AssertionStatusDirectives
_JVM_Available
_JVM_Bind
_JVM_ClassDepth
_JVM_ClassLoaderDepth
_JVM_Clone
_JVM_Close
_JVM_CX8Field
_JVM_CompileClass
_JVM_CompileClasses
_JVM_CompilerCommand
_JVM_Connect
_JVM_ConstantPoolGetClassAt
_JVM_ConstantPoolGetClassAtIfLoaded
_JVM_ConstantPoolGetDoubleAt
_JVM_ConstantPoolGetFieldAt
_JVM_ConstantPoolGetFieldAtIfLoaded
_JVM_ConstantPoolGetFloatAt
_JVM_ConstantPoolGetIntAt
_JVM_ConstantPoolGetLongAt
_JVM_ConstantPoolGetMethodAt
_JVM_ConstantPoolGetMethodAtIfLoaded
_JVM_ConstantPoolGetMemberRefInfoAt
_JVM_ConstantPoolGetSize
_JVM_ConstantPoolGetStringAt
_JVM_ConstantPoolGetUTF8At
_JVM_CountStackFrames
_JVM_CurrentClassLoader
_JVM_CurrentLoadedClass
_JVM_CurrentThread
_JVM_CurrentTimeMillis
_JVM_DefineClass
_JVM_DefineClassWithSource
_JVM_DefineClassWithSourceCond
_JVM_DesiredAssertionStatus
_JVM_DisableCompiler
_JVM_DoPrivileged
_JVM_DTraceGetVersion
_JVM_DTraceActivate
_JVM_DTraceIsProbeEnabled
_JVM_DTraceIsSupported
_JVM_DTraceDispose
_JVM_DumpAllStacks
_JVM_DumpThreads
_JVM_EnableCompiler
_JVM_Exit
_JVM_FillInStackTrace
_JVM_FindClassFromClass
_JVM_FindClassFromClassLoader
_JVM_FindClassFromBootLoader
_JVM_FindLibraryEntry
_JVM_FindLoadedClass
_JVM_FindPrimitiveClass
_JVM_FindSignal
_JVM_FreeMemory
_JVM_GC
_JVM_GetAllThreads
_JVM_GetArrayElement
_JVM_GetArrayLength
_JVM_GetCPClassNameUTF
_JVM_GetCPFieldClassNameUTF
_JVM_GetCPFieldModifiers
_JVM_GetCPFieldNameUTF
_JVM_GetCPFieldSignatureUTF
_JVM_GetCPMethodClassNameUTF
_JVM_GetCPMethodModifiers
_JVM_GetCPMethodNameUTF
_JVM_GetCPMethodSignatureUTF
_JVM_GetCallerClass
_JVM_GetClassAccessFlags
_JVM_GetClassAnnotations
_JVM_GetClassCPEntriesCount
_JVM_GetClassCPTypes
_JVM_GetClassConstantPool
_JVM_GetClassContext
_JVM_GetClassDeclaredConstructors
_JVM_GetClassDeclaredFields
_JVM_GetClassDeclaredMethods
_JVM_GetClassFieldsCount
_JVM_GetClassInterfaces
_JVM_GetClassLoader
_JVM_GetClassMethodsCount
_JVM_GetClassModifiers
_JVM_GetClassName
_JVM_GetClassNameUTF
_JVM_GetClassSignature
_JVM_GetClassSigners
_JVM_GetClassTypeAnnotations
_JVM_GetComponentType
_JVM_GetDeclaredClasses
_JVM_GetDeclaringClass
_JVM_GetEnclosingMethodInfo
_JVM_GetFieldAnnotations
_JVM_GetFieldIxModifiers
_JVM_GetFieldTypeAnnotations
_JVM_GetHostName
_JVM_GetInheritedAccessControlContext
_JVM_GetInterfaceVersion
_JVM_GetLastErrorString
_JVM_GetManagement
_JVM_GetMethodAnnotations
_JVM_GetMethodDefaultAnnotationValue
_JVM_GetMethodIxArgsSize
_JVM_GetMethodIxByteCode
_JVM_GetMethodIxByteCodeLength
_JVM_GetMethodIxExceptionIndexes
_JVM_GetMethodIxExceptionTableEntry
_JVM_GetMethodIxExceptionTableLength
_JVM_GetMethodIxExceptionsCount
_JVM_GetMethodIxLocalsCount
_JVM_GetMethodIxMaxStack
_JVM_GetMethodIxModifiers
_JVM_GetMethodIxNameUTF
_JVM_GetMethodIxSignatureUTF
_JVM_GetMethodParameterAnnotations
_JVM_GetMethodParameters
_JVM_GetMethodTypeAnnotations
_JVM_GetPrimitiveArrayElement
_JVM_GetProtectionDomain
_JVM_GetSockName
_JVM_GetSockOpt
_JVM_GetStackAccessControlContext
_JVM_GetStackTraceDepth
_JVM_GetStackTraceElement
_JVM_GetSystemPackage
_JVM_GetSystemPackages
_JVM_GetThreadStateNames
_JVM_GetThreadStateValues
_JVM_GetVersionInfo
_JVM_Halt
_JVM_HoldsLock
_JVM_IHashCode
_JVM_InitAgentProperties
_JVM_InitProperties
_JVM_InitializeCompiler
_JVM_InitializeSocketLibrary
_JVM_InternString
_JVM_Interrupt
_JVM_InvokeMethod
_JVM_IsArrayClass
_JVM_IsConstructorIx
_JVM_IsInterface
_JVM_IsInterrupted
_JVM_IsNaN
_JVM_IsPrimitiveClass
_JVM_IsSameClassPackage
_JVM_IsSilentCompiler
_JVM_IsSupportedJNIVersion
_JVM_IsThreadAlive
_JVM_IsVMGeneratedMethodIx
_JVM_LatestUserDefinedLoader
_JVM_Listen
_JVM_LoadClass0
_JVM_LoadLibrary
_JVM_Lseek
_JVM_MaxObjectInspectionAge
_JVM_MaxMemory
_JVM_MonitorNotify
_JVM_MonitorNotifyAll
_JVM_MonitorWait
_JVM_NanoTime
_JVM_NativePath
_JVM_NewArray
_JVM_NewInstanceFromConstructor
_JVM_NewMultiArray
_JVM_OnExit
_JVM_Open
_JVM_RaiseSignal
_JVM_RawMonitorCreate
_JVM_RawMonitorDestroy
_JVM_RawMonitorEnter
_JVM_RawMonitorExit
_JVM_Read
_JVM_Recv
_JVM_RecvFrom
_JVM_RegisterSignal
_JVM_ReleaseUTF
_JVM_ResolveClass
_JVM_ResumeThread
_JVM_Send
_JVM_SendTo
_JVM_SetArrayElement
_JVM_SetClassSigners
_JVM_SetLength
_JVM_SetNativeThreadName
_JVM_SetPrimitiveArrayElement
_JVM_SetSockOpt
_JVM_SetThreadPriority
_JVM_Sleep
_JVM_Socket
_JVM_SocketAvailable
_JVM_SocketClose
_JVM_SocketShutdown
_JVM_StartThread
_JVM_StopThread
_JVM_SuspendThread
_JVM_SupportsCX8
_JVM_Sync
_JVM_Timeout
_JVM_TotalMemory
_JVM_TraceInstructions
_JVM_TraceMethodCalls
_JVM_UnloadLibrary
_JVM_Write
_JVM_Yield
_JVM_handle_bsd_signal
SUNWprivate_1.1 {
global:
# JNI
JNI_CreateJavaVM;
JNI_GetCreatedJavaVMs;
JNI_GetDefaultJavaVMInitArgs;
# JVM
JVM_Accept;
JVM_ActiveProcessorCount;
JVM_AllocateNewArray;
JVM_AllocateNewObject;
JVM_ArrayCopy;
JVM_AssertionStatusDirectives;
JVM_Available;
JVM_Bind;
JVM_ClassDepth;
JVM_ClassLoaderDepth;
JVM_Clone;
JVM_Close;
JVM_CX8Field;
JVM_CompileClass;
JVM_CompileClasses;
JVM_CompilerCommand;
JVM_Connect;
JVM_ConstantPoolGetClassAt;
JVM_ConstantPoolGetClassAtIfLoaded;
JVM_ConstantPoolGetDoubleAt;
JVM_ConstantPoolGetFieldAt;
JVM_ConstantPoolGetFieldAtIfLoaded;
JVM_ConstantPoolGetFloatAt;
JVM_ConstantPoolGetIntAt;
JVM_ConstantPoolGetLongAt;
JVM_ConstantPoolGetMethodAt;
JVM_ConstantPoolGetMethodAtIfLoaded;
JVM_ConstantPoolGetMemberRefInfoAt;
JVM_ConstantPoolGetSize;
JVM_ConstantPoolGetStringAt;
JVM_ConstantPoolGetUTF8At;
JVM_CountStackFrames;
JVM_CurrentClassLoader;
JVM_CurrentLoadedClass;
JVM_CurrentThread;
JVM_CurrentTimeMillis;
JVM_DefineClass;
JVM_DefineClassWithSource;
JVM_DefineClassWithSourceCond;
JVM_DesiredAssertionStatus;
JVM_DisableCompiler;
JVM_DoPrivileged;
JVM_DTraceGetVersion;
JVM_DTraceActivate;
JVM_DTraceIsProbeEnabled;
JVM_DTraceIsSupported;
JVM_DTraceDispose;
JVM_DumpAllStacks;
JVM_DumpThreads;
JVM_EnableCompiler;
JVM_Exit;
JVM_FillInStackTrace;
JVM_FindClassFromClass;
JVM_FindClassFromClassLoader;
JVM_FindClassFromBootLoader;
JVM_FindLibraryEntry;
JVM_FindLoadedClass;
JVM_FindPrimitiveClass;
JVM_FindSignal;
JVM_FreeMemory;
JVM_GC;
JVM_GetAllThreads;
JVM_GetArrayElement;
JVM_GetArrayLength;
JVM_GetCPClassNameUTF;
JVM_GetCPFieldClassNameUTF;
JVM_GetCPFieldModifiers;
JVM_GetCPFieldNameUTF;
JVM_GetCPFieldSignatureUTF;
JVM_GetCPMethodClassNameUTF;
JVM_GetCPMethodModifiers;
JVM_GetCPMethodNameUTF;
JVM_GetCPMethodSignatureUTF;
JVM_GetCallerClass;
JVM_GetClassAccessFlags;
JVM_GetClassAnnotations;
JVM_GetClassCPEntriesCount;
JVM_GetClassCPTypes;
JVM_GetClassConstantPool;
JVM_GetClassContext;
JVM_GetClassDeclaredConstructors;
JVM_GetClassDeclaredFields;
JVM_GetClassDeclaredMethods;
JVM_GetClassFieldsCount;
JVM_GetClassInterfaces;
JVM_GetClassLoader;
JVM_GetClassMethodsCount;
JVM_GetClassModifiers;
JVM_GetClassName;
JVM_GetClassNameUTF;
JVM_GetClassSignature;
JVM_GetClassSigners;
JVM_GetClassTypeAnnotations;
JVM_GetComponentType;
JVM_GetDeclaredClasses;
JVM_GetDeclaringClass;
JVM_GetEnclosingMethodInfo;
JVM_GetFieldAnnotations;
JVM_GetFieldIxModifiers;
JVM_GetFieldTypeAnnotations;
JVM_GetHostName;
JVM_GetInheritedAccessControlContext;
JVM_GetInterfaceVersion;
JVM_GetLastErrorString;
JVM_GetManagement;
JVM_GetMethodAnnotations;
JVM_GetMethodDefaultAnnotationValue;
JVM_GetMethodIxArgsSize;
JVM_GetMethodIxByteCode;
JVM_GetMethodIxByteCodeLength;
JVM_GetMethodIxExceptionIndexes;
JVM_GetMethodIxExceptionTableEntry;
JVM_GetMethodIxExceptionTableLength;
JVM_GetMethodIxExceptionsCount;
JVM_GetMethodIxLocalsCount;
JVM_GetMethodIxMaxStack;
JVM_GetMethodIxModifiers;
JVM_GetMethodIxNameUTF;
JVM_GetMethodIxSignatureUTF;
JVM_GetMethodParameterAnnotations;
JVM_GetMethodParameters;
JVM_GetMethodTypeAnnotations;
JVM_GetPrimitiveArrayElement;
JVM_GetProtectionDomain;
JVM_GetSockName;
JVM_GetSockOpt;
JVM_GetStackAccessControlContext;
JVM_GetStackTraceDepth;
JVM_GetStackTraceElement;
JVM_GetSystemPackage;
JVM_GetSystemPackages;
JVM_GetThreadStateNames;
JVM_GetThreadStateValues;
JVM_GetVersionInfo;
JVM_Halt;
JVM_HoldsLock;
JVM_IHashCode;
JVM_InitAgentProperties;
JVM_InitProperties;
JVM_InitializeCompiler;
JVM_InitializeSocketLibrary;
JVM_InternString;
JVM_Interrupt;
JVM_InvokeMethod;
JVM_IsArrayClass;
JVM_IsConstructorIx;
JVM_IsInterface;
JVM_IsInterrupted;
JVM_IsNaN;
JVM_IsPrimitiveClass;
JVM_IsSameClassPackage;
JVM_IsSilentCompiler;
JVM_IsSupportedJNIVersion;
JVM_IsThreadAlive;
JVM_IsVMGeneratedMethodIx;
JVM_LatestUserDefinedLoader;
JVM_Listen;
JVM_LoadClass0;
JVM_LoadLibrary;
JVM_Lseek;
JVM_MaxObjectInspectionAge;
JVM_MaxMemory;
JVM_MonitorNotify;
JVM_MonitorNotifyAll;
JVM_MonitorWait;
JVM_NanoTime;
JVM_NativePath;
JVM_NewArray;
JVM_NewInstanceFromConstructor;
JVM_NewMultiArray;
JVM_OnExit;
JVM_Open;
JVM_RaiseSignal;
JVM_RawMonitorCreate;
JVM_RawMonitorDestroy;
JVM_RawMonitorEnter;
JVM_RawMonitorExit;
JVM_Read;
JVM_Recv;
JVM_RecvFrom;
JVM_RegisterSignal;
JVM_ReleaseUTF;
JVM_ResolveClass;
JVM_ResumeThread;
JVM_Send;
JVM_SendTo;
JVM_SetArrayElement;
JVM_SetClassSigners;
JVM_SetLength;
JVM_SetNativeThreadName;
JVM_SetPrimitiveArrayElement;
JVM_SetSockOpt;
JVM_SetThreadPriority;
JVM_Sleep;
JVM_Socket;
JVM_SocketAvailable;
JVM_SocketClose;
JVM_SocketShutdown;
JVM_StartThread;
JVM_StopThread;
JVM_SuspendThread;
JVM_SupportsCX8;
JVM_Sync;
JVM_Timeout;
JVM_TotalMemory;
JVM_TraceInstructions;
JVM_TraceMethodCalls;
JVM_UnloadLibrary;
JVM_Write;
JVM_Yield;
JVM_handle_linux_signal;
# miscellaneous functions
_jio_fprintf
_jio_printf
_jio_snprintf
_jio_vfprintf
_jio_vsnprintf
jio_fprintf;
jio_printf;
jio_snprintf;
jio_vfprintf;
jio_vsnprintf;
fork1;
numa_warn;
numa_error;
# Needed because there is no JVM interface for this.
sysThreadAvailableStackWithSlack;
# This is for Forte Analyzer profiling support.
_AsyncGetCallTrace
AsyncGetCallTrace;
# INSERT VTABLE SYMBOLS HERE
# INSERT VTABLE SYMBOLS HERE
local:
*;
};

View File

@ -19,238 +19,250 @@
# 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.
#
#
#
# Only used for OSX/Darwin builds
# Define public interface.
# _JNI
_JNI_CreateJavaVM
_JNI_GetCreatedJavaVMs
_JNI_GetDefaultJavaVMInitArgs
# _JVM
_JVM_Accept
_JVM_ActiveProcessorCount
_JVM_AllocateNewArray
_JVM_AllocateNewObject
_JVM_ArrayCopy
_JVM_AssertionStatusDirectives
_JVM_Available
_JVM_Bind
_JVM_ClassDepth
_JVM_ClassLoaderDepth
_JVM_Clone
_JVM_Close
_JVM_CX8Field
_JVM_CompileClass
_JVM_CompileClasses
_JVM_CompilerCommand
_JVM_Connect
_JVM_ConstantPoolGetClassAt
_JVM_ConstantPoolGetClassAtIfLoaded
_JVM_ConstantPoolGetDoubleAt
_JVM_ConstantPoolGetFieldAt
_JVM_ConstantPoolGetFieldAtIfLoaded
_JVM_ConstantPoolGetFloatAt
_JVM_ConstantPoolGetIntAt
_JVM_ConstantPoolGetLongAt
_JVM_ConstantPoolGetMethodAt
_JVM_ConstantPoolGetMethodAtIfLoaded
_JVM_ConstantPoolGetMemberRefInfoAt
_JVM_ConstantPoolGetSize
_JVM_ConstantPoolGetStringAt
_JVM_ConstantPoolGetUTF8At
_JVM_CountStackFrames
_JVM_CurrentClassLoader
_JVM_CurrentLoadedClass
_JVM_CurrentThread
_JVM_CurrentTimeMillis
_JVM_DefineClass
_JVM_DefineClassWithSource
_JVM_DefineClassWithSourceCond
_JVM_DesiredAssertionStatus
_JVM_DisableCompiler
_JVM_DoPrivileged
_JVM_DTraceGetVersion
_JVM_DTraceActivate
_JVM_DTraceIsProbeEnabled
_JVM_DTraceIsSupported
_JVM_DTraceDispose
_JVM_DumpAllStacks
_JVM_DumpThreads
_JVM_EnableCompiler
_JVM_Exit
_JVM_FillInStackTrace
_JVM_FindClassFromClass
_JVM_FindClassFromClassLoader
_JVM_FindClassFromBootLoader
_JVM_FindLibraryEntry
_JVM_FindLoadedClass
_JVM_FindPrimitiveClass
_JVM_FindSignal
_JVM_FreeMemory
_JVM_GC
_JVM_GetAllThreads
_JVM_GetArrayElement
_JVM_GetArrayLength
_JVM_GetCPClassNameUTF
_JVM_GetCPFieldClassNameUTF
_JVM_GetCPFieldModifiers
_JVM_GetCPFieldNameUTF
_JVM_GetCPFieldSignatureUTF
_JVM_GetCPMethodClassNameUTF
_JVM_GetCPMethodModifiers
_JVM_GetCPMethodNameUTF
_JVM_GetCPMethodSignatureUTF
_JVM_GetCallerClass
_JVM_GetClassAccessFlags
_JVM_GetClassAnnotations
_JVM_GetClassCPEntriesCount
_JVM_GetClassCPTypes
_JVM_GetClassConstantPool
_JVM_GetClassContext
_JVM_GetClassDeclaredConstructors
_JVM_GetClassDeclaredFields
_JVM_GetClassDeclaredMethods
_JVM_GetClassFieldsCount
_JVM_GetClassInterfaces
_JVM_GetClassLoader
_JVM_GetClassMethodsCount
_JVM_GetClassModifiers
_JVM_GetClassName
_JVM_GetClassNameUTF
_JVM_GetClassSignature
_JVM_GetClassSigners
_JVM_GetClassTypeAnnotations
_JVM_GetComponentType
_JVM_GetDeclaredClasses
_JVM_GetDeclaringClass
_JVM_GetEnclosingMethodInfo
_JVM_GetFieldAnnotations
_JVM_GetFieldIxModifiers
_JVM_GetFieldTypeAnnotations
_JVM_GetHostName
_JVM_GetInheritedAccessControlContext
_JVM_GetInterfaceVersion
_JVM_GetLastErrorString
_JVM_GetManagement
_JVM_GetMethodAnnotations
_JVM_GetMethodDefaultAnnotationValue
_JVM_GetMethodIxArgsSize
_JVM_GetMethodIxByteCode
_JVM_GetMethodIxByteCodeLength
_JVM_GetMethodIxExceptionIndexes
_JVM_GetMethodIxExceptionTableEntry
_JVM_GetMethodIxExceptionTableLength
_JVM_GetMethodIxExceptionsCount
_JVM_GetMethodIxLocalsCount
_JVM_GetMethodIxMaxStack
_JVM_GetMethodIxModifiers
_JVM_GetMethodIxNameUTF
_JVM_GetMethodIxSignatureUTF
_JVM_GetMethodParameterAnnotations
_JVM_GetMethodParameters
_JVM_GetMethodTypeAnnotations
_JVM_GetPrimitiveArrayElement
_JVM_GetProtectionDomain
_JVM_GetSockName
_JVM_GetSockOpt
_JVM_GetStackAccessControlContext
_JVM_GetStackTraceDepth
_JVM_GetStackTraceElement
_JVM_GetSystemPackage
_JVM_GetSystemPackages
_JVM_GetThreadStateNames
_JVM_GetThreadStateValues
_JVM_GetVersionInfo
_JVM_Halt
_JVM_HoldsLock
_JVM_IHashCode
_JVM_InitAgentProperties
_JVM_InitProperties
_JVM_InitializeCompiler
_JVM_InitializeSocketLibrary
_JVM_InternString
_JVM_Interrupt
_JVM_InvokeMethod
_JVM_IsArrayClass
_JVM_IsConstructorIx
_JVM_IsInterface
_JVM_IsInterrupted
_JVM_IsNaN
_JVM_IsPrimitiveClass
_JVM_IsSameClassPackage
_JVM_IsSilentCompiler
_JVM_IsSupportedJNIVersion
_JVM_IsThreadAlive
_JVM_IsVMGeneratedMethodIx
_JVM_LatestUserDefinedLoader
_JVM_Listen
_JVM_LoadClass0
_JVM_LoadLibrary
_JVM_Lseek
_JVM_MaxObjectInspectionAge
_JVM_MaxMemory
_JVM_MonitorNotify
_JVM_MonitorNotifyAll
_JVM_MonitorWait
_JVM_NanoTime
_JVM_NativePath
_JVM_NewArray
_JVM_NewInstanceFromConstructor
_JVM_NewMultiArray
_JVM_OnExit
_JVM_Open
_JVM_RaiseSignal
_JVM_RawMonitorCreate
_JVM_RawMonitorDestroy
_JVM_RawMonitorEnter
_JVM_RawMonitorExit
_JVM_Read
_JVM_Recv
_JVM_RecvFrom
_JVM_RegisterSignal
_JVM_ReleaseUTF
_JVM_ResolveClass
_JVM_ResumeThread
_JVM_Send
_JVM_SendTo
_JVM_SetArrayElement
_JVM_SetClassSigners
_JVM_SetLength
_JVM_SetNativeThreadName
_JVM_SetPrimitiveArrayElement
_JVM_SetSockOpt
_JVM_SetThreadPriority
_JVM_Sleep
_JVM_Socket
_JVM_SocketAvailable
_JVM_SocketClose
_JVM_SocketShutdown
_JVM_StartThread
_JVM_StopThread
_JVM_SuspendThread
_JVM_SupportsCX8
_JVM_Sync
_JVM_Timeout
_JVM_TotalMemory
_JVM_TraceInstructions
_JVM_TraceMethodCalls
_JVM_UnloadLibrary
_JVM_Write
_JVM_Yield
_JVM_handle_bsd_signal
SUNWprivate_1.1 {
global:
# JNI
JNI_CreateJavaVM;
JNI_GetCreatedJavaVMs;
JNI_GetDefaultJavaVMInitArgs;
# JVM
JVM_Accept;
JVM_ActiveProcessorCount;
JVM_AllocateNewArray;
JVM_AllocateNewObject;
JVM_ArrayCopy;
JVM_AssertionStatusDirectives;
JVM_Available;
JVM_Bind;
JVM_ClassDepth;
JVM_ClassLoaderDepth;
JVM_Clone;
JVM_Close;
JVM_CX8Field;
JVM_CompileClass;
JVM_CompileClasses;
JVM_CompilerCommand;
JVM_Connect;
JVM_ConstantPoolGetClassAt;
JVM_ConstantPoolGetClassAtIfLoaded;
JVM_ConstantPoolGetDoubleAt;
JVM_ConstantPoolGetFieldAt;
JVM_ConstantPoolGetFieldAtIfLoaded;
JVM_ConstantPoolGetFloatAt;
JVM_ConstantPoolGetIntAt;
JVM_ConstantPoolGetLongAt;
JVM_ConstantPoolGetMethodAt;
JVM_ConstantPoolGetMethodAtIfLoaded;
JVM_ConstantPoolGetMemberRefInfoAt;
JVM_ConstantPoolGetSize;
JVM_ConstantPoolGetStringAt;
JVM_ConstantPoolGetUTF8At;
JVM_CountStackFrames;
JVM_CurrentClassLoader;
JVM_CurrentLoadedClass;
JVM_CurrentThread;
JVM_CurrentTimeMillis;
JVM_DefineClass;
JVM_DefineClassWithSource;
JVM_DefineClassWithSourceCond;
JVM_DesiredAssertionStatus;
JVM_DisableCompiler;
JVM_DoPrivileged;
JVM_DTraceGetVersion;
JVM_DTraceActivate;
JVM_DTraceIsProbeEnabled;
JVM_DTraceIsSupported;
JVM_DTraceDispose;
JVM_DumpAllStacks;
JVM_DumpThreads;
JVM_EnableCompiler;
JVM_Exit;
JVM_FillInStackTrace;
JVM_FindClassFromClass;
JVM_FindClassFromClassLoader;
JVM_FindClassFromBootLoader;
JVM_FindLibraryEntry;
JVM_FindLoadedClass;
JVM_FindPrimitiveClass;
JVM_FindSignal;
JVM_FreeMemory;
JVM_GC;
JVM_GetAllThreads;
JVM_GetArrayElement;
JVM_GetArrayLength;
JVM_GetCPClassNameUTF;
JVM_GetCPFieldClassNameUTF;
JVM_GetCPFieldModifiers;
JVM_GetCPFieldNameUTF;
JVM_GetCPFieldSignatureUTF;
JVM_GetCPMethodClassNameUTF;
JVM_GetCPMethodModifiers;
JVM_GetCPMethodNameUTF;
JVM_GetCPMethodSignatureUTF;
JVM_GetCallerClass;
JVM_GetClassAccessFlags;
JVM_GetClassAnnotations;
JVM_GetClassCPEntriesCount;
JVM_GetClassCPTypes;
JVM_GetClassConstantPool;
JVM_GetClassContext;
JVM_GetClassDeclaredConstructors;
JVM_GetClassDeclaredFields;
JVM_GetClassDeclaredMethods;
JVM_GetClassFieldsCount;
JVM_GetClassInterfaces;
JVM_GetClassLoader;
JVM_GetClassMethodsCount;
JVM_GetClassModifiers;
JVM_GetClassName;
JVM_GetClassNameUTF;
JVM_GetClassSignature;
JVM_GetClassSigners;
JVM_GetClassTypeAnnotations;
JVM_GetComponentType;
JVM_GetDeclaredClasses;
JVM_GetDeclaringClass;
JVM_GetEnclosingMethodInfo;
JVM_GetFieldAnnotations;
JVM_GetFieldIxModifiers;
JVM_GetFieldTypeAnnotations;
JVM_GetHostName;
JVM_GetInheritedAccessControlContext;
JVM_GetInterfaceVersion;
JVM_GetLastErrorString;
JVM_GetManagement;
JVM_GetMethodAnnotations;
JVM_GetMethodDefaultAnnotationValue;
JVM_GetMethodIxArgsSize;
JVM_GetMethodIxByteCode;
JVM_GetMethodIxByteCodeLength;
JVM_GetMethodIxExceptionIndexes;
JVM_GetMethodIxExceptionTableEntry;
JVM_GetMethodIxExceptionTableLength;
JVM_GetMethodIxExceptionsCount;
JVM_GetMethodIxLocalsCount;
JVM_GetMethodIxMaxStack;
JVM_GetMethodIxModifiers;
JVM_GetMethodIxNameUTF;
JVM_GetMethodIxSignatureUTF;
JVM_GetMethodParameterAnnotations;
JVM_GetMethodParameters;
JVM_GetMethodTypeAnnotations;
JVM_GetPrimitiveArrayElement;
JVM_GetProtectionDomain;
JVM_GetSockName;
JVM_GetSockOpt;
JVM_GetStackAccessControlContext;
JVM_GetStackTraceDepth;
JVM_GetStackTraceElement;
JVM_GetSystemPackage;
JVM_GetSystemPackages;
JVM_GetThreadStateNames;
JVM_GetThreadStateValues;
JVM_GetVersionInfo;
JVM_Halt;
JVM_HoldsLock;
JVM_IHashCode;
JVM_InitAgentProperties;
JVM_InitProperties;
JVM_InitializeCompiler;
JVM_InitializeSocketLibrary;
JVM_InternString;
JVM_Interrupt;
JVM_InvokeMethod;
JVM_IsArrayClass;
JVM_IsConstructorIx;
JVM_IsInterface;
JVM_IsInterrupted;
JVM_IsNaN;
JVM_IsPrimitiveClass;
JVM_IsSameClassPackage;
JVM_IsSilentCompiler;
JVM_IsSupportedJNIVersion;
JVM_IsThreadAlive;
JVM_IsVMGeneratedMethodIx;
JVM_LatestUserDefinedLoader;
JVM_Listen;
JVM_LoadClass0;
JVM_LoadLibrary;
JVM_Lseek;
JVM_MaxObjectInspectionAge;
JVM_MaxMemory;
JVM_MonitorNotify;
JVM_MonitorNotifyAll;
JVM_MonitorWait;
JVM_NanoTime;
JVM_NativePath;
JVM_NewArray;
JVM_NewInstanceFromConstructor;
JVM_NewMultiArray;
JVM_OnExit;
JVM_Open;
JVM_RaiseSignal;
JVM_RawMonitorCreate;
JVM_RawMonitorDestroy;
JVM_RawMonitorEnter;
JVM_RawMonitorExit;
JVM_Read;
JVM_Recv;
JVM_RecvFrom;
JVM_RegisterSignal;
JVM_ReleaseUTF;
JVM_ResolveClass;
JVM_ResumeThread;
JVM_Send;
JVM_SendTo;
JVM_SetArrayElement;
JVM_SetClassSigners;
JVM_SetLength;
JVM_SetNativeThreadName;
JVM_SetPrimitiveArrayElement;
JVM_SetSockOpt;
JVM_SetThreadPriority;
JVM_Sleep;
JVM_Socket;
JVM_SocketAvailable;
JVM_SocketClose;
JVM_SocketShutdown;
JVM_StartThread;
JVM_StopThread;
JVM_SuspendThread;
JVM_SupportsCX8;
JVM_Sync;
JVM_Timeout;
JVM_TotalMemory;
JVM_TraceInstructions;
JVM_TraceMethodCalls;
JVM_UnloadLibrary;
JVM_Write;
JVM_Yield;
JVM_handle_linux_signal;
# miscellaneous functions
_jio_fprintf
_jio_printf
_jio_snprintf
_jio_vfprintf
_jio_vsnprintf
jio_fprintf;
jio_printf;
jio_snprintf;
jio_vfprintf;
jio_vsnprintf;
fork1;
numa_warn;
numa_error;
# Needed because there is no JVM interface for this.
sysThreadAvailableStackWithSlack;
# This is for Forte Analyzer profiling support.
_AsyncGetCallTrace
AsyncGetCallTrace;
# INSERT VTABLE SYMBOLS HERE
# INSERT VTABLE SYMBOLS HERE
local:
*;
};

View File

@ -39,5 +39,8 @@ CFLAGS$(HOTSPARC_GENERIC) += $(OPT_CFLAGS/BYFILE)
# Linker mapfile
MAPFILE = $(GAMMADIR)/make/bsd/makefiles/mapfile-vers-debug
ifeq ($(OS_VENDOR), Darwin)
MAPFILE = $(GAMMADIR)/make/bsd/makefiles/mapfile-vers-darwin-debug
endif
VERSION = optimized

View File

@ -39,6 +39,9 @@ CFLAGS$(HOTSPARC_GENERIC) += $(OPT_CFLAGS/BYFILE)
# Linker mapfile
MAPFILE = $(GAMMADIR)/make/bsd/makefiles/mapfile-vers-product
ifeq ($(OS_VENDOR), Darwin)
MAPFILE = $(GAMMADIR)/make/bsd/makefiles/mapfile-vers-darwin-product
endif
SYSDEFS += -DPRODUCT
VERSION = optimized

View File

@ -64,7 +64,7 @@ MFLAGS=`
echo "$MFLAGS" \
| sed '
s/^-/ -/
s/ -\([^ ][^ ]*\)j/ -\1 -j/
s/ -\([^ I][^ I]*\)j/ -\1 -j/
s/ -j[0-9][0-9]*/ -j/
s/ -j\([^ ]\)/ -j -\1/
s/ -j/ -j'${HOTSPOT_BUILD_JOBS:-${default_build_jobs}}'/

View File

@ -64,7 +64,7 @@ MFLAGS=`
echo "$MFLAGS" \
| sed '
s/^-/ -/
s/ -\([^ ][^ ]*\)j/ -\1 -j/
s/ -\([^ I][^ I]*\)j/ -\1 -j/
s/ -j[0-9][0-9]*/ -j/
s/ -j\([^ ]\)/ -j -\1/
s/ -j/ -j'${HOTSPOT_BUILD_JOBS:-${default_build_jobs}}'/

View File

@ -117,7 +117,7 @@ SUBMAKE_DIRS = $(addprefix $(PLATFORM_DIR)/,$(TARGETS))
# For dependencies and recursive makes.
BUILDTREE_MAKE = $(GAMMADIR)/make/$(OS_FAMILY)/makefiles/buildtree.make
BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make trace.make sa.make
BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make trace.make sa.make dtrace.make
BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \
ARCH=$(ARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) VARIANT=$(VARIANT)
@ -349,6 +349,16 @@ sa.make: $(BUILDTREE_MAKE)
echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \
) > $@
dtrace.make: $(BUILDTREE_MAKE)
@echo Creating $@ ...
$(QUIETLY) ( \
$(BUILDTREE_COMMENT); \
echo; \
echo include flags.make; \
echo; \
echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \
) > $@
FORCE:
.PHONY: all FORCE

View File

@ -36,6 +36,8 @@ dtraceCheck:
else
DtraceOutDir = $(GENERATED)/dtracefiles
JVM_DB = libjvm_db
LIBJVM_DB = libjvm_db.so
@ -326,6 +328,22 @@ $(DTRACE.o): $(DTRACE).d $(JVMOFFS).h $(JVMOFFS)Index.h $(DTraced_Files)
$(QUIETLY) if [ -f $(GENOFFS) ]; then touch $(GENOFFS); fi
$(QUIETLY) if [ -f $(JVMOFFS.o) ]; then touch $(JVMOFFS.o); fi
$(DtraceOutDir):
mkdir $(DtraceOutDir)
$(DtraceOutDir)/hotspot.h: $(DTRACE_SRCDIR)/hotspot.d | $(DtraceOutDir)
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hotspot.d
$(DtraceOutDir)/hotspot_jni.h: $(DTRACE_SRCDIR)/hotspot_jni.d | $(DtraceOutDir)
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hotspot_jni.d
$(DtraceOutDir)/hs_private.h: $(DTRACE_SRCDIR)/hs_private.d | $(DtraceOutDir)
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hs_private.d
dtrace_gen_headers: $(DtraceOutDir)/hotspot.h $(DtraceOutDir)/hotspot_jni.h $(DtraceOutDir)/hs_private.h
.PHONY: dtraceCheck
SYSTEM_DTRACE_H = /usr/include/dtrace.h

View File

@ -73,7 +73,7 @@ default: vm_build_preliminaries the_vm
@echo All done.
# This is an explicit dependency for the sake of parallel makes.
vm_build_preliminaries: checks $(Cached_plat) $(AD_Files_If_Required) jvmti_stuff trace_stuff sa_stuff
vm_build_preliminaries: checks $(Cached_plat) $(AD_Files_If_Required) jvmti_stuff trace_stuff sa_stuff dtrace_stuff
@# We need a null action here, so implicit rules don't get consulted.
$(Cached_plat): $(Plat_File)
@ -95,6 +95,9 @@ trace_stuff: jvmti_stuff $(Cached_plat) $(adjust-mflags)
sa_stuff:
@$(MAKE) -f sa.make $(MFLAGS-adjusted)
dtrace_stuff: $(Cached_plat) $(adjust-mflags)
@$(MAKE) -f dtrace.make dtrace_gen_headers $(MFLAGS-adjusted) GENERATED=$(GENERATED)
# and the VM: must use other makefile with dependencies included
# We have to go to great lengths to get control over the -jN argument

View File

@ -88,6 +88,7 @@ class Assembler : public AbstractAssembler {
orncc_op3 = 0x16,
xnorcc_op3 = 0x17,
addccc_op3 = 0x18,
aes4_op3 = 0x19,
umulcc_op3 = 0x1a,
smulcc_op3 = 0x1b,
subccc_op3 = 0x1c,
@ -121,6 +122,8 @@ class Assembler : public AbstractAssembler {
fpop1_op3 = 0x34,
fpop2_op3 = 0x35,
impdep1_op3 = 0x36,
aes3_op3 = 0x36,
flog3_op3 = 0x36,
impdep2_op3 = 0x37,
jmpl_op3 = 0x38,
rett_op3 = 0x39,
@ -172,41 +175,56 @@ class Assembler : public AbstractAssembler {
enum opfs {
// selected opfs
fmovs_opf = 0x01,
fmovd_opf = 0x02,
fmovs_opf = 0x01,
fmovd_opf = 0x02,
fnegs_opf = 0x05,
fnegd_opf = 0x06,
fnegs_opf = 0x05,
fnegd_opf = 0x06,
fadds_opf = 0x41,
faddd_opf = 0x42,
fsubs_opf = 0x45,
fsubd_opf = 0x46,
fadds_opf = 0x41,
faddd_opf = 0x42,
fsubs_opf = 0x45,
fsubd_opf = 0x46,
fmuls_opf = 0x49,
fmuld_opf = 0x4a,
fdivs_opf = 0x4d,
fdivd_opf = 0x4e,
fmuls_opf = 0x49,
fmuld_opf = 0x4a,
fdivs_opf = 0x4d,
fdivd_opf = 0x4e,
fcmps_opf = 0x51,
fcmpd_opf = 0x52,
fcmps_opf = 0x51,
fcmpd_opf = 0x52,
fstox_opf = 0x81,
fdtox_opf = 0x82,
fxtos_opf = 0x84,
fxtod_opf = 0x88,
fitos_opf = 0xc4,
fdtos_opf = 0xc6,
fitod_opf = 0xc8,
fstod_opf = 0xc9,
fstoi_opf = 0xd1,
fdtoi_opf = 0xd2,
fstox_opf = 0x81,
fdtox_opf = 0x82,
fxtos_opf = 0x84,
fxtod_opf = 0x88,
fitos_opf = 0xc4,
fdtos_opf = 0xc6,
fitod_opf = 0xc8,
fstod_opf = 0xc9,
fstoi_opf = 0xd1,
fdtoi_opf = 0xd2,
mdtox_opf = 0x110,
mstouw_opf = 0x111,
mstosw_opf = 0x113,
mxtod_opf = 0x118,
mwtos_opf = 0x119
mdtox_opf = 0x110,
mstouw_opf = 0x111,
mstosw_opf = 0x113,
mxtod_opf = 0x118,
mwtos_opf = 0x119,
aes_kexpand0_opf = 0x130,
aes_kexpand2_opf = 0x131
};
enum op5s {
aes_eround01_op5 = 0x00,
aes_eround23_op5 = 0x01,
aes_dround01_op5 = 0x02,
aes_dround23_op5 = 0x03,
aes_eround01_l_op5 = 0x04,
aes_eround23_l_op5 = 0x05,
aes_dround01_l_op5 = 0x06,
aes_dround23_l_op5 = 0x07,
aes_kexpand1_op5 = 0x08
};
enum RCondition { rc_z = 1, rc_lez = 2, rc_lz = 3, rc_nz = 5, rc_gz = 6, rc_gez = 7, rc_last = rc_gez };
@ -427,6 +445,7 @@ class Assembler : public AbstractAssembler {
static int immed( bool i) { return u_field(i ? 1 : 0, 13, 13); }
static int opf_low6( int w) { return u_field(w, 10, 5); }
static int opf_low5( int w) { return u_field(w, 9, 5); }
static int op5( int x) { return u_field(x, 8, 5); }
static int trapcc( CC cc) { return u_field(cc, 12, 11); }
static int sx( int i) { return u_field(i, 12, 12); } // shift x=1 means 64-bit
static int opf( int x) { return u_field(x, 13, 5); }
@ -451,6 +470,7 @@ class Assembler : public AbstractAssembler {
static int fd( FloatRegister r, FloatRegisterImpl::Width fwa) { return u_field(r->encoding(fwa), 29, 25); };
static int fs1(FloatRegister r, FloatRegisterImpl::Width fwa) { return u_field(r->encoding(fwa), 18, 14); };
static int fs2(FloatRegister r, FloatRegisterImpl::Width fwa) { return u_field(r->encoding(fwa), 4, 0); };
static int fs3(FloatRegister r, FloatRegisterImpl::Width fwa) { return u_field(r->encoding(fwa), 13, 9); };
// some float instructions use this encoding on the op3 field
static int alt_op3(int op, FloatRegisterImpl::Width w) {
@ -559,6 +579,12 @@ class Assembler : public AbstractAssembler {
return x & ((1 << 10) - 1);
}
// AES crypto instructions supported only on certain processors
static void aes_only() { assert( VM_Version::has_aes(), "This instruction only works on SPARC with AES instructions support"); }
// instruction only in VIS1
static void vis1_only() { assert( VM_Version::has_vis1(), "This instruction only works on SPARC with VIS1"); }
// instruction only in VIS3
static void vis3_only() { assert( VM_Version::has_vis3(), "This instruction only works on SPARC with VIS3"); }
@ -682,6 +708,24 @@ public:
void addccc( Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(addc_op3 | cc_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
// 4-operand AES instructions
void aes_eround01( FloatRegister s1, FloatRegister s2, FloatRegister s3, FloatRegister d ) { aes_only(); emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::D) | op3(aes4_op3) | fs1(s1, FloatRegisterImpl::D) | fs3(s3, FloatRegisterImpl::D) | op5(aes_eround01_op5) | fs2(s2, FloatRegisterImpl::D) ); }
void aes_eround23( FloatRegister s1, FloatRegister s2, FloatRegister s3, FloatRegister d ) { aes_only(); emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::D) | op3(aes4_op3) | fs1(s1, FloatRegisterImpl::D) | fs3(s3, FloatRegisterImpl::D) | op5(aes_eround23_op5) | fs2(s2, FloatRegisterImpl::D) ); }
void aes_dround01( FloatRegister s1, FloatRegister s2, FloatRegister s3, FloatRegister d ) { aes_only(); emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::D) | op3(aes4_op3) | fs1(s1, FloatRegisterImpl::D) | fs3(s3, FloatRegisterImpl::D) | op5(aes_dround01_op5) | fs2(s2, FloatRegisterImpl::D) ); }
void aes_dround23( FloatRegister s1, FloatRegister s2, FloatRegister s3, FloatRegister d ) { aes_only(); emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::D) | op3(aes4_op3) | fs1(s1, FloatRegisterImpl::D) | fs3(s3, FloatRegisterImpl::D) | op5(aes_dround23_op5) | fs2(s2, FloatRegisterImpl::D) ); }
void aes_eround01_l( FloatRegister s1, FloatRegister s2, FloatRegister s3, FloatRegister d ) { aes_only(); emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::D) | op3(aes4_op3) | fs1(s1, FloatRegisterImpl::D) | fs3(s3, FloatRegisterImpl::D) | op5(aes_eround01_l_op5) | fs2(s2, FloatRegisterImpl::D) ); }
void aes_eround23_l( FloatRegister s1, FloatRegister s2, FloatRegister s3, FloatRegister d ) { aes_only(); emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::D) | op3(aes4_op3) | fs1(s1, FloatRegisterImpl::D) | fs3(s3, FloatRegisterImpl::D) | op5(aes_eround23_l_op5) | fs2(s2, FloatRegisterImpl::D) ); }
void aes_dround01_l( FloatRegister s1, FloatRegister s2, FloatRegister s3, FloatRegister d ) { aes_only(); emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::D) | op3(aes4_op3) | fs1(s1, FloatRegisterImpl::D) | fs3(s3, FloatRegisterImpl::D) | op5(aes_dround01_l_op5) | fs2(s2, FloatRegisterImpl::D) ); }
void aes_dround23_l( FloatRegister s1, FloatRegister s2, FloatRegister s3, FloatRegister d ) { aes_only(); emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::D) | op3(aes4_op3) | fs1(s1, FloatRegisterImpl::D) | fs3(s3, FloatRegisterImpl::D) | op5(aes_dround23_l_op5) | fs2(s2, FloatRegisterImpl::D) ); }
void aes_kexpand1( FloatRegister s1, FloatRegister s2, int imm5a, FloatRegister d ) { aes_only(); emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::D) | op3(aes4_op3) | fs1(s1, FloatRegisterImpl::D) | u_field(imm5a, 13, 9) | op5(aes_kexpand1_op5) | fs2(s2, FloatRegisterImpl::D) ); }
// 3-operand AES instructions
void aes_kexpand0( FloatRegister s1, FloatRegister s2, FloatRegister d ) { aes_only(); emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::D) | op3(aes3_op3) | fs1(s1, FloatRegisterImpl::D) | opf(aes_kexpand0_opf) | fs2(s2, FloatRegisterImpl::D) ); }
void aes_kexpand2( FloatRegister s1, FloatRegister s2, FloatRegister d ) { aes_only(); emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::D) | op3(aes3_op3) | fs1(s1, FloatRegisterImpl::D) | opf(aes_kexpand2_opf) | fs2(s2, FloatRegisterImpl::D) ); }
// pp 136
inline void bpr(RCondition c, bool a, Predict p, Register s1, address d, relocInfo::relocType rt = relocInfo::none);
@ -784,6 +828,10 @@ public:
void fmul( FloatRegisterImpl::Width sw, FloatRegisterImpl::Width dw, FloatRegister s1, FloatRegister s2, FloatRegister d ) { emit_int32( op(arith_op) | fd(d, dw) | op3(fpop1_op3) | fs1(s1, sw) | opf(0x60 + sw + dw*4) | fs2(s2, sw)); }
void fdiv( FloatRegisterImpl::Width w, FloatRegister s1, FloatRegister s2, FloatRegister d ) { emit_int32( op(arith_op) | fd(d, w) | op3(fpop1_op3) | fs1(s1, w) | opf(0x4c + w) | fs2(s2, w)); }
// FXORs/FXORd instructions
void fxor( FloatRegisterImpl::Width w, FloatRegister s1, FloatRegister s2, FloatRegister d ) { vis1_only(); emit_int32( op(arith_op) | fd(d, w) | op3(flog3_op3) | fs1(s1, w) | opf(0x6E - w) | fs2(s2, w)); }
// pp 164
void fsqrt( FloatRegisterImpl::Width w, FloatRegister s, FloatRegister d ) { emit_int32( op(arith_op) | fd(d, w) | op3(fpop1_op3) | opf(0x28 + w) | fs2(s, w)); }

View File

@ -1315,7 +1315,7 @@ void LIR_Assembler::const2reg(LIR_Opr src, LIR_Opr dest, LIR_PatchCode patch_cod
}
Address LIR_Assembler::as_Address(LIR_Address* addr) {
Register reg = addr->base()->as_register();
Register reg = addr->base()->as_pointer_register();
LIR_Opr index = addr->index();
if (index->is_illegal()) {
return Address(reg, addr->disp());
@ -3101,7 +3101,145 @@ void LIR_Assembler::emit_profile_call(LIR_OpProfileCall* op) {
}
void LIR_Assembler::emit_profile_type(LIR_OpProfileType* op) {
fatal("Type profiling not implemented on this platform");
Register obj = op->obj()->as_register();
Register tmp1 = op->tmp()->as_pointer_register();
Register tmp2 = G1;
Address mdo_addr = as_Address(op->mdp()->as_address_ptr());
ciKlass* exact_klass = op->exact_klass();
intptr_t current_klass = op->current_klass();
bool not_null = op->not_null();
bool no_conflict = op->no_conflict();
Label update, next, none;
bool do_null = !not_null;
bool exact_klass_set = exact_klass != NULL && ciTypeEntries::valid_ciklass(current_klass) == exact_klass;
bool do_update = !TypeEntries::is_type_unknown(current_klass) && !exact_klass_set;
assert(do_null || do_update, "why are we here?");
assert(!TypeEntries::was_null_seen(current_klass) || do_update, "why are we here?");
__ verify_oop(obj);
if (tmp1 != obj) {
__ mov(obj, tmp1);
}
if (do_null) {
__ br_notnull_short(tmp1, Assembler::pt, update);
if (!TypeEntries::was_null_seen(current_klass)) {
__ ld_ptr(mdo_addr, tmp1);
__ or3(tmp1, TypeEntries::null_seen, tmp1);
__ st_ptr(tmp1, mdo_addr);
}
if (do_update) {
__ ba(next);
__ delayed()->nop();
}
#ifdef ASSERT
} else {
__ br_notnull_short(tmp1, Assembler::pt, update);
__ stop("unexpect null obj");
#endif
}
__ bind(update);
if (do_update) {
#ifdef ASSERT
if (exact_klass != NULL) {
Label ok;
__ load_klass(tmp1, tmp1);
metadata2reg(exact_klass->constant_encoding(), tmp2);
__ cmp_and_br_short(tmp1, tmp2, Assembler::equal, Assembler::pt, ok);
__ stop("exact klass and actual klass differ");
__ bind(ok);
}
#endif
Label do_update;
__ ld_ptr(mdo_addr, tmp2);
if (!no_conflict) {
if (exact_klass == NULL || TypeEntries::is_type_none(current_klass)) {
if (exact_klass != NULL) {
metadata2reg(exact_klass->constant_encoding(), tmp1);
} else {
__ load_klass(tmp1, tmp1);
}
__ xor3(tmp1, tmp2, tmp1);
__ btst(TypeEntries::type_klass_mask, tmp1);
// klass seen before, nothing to do. The unknown bit may have been
// set already but no need to check.
__ brx(Assembler::zero, false, Assembler::pt, next);
__ delayed()->
btst(TypeEntries::type_unknown, tmp1);
// already unknown. Nothing to do anymore.
__ brx(Assembler::notZero, false, Assembler::pt, next);
if (TypeEntries::is_type_none(current_klass)) {
__ delayed()->btst(TypeEntries::type_mask, tmp2);
__ brx(Assembler::zero, true, Assembler::pt, do_update);
// first time here. Set profile type.
__ delayed()->or3(tmp2, tmp1, tmp2);
} else {
__ delayed()->nop();
}
} else {
assert(ciTypeEntries::valid_ciklass(current_klass) != NULL &&
ciTypeEntries::valid_ciklass(current_klass) != exact_klass, "conflict only");
__ btst(TypeEntries::type_unknown, tmp2);
// already unknown. Nothing to do anymore.
__ brx(Assembler::notZero, false, Assembler::pt, next);
__ delayed()->nop();
}
// different than before. Cannot keep accurate profile.
__ or3(tmp2, TypeEntries::type_unknown, tmp2);
} else {
// There's a single possible klass at this profile point
assert(exact_klass != NULL, "should be");
if (TypeEntries::is_type_none(current_klass)) {
metadata2reg(exact_klass->constant_encoding(), tmp1);
__ xor3(tmp1, tmp2, tmp1);
__ btst(TypeEntries::type_klass_mask, tmp1);
__ brx(Assembler::zero, false, Assembler::pt, next);
#ifdef ASSERT
{
Label ok;
__ delayed()->btst(TypeEntries::type_mask, tmp2);
__ brx(Assembler::zero, true, Assembler::pt, ok);
__ delayed()->nop();
__ stop("unexpected profiling mismatch");
__ bind(ok);
}
// first time here. Set profile type.
__ or3(tmp2, tmp1, tmp2);
#else
// first time here. Set profile type.
__ delayed()->or3(tmp2, tmp1, tmp2);
#endif
} else {
assert(ciTypeEntries::valid_ciklass(current_klass) != NULL &&
ciTypeEntries::valid_ciklass(current_klass) != exact_klass, "inconsistent");
// already unknown. Nothing to do anymore.
__ btst(TypeEntries::type_unknown, tmp2);
__ brx(Assembler::notZero, false, Assembler::pt, next);
__ delayed()->or3(tmp2, TypeEntries::type_unknown, tmp2);
}
}
__ bind(do_update);
__ st_ptr(tmp2, mdo_addr);
__ bind(next);
}
}
void LIR_Assembler::align_backward_branch_target() {
@ -3321,9 +3459,14 @@ void LIR_Assembler::unpack64(LIR_Opr src, LIR_Opr dst) {
void LIR_Assembler::leal(LIR_Opr addr_opr, LIR_Opr dest) {
LIR_Address* addr = addr_opr->as_address_ptr();
assert(addr->index()->is_illegal() && addr->scale() == LIR_Address::times_1 && Assembler::is_simm13(addr->disp()), "can't handle complex addresses yet");
assert(addr->index()->is_illegal() && addr->scale() == LIR_Address::times_1, "can't handle complex addresses yet");
__ add(addr->base()->as_pointer_register(), addr->disp(), dest->as_pointer_register());
if (Assembler::is_simm13(addr->disp())) {
__ add(addr->base()->as_pointer_register(), addr->disp(), dest->as_pointer_register());
} else {
__ set(addr->disp(), G3_scratch);
__ add(addr->base()->as_pointer_register(), G3_scratch, dest->as_pointer_register());
}
}

View File

@ -1892,6 +1892,220 @@ void InterpreterMacroAssembler::profile_switch_case(Register index,
}
}
void InterpreterMacroAssembler::profile_obj_type(Register obj, const Address& mdo_addr, Register tmp) {
Label not_null, do_nothing, do_update;
assert_different_registers(obj, mdo_addr.base(), tmp);
verify_oop(obj);
ld_ptr(mdo_addr, tmp);
br_notnull_short(obj, pt, not_null);
or3(tmp, TypeEntries::null_seen, tmp);
ba_short(do_update);
bind(not_null);
load_klass(obj, obj);
xor3(obj, tmp, obj);
btst(TypeEntries::type_klass_mask, obj);
// klass seen before, nothing to do. The unknown bit may have been
// set already but no need to check.
brx(zero, false, pt, do_nothing);
delayed()->
btst(TypeEntries::type_unknown, obj);
// already unknown. Nothing to do anymore.
brx(notZero, false, pt, do_nothing);
delayed()->
btst(TypeEntries::type_mask, tmp);
brx(zero, true, pt, do_update);
// first time here. Set profile type.
delayed()->or3(tmp, obj, tmp);
// different than before. Cannot keep accurate profile.
or3(tmp, TypeEntries::type_unknown, tmp);
bind(do_update);
// update profile
st_ptr(tmp, mdo_addr);
bind(do_nothing);
}
void InterpreterMacroAssembler::profile_arguments_type(Register callee, Register tmp1, Register tmp2, bool is_virtual) {
if (!ProfileInterpreter) {
return;
}
assert_different_registers(callee, tmp1, tmp2, ImethodDataPtr);
if (MethodData::profile_arguments() || MethodData::profile_return()) {
Label profile_continue;
test_method_data_pointer(profile_continue);
int off_to_start = is_virtual ? in_bytes(VirtualCallData::virtual_call_data_size()) : in_bytes(CounterData::counter_data_size());
ldub(ImethodDataPtr, in_bytes(DataLayout::tag_offset()) - off_to_start, tmp1);
cmp_and_br_short(tmp1, is_virtual ? DataLayout::virtual_call_type_data_tag : DataLayout::call_type_data_tag, notEqual, pn, profile_continue);
if (MethodData::profile_arguments()) {
Label done;
int off_to_args = in_bytes(TypeEntriesAtCall::args_data_offset());
add(ImethodDataPtr, off_to_args, ImethodDataPtr);
for (int i = 0; i < TypeProfileArgsLimit; i++) {
if (i > 0 || MethodData::profile_return()) {
// If return value type is profiled we may have no argument to profile
ld_ptr(ImethodDataPtr, in_bytes(TypeEntriesAtCall::cell_count_offset())-off_to_args, tmp1);
sub(tmp1, i*TypeStackSlotEntries::per_arg_count(), tmp1);
cmp_and_br_short(tmp1, TypeStackSlotEntries::per_arg_count(), less, pn, done);
}
ld_ptr(Address(callee, Method::const_offset()), tmp1);
lduh(Address(tmp1, ConstMethod::size_of_parameters_offset()), tmp1);
// stack offset o (zero based) from the start of the argument
// list, for n arguments translates into offset n - o - 1 from
// the end of the argument list. But there's an extra slot at
// the stop of the stack. So the offset is n - o from Lesp.
ld_ptr(ImethodDataPtr, in_bytes(TypeEntriesAtCall::stack_slot_offset(i))-off_to_args, tmp2);
sub(tmp1, tmp2, tmp1);
// Can't use MacroAssembler::argument_address() which needs Gargs to be set up
sll(tmp1, Interpreter::logStackElementSize, tmp1);
ld_ptr(Lesp, tmp1, tmp1);
Address mdo_arg_addr(ImethodDataPtr, in_bytes(TypeEntriesAtCall::argument_type_offset(i))-off_to_args);
profile_obj_type(tmp1, mdo_arg_addr, tmp2);
int to_add = in_bytes(TypeStackSlotEntries::per_arg_size());
add(ImethodDataPtr, to_add, ImethodDataPtr);
off_to_args += to_add;
}
if (MethodData::profile_return()) {
ld_ptr(ImethodDataPtr, in_bytes(TypeEntriesAtCall::cell_count_offset())-off_to_args, tmp1);
sub(tmp1, TypeProfileArgsLimit*TypeStackSlotEntries::per_arg_count(), tmp1);
}
bind(done);
if (MethodData::profile_return()) {
// We're right after the type profile for the last
// argument. tmp1 is the number of cells left in the
// CallTypeData/VirtualCallTypeData to reach its end. Non null
// if there's a return to profile.
assert(ReturnTypeEntry::static_cell_count() < TypeStackSlotEntries::per_arg_count(), "can't move past ret type");
sll(tmp1, exact_log2(DataLayout::cell_size), tmp1);
add(ImethodDataPtr, tmp1, ImethodDataPtr);
}
} else {
assert(MethodData::profile_return(), "either profile call args or call ret");
update_mdp_by_constant(in_bytes(ReturnTypeEntry::size()));
}
// mdp points right after the end of the
// CallTypeData/VirtualCallTypeData, right after the cells for the
// return value type if there's one.
bind(profile_continue);
}
}
void InterpreterMacroAssembler::profile_return_type(Register ret, Register tmp1, Register tmp2) {
assert_different_registers(ret, tmp1, tmp2);
if (ProfileInterpreter && MethodData::profile_return()) {
Label profile_continue, done;
test_method_data_pointer(profile_continue);
if (MethodData::profile_return_jsr292_only()) {
// If we don't profile all invoke bytecodes we must make sure
// it's a bytecode we indeed profile. We can't go back to the
// begining of the ProfileData we intend to update to check its
// type because we're right after it and we don't known its
// length.
Label do_profile;
ldub(Lbcp, 0, tmp1);
cmp_and_br_short(tmp1, Bytecodes::_invokedynamic, equal, pn, do_profile);
cmp(tmp1, Bytecodes::_invokehandle);
br(equal, false, pn, do_profile);
delayed()->ldub(Lmethod, Method::intrinsic_id_offset_in_bytes(), tmp1);
cmp_and_br_short(tmp1, vmIntrinsics::_compiledLambdaForm, notEqual, pt, profile_continue);
bind(do_profile);
}
Address mdo_ret_addr(ImethodDataPtr, -in_bytes(ReturnTypeEntry::size()));
mov(ret, tmp1);
profile_obj_type(tmp1, mdo_ret_addr, tmp2);
bind(profile_continue);
}
}
void InterpreterMacroAssembler::profile_parameters_type(Register tmp1, Register tmp2, Register tmp3, Register tmp4) {
if (ProfileInterpreter && MethodData::profile_parameters()) {
Label profile_continue, done;
test_method_data_pointer(profile_continue);
// Load the offset of the area within the MDO used for
// parameters. If it's negative we're not profiling any parameters.
lduw(ImethodDataPtr, in_bytes(MethodData::parameters_type_data_di_offset()) - in_bytes(MethodData::data_offset()), tmp1);
cmp_and_br_short(tmp1, 0, less, pn, profile_continue);
// Compute a pointer to the area for parameters from the offset
// and move the pointer to the slot for the last
// parameters. Collect profiling from last parameter down.
// mdo start + parameters offset + array length - 1
// Pointer to the parameter area in the MDO
Register mdp = tmp1;
add(ImethodDataPtr, tmp1, mdp);
// offset of the current profile entry to update
Register entry_offset = tmp2;
// entry_offset = array len in number of cells
ld_ptr(mdp, ArrayData::array_len_offset(), entry_offset);
int off_base = in_bytes(ParametersTypeData::stack_slot_offset(0));
assert(off_base % DataLayout::cell_size == 0, "should be a number of cells");
// entry_offset (number of cells) = array len - size of 1 entry + offset of the stack slot field
sub(entry_offset, TypeStackSlotEntries::per_arg_count() - (off_base / DataLayout::cell_size), entry_offset);
// entry_offset in bytes
sll(entry_offset, exact_log2(DataLayout::cell_size), entry_offset);
Label loop;
bind(loop);
// load offset on the stack from the slot for this parameter
ld_ptr(mdp, entry_offset, tmp3);
sll(tmp3,Interpreter::logStackElementSize, tmp3);
neg(tmp3);
// read the parameter from the local area
ld_ptr(Llocals, tmp3, tmp3);
// make entry_offset now point to the type field for this parameter
int type_base = in_bytes(ParametersTypeData::type_offset(0));
assert(type_base > off_base, "unexpected");
add(entry_offset, type_base - off_base, entry_offset);
// profile the parameter
Address arg_type(mdp, entry_offset);
profile_obj_type(tmp3, arg_type, tmp4);
// go to next parameter
sub(entry_offset, TypeStackSlotEntries::per_arg_count() * DataLayout::cell_size + (type_base - off_base), entry_offset);
cmp_and_br_short(entry_offset, off_base, greaterEqual, pt, loop);
bind(profile_continue);
}
}
// add a InterpMonitorElem to stack (see frame_sparc.hpp)
void InterpreterMacroAssembler::add_monitor_to_stack( bool stack_is_empty,

View File

@ -323,6 +323,11 @@ class InterpreterMacroAssembler: public MacroAssembler {
Register scratch2,
Register scratch3);
void profile_obj_type(Register obj, const Address& mdo_addr, Register tmp);
void profile_arguments_type(Register callee, Register tmp1, Register tmp2, bool is_virtual);
void profile_return_type(Register ret, Register tmp1, Register tmp2);
void profile_parameters_type(Register tmp1, Register tmp2, Register tmp3, Register tmp4);
// Debugging
void interp_verify_oop(Register reg, TosState state, const char * file, int line); // only if +VerifyOops && state == atos
void verify_oop_or_return_address(Register reg, Register rtmp); // for astore

View File

@ -1848,6 +1848,12 @@ const bool Matcher::misaligned_vectors_ok() {
return false;
}
// Current (2013) SPARC platforms need to read original key
// to construct decryption expanded key
const bool Matcher::pass_original_key_for_aes() {
return true;
}
// USII supports fxtof through the whole range of number, USIII doesn't
const bool Matcher::convL2FSupported(void) {
return VM_Version::has_fast_fxtof();
@ -3355,8 +3361,8 @@ operand immI16() %{
interface(CONST_INTER);
%}
// Unsigned (positive) Integer Immediate: 13-bit
operand immU13() %{
// Unsigned Integer Immediate: 12-bit (non-negative that fits in simm13)
operand immU12() %{
predicate((0 <= n->get_int()) && Assembler::is_simm13(n->get_int()));
match(ConI);
op_cost(0);
@ -3392,6 +3398,17 @@ operand immI5() %{
interface(CONST_INTER);
%}
// Int Immediate non-negative
operand immU31()
%{
predicate(n->get_int() >= 0);
match(ConI);
op_cost(0);
format %{ %}
interface(CONST_INTER);
%}
// Integer Immediate: 0-bit
operand immI0() %{
predicate(n->get_int() == 0);
@ -5720,7 +5737,6 @@ instruct loadUS2L_immI16(iRegL dst, memory mem, immI16 mask, iRegL tmp) %{
effect(TEMP dst, TEMP tmp);
ins_cost(MEMORY_REF_COST + 2*DEFAULT_COST);
size((3+1)*4); // set may use two instructions.
format %{ "LDUH $mem,$dst\t! ushort/char & 16-bit mask -> long\n\t"
"SET $mask,$tmp\n\t"
"AND $dst,$tmp,$dst" %}
@ -5842,13 +5858,13 @@ instruct loadI2L_immI_65535(iRegL dst, indOffset13m7 mem, immI_65535 mask) %{
ins_pipe(iload_mem);
%}
// Load Integer with a 13-bit mask into a Long Register
instruct loadI2L_immI13(iRegL dst, memory mem, immI13 mask) %{
// Load Integer with a 12-bit mask into a Long Register
instruct loadI2L_immU12(iRegL dst, memory mem, immU12 mask) %{
match(Set dst (ConvI2L (AndI (LoadI mem) mask)));
ins_cost(MEMORY_REF_COST + DEFAULT_COST);
size(2*4);
format %{ "LDUW $mem,$dst\t! int & 13-bit mask -> long\n\t"
format %{ "LDUW $mem,$dst\t! int & 12-bit mask -> long\n\t"
"AND $dst,$mask,$dst" %}
ins_encode %{
Register Rdst = $dst$$Register;
@ -5858,14 +5874,13 @@ instruct loadI2L_immI13(iRegL dst, memory mem, immI13 mask) %{
ins_pipe(iload_mem);
%}
// Load Integer with a 32-bit mask into a Long Register
instruct loadI2L_immI(iRegL dst, memory mem, immI mask, iRegL tmp) %{
// Load Integer with a 31-bit mask into a Long Register
instruct loadI2L_immU31(iRegL dst, memory mem, immU31 mask, iRegL tmp) %{
match(Set dst (ConvI2L (AndI (LoadI mem) mask)));
effect(TEMP dst, TEMP tmp);
ins_cost(MEMORY_REF_COST + 2*DEFAULT_COST);
size((3+1)*4); // set may use two instructions.
format %{ "LDUW $mem,$dst\t! int & 32-bit mask -> long\n\t"
format %{ "LDUW $mem,$dst\t! int & 31-bit mask -> long\n\t"
"SET $mask,$tmp\n\t"
"AND $dst,$tmp,$dst" %}
ins_encode %{
@ -8960,7 +8975,7 @@ instruct testL_reg_con(flagsRegL xcc, iRegL op1, immL13 con, immL0 zero) %{
ins_pipe(ialu_cconly_reg_reg);
%}
instruct compU_iReg_imm13(flagsRegU icc, iRegI op1, immU13 op2 ) %{
instruct compU_iReg_imm13(flagsRegU icc, iRegI op1, immU12 op2 ) %{
match(Set icc (CmpU op1 op2));
size(4);

View File

@ -3304,6 +3304,775 @@ class StubGenerator: public StubCodeGenerator {
}
}
address generate_aescrypt_encryptBlock() {
__ align(CodeEntryAlignment);
StubCodeMark mark(this, "StubRoutines", "aesencryptBlock");
Label L_doLast128bit, L_storeOutput;
address start = __ pc();
Register from = O0; // source byte array
Register to = O1; // destination byte array
Register key = O2; // expanded key array
const Register keylen = O4; //reg for storing expanded key array length
// read expanded key length
__ ldsw(Address(key, arrayOopDesc::length_offset_in_bytes() - arrayOopDesc::base_offset_in_bytes(T_INT)), keylen, 0);
// load input into F54-F56; F30-F31 used as temp
__ ldf(FloatRegisterImpl::S, from, 0, F30);
__ ldf(FloatRegisterImpl::S, from, 4, F31);
__ fmov(FloatRegisterImpl::D, F30, F54);
__ ldf(FloatRegisterImpl::S, from, 8, F30);
__ ldf(FloatRegisterImpl::S, from, 12, F31);
__ fmov(FloatRegisterImpl::D, F30, F56);
// load expanded key
for ( int i = 0; i <= 38; i += 2 ) {
__ ldf(FloatRegisterImpl::D, key, i*4, as_FloatRegister(i));
}
// perform cipher transformation
__ fxor(FloatRegisterImpl::D, F0, F54, F54);
__ fxor(FloatRegisterImpl::D, F2, F56, F56);
// rounds 1 through 8
for ( int i = 4; i <= 28; i += 8 ) {
__ aes_eround01(as_FloatRegister(i), F54, F56, F58);
__ aes_eround23(as_FloatRegister(i+2), F54, F56, F60);
__ aes_eround01(as_FloatRegister(i+4), F58, F60, F54);
__ aes_eround23(as_FloatRegister(i+6), F58, F60, F56);
}
__ aes_eround01(F36, F54, F56, F58); //round 9
__ aes_eround23(F38, F54, F56, F60);
// 128-bit original key size
__ cmp_and_brx_short(keylen, 44, Assembler::equal, Assembler::pt, L_doLast128bit);
for ( int i = 40; i <= 50; i += 2 ) {
__ ldf(FloatRegisterImpl::D, key, i*4, as_FloatRegister(i) );
}
__ aes_eround01(F40, F58, F60, F54); //round 10
__ aes_eround23(F42, F58, F60, F56);
__ aes_eround01(F44, F54, F56, F58); //round 11
__ aes_eround23(F46, F54, F56, F60);
// 192-bit original key size
__ cmp_and_brx_short(keylen, 52, Assembler::equal, Assembler::pt, L_storeOutput);
__ ldf(FloatRegisterImpl::D, key, 208, F52);
__ aes_eround01(F48, F58, F60, F54); //round 12
__ aes_eround23(F50, F58, F60, F56);
__ ldf(FloatRegisterImpl::D, key, 216, F46);
__ ldf(FloatRegisterImpl::D, key, 224, F48);
__ ldf(FloatRegisterImpl::D, key, 232, F50);
__ aes_eround01(F52, F54, F56, F58); //round 13
__ aes_eround23(F46, F54, F56, F60);
__ br(Assembler::always, false, Assembler::pt, L_storeOutput);
__ delayed()->nop();
__ BIND(L_doLast128bit);
__ ldf(FloatRegisterImpl::D, key, 160, F48);
__ ldf(FloatRegisterImpl::D, key, 168, F50);
__ BIND(L_storeOutput);
// perform last round of encryption common for all key sizes
__ aes_eround01_l(F48, F58, F60, F54); //last round
__ aes_eround23_l(F50, F58, F60, F56);
// store output into the destination array, F0-F1 used as temp
__ fmov(FloatRegisterImpl::D, F54, F0);
__ stf(FloatRegisterImpl::S, F0, to, 0);
__ stf(FloatRegisterImpl::S, F1, to, 4);
__ fmov(FloatRegisterImpl::D, F56, F0);
__ stf(FloatRegisterImpl::S, F0, to, 8);
__ retl();
__ delayed()->stf(FloatRegisterImpl::S, F1, to, 12);
return start;
}
address generate_aescrypt_decryptBlock() {
__ align(CodeEntryAlignment);
StubCodeMark mark(this, "StubRoutines", "aesdecryptBlock");
address start = __ pc();
Label L_expand192bit, L_expand256bit, L_common_transform;
Register from = O0; // source byte array
Register to = O1; // destination byte array
Register key = O2; // expanded key array
Register original_key = O3; // original key array only required during decryption
const Register keylen = O4; // reg for storing expanded key array length
// read expanded key array length
__ ldsw(Address(key, arrayOopDesc::length_offset_in_bytes() - arrayOopDesc::base_offset_in_bytes(T_INT)), keylen, 0);
// load input into F52-F54; F30,F31 used as temp
__ ldf(FloatRegisterImpl::S, from, 0, F30);
__ ldf(FloatRegisterImpl::S, from, 4, F31);
__ fmov(FloatRegisterImpl::D, F30, F52);
__ ldf(FloatRegisterImpl::S, from, 8, F30);
__ ldf(FloatRegisterImpl::S, from, 12, F31);
__ fmov(FloatRegisterImpl::D, F30, F54);
// load original key from SunJCE expanded decryption key
for ( int i = 0; i <= 3; i++ ) {
__ ldf(FloatRegisterImpl::S, original_key, i*4, as_FloatRegister(i));
}
// 256-bit original key size
__ cmp_and_brx_short(keylen, 60, Assembler::equal, Assembler::pn, L_expand256bit);
// 192-bit original key size
__ cmp_and_brx_short(keylen, 52, Assembler::equal, Assembler::pn, L_expand192bit);
// 128-bit original key size
// perform key expansion since SunJCE decryption-key expansion is not compatible with SPARC crypto instructions
for ( int i = 0; i <= 36; i += 4 ) {
__ aes_kexpand1(as_FloatRegister(i), as_FloatRegister(i+2), i/4, as_FloatRegister(i+4));
__ aes_kexpand2(as_FloatRegister(i+2), as_FloatRegister(i+4), as_FloatRegister(i+6));
}
// perform 128-bit key specific inverse cipher transformation
__ fxor(FloatRegisterImpl::D, F42, F54, F54);
__ fxor(FloatRegisterImpl::D, F40, F52, F52);
__ br(Assembler::always, false, Assembler::pt, L_common_transform);
__ delayed()->nop();
__ BIND(L_expand192bit);
// start loading rest of the 192-bit key
__ ldf(FloatRegisterImpl::S, original_key, 16, F4);
__ ldf(FloatRegisterImpl::S, original_key, 20, F5);
// perform key expansion since SunJCE decryption-key expansion is not compatible with SPARC crypto instructions
for ( int i = 0; i <= 36; i += 6 ) {
__ aes_kexpand1(as_FloatRegister(i), as_FloatRegister(i+4), i/6, as_FloatRegister(i+6));
__ aes_kexpand2(as_FloatRegister(i+2), as_FloatRegister(i+6), as_FloatRegister(i+8));
__ aes_kexpand2(as_FloatRegister(i+4), as_FloatRegister(i+8), as_FloatRegister(i+10));
}
__ aes_kexpand1(F42, F46, 7, F48);
__ aes_kexpand2(F44, F48, F50);
// perform 192-bit key specific inverse cipher transformation
__ fxor(FloatRegisterImpl::D, F50, F54, F54);
__ fxor(FloatRegisterImpl::D, F48, F52, F52);
__ aes_dround23(F46, F52, F54, F58);
__ aes_dround01(F44, F52, F54, F56);
__ aes_dround23(F42, F56, F58, F54);
__ aes_dround01(F40, F56, F58, F52);
__ br(Assembler::always, false, Assembler::pt, L_common_transform);
__ delayed()->nop();
__ BIND(L_expand256bit);
// load rest of the 256-bit key
for ( int i = 4; i <= 7; i++ ) {
__ ldf(FloatRegisterImpl::S, original_key, i*4, as_FloatRegister(i));
}
// perform key expansion since SunJCE decryption-key expansion is not compatible with SPARC crypto instructions
for ( int i = 0; i <= 40; i += 8 ) {
__ aes_kexpand1(as_FloatRegister(i), as_FloatRegister(i+6), i/8, as_FloatRegister(i+8));
__ aes_kexpand2(as_FloatRegister(i+2), as_FloatRegister(i+8), as_FloatRegister(i+10));
__ aes_kexpand0(as_FloatRegister(i+4), as_FloatRegister(i+10), as_FloatRegister(i+12));
__ aes_kexpand2(as_FloatRegister(i+6), as_FloatRegister(i+12), as_FloatRegister(i+14));
}
__ aes_kexpand1(F48, F54, 6, F56);
__ aes_kexpand2(F50, F56, F58);
for ( int i = 0; i <= 6; i += 2 ) {
__ fmov(FloatRegisterImpl::D, as_FloatRegister(58-i), as_FloatRegister(i));
}
// load input into F52-F54
__ ldf(FloatRegisterImpl::D, from, 0, F52);
__ ldf(FloatRegisterImpl::D, from, 8, F54);
// perform 256-bit key specific inverse cipher transformation
__ fxor(FloatRegisterImpl::D, F0, F54, F54);
__ fxor(FloatRegisterImpl::D, F2, F52, F52);
__ aes_dround23(F4, F52, F54, F58);
__ aes_dround01(F6, F52, F54, F56);
__ aes_dround23(F50, F56, F58, F54);
__ aes_dround01(F48, F56, F58, F52);
__ aes_dround23(F46, F52, F54, F58);
__ aes_dround01(F44, F52, F54, F56);
__ aes_dround23(F42, F56, F58, F54);
__ aes_dround01(F40, F56, F58, F52);
for ( int i = 0; i <= 7; i++ ) {
__ ldf(FloatRegisterImpl::S, original_key, i*4, as_FloatRegister(i));
}
// perform inverse cipher transformations common for all key sizes
__ BIND(L_common_transform);
for ( int i = 38; i >= 6; i -= 8 ) {
__ aes_dround23(as_FloatRegister(i), F52, F54, F58);
__ aes_dround01(as_FloatRegister(i-2), F52, F54, F56);
if ( i != 6) {
__ aes_dround23(as_FloatRegister(i-4), F56, F58, F54);
__ aes_dround01(as_FloatRegister(i-6), F56, F58, F52);
} else {
__ aes_dround23_l(as_FloatRegister(i-4), F56, F58, F54);
__ aes_dround01_l(as_FloatRegister(i-6), F56, F58, F52);
}
}
// store output to destination array, F0-F1 used as temp
__ fmov(FloatRegisterImpl::D, F52, F0);
__ stf(FloatRegisterImpl::S, F0, to, 0);
__ stf(FloatRegisterImpl::S, F1, to, 4);
__ fmov(FloatRegisterImpl::D, F54, F0);
__ stf(FloatRegisterImpl::S, F0, to, 8);
__ retl();
__ delayed()->stf(FloatRegisterImpl::S, F1, to, 12);
return start;
}
address generate_cipherBlockChaining_encryptAESCrypt() {
__ align(CodeEntryAlignment);
StubCodeMark mark(this, "StubRoutines", "cipherBlockChaining_encryptAESCrypt");
Label L_cbcenc128, L_cbcenc192, L_cbcenc256;
address start = __ pc();
Register from = O0; // source byte array
Register to = O1; // destination byte array
Register key = O2; // expanded key array
Register rvec = O3; // init vector
const Register len_reg = O4; // cipher length
const Register keylen = O5; // reg for storing expanded key array length
// save cipher len to return in the end
__ mov(len_reg, L1);
// read expanded key length
__ ldsw(Address(key, arrayOopDesc::length_offset_in_bytes() - arrayOopDesc::base_offset_in_bytes(T_INT)), keylen, 0);
// load init vector
__ ldf(FloatRegisterImpl::D, rvec, 0, F60);
__ ldf(FloatRegisterImpl::D, rvec, 8, F62);
__ ldx(key,0,G1);
__ ldx(key,8,G2);
// start loading expanded key
for ( int i = 0, j = 16; i <= 38; i += 2, j += 8 ) {
__ ldf(FloatRegisterImpl::D, key, j, as_FloatRegister(i));
}
// 128-bit original key size
__ cmp_and_brx_short(keylen, 44, Assembler::equal, Assembler::pt, L_cbcenc128);
for ( int i = 40, j = 176; i <= 46; i += 2, j += 8 ) {
__ ldf(FloatRegisterImpl::D, key, j, as_FloatRegister(i));
}
// 192-bit original key size
__ cmp_and_brx_short(keylen, 52, Assembler::equal, Assembler::pt, L_cbcenc192);
for ( int i = 48, j = 208; i <= 54; i += 2, j += 8 ) {
__ ldf(FloatRegisterImpl::D, key, j, as_FloatRegister(i));
}
// 256-bit original key size
__ br(Assembler::always, false, Assembler::pt, L_cbcenc256);
__ delayed()->nop();
__ align(OptoLoopAlignment);
__ BIND(L_cbcenc128);
__ ldx(from,0,G3);
__ ldx(from,8,G4);
__ xor3(G1,G3,G3);
__ xor3(G2,G4,G4);
__ movxtod(G3,F56);
__ movxtod(G4,F58);
__ fxor(FloatRegisterImpl::D, F60, F56, F60);
__ fxor(FloatRegisterImpl::D, F62, F58, F62);
// TEN_EROUNDS
for ( int i = 0; i <= 32; i += 8 ) {
__ aes_eround01(as_FloatRegister(i), F60, F62, F56);
__ aes_eround23(as_FloatRegister(i+2), F60, F62, F58);
if (i != 32 ) {
__ aes_eround01(as_FloatRegister(i+4), F56, F58, F60);
__ aes_eround23(as_FloatRegister(i+6), F56, F58, F62);
} else {
__ aes_eround01_l(as_FloatRegister(i+4), F56, F58, F60);
__ aes_eround23_l(as_FloatRegister(i+6), F56, F58, F62);
}
}
__ stf(FloatRegisterImpl::D, F60, to, 0);
__ stf(FloatRegisterImpl::D, F62, to, 8);
__ add(from, 16, from);
__ add(to, 16, to);
__ subcc(len_reg, 16, len_reg);
__ br(Assembler::notEqual, false, Assembler::pt, L_cbcenc128);
__ delayed()->nop();
__ stf(FloatRegisterImpl::D, F60, rvec, 0);
__ stf(FloatRegisterImpl::D, F62, rvec, 8);
__ retl();
__ delayed()->mov(L1, O0);
__ align(OptoLoopAlignment);
__ BIND(L_cbcenc192);
__ ldx(from,0,G3);
__ ldx(from,8,G4);
__ xor3(G1,G3,G3);
__ xor3(G2,G4,G4);
__ movxtod(G3,F56);
__ movxtod(G4,F58);
__ fxor(FloatRegisterImpl::D, F60, F56, F60);
__ fxor(FloatRegisterImpl::D, F62, F58, F62);
// TWELEVE_EROUNDS
for ( int i = 0; i <= 40; i += 8 ) {
__ aes_eround01(as_FloatRegister(i), F60, F62, F56);
__ aes_eround23(as_FloatRegister(i+2), F60, F62, F58);
if (i != 40 ) {
__ aes_eround01(as_FloatRegister(i+4), F56, F58, F60);
__ aes_eround23(as_FloatRegister(i+6), F56, F58, F62);
} else {
__ aes_eround01_l(as_FloatRegister(i+4), F56, F58, F60);
__ aes_eround23_l(as_FloatRegister(i+6), F56, F58, F62);
}
}
__ stf(FloatRegisterImpl::D, F60, to, 0);
__ stf(FloatRegisterImpl::D, F62, to, 8);
__ add(from, 16, from);
__ subcc(len_reg, 16, len_reg);
__ add(to, 16, to);
__ br(Assembler::notEqual, false, Assembler::pt, L_cbcenc192);
__ delayed()->nop();
__ stf(FloatRegisterImpl::D, F60, rvec, 0);
__ stf(FloatRegisterImpl::D, F62, rvec, 8);
__ retl();
__ delayed()->mov(L1, O0);
__ align(OptoLoopAlignment);
__ BIND(L_cbcenc256);
__ ldx(from,0,G3);
__ ldx(from,8,G4);
__ xor3(G1,G3,G3);
__ xor3(G2,G4,G4);
__ movxtod(G3,F56);
__ movxtod(G4,F58);
__ fxor(FloatRegisterImpl::D, F60, F56, F60);
__ fxor(FloatRegisterImpl::D, F62, F58, F62);
// FOURTEEN_EROUNDS
for ( int i = 0; i <= 48; i += 8 ) {
__ aes_eround01(as_FloatRegister(i), F60, F62, F56);
__ aes_eround23(as_FloatRegister(i+2), F60, F62, F58);
if (i != 48 ) {
__ aes_eround01(as_FloatRegister(i+4), F56, F58, F60);
__ aes_eround23(as_FloatRegister(i+6), F56, F58, F62);
} else {
__ aes_eround01_l(as_FloatRegister(i+4), F56, F58, F60);
__ aes_eround23_l(as_FloatRegister(i+6), F56, F58, F62);
}
}
__ stf(FloatRegisterImpl::D, F60, to, 0);
__ stf(FloatRegisterImpl::D, F62, to, 8);
__ add(from, 16, from);
__ subcc(len_reg, 16, len_reg);
__ add(to, 16, to);
__ br(Assembler::notEqual, false, Assembler::pt, L_cbcenc256);
__ delayed()->nop();
__ stf(FloatRegisterImpl::D, F60, rvec, 0);
__ stf(FloatRegisterImpl::D, F62, rvec, 8);
__ retl();
__ delayed()->mov(L1, O0);
return start;
}
address generate_cipherBlockChaining_decryptAESCrypt_Parallel() {
__ align(CodeEntryAlignment);
StubCodeMark mark(this, "StubRoutines", "cipherBlockChaining_decryptAESCrypt");
Label L_cbcdec_end, L_expand192bit, L_expand256bit, L_dec_first_block_start;
Label L_dec_first_block128, L_dec_first_block192, L_dec_next2_blocks128, L_dec_next2_blocks192, L_dec_next2_blocks256;
address start = __ pc();
Register from = I0; // source byte array
Register to = I1; // destination byte array
Register key = I2; // expanded key array
Register rvec = I3; // init vector
const Register len_reg = I4; // cipher length
const Register original_key = I5; // original key array only required during decryption
const Register keylen = L6; // reg for storing expanded key array length
// save cipher len before save_frame, to return in the end
__ mov(O4, L0);
__ save_frame(0); //args are read from I* registers since we save the frame in the beginning
// load original key from SunJCE expanded decryption key
for ( int i = 0; i <= 3; i++ ) {
__ ldf(FloatRegisterImpl::S, original_key, i*4, as_FloatRegister(i));
}
// load initial vector
__ ldx(rvec,0,L0);
__ ldx(rvec,8,L1);
// read expanded key array length
__ ldsw(Address(key, arrayOopDesc::length_offset_in_bytes() - arrayOopDesc::base_offset_in_bytes(T_INT)), keylen, 0);
// 256-bit original key size
__ cmp_and_brx_short(keylen, 60, Assembler::equal, Assembler::pn, L_expand256bit);
// 192-bit original key size
__ cmp_and_brx_short(keylen, 52, Assembler::equal, Assembler::pn, L_expand192bit);
// 128-bit original key size
// perform key expansion since SunJCE decryption-key expansion is not compatible with SPARC crypto instructions
for ( int i = 0; i <= 36; i += 4 ) {
__ aes_kexpand1(as_FloatRegister(i), as_FloatRegister(i+2), i/4, as_FloatRegister(i+4));
__ aes_kexpand2(as_FloatRegister(i+2), as_FloatRegister(i+4), as_FloatRegister(i+6));
}
// load expanded key[last-1] and key[last] elements
__ movdtox(F40,L2);
__ movdtox(F42,L3);
__ and3(len_reg, 16, L4);
__ br_null(L4, false, Assembler::pt, L_dec_next2_blocks128);
__ delayed()->nop();
__ br(Assembler::always, false, Assembler::pt, L_dec_first_block_start);
__ delayed()->nop();
__ BIND(L_expand192bit);
// load rest of the 192-bit key
__ ldf(FloatRegisterImpl::S, original_key, 16, F4);
__ ldf(FloatRegisterImpl::S, original_key, 20, F5);
// perform key expansion since SunJCE decryption-key expansion is not compatible with SPARC crypto instructions
for ( int i = 0; i <= 36; i += 6 ) {
__ aes_kexpand1(as_FloatRegister(i), as_FloatRegister(i+4), i/6, as_FloatRegister(i+6));
__ aes_kexpand2(as_FloatRegister(i+2), as_FloatRegister(i+6), as_FloatRegister(i+8));
__ aes_kexpand2(as_FloatRegister(i+4), as_FloatRegister(i+8), as_FloatRegister(i+10));
}
__ aes_kexpand1(F42, F46, 7, F48);
__ aes_kexpand2(F44, F48, F50);
// load expanded key[last-1] and key[last] elements
__ movdtox(F48,L2);
__ movdtox(F50,L3);
__ and3(len_reg, 16, L4);
__ br_null(L4, false, Assembler::pt, L_dec_next2_blocks192);
__ delayed()->nop();
__ br(Assembler::always, false, Assembler::pt, L_dec_first_block_start);
__ delayed()->nop();
__ BIND(L_expand256bit);
// load rest of the 256-bit key
for ( int i = 4; i <= 7; i++ ) {
__ ldf(FloatRegisterImpl::S, original_key, i*4, as_FloatRegister(i));
}
// perform key expansion since SunJCE decryption-key expansion is not compatible with SPARC crypto instructions
for ( int i = 0; i <= 40; i += 8 ) {
__ aes_kexpand1(as_FloatRegister(i), as_FloatRegister(i+6), i/8, as_FloatRegister(i+8));
__ aes_kexpand2(as_FloatRegister(i+2), as_FloatRegister(i+8), as_FloatRegister(i+10));
__ aes_kexpand0(as_FloatRegister(i+4), as_FloatRegister(i+10), as_FloatRegister(i+12));
__ aes_kexpand2(as_FloatRegister(i+6), as_FloatRegister(i+12), as_FloatRegister(i+14));
}
__ aes_kexpand1(F48, F54, 6, F56);
__ aes_kexpand2(F50, F56, F58);
// load expanded key[last-1] and key[last] elements
__ movdtox(F56,L2);
__ movdtox(F58,L3);
__ and3(len_reg, 16, L4);
__ br_null(L4, false, Assembler::pt, L_dec_next2_blocks256);
__ delayed()->nop();
__ BIND(L_dec_first_block_start);
__ ldx(from,0,L4);
__ ldx(from,8,L5);
__ xor3(L2,L4,G1);
__ movxtod(G1,F60);
__ xor3(L3,L5,G1);
__ movxtod(G1,F62);
// 128-bit original key size
__ cmp_and_brx_short(keylen, 44, Assembler::equal, Assembler::pn, L_dec_first_block128);
// 192-bit original key size
__ cmp_and_brx_short(keylen, 52, Assembler::equal, Assembler::pn, L_dec_first_block192);
__ aes_dround23(F54, F60, F62, F58);
__ aes_dround01(F52, F60, F62, F56);
__ aes_dround23(F50, F56, F58, F62);
__ aes_dround01(F48, F56, F58, F60);
__ BIND(L_dec_first_block192);
__ aes_dround23(F46, F60, F62, F58);
__ aes_dround01(F44, F60, F62, F56);
__ aes_dround23(F42, F56, F58, F62);
__ aes_dround01(F40, F56, F58, F60);
__ BIND(L_dec_first_block128);
for ( int i = 38; i >= 6; i -= 8 ) {
__ aes_dround23(as_FloatRegister(i), F60, F62, F58);
__ aes_dround01(as_FloatRegister(i-2), F60, F62, F56);
if ( i != 6) {
__ aes_dround23(as_FloatRegister(i-4), F56, F58, F62);
__ aes_dround01(as_FloatRegister(i-6), F56, F58, F60);
} else {
__ aes_dround23_l(as_FloatRegister(i-4), F56, F58, F62);
__ aes_dround01_l(as_FloatRegister(i-6), F56, F58, F60);
}
}
__ movxtod(L0,F56);
__ movxtod(L1,F58);
__ mov(L4,L0);
__ mov(L5,L1);
__ fxor(FloatRegisterImpl::D, F56, F60, F60);
__ fxor(FloatRegisterImpl::D, F58, F62, F62);
__ stf(FloatRegisterImpl::D, F60, to, 0);
__ stf(FloatRegisterImpl::D, F62, to, 8);
__ add(from, 16, from);
__ add(to, 16, to);
__ subcc(len_reg, 16, len_reg);
__ br(Assembler::equal, false, Assembler::pt, L_cbcdec_end);
__ delayed()->nop();
// 256-bit original key size
__ cmp_and_brx_short(keylen, 60, Assembler::equal, Assembler::pn, L_dec_next2_blocks256);
// 192-bit original key size
__ cmp_and_brx_short(keylen, 52, Assembler::equal, Assembler::pn, L_dec_next2_blocks192);
__ align(OptoLoopAlignment);
__ BIND(L_dec_next2_blocks128);
__ nop();
// F40:F42 used for first 16-bytes
__ ldx(from,0,G4);
__ ldx(from,8,G5);
__ xor3(L2,G4,G1);
__ movxtod(G1,F40);
__ xor3(L3,G5,G1);
__ movxtod(G1,F42);
// F60:F62 used for next 16-bytes
__ ldx(from,16,L4);
__ ldx(from,24,L5);
__ xor3(L2,L4,G1);
__ movxtod(G1,F60);
__ xor3(L3,L5,G1);
__ movxtod(G1,F62);
for ( int i = 38; i >= 6; i -= 8 ) {
__ aes_dround23(as_FloatRegister(i), F40, F42, F44);
__ aes_dround01(as_FloatRegister(i-2), F40, F42, F46);
__ aes_dround23(as_FloatRegister(i), F60, F62, F58);
__ aes_dround01(as_FloatRegister(i-2), F60, F62, F56);
if (i != 6 ) {
__ aes_dround23(as_FloatRegister(i-4), F46, F44, F42);
__ aes_dround01(as_FloatRegister(i-6), F46, F44, F40);
__ aes_dround23(as_FloatRegister(i-4), F56, F58, F62);
__ aes_dround01(as_FloatRegister(i-6), F56, F58, F60);
} else {
__ aes_dround23_l(as_FloatRegister(i-4), F46, F44, F42);
__ aes_dround01_l(as_FloatRegister(i-6), F46, F44, F40);
__ aes_dround23_l(as_FloatRegister(i-4), F56, F58, F62);
__ aes_dround01_l(as_FloatRegister(i-6), F56, F58, F60);
}
}
__ movxtod(L0,F46);
__ movxtod(L1,F44);
__ fxor(FloatRegisterImpl::D, F46, F40, F40);
__ fxor(FloatRegisterImpl::D, F44, F42, F42);
__ stf(FloatRegisterImpl::D, F40, to, 0);
__ stf(FloatRegisterImpl::D, F42, to, 8);
__ movxtod(G4,F56);
__ movxtod(G5,F58);
__ mov(L4,L0);
__ mov(L5,L1);
__ fxor(FloatRegisterImpl::D, F56, F60, F60);
__ fxor(FloatRegisterImpl::D, F58, F62, F62);
__ stf(FloatRegisterImpl::D, F60, to, 16);
__ stf(FloatRegisterImpl::D, F62, to, 24);
__ add(from, 32, from);
__ add(to, 32, to);
__ subcc(len_reg, 32, len_reg);
__ br(Assembler::notEqual, false, Assembler::pt, L_dec_next2_blocks128);
__ delayed()->nop();
__ br(Assembler::always, false, Assembler::pt, L_cbcdec_end);
__ delayed()->nop();
__ align(OptoLoopAlignment);
__ BIND(L_dec_next2_blocks192);
__ nop();
// F48:F50 used for first 16-bytes
__ ldx(from,0,G4);
__ ldx(from,8,G5);
__ xor3(L2,G4,G1);
__ movxtod(G1,F48);
__ xor3(L3,G5,G1);
__ movxtod(G1,F50);
// F60:F62 used for next 16-bytes
__ ldx(from,16,L4);
__ ldx(from,24,L5);
__ xor3(L2,L4,G1);
__ movxtod(G1,F60);
__ xor3(L3,L5,G1);
__ movxtod(G1,F62);
for ( int i = 46; i >= 6; i -= 8 ) {
__ aes_dround23(as_FloatRegister(i), F48, F50, F52);
__ aes_dround01(as_FloatRegister(i-2), F48, F50, F54);
__ aes_dround23(as_FloatRegister(i), F60, F62, F58);
__ aes_dround01(as_FloatRegister(i-2), F60, F62, F56);
if (i != 6 ) {
__ aes_dround23(as_FloatRegister(i-4), F54, F52, F50);
__ aes_dround01(as_FloatRegister(i-6), F54, F52, F48);
__ aes_dround23(as_FloatRegister(i-4), F56, F58, F62);
__ aes_dround01(as_FloatRegister(i-6), F56, F58, F60);
} else {
__ aes_dround23_l(as_FloatRegister(i-4), F54, F52, F50);
__ aes_dround01_l(as_FloatRegister(i-6), F54, F52, F48);
__ aes_dround23_l(as_FloatRegister(i-4), F56, F58, F62);
__ aes_dround01_l(as_FloatRegister(i-6), F56, F58, F60);
}
}
__ movxtod(L0,F54);
__ movxtod(L1,F52);
__ fxor(FloatRegisterImpl::D, F54, F48, F48);
__ fxor(FloatRegisterImpl::D, F52, F50, F50);
__ stf(FloatRegisterImpl::D, F48, to, 0);
__ stf(FloatRegisterImpl::D, F50, to, 8);
__ movxtod(G4,F56);
__ movxtod(G5,F58);
__ mov(L4,L0);
__ mov(L5,L1);
__ fxor(FloatRegisterImpl::D, F56, F60, F60);
__ fxor(FloatRegisterImpl::D, F58, F62, F62);
__ stf(FloatRegisterImpl::D, F60, to, 16);
__ stf(FloatRegisterImpl::D, F62, to, 24);
__ add(from, 32, from);
__ add(to, 32, to);
__ subcc(len_reg, 32, len_reg);
__ br(Assembler::notEqual, false, Assembler::pt, L_dec_next2_blocks192);
__ delayed()->nop();
__ br(Assembler::always, false, Assembler::pt, L_cbcdec_end);
__ delayed()->nop();
__ align(OptoLoopAlignment);
__ BIND(L_dec_next2_blocks256);
__ nop();
// F0:F2 used for first 16-bytes
__ ldx(from,0,G4);
__ ldx(from,8,G5);
__ xor3(L2,G4,G1);
__ movxtod(G1,F0);
__ xor3(L3,G5,G1);
__ movxtod(G1,F2);
// F60:F62 used for next 16-bytes
__ ldx(from,16,L4);
__ ldx(from,24,L5);
__ xor3(L2,L4,G1);
__ movxtod(G1,F60);
__ xor3(L3,L5,G1);
__ movxtod(G1,F62);
__ aes_dround23(F54, F0, F2, F4);
__ aes_dround01(F52, F0, F2, F6);
__ aes_dround23(F54, F60, F62, F58);
__ aes_dround01(F52, F60, F62, F56);
__ aes_dround23(F50, F6, F4, F2);
__ aes_dround01(F48, F6, F4, F0);
__ aes_dround23(F50, F56, F58, F62);
__ aes_dround01(F48, F56, F58, F60);
// save F48:F54 in temp registers
__ movdtox(F54,G2);
__ movdtox(F52,G3);
__ movdtox(F50,G6);
__ movdtox(F48,G1);
for ( int i = 46; i >= 14; i -= 8 ) {
__ aes_dround23(as_FloatRegister(i), F0, F2, F4);
__ aes_dround01(as_FloatRegister(i-2), F0, F2, F6);
__ aes_dround23(as_FloatRegister(i), F60, F62, F58);
__ aes_dround01(as_FloatRegister(i-2), F60, F62, F56);
__ aes_dround23(as_FloatRegister(i-4), F6, F4, F2);
__ aes_dround01(as_FloatRegister(i-6), F6, F4, F0);
__ aes_dround23(as_FloatRegister(i-4), F56, F58, F62);
__ aes_dround01(as_FloatRegister(i-6), F56, F58, F60);
}
// init F48:F54 with F0:F6 values (original key)
__ ldf(FloatRegisterImpl::D, original_key, 0, F48);
__ ldf(FloatRegisterImpl::D, original_key, 8, F50);
__ ldf(FloatRegisterImpl::D, original_key, 16, F52);
__ ldf(FloatRegisterImpl::D, original_key, 24, F54);
__ aes_dround23(F54, F0, F2, F4);
__ aes_dround01(F52, F0, F2, F6);
__ aes_dround23(F54, F60, F62, F58);
__ aes_dround01(F52, F60, F62, F56);
__ aes_dround23_l(F50, F6, F4, F2);
__ aes_dround01_l(F48, F6, F4, F0);
__ aes_dround23_l(F50, F56, F58, F62);
__ aes_dround01_l(F48, F56, F58, F60);
// re-init F48:F54 with their original values
__ movxtod(G2,F54);
__ movxtod(G3,F52);
__ movxtod(G6,F50);
__ movxtod(G1,F48);
__ movxtod(L0,F6);
__ movxtod(L1,F4);
__ fxor(FloatRegisterImpl::D, F6, F0, F0);
__ fxor(FloatRegisterImpl::D, F4, F2, F2);
__ stf(FloatRegisterImpl::D, F0, to, 0);
__ stf(FloatRegisterImpl::D, F2, to, 8);
__ movxtod(G4,F56);
__ movxtod(G5,F58);
__ mov(L4,L0);
__ mov(L5,L1);
__ fxor(FloatRegisterImpl::D, F56, F60, F60);
__ fxor(FloatRegisterImpl::D, F58, F62, F62);
__ stf(FloatRegisterImpl::D, F60, to, 16);
__ stf(FloatRegisterImpl::D, F62, to, 24);
__ add(from, 32, from);
__ add(to, 32, to);
__ subcc(len_reg, 32, len_reg);
__ br(Assembler::notEqual, false, Assembler::pt, L_dec_next2_blocks256);
__ delayed()->nop();
__ BIND(L_cbcdec_end);
__ stx(L0, rvec, 0);
__ stx(L1, rvec, 8);
__ restore();
__ mov(L0, O0);
__ retl();
__ delayed()->nop();
return start;
}
void generate_initial() {
// Generates all stubs and initializes the entry points
@ -3368,6 +4137,14 @@ class StubGenerator: public StubCodeGenerator {
generate_safefetch("SafeFetchN", sizeof(intptr_t), &StubRoutines::_safefetchN_entry,
&StubRoutines::_safefetchN_fault_pc,
&StubRoutines::_safefetchN_continuation_pc);
// generate AES intrinsics code
if (UseAESIntrinsics) {
StubRoutines::_aescrypt_encryptBlock = generate_aescrypt_encryptBlock();
StubRoutines::_aescrypt_decryptBlock = generate_aescrypt_decryptBlock();
StubRoutines::_cipherBlockChaining_encryptAESCrypt = generate_cipherBlockChaining_encryptAESCrypt();
StubRoutines::_cipherBlockChaining_decryptAESCrypt = generate_cipherBlockChaining_decryptAESCrypt_Parallel();
}
}

View File

@ -156,6 +156,10 @@ address TemplateInterpreterGenerator::generate_StackOverflowError_handler() {
address TemplateInterpreterGenerator::generate_return_entry_for(TosState state, int step, size_t index_size) {
address entry = __ pc();
if (state == atos) {
__ profile_return_type(O0, G3_scratch, G1_scratch);
}
#if !defined(_LP64) && defined(COMPILER2)
// All return values are where we want them, except for Longs. C2 returns
// longs in G1 in the 32-bit build whereas the interpreter wants them in O0/O1.
@ -1333,6 +1337,7 @@ address InterpreterGenerator::generate_normal_entry(bool synchronized) {
__ movbool(true, G3_scratch);
__ stbool(G3_scratch, do_not_unlock_if_synchronized);
__ profile_parameters_type(G1_scratch, G3_scratch, G4_scratch, Lscratch);
// increment invocation counter and check for overflow
//
// Note: checking for negative value instead of overflow

View File

@ -2942,12 +2942,12 @@ void TemplateTable::prepare_invoke(int byte_no,
void TemplateTable::generate_vtable_call(Register Rrecv, Register Rindex, Register Rret) {
Register Rtemp = G4_scratch;
Register Rcall = Rindex;
assert_different_registers(Rcall, G5_method, Gargs, Rret);
// get target Method* & entry point
__ lookup_virtual_method(Rrecv, Rindex, G5_method);
__ profile_arguments_type(G5_method, Rcall, Gargs, true);
__ call_from_interpreter(Rcall, Gargs, Rret);
}
@ -3022,6 +3022,7 @@ void TemplateTable::invokevfinal_helper(Register Rscratch, Register Rret) {
__ null_check(O0);
__ profile_final_call(O4);
__ profile_arguments_type(G5_method, Rscratch, Gargs, true);
// get return address
AddressLiteral table(Interpreter::invoke_return_entry_table());
@ -3051,6 +3052,7 @@ void TemplateTable::invokespecial(int byte_no) {
// do the call
__ profile_call(O4);
__ profile_arguments_type(G5_method, Rscratch, Gargs, false);
__ call_from_interpreter(Rscratch, Gargs, Rret);
}
@ -3066,6 +3068,7 @@ void TemplateTable::invokestatic(int byte_no) {
// do the call
__ profile_call(O4);
__ profile_arguments_type(G5_method, Rscratch, Gargs, false);
__ call_from_interpreter(Rscratch, Gargs, Rret);
}
@ -3091,6 +3094,7 @@ void TemplateTable::invokeinterface_object_method(Register RKlass,
// do the call - the index (f2) contains the Method*
assert_different_registers(G5_method, Gargs, Rcall);
__ mov(Rindex, G5_method);
__ profile_arguments_type(G5_method, Rcall, Gargs, true);
__ call_from_interpreter(Rcall, Gargs, Rret);
__ bind(notFinal);
@ -3197,6 +3201,7 @@ void TemplateTable::invokeinterface(int byte_no) {
Register Rcall = Rinterface;
assert_different_registers(Rcall, G5_method, Gargs, Rret);
__ profile_arguments_type(G5_method, Rcall, Gargs, true);
__ call_from_interpreter(Rcall, Gargs, Rret);
}
@ -3226,6 +3231,7 @@ void TemplateTable::invokehandle(int byte_no) {
// do the call
__ verify_oop(G4_mtype);
__ profile_final_call(O4); // FIXME: profile the LambdaForm also
__ profile_arguments_type(G5_method, Rscratch, Gargs, true);
__ call_from_interpreter(Rscratch, Gargs, Rret);
}
@ -3262,6 +3268,7 @@ void TemplateTable::invokedynamic(int byte_no) {
// do the call
__ verify_oop(G4_callsite);
__ profile_arguments_type(G5_method, Rscratch, Gargs, false);
__ call_from_interpreter(Rscratch, Gargs, Rret);
}

View File

@ -234,7 +234,7 @@ void VM_Version::initialize() {
assert((OptoLoopAlignment % relocInfo::addr_unit()) == 0, "alignment is not a multiple of NOP size");
char buf[512];
jio_snprintf(buf, sizeof(buf), "%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
jio_snprintf(buf, sizeof(buf), "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
(has_v9() ? ", v9" : (has_v8() ? ", v8" : "")),
(has_hardware_popc() ? ", popc" : ""),
(has_vis1() ? ", vis1" : ""),
@ -242,6 +242,7 @@ void VM_Version::initialize() {
(has_vis3() ? ", vis3" : ""),
(has_blk_init() ? ", blk_init" : ""),
(has_cbcond() ? ", cbcond" : ""),
(has_aes() ? ", aes" : ""),
(is_ultra3() ? ", ultra3" : ""),
(is_sun4v() ? ", sun4v" : ""),
(is_niagara_plus() ? ", niagara_plus" : (is_niagara() ? ", niagara" : "")),
@ -265,6 +266,41 @@ void VM_Version::initialize() {
if (!has_vis1()) // Drop to 0 if no VIS1 support
UseVIS = 0;
// T2 and above should have support for AES instructions
if (has_aes()) {
if (UseVIS > 0) { // AES intrinsics use FXOR instruction which is VIS1
if (FLAG_IS_DEFAULT(UseAES)) {
FLAG_SET_DEFAULT(UseAES, true);
}
if (FLAG_IS_DEFAULT(UseAESIntrinsics)) {
FLAG_SET_DEFAULT(UseAESIntrinsics, true);
}
// we disable both the AES flags if either of them is disabled on the command line
if (!UseAES || !UseAESIntrinsics) {
FLAG_SET_DEFAULT(UseAES, false);
FLAG_SET_DEFAULT(UseAESIntrinsics, false);
}
} else {
if (UseAES || UseAESIntrinsics) {
warning("SPARC AES intrinsics require VIS1 instruction support. Intrinsics will be disabled.");
if (UseAES) {
FLAG_SET_DEFAULT(UseAES, false);
}
if (UseAESIntrinsics) {
FLAG_SET_DEFAULT(UseAESIntrinsics, false);
}
}
}
} else if (UseAES || UseAESIntrinsics) {
warning("AES instructions are not available on this CPU");
if (UseAES) {
FLAG_SET_DEFAULT(UseAES, false);
}
if (UseAESIntrinsics) {
FLAG_SET_DEFAULT(UseAESIntrinsics, false);
}
}
if (FLAG_IS_DEFAULT(ContendedPaddingWidth) &&
(cache_line_size > ContendedPaddingWidth))
ContendedPaddingWidth = cache_line_size;

View File

@ -48,7 +48,9 @@ protected:
sparc64_family = 14,
M_family = 15,
T_family = 16,
T1_model = 17
T1_model = 17,
sparc5_instructions = 18,
aes_instructions = 19
};
enum Feature_Flag_Set {
@ -73,6 +75,8 @@ protected:
M_family_m = 1 << M_family,
T_family_m = 1 << T_family,
T1_model_m = 1 << T1_model,
sparc5_instructions_m = 1 << sparc5_instructions,
aes_instructions_m = 1 << aes_instructions,
generic_v8_m = v8_instructions_m | hardware_mul32_m | hardware_div32_m | hardware_fsmuld_m,
generic_v9_m = generic_v8_m | v9_instructions_m,
@ -123,6 +127,8 @@ public:
static bool has_vis3() { return (_features & vis3_instructions_m) != 0; }
static bool has_blk_init() { return (_features & blk_init_instructions_m) != 0; }
static bool has_cbcond() { return (_features & cbcond_instructions_m) != 0; }
static bool has_sparc5_instr() { return (_features & sparc5_instructions_m) != 0; }
static bool has_aes() { return (_features & aes_instructions_m) != 0; }
static bool supports_compare_and_exchange()
{ return has_v9(); }
@ -133,6 +139,7 @@ public:
static bool is_M_series() { return is_M_family(_features); }
static bool is_T4() { return is_T_family(_features) && has_cbcond(); }
static bool is_T7() { return is_T_family(_features) && has_sparc5_instr(); }
// Fujitsu SPARC64
static bool is_sparc64() { return (_features & sparc64_family_m) != 0; }
@ -152,7 +159,7 @@ public:
static const char* cpu_features() { return _features_str; }
static intx prefetch_data_size() {
return is_T4() ? 32 : 64; // default prefetch block size on sparc
return is_T4() && !is_T7() ? 32 : 64; // default prefetch block size on sparc
}
// Prefetch

View File

@ -38,6 +38,7 @@
#include "nativeInst_x86.hpp"
#include "oops/objArrayKlass.hpp"
#include "runtime/sharedRuntime.hpp"
#include "vmreg_x86.inline.hpp"
// These masks are used to provide 128-bit aligned bitmasks to the XMM
@ -1006,6 +1007,9 @@ void LIR_Assembler::reg2mem(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_Patch
if (UseCompressedOops && !wide) {
__ movptr(compressed_src, src->as_register());
__ encode_heap_oop(compressed_src);
if (patch_code != lir_patch_none) {
info->oop_map()->set_narrowoop(compressed_src->as_VMReg());
}
}
#endif
}

View File

@ -941,6 +941,8 @@ void LIRGenerator::do_update_CRC32(Intrinsic* x) {
case vmIntrinsics::_updateCRC32: {
LIRItem crc(x->argument_at(0), this);
LIRItem val(x->argument_at(1), this);
// val is destroyed by update_crc32
val.set_destroys_register();
crc.load_item();
val.load_item();
__ update_crc32(crc.result(), val.result(), result);

View File

@ -127,7 +127,7 @@ void InterpreterMacroAssembler::profile_arguments_type(Register mdp, Register ca
if (MethodData::profile_return()) {
// We're right after the type profile for the last
// argument. tmp is the number of cell left in the
// argument. tmp is the number of cells left in the
// CallTypeData/VirtualCallTypeData to reach its end. Non null
// if there's a return to profile.
assert(ReturnTypeEntry::static_cell_count() < TypeStackSlotEntries::per_arg_count(), "can't move past ret type");
@ -198,7 +198,7 @@ void InterpreterMacroAssembler::profile_parameters_type(Register mdp, Register t
// parameters. Collect profiling from last parameter down.
// mdo start + parameters offset + array length - 1
addptr(mdp, tmp1);
movptr(tmp1, Address(mdp, in_bytes(ArrayData::array_len_offset())));
movptr(tmp1, Address(mdp, ArrayData::array_len_offset()));
decrement(tmp1, TypeStackSlotEntries::per_arg_count());
Label loop;

View File

@ -2403,6 +2403,9 @@ class StubGenerator: public StubCodeGenerator {
// c_rarg3 - r vector byte array address
// c_rarg4 - input length
//
// Output:
// rax - input length
//
address generate_cipherBlockChaining_encryptAESCrypt() {
assert(UseAES, "need AES instructions and misaligned SSE support");
__ align(CodeEntryAlignment);
@ -2483,7 +2486,7 @@ class StubGenerator: public StubCodeGenerator {
__ movdqu(Address(rvec, 0), xmm_result); // final value of r stored in rvec of CipherBlockChaining object
handleSOERegisters(false /*restoring*/);
__ movl(rax, 0); // return 0 (why?)
__ movptr(rax, len_param); // return length
__ leave(); // required for proper stackwalking of RuntimeStub frame
__ ret(0);
@ -2557,6 +2560,9 @@ class StubGenerator: public StubCodeGenerator {
// c_rarg3 - r vector byte array address
// c_rarg4 - input length
//
// Output:
// rax - input length
//
address generate_cipherBlockChaining_decryptAESCrypt() {
assert(UseAES, "need AES instructions and misaligned SSE support");
@ -2650,7 +2656,7 @@ class StubGenerator: public StubCodeGenerator {
__ movptr(rvec , rvec_param); // restore this since used in loop
__ movdqu(Address(rvec, 0), xmm_temp); // final value of r stored in rvec of CipherBlockChaining object
handleSOERegisters(false /*restoring*/);
__ movl(rax, 0); // return 0 (why?)
__ movptr(rax, len_param); // return length
__ leave(); // required for proper stackwalking of RuntimeStub frame
__ ret(0);

View File

@ -3217,6 +3217,9 @@ class StubGenerator: public StubCodeGenerator {
// c_rarg3 - r vector byte array address
// c_rarg4 - input length
//
// Output:
// rax - input length
//
address generate_cipherBlockChaining_encryptAESCrypt() {
assert(UseAES, "need AES instructions and misaligned SSE support");
__ align(CodeEntryAlignment);
@ -3232,7 +3235,7 @@ class StubGenerator: public StubCodeGenerator {
#ifndef _WIN64
const Register len_reg = c_rarg4; // src len (must be multiple of blocksize 16)
#else
const Address len_mem(rsp, 6 * wordSize); // length is on stack on Win64
const Address len_mem(rbp, 6 * wordSize); // length is on stack on Win64
const Register len_reg = r10; // pick the first volatile windows register
#endif
const Register pos = rax;
@ -3259,6 +3262,8 @@ class StubGenerator: public StubCodeGenerator {
for (int i = 6; i <= XMM_REG_NUM_KEY_LAST; i++) {
__ movdqu(xmm_save(i), as_XMMRegister(i));
}
#else
__ push(len_reg); // Save
#endif
const XMMRegister xmm_key_shuf_mask = xmm_temp; // used temporarily to swap key bytes up front
@ -3301,8 +3306,10 @@ class StubGenerator: public StubCodeGenerator {
for (int i = 6; i <= XMM_REG_NUM_KEY_LAST; i++) {
__ movdqu(as_XMMRegister(i), xmm_save(i));
}
__ movl(rax, len_mem);
#else
__ pop(rax); // return length
#endif
__ movl(rax, 0); // return 0 (why?)
__ leave(); // required for proper stackwalking of RuntimeStub frame
__ ret(0);
@ -3409,6 +3416,9 @@ class StubGenerator: public StubCodeGenerator {
// c_rarg3 - r vector byte array address
// c_rarg4 - input length
//
// Output:
// rax - input length
//
address generate_cipherBlockChaining_decryptAESCrypt_Parallel() {
assert(UseAES, "need AES instructions and misaligned SSE support");
@ -3427,7 +3437,7 @@ class StubGenerator: public StubCodeGenerator {
#ifndef _WIN64
const Register len_reg = c_rarg4; // src len (must be multiple of blocksize 16)
#else
const Address len_mem(rsp, 6 * wordSize); // length is on stack on Win64
const Address len_mem(rbp, 6 * wordSize); // length is on stack on Win64
const Register len_reg = r10; // pick the first volatile windows register
#endif
const Register pos = rax;
@ -3448,7 +3458,10 @@ class StubGenerator: public StubCodeGenerator {
for (int i = 6; i <= XMM_REG_NUM_KEY_LAST; i++) {
__ movdqu(xmm_save(i), as_XMMRegister(i));
}
#else
__ push(len_reg); // Save
#endif
// the java expanded key ordering is rotated one position from what we want
// so we start from 0x10 here and hit 0x00 last
const XMMRegister xmm_key_shuf_mask = xmm1; // used temporarily to swap key bytes up front
@ -3554,8 +3567,10 @@ class StubGenerator: public StubCodeGenerator {
for (int i = 6; i <= XMM_REG_NUM_KEY_LAST; i++) {
__ movdqu(as_XMMRegister(i), xmm_save(i));
}
__ movl(rax, len_mem);
#else
__ pop(rax); // return length
#endif
__ movl(rax, 0); // return 0 (why?)
__ leave(); // required for proper stackwalking of RuntimeStub frame
__ ret(0);

View File

@ -581,6 +581,12 @@ const bool Matcher::misaligned_vectors_ok() {
return !AlignVector; // can be changed by flag
}
// x86 AES instructions are compatible with SunJCE expanded
// keys, hence we do not need to pass the original key to stubs
const bool Matcher::pass_original_key_for_aes() {
return false;
}
// Helper methods for MachSpillCopyNode::implementation().
static int vec_mov_helper(CodeBuffer *cbuf, bool do_size, int src_lo, int dst_lo,
int src_hi, int dst_hi, uint ireg, outputStream* st) {

View File

@ -3889,6 +3889,17 @@ operand immI16() %{
interface(CONST_INTER);
%}
// Int Immediate non-negative
operand immU31()
%{
predicate(n->get_int() >= 0);
match(ConI);
op_cost(0);
format %{ %}
interface(CONST_INTER);
%}
// Constant for long shifts
operand immI_32() %{
predicate( n->get_int() == 32 );
@ -6119,12 +6130,12 @@ instruct loadI2L_immI_65535(eRegL dst, memory mem, immI_65535 mask, eFlagsReg cr
ins_pipe(ialu_reg_mem);
%}
// Load Integer with 32-bit mask into Long Register
instruct loadI2L_immI(eRegL dst, memory mem, immI mask, eFlagsReg cr) %{
// Load Integer with 31-bit mask into Long Register
instruct loadI2L_immU31(eRegL dst, memory mem, immU31 mask, eFlagsReg cr) %{
match(Set dst (ConvI2L (AndI (LoadI mem) mask)));
effect(KILL cr);
format %{ "MOV $dst.lo,$mem\t# int & 32-bit mask -> long\n\t"
format %{ "MOV $dst.lo,$mem\t# int & 31-bit mask -> long\n\t"
"XOR $dst.hi,$dst.hi\n\t"
"AND $dst.lo,$mask" %}
ins_encode %{

View File

@ -3086,6 +3086,17 @@ operand immI16()
interface(CONST_INTER);
%}
// Int Immediate non-negative
operand immU31()
%{
predicate(n->get_int() >= 0);
match(ConI);
op_cost(0);
format %{ %}
interface(CONST_INTER);
%}
// Constant for long shifts
operand immI_32()
%{
@ -5042,12 +5053,12 @@ instruct loadI2L_immI_65535(rRegL dst, memory mem, immI_65535 mask) %{
ins_pipe(ialu_reg_mem);
%}
// Load Integer with a 32-bit mask into Long Register
instruct loadI2L_immI(rRegL dst, memory mem, immI mask, rFlagsReg cr) %{
// Load Integer with a 31-bit mask into Long Register
instruct loadI2L_immU31(rRegL dst, memory mem, immU31 mask, rFlagsReg cr) %{
match(Set dst (ConvI2L (AndI (LoadI mem) mask)));
effect(KILL cr);
format %{ "movl $dst, $mem\t# int & 32-bit mask -> long\n\t"
format %{ "movl $dst, $mem\t# int & 31-bit mask -> long\n\t"
"andl $dst, $mask" %}
ins_encode %{
Register Rdst = $dst$$Register;

View File

@ -56,7 +56,7 @@ provider hotspot {
probe thread__park__end(uintptr_t);
probe thread__unpark(uintptr_t);
probe method__compile__begin(
const char*, uintptr_t, const char*, uintptr_t, const char*, uintptr_t, const char*, uintptr_t);
char*, uintptr_t, char*, uintptr_t, char*, uintptr_t, char*, uintptr_t);
probe method__compile__end(
char*, uintptr_t, char*, uintptr_t, char*, uintptr_t,
char*, uintptr_t, uintptr_t);

View File

@ -1557,6 +1557,17 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen)
}
#endif /* !__APPLE__ */
void* os::get_default_process_handle() {
#ifdef __APPLE__
// MacOS X needs to use RTLD_FIRST instead of RTLD_LAZY
// to avoid finding unexpected symbols on second (or later)
// loads of a library.
return (void*)::dlopen(NULL, RTLD_FIRST);
#else
return (void*)::dlopen(NULL, RTLD_LAZY);
#endif
}
// XXX: Do we need a lock around this as per Linux?
void* os::dll_lookup(void* handle, const char* name) {
return dlsym(handle, name);
@ -2625,9 +2636,21 @@ int os::sleep(Thread* thread, jlong millis, bool interruptible) {
}
}
int os::naked_sleep() {
// %% make the sleep time an integer flag. for now use 1 millisec.
return os::sleep(Thread::current(), 1, false);
void os::naked_short_sleep(jlong ms) {
struct timespec req;
assert(ms < 1000, "Un-interruptable sleep, short time use only");
req.tv_sec = 0;
if (ms > 0) {
req.tv_nsec = (ms % 1000) * 1000000;
}
else {
req.tv_nsec = 1;
}
nanosleep(&req, NULL);
return;
}
// Sleep forever; naked call to OS-specific sleep; use with CAUTION

View File

@ -2104,6 +2104,9 @@ void* os::dll_lookup(void* handle, const char* name) {
return res;
}
void* os::get_default_process_handle() {
return (void*)::dlopen(NULL, RTLD_LAZY);
}
static bool _print_ascii_file(const char* filename, outputStream* st) {
int fd = ::open(filename, O_RDONLY);
@ -3868,9 +3871,33 @@ int os::sleep(Thread* thread, jlong millis, bool interruptible) {
}
}
int os::naked_sleep() {
// %% make the sleep time an integer flag. for now use 1 millisec.
return os::sleep(Thread::current(), 1, false);
//
// Short sleep, direct OS call.
//
// Note: certain versions of Linux CFS scheduler (since 2.6.23) do not guarantee
// sched_yield(2) will actually give up the CPU:
//
// * Alone on this pariticular CPU, keeps running.
// * Before the introduction of "skip_buddy" with "compat_yield" disabled
// (pre 2.6.39).
//
// So calling this with 0 is an alternative.
//
void os::naked_short_sleep(jlong ms) {
struct timespec req;
assert(ms < 1000, "Un-interruptable sleep, short time use only");
req.tv_sec = 0;
if (ms > 0) {
req.tv_nsec = (ms % 1000) * 1000000;
}
else {
req.tv_nsec = 1;
}
nanosleep(&req, NULL);
return;
}
// Sleep forever; naked call to OS-specific sleep; use with CAUTION

View File

@ -262,10 +262,6 @@ FILE* os::open(int fd, const char* mode) {
return ::fdopen(fd, mode);
}
void* os::get_default_process_handle() {
return (void*)::dlopen(NULL, RTLD_LAZY);
}
// Builds a platform dependent Agent_OnLoad_<lib_name> function name
// which is used to find statically linked in agents.
// Parameters:

View File

@ -25,7 +25,7 @@
provider hotspot {
probe class__loaded(char*, uintptr_t, void*, uintptr_t);
probe class__unloaded(char*, uintptr_t, void*, uintptr_t);
probe class__initialization__required(char*, uintptr_t, void*, intptr_t,int);
probe class__initialization__required(char*, uintptr_t, void*, intptr_t);
probe class__initialization__recursive(char*, uintptr_t, void*, intptr_t,int);
probe class__initialization__concurrent(char*, uintptr_t, void*, intptr_t,int);
probe class__initialization__erroneous(char*, uintptr_t, void*, intptr_t, int);

View File

@ -211,7 +211,7 @@ provider hotspot_jni {
probe CallVoidMethodV__return();
probe CreateJavaVM__entry(void**, void**, void*);
probe CreateJavaVM__return(uint32_t);
probe DefineClass__entry(void*, const char*, void*, char, uintptr_t);
probe DefineClass__entry(void*, const char*, void*, char*, uintptr_t);
probe DefineClass__return(void*);
probe DeleteGlobalRef__entry(void*, void*);
probe DeleteGlobalRef__return();

View File

@ -2146,6 +2146,10 @@ void* os::dll_lookup(void* handle, const char* name) {
return dlsym(handle, name);
}
void* os::get_default_process_handle() {
return (void*)::dlopen(NULL, RTLD_LAZY);
}
int os::stat(const char *path, struct stat *sbuf) {
char pathbuf[MAX_PATH];
if (strlen(path) > MAX_PATH - 1) {
@ -3536,9 +3540,14 @@ int os::sleep(Thread* thread, jlong millis, bool interruptible) {
return os_sleep(millis, interruptible);
}
int os::naked_sleep() {
// %% make the sleep time an integer flag. for now use 1 millisec.
return os_sleep(1, false);
void os::naked_short_sleep(jlong ms) {
assert(ms < 1000, "Un-interruptable sleep, short time use only");
// usleep is deprecated and removed from POSIX, in favour of nanosleep, but
// Solaris requires -lrt for this.
usleep((ms * 1000));
return;
}
// Sleep forever; naked call to OS-specific sleep; use with CAUTION

View File

@ -166,12 +166,10 @@ void os::run_periodic_checks() {
return;
}
#ifndef _WIN64
// previous UnhandledExceptionFilter, if there is one
static LPTOP_LEVEL_EXCEPTION_FILTER prev_uef_handler = NULL;
LONG WINAPI Handle_FLT_Exception(struct _EXCEPTION_POINTERS* exceptionInfo);
#endif
void os::init_system_properties_values() {
/* sysclasspath, java_home, dll_dir */
{
@ -2240,11 +2238,11 @@ LONG Handle_IDiv_Exception(struct _EXCEPTION_POINTERS* exceptionInfo) {
return EXCEPTION_CONTINUE_EXECUTION;
}
#ifndef _WIN64
//-----------------------------------------------------------------------------
LONG WINAPI Handle_FLT_Exception(struct _EXCEPTION_POINTERS* exceptionInfo) {
// handle exception caused by native method modifying control word
PCONTEXT ctx = exceptionInfo->ContextRecord;
#ifndef _WIN64
// handle exception caused by native method modifying control word
DWORD exception_code = exceptionInfo->ExceptionRecord->ExceptionCode;
switch (exception_code) {
@ -2270,17 +2268,11 @@ LONG WINAPI Handle_FLT_Exception(struct _EXCEPTION_POINTERS* exceptionInfo) {
// UnhandledExceptionFilter.
return (prev_uef_handler)(exceptionInfo);
}
return EXCEPTION_CONTINUE_SEARCH;
}
#else //_WIN64
#else // !_WIN64
/*
On Windows, the mxcsr control bits are non-volatile across calls
See also CR 6192333
If EXCEPTION_FLT_* happened after some native method modified
mxcsr - it is not a jvm fault.
However should we decide to restore of mxcsr after a faulty
native method we can uncomment following code
*/
jint MxCsr = INITIAL_MXCSR;
// we can't use StubRoutines::addr_mxcsr_std()
// because in Win64 mxcsr is not saved there
@ -2288,10 +2280,10 @@ LONG WINAPI Handle_FLT_Exception(struct _EXCEPTION_POINTERS* exceptionInfo) {
ctx->MxCsr = MxCsr;
return EXCEPTION_CONTINUE_EXECUTION;
}
#endif // !_WIN64
*/
#endif //_WIN64
return EXCEPTION_CONTINUE_SEARCH;
}
// Fatal error reporting is single threaded so we can make this a
// static and preallocated. If it's more than MAX_PATH silently ignore
@ -2640,7 +2632,6 @@ LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) {
} // switch
}
#ifndef _WIN64
if (((thread->thread_state() == _thread_in_Java) ||
(thread->thread_state() == _thread_in_native)) &&
exception_code != EXCEPTION_UNCAUGHT_CXX_EXCEPTION)
@ -2648,7 +2639,6 @@ LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) {
LONG result=Handle_FLT_Exception(exceptionInfo);
if (result==EXCEPTION_CONTINUE_EXECUTION) return result;
}
#endif //_WIN64
}
if (exception_code != EXCEPTION_BREAKPOINT) {
@ -3496,6 +3486,16 @@ int os::sleep(Thread* thread, jlong ms, bool interruptable) {
return result;
}
//
// Short sleep, direct OS call.
//
// ms = 0, means allow others (if any) to run.
//
void os::naked_short_sleep(jlong ms) {
assert(ms < 1000, "Un-interruptable sleep, short time use only");
Sleep(ms);
}
// Sleep forever; naked call to OS-specific sleep; use with CAUTION
void os::infinite_sleep() {
while (true) { // sleep forever ...

View File

@ -49,6 +49,7 @@
#include "runtime/stubRoutines.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/timer.hpp"
#include "services/memTracker.hpp"
#include "utilities/events.hpp"
#include "utilities/vmError.hpp"
@ -906,6 +907,9 @@ void os::workaround_expand_exec_shield_cs_limit() {
if ( (codebuf == NULL) || (!os::commit_memory(codebuf, page_size, true)) ) {
return; // No matter, we tried, best effort.
}
MemTracker::record_virtual_memory_type((address)codebuf, mtInternal);
if (PrintMiscellaneous && (Verbose || WizardMode)) {
tty->print_cr("[CS limit NX emulation work-around, exec code at: %p]", codebuf);
}

View File

@ -75,13 +75,19 @@ int VM_Version::platform_features(int features) {
do_sysinfo(SI_ARCHITECTURE_64, "sparcv9", &features, generic_v9_m);
// Extract valid instruction set extensions.
uint_t av;
uint_t avn = os::Solaris::getisax(&av, 1);
assert(avn == 1, "should only return one av");
uint_t avs[2];
uint_t avn = os::Solaris::getisax(avs, 2);
assert(avn <= 2, "should return two or less av's");
uint_t av = avs[0];
#ifndef PRODUCT
if (PrintMiscellaneous && Verbose)
tty->print_cr("getisax(2) returned: " PTR32_FORMAT, av);
if (PrintMiscellaneous && Verbose) {
tty->print("getisax(2) returned: " PTR32_FORMAT, av);
if (avn > 1) {
tty->print(", " PTR32_FORMAT, avs[1]);
}
tty->cr();
}
#endif
if (av & AV_SPARC_MUL32) features |= hardware_mul32_m;
@ -91,6 +97,13 @@ int VM_Version::platform_features(int features) {
if (av & AV_SPARC_POPC) features |= hardware_popc_m;
if (av & AV_SPARC_VIS) features |= vis1_instructions_m;
if (av & AV_SPARC_VIS2) features |= vis2_instructions_m;
if (avn > 1) {
uint_t av2 = avs[1];
#ifndef AV2_SPARC_SPARC5
#define AV2_SPARC_SPARC5 0x00000008 /* The 29 new fp and sub instructions */
#endif
if (av2 & AV2_SPARC_SPARC5) features |= sparc5_instructions_m;
}
// Next values are not defined before Solaris 10
// but Solaris 8 is used for jdk6 update builds.
@ -119,6 +132,11 @@ int VM_Version::platform_features(int features) {
#endif
if (av & AV_SPARC_CBCOND) features |= cbcond_instructions_m;
#ifndef AV_SPARC_AES
#define AV_SPARC_AES 0x00020000 /* aes instrs supported */
#endif
if (av & AV_SPARC_AES) features |= aes_instructions_m;
} else {
// getisax(2) failed, use the old legacy code.
#ifndef PRODUCT

View File

@ -3288,7 +3288,10 @@ void LIRGenerator::do_ProfileReturnType(ProfileReturnType* x) {
ciSignature* signature_at_call = NULL;
x->method()->get_method_at_bci(bci, ignored_will_link, &signature_at_call);
ciKlass* exact = profile_type(md, 0, md->byte_offset_of_slot(data, ret->type_offset()),
// The offset within the MDO of the entry to update may be too large
// to be used in load/store instructions on some platforms. So have
// profile_type() compute the address of the profile in a register.
ciKlass* exact = profile_type(md, md->byte_offset_of_slot(data, ret->type_offset()), 0,
ret->type(), x->ret(), mdp,
!x->needs_null_check(),
signature_at_call->return_type()->as_klass(),

View File

@ -201,16 +201,10 @@ void ciField::initialize_from(fieldDescriptor* fd) {
return;
}
// This field just may be constant. The only cases where it will
// not be constant are:
//
// 1. The field holds a non-perm-space oop. The field is, strictly
// speaking, constant but we cannot embed non-perm-space oops into
// generated code. For the time being we need to consider the
// field to be not constant.
// 2. The field is a *special* static&final field whose value
// may change. The three examples are java.lang.System.in,
// java.lang.System.out, and java.lang.System.err.
// This field just may be constant. The only case where it will
// not be constant is when the field is a *special* static&final field
// whose value may change. The three examples are java.lang.System.in,
// java.lang.System.out, and java.lang.System.err.
KlassHandle k = _holder->get_Klass();
assert( SystemDictionary::System_klass() != NULL, "Check once per vm");

View File

@ -130,9 +130,7 @@ public:
// 1. The field is both static and final
// 2. The canonical holder of the field has undergone
// static initialization.
// 3. If the field is an object or array, then the oop
// in question is allocated in perm space.
// 4. The field is not one of the special static/final
// 3. The field is not one of the special static/final
// non-constant fields. These are java.lang.System.in
// and java.lang.System.out. Abomination.
//

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 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
@ -4098,8 +4098,12 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
tty->print("[Loaded %s from %s]\n", this_klass->external_name(),
cfs->source());
} else if (class_loader.is_null()) {
if (THREAD->is_Java_thread()) {
Klass* caller = ((JavaThread*)THREAD)->security_get_caller_class(1);
Klass* caller =
THREAD->is_Java_thread()
? ((JavaThread*)THREAD)->security_get_caller_class(1)
: NULL;
// caller can be NULL, for example, during a JVMTI VM_Init hook
if (caller != NULL) {
tty->print("[Loaded %s by instance of %s]\n",
this_klass->external_name(),
InstanceKlass::cast(caller)->external_name());
@ -4500,8 +4504,8 @@ void ClassFileParser::check_final_method_override(instanceKlassHandle this_klass
break; // didn't find any match; get out
}
if (super_m->is_final() &&
// matching method in super is final
if (super_m->is_final() && !super_m->is_static() &&
// matching method in super is final, and not static
(Reflection::verify_field_access(this_klass(),
super_m->method_holder(),
super_m->method_holder(),

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 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
@ -390,6 +390,20 @@ class MethodFamily : public ResourceObj {
Symbol* get_exception_message() { return _exception_message; }
Symbol* get_exception_name() { return _exception_name; }
// Return true if the specified klass has a static method that matches
// the name and signature of the target method.
bool has_matching_static(InstanceKlass* root) {
if (_members.length() > 0) {
Pair<Method*,QualifiedState> entry = _members.at(0);
Method* impl = root->find_method(entry.first->name(),
entry.first->signature());
if ((impl != NULL) && impl->is_static()) {
return true;
}
}
return false;
}
// Either sets the target or the exception error message
void determine_target(InstanceKlass* root, TRAPS) {
if (has_target() || throws_exception()) {
@ -416,19 +430,26 @@ class MethodFamily : public ResourceObj {
}
if (num_defaults == 0) {
if (qualified_methods.length() == 0) {
_exception_message = generate_no_defaults_message(CHECK);
} else {
assert(root != NULL, "Null root class");
_exception_message = generate_method_message(root->name(), qualified_methods.at(0), CHECK);
// If the root klass has a static method with matching name and signature
// then do not generate an overpass method because it will hide the
// static method during resolution.
if (!has_matching_static(root)) {
if (qualified_methods.length() == 0) {
_exception_message = generate_no_defaults_message(CHECK);
} else {
assert(root != NULL, "Null root class");
_exception_message = generate_method_message(root->name(), qualified_methods.at(0), CHECK);
}
_exception_name = vmSymbols::java_lang_AbstractMethodError();
}
_exception_name = vmSymbols::java_lang_AbstractMethodError();
// If only one qualified method is default, select that
} else if (num_defaults == 1) {
_selected_target = qualified_methods.at(default_index);
} else if (num_defaults > 1) {
_exception_message = generate_conflicts_message(&qualified_methods,CHECK);
_exception_name = vmSymbols::java_lang_IncompatibleClassChangeError();
} else if (num_defaults > 1 && !has_matching_static(root)) {
_exception_message = generate_conflicts_message(&qualified_methods,CHECK);
_exception_name = vmSymbols::java_lang_IncompatibleClassChangeError();
if (TraceDefaultMethods) {
_exception_message->print_value_on(tty);
tty->print_cr("");

View File

@ -38,6 +38,9 @@
// --------------------------------------------------------------------------
// the number of buckets a thread claims
const int ClaimChunkSize = 32;
SymbolTable* SymbolTable::_the_table = NULL;
// Static arena for symbols that are not deallocated
Arena* SymbolTable::_arena = NULL;
@ -83,16 +86,12 @@ void SymbolTable::symbols_do(SymbolClosure *cl) {
}
}
int SymbolTable::symbols_removed = 0;
int SymbolTable::symbols_counted = 0;
int SymbolTable::_symbols_removed = 0;
int SymbolTable::_symbols_counted = 0;
volatile int SymbolTable::_parallel_claimed_idx = 0;
// Remove unreferenced symbols from the symbol table
// This is done late during GC.
void SymbolTable::unlink() {
int removed = 0;
int total = 0;
size_t memory_total = 0;
for (int i = 0; i < the_table()->table_size(); ++i) {
void SymbolTable::buckets_unlink(int start_idx, int end_idx, int* processed, int* removed, size_t* memory_total) {
for (int i = start_idx; i < end_idx; ++i) {
HashtableEntry<Symbol*, mtSymbol>** p = the_table()->bucket_addr(i);
HashtableEntry<Symbol*, mtSymbol>* entry = the_table()->bucket(i);
while (entry != NULL) {
@ -104,14 +103,14 @@ void SymbolTable::unlink() {
break;
}
Symbol* s = entry->literal();
memory_total += s->size();
total++;
(*memory_total) += s->size();
(*processed)++;
assert(s != NULL, "just checking");
// If reference count is zero, remove.
if (s->refcount() == 0) {
assert(!entry->is_shared(), "shared entries should be kept live");
delete s;
removed++;
(*removed)++;
*p = entry->next();
the_table()->free_entry(entry);
} else {
@ -121,12 +120,45 @@ void SymbolTable::unlink() {
entry = (HashtableEntry<Symbol*, mtSymbol>*)HashtableEntry<Symbol*, mtSymbol>::make_ptr(*p);
}
}
symbols_removed += removed;
symbols_counted += total;
}
// Remove unreferenced symbols from the symbol table
// This is done late during GC.
void SymbolTable::unlink(int* processed, int* removed) {
size_t memory_total = 0;
buckets_unlink(0, the_table()->table_size(), processed, removed, &memory_total);
_symbols_removed += *removed;
_symbols_counted += *processed;
// Exclude printing for normal PrintGCDetails because people parse
// this output.
if (PrintGCDetails && Verbose && WizardMode) {
gclog_or_tty->print(" [Symbols=%d size=" SIZE_FORMAT "K] ", total,
gclog_or_tty->print(" [Symbols=%d size=" SIZE_FORMAT "K] ", *processed,
(memory_total*HeapWordSize)/1024);
}
}
void SymbolTable::possibly_parallel_unlink(int* processed, int* removed) {
const int limit = the_table()->table_size();
size_t memory_total = 0;
for (;;) {
// Grab next set of buckets to scan
int start_idx = Atomic::add(ClaimChunkSize, &_parallel_claimed_idx) - ClaimChunkSize;
if (start_idx >= limit) {
// End of table
break;
}
int end_idx = MIN2(limit, start_idx + ClaimChunkSize);
buckets_unlink(start_idx, end_idx, processed, removed, &memory_total);
}
Atomic::add(*processed, &_symbols_counted);
Atomic::add(*removed, &_symbols_removed);
// Exclude printing for normal PrintGCDetails because people parse
// this output.
if (PrintGCDetails && Verbose && WizardMode) {
gclog_or_tty->print(" [Symbols: scanned=%d removed=%d size=" SIZE_FORMAT "K] ", *processed, *removed,
(memory_total*HeapWordSize)/1024);
}
}
@ -494,11 +526,11 @@ void SymbolTable::print_histogram() {
tty->print_cr("Total number of symbols %5d", count);
tty->print_cr("Total size in memory %5dK",
(memory_total*HeapWordSize)/1024);
tty->print_cr("Total counted %5d", symbols_counted);
tty->print_cr("Total removed %5d", symbols_removed);
if (symbols_counted > 0) {
tty->print_cr("Total counted %5d", _symbols_counted);
tty->print_cr("Total removed %5d", _symbols_removed);
if (_symbols_counted > 0) {
tty->print_cr("Percent removed %3.2f",
((float)symbols_removed/(float)symbols_counted)* 100);
((float)_symbols_removed/(float)_symbols_counted)* 100);
}
tty->print_cr("Reference counts %5d", Symbol::_total_count);
tty->print_cr("Symbol arena size %5d used %5d",
@ -739,39 +771,38 @@ oop StringTable::intern(const char* utf8_string, TRAPS) {
return result;
}
void StringTable::unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f) {
void StringTable::unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int* processed, int* removed) {
buckets_unlink_or_oops_do(is_alive, f, 0, the_table()->table_size(), processed, removed);
}
void StringTable::possibly_parallel_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int* processed, int* removed) {
// Readers of the table are unlocked, so we should only be removing
// entries at a safepoint.
assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
for (int i = 0; i < the_table()->table_size(); ++i) {
HashtableEntry<oop, mtSymbol>** p = the_table()->bucket_addr(i);
HashtableEntry<oop, mtSymbol>* entry = the_table()->bucket(i);
while (entry != NULL) {
assert(!entry->is_shared(), "CDS not used for the StringTable");
const int limit = the_table()->table_size();
if (is_alive->do_object_b(entry->literal())) {
if (f != NULL) {
f->do_oop((oop*)entry->literal_addr());
}
p = entry->next_addr();
} else {
*p = entry->next();
the_table()->free_entry(entry);
}
entry = *p;
for (;;) {
// Grab next set of buckets to scan
int start_idx = Atomic::add(ClaimChunkSize, &_parallel_claimed_idx) - ClaimChunkSize;
if (start_idx >= limit) {
// End of table
break;
}
int end_idx = MIN2(limit, start_idx + ClaimChunkSize);
buckets_unlink_or_oops_do(is_alive, f, start_idx, end_idx, processed, removed);
}
}
void StringTable::buckets_do(OopClosure* f, int start_idx, int end_idx) {
void StringTable::buckets_oops_do(OopClosure* f, int start_idx, int end_idx) {
const int limit = the_table()->table_size();
assert(0 <= start_idx && start_idx <= limit,
err_msg("start_idx (" INT32_FORMAT ") oob?", start_idx));
err_msg("start_idx (" INT32_FORMAT ") is out of bounds", start_idx));
assert(0 <= end_idx && end_idx <= limit,
err_msg("end_idx (" INT32_FORMAT ") oob?", end_idx));
err_msg("end_idx (" INT32_FORMAT ") is out of bounds", end_idx));
assert(start_idx <= end_idx,
err_msg("Ordering: start_idx=" INT32_FORMAT", end_idx=" INT32_FORMAT,
err_msg("Index ordering: start_idx=" INT32_FORMAT", end_idx=" INT32_FORMAT,
start_idx, end_idx));
for (int i = start_idx; i < end_idx; i += 1) {
@ -786,12 +817,44 @@ void StringTable::buckets_do(OopClosure* f, int start_idx, int end_idx) {
}
}
void StringTable::buckets_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int start_idx, int end_idx, int* processed, int* removed) {
const int limit = the_table()->table_size();
assert(0 <= start_idx && start_idx <= limit,
err_msg("start_idx (" INT32_FORMAT ") is out of bounds", start_idx));
assert(0 <= end_idx && end_idx <= limit,
err_msg("end_idx (" INT32_FORMAT ") is out of bounds", end_idx));
assert(start_idx <= end_idx,
err_msg("Index ordering: start_idx=" INT32_FORMAT", end_idx=" INT32_FORMAT,
start_idx, end_idx));
for (int i = start_idx; i < end_idx; ++i) {
HashtableEntry<oop, mtSymbol>** p = the_table()->bucket_addr(i);
HashtableEntry<oop, mtSymbol>* entry = the_table()->bucket(i);
while (entry != NULL) {
assert(!entry->is_shared(), "CDS not used for the StringTable");
if (is_alive->do_object_b(entry->literal())) {
if (f != NULL) {
f->do_oop((oop*)entry->literal_addr());
}
p = entry->next_addr();
} else {
*p = entry->next();
the_table()->free_entry(entry);
(*removed)++;
}
(*processed)++;
entry = *p;
}
}
}
void StringTable::oops_do(OopClosure* f) {
buckets_do(f, 0, the_table()->table_size());
buckets_oops_do(f, 0, the_table()->table_size());
}
void StringTable::possibly_parallel_oops_do(OopClosure* f) {
const int ClaimChunkSize = 32;
const int limit = the_table()->table_size();
for (;;) {
@ -803,7 +866,7 @@ void StringTable::possibly_parallel_oops_do(OopClosure* f) {
}
int end_idx = MIN2(limit, start_idx + ClaimChunkSize);
buckets_do(f, start_idx, end_idx);
buckets_oops_do(f, start_idx, end_idx);
}
}

View File

@ -86,8 +86,8 @@ private:
static bool _needs_rehashing;
// For statistics
static int symbols_removed;
static int symbols_counted;
static int _symbols_removed;
static int _symbols_counted;
Symbol* allocate_symbol(const u1* name, int len, bool c_heap, TRAPS); // Assumes no characters larger than 0x7F
@ -121,6 +121,11 @@ private:
static Arena* arena() { return _arena; } // called for statistics
static void initialize_symbols(int arena_alloc_size = 0);
static volatile int _parallel_claimed_idx;
// Release any dead symbols
static void buckets_unlink(int start_idx, int end_idx, int* processed, int* removed, size_t* memory_total);
public:
enum {
symbol_alloc_batch_size = 8,
@ -177,7 +182,14 @@ public:
unsigned int* hashValues, TRAPS);
// Release any dead symbols
static void unlink();
static void unlink() {
int processed = 0;
int removed = 0;
unlink(&processed, &removed);
}
static void unlink(int* processed, int* removed);
// Release any dead symbols, possibly parallel version
static void possibly_parallel_unlink(int* processed, int* removed);
// iterate over symbols
static void symbols_do(SymbolClosure *cl);
@ -235,6 +247,9 @@ public:
// Rehash the symbol table if it gets out of balance
static void rehash_table();
static bool needs_rehashing() { return _needs_rehashing; }
// Parallel chunked scanning
static void clear_parallel_claimed_index() { _parallel_claimed_idx = 0; }
static int parallel_claimed_index() { return _parallel_claimed_idx; }
};
class StringTable : public Hashtable<oop, mtSymbol> {
@ -258,7 +273,10 @@ private:
// Apply the give oop closure to the entries to the buckets
// in the range [start_idx, end_idx).
static void buckets_do(OopClosure* f, int start_idx, int end_idx);
static void buckets_oops_do(OopClosure* f, int start_idx, int end_idx);
// Unlink or apply the give oop closure to the entries to the buckets
// in the range [start_idx, end_idx).
static void buckets_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int start_idx, int end_idx, int* processed, int* removed);
StringTable() : Hashtable<oop, mtSymbol>((int)StringTableSize,
sizeof (HashtableEntry<oop, mtSymbol>)) {}
@ -280,15 +298,28 @@ public:
// GC support
// Delete pointers to otherwise-unreachable objects.
static void unlink_or_oops_do(BoolObjectClosure* cl, OopClosure* f);
static void unlink(BoolObjectClosure* cl) {
unlink_or_oops_do(cl, NULL);
static void unlink_or_oops_do(BoolObjectClosure* cl, OopClosure* f) {
int processed = 0;
int removed = 0;
unlink_or_oops_do(cl, f, &processed, &removed);
}
static void unlink(BoolObjectClosure* cl) {
int processed = 0;
int removed = 0;
unlink_or_oops_do(cl, NULL, &processed, &removed);
}
static void unlink_or_oops_do(BoolObjectClosure* cl, OopClosure* f, int* processed, int* removed);
static void unlink(BoolObjectClosure* cl, int* processed, int* removed) {
unlink_or_oops_do(cl, NULL, processed, removed);
}
// Serially invoke "f->do_oop" on the locations of all oops in the table.
static void oops_do(OopClosure* f);
// Possibly parallel version of the above
// Possibly parallel versions of the above
static void possibly_parallel_unlink_or_oops_do(BoolObjectClosure* cl, OopClosure* f, int* processed, int* removed);
static void possibly_parallel_unlink(BoolObjectClosure* cl, int* processed, int* removed) {
possibly_parallel_unlink_or_oops_do(cl, NULL, processed, removed);
}
static void possibly_parallel_oops_do(OopClosure* f);
// Hashing algorithm, used as the hash value used by the
@ -349,5 +380,6 @@ public:
// Parallel chunked scanning
static void clear_parallel_claimed_index() { _parallel_claimed_idx = 0; }
static int parallel_claimed_index() { return _parallel_claimed_idx; }
};
#endif // SHARE_VM_CLASSFILE_SYMBOLTABLE_HPP

View File

@ -787,7 +787,7 @@
do_intrinsic(_cipherBlockChaining_decryptAESCrypt, com_sun_crypto_provider_cipherBlockChaining, decrypt_name, byteArray_int_int_byteArray_int_signature, F_R) \
do_name( encrypt_name, "encrypt") \
do_name( decrypt_name, "decrypt") \
do_signature(byteArray_int_int_byteArray_int_signature, "([BII[BI)V") \
do_signature(byteArray_int_int_byteArray_int_signature, "([BII[BI)I") \
\
/* support for java.util.zip */ \
do_class(java_util_zip_CRC32, "java/util/zip/CRC32") \

View File

@ -596,20 +596,13 @@ void CodeCache::clear_inline_caches() {
}
#ifndef PRODUCT
// used to keep track of how much time is spent in mark_for_deoptimization
// Keeps track of time spent for checking dependencies
static elapsedTimer dependentCheckTime;
static int dependentCheckCount = 0;
#endif // PRODUCT
#endif
int CodeCache::mark_for_deoptimization(DepChange& changes) {
MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
#ifndef PRODUCT
dependentCheckTime.start();
dependentCheckCount++;
#endif // PRODUCT
int number_of_marked_CodeBlobs = 0;
// search the hierarchy looking for nmethods which are affected by the loading of this class
@ -617,32 +610,23 @@ int CodeCache::mark_for_deoptimization(DepChange& changes) {
// then search the interfaces this class implements looking for nmethods
// which might be dependent of the fact that an interface only had one
// implementor.
{ No_Safepoint_Verifier nsv;
for (DepChange::ContextStream str(changes, nsv); str.next(); ) {
Klass* d = str.klass();
number_of_marked_CodeBlobs += InstanceKlass::cast(d)->mark_dependent_nmethods(changes);
}
}
if (VerifyDependencies) {
// Turn off dependency tracing while actually testing deps.
NOT_PRODUCT( FlagSetting fs(TraceDependencies, false) );
FOR_ALL_ALIVE_NMETHODS(nm) {
if (!nm->is_marked_for_deoptimization() &&
nm->check_all_dependencies()) {
ResourceMark rm;
tty->print_cr("Should have been marked for deoptimization:");
changes.print();
nm->print();
nm->print_dependencies();
}
}
// nmethod::check_all_dependencies works only correctly, if no safepoint
// can happen
No_Safepoint_Verifier nsv;
for (DepChange::ContextStream str(changes, nsv); str.next(); ) {
Klass* d = str.klass();
number_of_marked_CodeBlobs += InstanceKlass::cast(d)->mark_dependent_nmethods(changes);
}
#ifndef PRODUCT
dependentCheckTime.stop();
#endif // PRODUCT
if (VerifyDependencies) {
// Object pointers are used as unique identifiers for dependency arguments. This
// is only possible if no safepoint, i.e., GC occurs during the verification code.
dependentCheckTime.start();
nmethod::check_all_dependencies(changes);
dependentCheckTime.stop();
}
#endif
return number_of_marked_CodeBlobs;
}
@ -899,9 +883,7 @@ void CodeCache::print() {
}
tty->print_cr("CodeCache:");
tty->print_cr("nmethod dependency checking time %f", dependentCheckTime.seconds(),
dependentCheckTime.seconds() / dependentCheckCount);
tty->print_cr("nmethod dependency checking time %fs", dependentCheckTime.seconds());
if (!live.is_empty()) {
live.print("live");

View File

@ -678,6 +678,17 @@ Metadata* Dependencies::DepStream::argument(int i) {
return result;
}
/**
* Returns a unique identifier for each dependency argument.
*/
uintptr_t Dependencies::DepStream::get_identifier(int i) {
if (has_oop_argument()) {
return (uintptr_t)(oopDesc*)argument_oop(i);
} else {
return (uintptr_t)argument(i);
}
}
oop Dependencies::DepStream::argument_oop(int i) {
oop result = recorded_oop_at(argument_index(i));
assert(result == NULL || result->is_oop(), "must be");
@ -713,6 +724,57 @@ Klass* Dependencies::DepStream::context_type() {
return NULL;
}
// ----------------- DependencySignature --------------------------------------
bool DependencySignature::equals(const DependencySignature& sig) const {
if (type() != sig.type()) {
return false;
}
if (args_count() != sig.args_count()) {
return false;
}
for (int i = 0; i < sig.args_count(); i++) {
if (arg(i) != sig.arg(i)) {
return false;
}
}
return true;
}
// ----------------- DependencySignatureBuffer --------------------------------------
DependencySignatureBuffer::DependencySignatureBuffer() {
_signatures = NEW_RESOURCE_ARRAY(GrowableArray<DependencySignature*>*, Dependencies::TYPE_LIMIT);
memset(_signatures, 0, sizeof(DependencySignature*) * Dependencies::TYPE_LIMIT);
}
/* Check if arguments are identical. Two dependency signatures are considered
* identical, if the type as well as all argument identifiers are identical.
* If the dependency has not already been checked, the dependency signature is
* added to the checked dependencies of the same type. The function returns
* false, which causes the dependency to be checked in the caller.
*/
bool DependencySignatureBuffer::add_if_missing(const DependencySignature& sig) {
const int index = sig.type();
GrowableArray<DependencySignature*>* buffer = _signatures[index];
if (buffer == NULL) {
buffer = new GrowableArray<DependencySignature*>();
_signatures[index] = buffer;
}
// Check if we have already checked the dependency
for (int i = 0; i < buffer->length(); i++) {
DependencySignature* checked_signature = buffer->at(i);
if (checked_signature->equals(sig)) {
return true;
}
}
buffer->append((DependencySignature*)&sig);
return false;
}
/// Checking dependencies:
// This hierarchy walker inspects subtypes of a given type,
@ -1159,11 +1221,9 @@ bool Dependencies::is_concrete_method(Method* m) {
// We could also return false if m does not yet appear to be
// executed, if the VM version supports this distinction also.
// Default methods are considered "concrete" as well.
return !m->is_abstract() &&
!InstanceKlass::cast(m->method_holder())->is_interface();
// TODO: investigate whether default methods should be
// considered as "concrete" in this situation. For now they
// are not.
!m->is_overpass(); // error functions aren't concrete
}

View File

@ -480,6 +480,9 @@ class Dependencies: public ResourceObj {
bool next();
DepType type() { return _type; }
bool has_oop_argument() { return type() == call_site_target_value; }
uintptr_t get_identifier(int i);
int argument_count() { return dep_args(type()); }
int argument_index(int i) { assert(0 <= i && i < argument_count(), "oob");
return _xi[i]; }
@ -523,6 +526,38 @@ class Dependencies: public ResourceObj {
};
class DependencySignature : public ResourceObj {
private:
int _args_count;
uintptr_t _argument_hash[Dependencies::max_arg_count];
Dependencies::DepType _type;
public:
DependencySignature(Dependencies::DepStream& dep) {
_args_count = dep.argument_count();
_type = dep.type();
for (int i = 0; i < _args_count; i++) {
_argument_hash[i] = dep.get_identifier(i);
}
}
bool equals(const DependencySignature& sig) const;
int args_count() const { return _args_count; }
uintptr_t arg(int idx) const { return _argument_hash[idx]; }
Dependencies::DepType type() const { return _type; }
};
class DependencySignatureBuffer : public StackObj {
private:
GrowableArray<DependencySignature*>** _signatures;
public:
DependencySignatureBuffer();
bool add_if_missing(const DependencySignature& sig);
};
// Every particular DepChange is a sub-class of this class.
class DepChange : public StackObj {
public:

View File

@ -2161,16 +2161,41 @@ PcDesc* nmethod::find_pc_desc_internal(address pc, bool approximate) {
}
bool nmethod::check_all_dependencies() {
bool found_check = false;
// wholesale check of all dependencies
for (Dependencies::DepStream deps(this); deps.next(); ) {
if (deps.check_dependency() != NULL) {
found_check = true;
NOT_DEBUG(break);
void nmethod::check_all_dependencies(DepChange& changes) {
// Checked dependencies are allocated into this ResourceMark
ResourceMark rm;
// Turn off dependency tracing while actually testing dependencies.
NOT_PRODUCT( FlagSetting fs(TraceDependencies, false) );
// 'dep_signature_buffers' caches already checked dependencies.
DependencySignatureBuffer dep_signature_buffers;
// Iterate over live nmethods and check dependencies of all nmethods that are not
// marked for deoptimization. A particular dependency is only checked once.
for(nmethod* nm = CodeCache::alive_nmethod(CodeCache::first()); nm != NULL; nm = CodeCache::alive_nmethod(CodeCache::next(nm))) {
if (!nm->is_marked_for_deoptimization()) {
for (Dependencies::DepStream deps(nm); deps.next(); ) {
// Construct abstraction of a dependency.
const DependencySignature* current_sig = new DependencySignature(deps);
// Determine if 'deps' is already checked. If it is not checked,
// 'add_if_missing()' adds the dependency signature and returns
// false.
if (!dep_signature_buffers.add_if_missing(*current_sig)) {
if (deps.check_dependency() != NULL) {
// Dependency checking failed. Print out information about the failed
// dependency and finally fail with an assert. We can fail here, since
// dependency checking is never done in a product build.
ResourceMark rm;
changes.print();
nm->print();
nm->print_dependencies();
assert(false, "Should have been marked for deoptimization");
}
}
}
}
}
return found_check; // tell caller if we found anything
}
bool nmethod::check_dependency_on(DepChange& changes) {

View File

@ -679,7 +679,7 @@ public:
// tells if any of this method's dependencies have been invalidated
// (this is expensive!)
bool check_all_dependencies();
static void check_all_dependencies(DepChange& changes);
// tells if this compiled method is dependent on the given changes,
// and the changes have invalidated it

View File

@ -98,7 +98,7 @@ HS_DTRACE_PROBE_DECL9(hotspot, method__compile__end,
Symbol* name = (method)->name(); \
Symbol* signature = (method)->signature(); \
HOTSPOT_METHOD_COMPILE_BEGIN( \
comp_name, strlen(comp_name), \
(char *) comp_name, strlen(comp_name), \
(char *) klass_name->bytes(), klass_name->utf8_length(), \
(char *) name->bytes(), name->utf8_length(), \
(char *) signature->bytes(), signature->utf8_length()); \
@ -110,7 +110,7 @@ HS_DTRACE_PROBE_DECL9(hotspot, method__compile__end,
Symbol* name = (method)->name(); \
Symbol* signature = (method)->signature(); \
HOTSPOT_METHOD_COMPILE_END( \
comp_name, strlen(comp_name), \
(char *) comp_name, strlen(comp_name), \
(char *) klass_name->bytes(), klass_name->utf8_length(), \
(char *) name->bytes(), name->utf8_length(), \
(char *) signature->bytes(), signature->utf8_length(), (success)); \

View File

@ -466,7 +466,7 @@ void CMSAdaptiveSizePolicy::checkpoint_roots_initial_end(
void CMSAdaptiveSizePolicy::checkpoint_roots_final_begin() {
_STW_timer.stop();
_latest_cms_initial_mark_end_to_remark_start_secs = _STW_timer.seconds();
// Start accumumlating time for the remark in the STW timer.
// Start accumulating time for the remark in the STW timer.
_STW_timer.reset();
_STW_timer.start();
}
@ -537,8 +537,8 @@ void CMSAdaptiveSizePolicy::msc_collection_end(GCCause::Cause gc_cause) {
avg_msc_pause()->sample(msc_pause_in_seconds);
double mutator_time_in_seconds = 0.0;
if (_latest_cms_collection_end_to_collection_start_secs == 0.0) {
// This assertion may fail because of time stamp gradularity.
// Comment it out and investiage it at a later time. The large
// This assertion may fail because of time stamp granularity.
// Comment it out and investigate it at a later time. The large
// time stamp granularity occurs on some older linux systems.
#ifndef CLOCK_GRANULARITY_TOO_LARGE
assert((_latest_cms_concurrent_marking_time_secs == 0.0) &&
@ -836,7 +836,7 @@ double CMSAdaptiveSizePolicy::cms_gc_cost() const {
void CMSAdaptiveSizePolicy::ms_collection_marking_begin() {
_STW_timer.stop();
// Start accumumlating time for the marking in the STW timer.
// Start accumulating time for the marking in the STW timer.
_STW_timer.reset();
_STW_timer.start();
}
@ -1227,7 +1227,7 @@ uint CMSAdaptiveSizePolicy::compute_survivor_space_size_and_threshold(
// We use the tenuring threshold to equalize the cost of major
// and minor collections.
// ThresholdTolerance is used to indicate how sensitive the
// tenuring threshold is to differences in cost betweent the
// tenuring threshold is to differences in cost between the
// collection types.
// Get the times of interest. This involves a little work, so

View File

@ -356,7 +356,7 @@ class CMSAdaptiveSizePolicy : public AdaptiveSizePolicy {
void concurrent_sweeping_begin();
void concurrent_sweeping_end();
// Similar to the above (e.g., concurrent_marking_end()) and
// is used for both the precleaning an abortable precleaing
// is used for both the precleaning an abortable precleaning
// phases.
void concurrent_precleaning_begin();
void concurrent_precleaning_end();

View File

@ -88,8 +88,7 @@ class CMSGCAdaptivePolicyCounters : public GCAdaptivePolicyCounters {
// of the tenured generation.
PerfVariable* _avg_msc_pause_counter;
// Average for the time between the most recent end of a
// MSC collection and the beginning of the next
// MSC collection.
// MSC collection and the beginning of the next MSC collection.
PerfVariable* _avg_msc_interval_counter;
// Average for the GC cost of a MSC collection based on
// _avg_msc_pause_counter and _avg_msc_interval_counter.
@ -99,8 +98,7 @@ class CMSGCAdaptivePolicyCounters : public GCAdaptivePolicyCounters {
// of the tenured generation.
PerfVariable* _avg_ms_pause_counter;
// Average for the time between the most recent end of a
// MS collection and the beginning of the next
// MS collection.
// MS collection and the beginning of the next MS collection.
PerfVariable* _avg_ms_interval_counter;
// Average for the GC cost of a MS collection based on
// _avg_ms_pause_counter and _avg_ms_interval_counter.
@ -108,9 +106,9 @@ class CMSGCAdaptivePolicyCounters : public GCAdaptivePolicyCounters {
// Average of the bytes promoted per minor collection.
PerfVariable* _promoted_avg_counter;
// Average of the deviation of the promoted average
// Average of the deviation of the promoted average.
PerfVariable* _promoted_avg_dev_counter;
// Padded average of the bytes promoted per minor colleciton
// Padded average of the bytes promoted per minor collection.
PerfVariable* _promoted_padded_avg_counter;
// See description of the _change_young_gen_for_maj_pauses

View File

@ -258,10 +258,10 @@ class MarkRefsIntoAndScanClosure: public CMSOopsInGenClosure {
bool take_from_overflow_list();
};
// Tn this, the parallel avatar of MarkRefsIntoAndScanClosure, the revisit
// In this, the parallel avatar of MarkRefsIntoAndScanClosure, the revisit
// stack and the bitMap are shared, so access needs to be suitably
// sycnhronized. An OopTaskQueue structure, supporting efficient
// workstealing, replaces a CMSMarkStack for storing grey objects.
// synchronized. An OopTaskQueue structure, supporting efficient
// work stealing, replaces a CMSMarkStack for storing grey objects.
class Par_MarkRefsIntoAndScanClosure: public CMSOopsInGenClosure {
private:
MemRegion _span;

View File

@ -407,8 +407,8 @@ size_t CompactibleFreeListSpace::max_alloc_in_words() const {
res = MAX2(res, MIN2(_smallLinearAllocBlock._word_size,
(size_t) SmallForLinearAlloc - 1));
// XXX the following could potentially be pretty slow;
// should one, pesimally for the rare cases when res
// caclulated above is less than IndexSetSize,
// should one, pessimistically for the rare cases when res
// calculated above is less than IndexSetSize,
// just return res calculated above? My reasoning was that
// those cases will be so rare that the extra time spent doesn't
// really matter....
@ -759,7 +759,7 @@ CompactibleFreeListSpace::new_dcto_cl(ExtendedOopClosure* cl,
// Note on locking for the space iteration functions:
// since the collector's iteration activities are concurrent with
// allocation activities by mutators, absent a suitable mutual exclusion
// mechanism the iterators may go awry. For instace a block being iterated
// mechanism the iterators may go awry. For instance a block being iterated
// may suddenly be allocated or divided up and part of it allocated and
// so on.
@ -2090,7 +2090,7 @@ CompactibleFreeListSpace::refillLinearAllocBlock(LinearAllocBlock* blk) {
// Support for concurrent collection policy decisions.
bool CompactibleFreeListSpace::should_concurrent_collect() const {
// In the future we might want to add in frgamentation stats --
// In the future we might want to add in fragmentation stats --
// including erosion of the "mountain" into this decision as well.
return !adaptive_freelists() && linearAllocationWouldFail();
}
@ -2099,7 +2099,7 @@ bool CompactibleFreeListSpace::should_concurrent_collect() const {
void CompactibleFreeListSpace::prepare_for_compaction(CompactPoint* cp) {
SCAN_AND_FORWARD(cp,end,block_is_obj,block_size);
// prepare_for_compaction() uses the space between live objects
// Prepare_for_compaction() uses the space between live objects
// so that later phase can skip dead space quickly. So verification
// of the free lists doesn't work after.
}
@ -2122,7 +2122,7 @@ void CompactibleFreeListSpace::compact() {
SCAN_AND_COMPACT(obj_size);
}
// fragmentation_metric = 1 - [sum of (fbs**2) / (sum of fbs)**2]
// Fragmentation metric = 1 - [sum of (fbs**2) / (sum of fbs)**2]
// where fbs is free block sizes
double CompactibleFreeListSpace::flsFrag() const {
size_t itabFree = totalSizeInIndexedFreeLists();
@ -2651,7 +2651,7 @@ void CFLS_LAB::get_from_global_pool(size_t word_sz, AdaptiveFreeList<FreeChunk>*
// changes on-the-fly during a scavenge and avoid such a phase-change
// pothole. The following code is a heuristic attempt to do that.
// It is protected by a product flag until we have gained
// enough experience with this heuristic and fine-tuned its behaviour.
// enough experience with this heuristic and fine-tuned its behavior.
// WARNING: This might increase fragmentation if we overreact to
// small spikes, so some kind of historical smoothing based on
// previous experience with the greater reactivity might be useful.

View File

@ -58,7 +58,7 @@ class LinearAllocBlock VALUE_OBJ_CLASS_SPEC {
HeapWord* _ptr;
size_t _word_size;
size_t _refillSize;
size_t _allocation_size_limit; // largest size that will be allocated
size_t _allocation_size_limit; // Largest size that will be allocated
void print_on(outputStream* st) const;
};
@ -116,14 +116,14 @@ class CompactibleFreeListSpace: public CompactibleSpace {
PromotionInfo _promoInfo;
// helps to impose a global total order on freelistLock ranks;
// Helps to impose a global total order on freelistLock ranks;
// assumes that CFLSpace's are allocated in global total order
static int _lockRank;
// a lock protecting the free lists and free blocks;
// A lock protecting the free lists and free blocks;
// mutable because of ubiquity of locking even for otherwise const methods
mutable Mutex _freelistLock;
// locking verifier convenience function
// Locking verifier convenience function
void assert_locked() const PRODUCT_RETURN;
void assert_locked(const Mutex* lock) const PRODUCT_RETURN;
@ -131,12 +131,13 @@ class CompactibleFreeListSpace: public CompactibleSpace {
LinearAllocBlock _smallLinearAllocBlock;
FreeBlockDictionary<FreeChunk>::DictionaryChoice _dictionaryChoice;
AFLBinaryTreeDictionary* _dictionary; // ptr to dictionary for large size blocks
AFLBinaryTreeDictionary* _dictionary; // Pointer to dictionary for large size blocks
// Indexed array for small size blocks
AdaptiveFreeList<FreeChunk> _indexedFreeList[IndexSetSize];
// indexed array for small size blocks
// allocation stategy
bool _fitStrategy; // Use best fit strategy.
// Allocation strategy
bool _fitStrategy; // Use best fit strategy
bool _adaptive_freelists; // Use adaptive freelists
// This is an address close to the largest free chunk in the heap.
@ -157,7 +158,7 @@ class CompactibleFreeListSpace: public CompactibleSpace {
// Extra stuff to manage promotion parallelism.
// a lock protecting the dictionary during par promotion allocation.
// A lock protecting the dictionary during par promotion allocation.
mutable Mutex _parDictionaryAllocLock;
Mutex* parDictionaryAllocLock() const { return &_parDictionaryAllocLock; }
@ -275,26 +276,26 @@ class CompactibleFreeListSpace: public CompactibleSpace {
}
protected:
// reset the indexed free list to its initial empty condition.
// Reset the indexed free list to its initial empty condition.
void resetIndexedFreeListArray();
// reset to an initial state with a single free block described
// Reset to an initial state with a single free block described
// by the MemRegion parameter.
void reset(MemRegion mr);
// Return the total number of words in the indexed free lists.
size_t totalSizeInIndexedFreeLists() const;
public:
// Constructor...
// Constructor
CompactibleFreeListSpace(BlockOffsetSharedArray* bs, MemRegion mr,
bool use_adaptive_freelists,
FreeBlockDictionary<FreeChunk>::DictionaryChoice);
// accessors
// Accessors
bool bestFitFirst() { return _fitStrategy == FreeBlockBestFitFirst; }
FreeBlockDictionary<FreeChunk>* dictionary() const { return _dictionary; }
HeapWord* nearLargestChunk() const { return _nearLargestChunk; }
void set_nearLargestChunk(HeapWord* v) { _nearLargestChunk = v; }
// Set CMS global values
// Set CMS global values.
static void set_cms_values();
// Return the free chunk at the end of the space. If no such
@ -305,7 +306,7 @@ class CompactibleFreeListSpace: public CompactibleSpace {
void set_collector(CMSCollector* collector) { _collector = collector; }
// Support for parallelization of rescan and marking
// Support for parallelization of rescan and marking.
const size_t rescan_task_size() const { return _rescan_task_size; }
const size_t marking_task_size() const { return _marking_task_size; }
SequentialSubTasksDone* conc_par_seq_tasks() {return &_conc_par_seq_tasks; }
@ -346,7 +347,7 @@ class CompactibleFreeListSpace: public CompactibleSpace {
// Resizing support
void set_end(HeapWord* value); // override
// mutual exclusion support
// Mutual exclusion support
Mutex* freelistLock() const { return &_freelistLock; }
// Iteration support
@ -370,7 +371,7 @@ class CompactibleFreeListSpace: public CompactibleSpace {
// If the iteration encounters an unparseable portion of the region,
// terminate the iteration and return the address of the start of the
// subregion that isn't done. Return of "NULL" indicates that the
// interation completed.
// iteration completed.
virtual HeapWord*
object_iterate_careful_m(MemRegion mr,
ObjectClosureCareful* cl);
@ -393,11 +394,11 @@ class CompactibleFreeListSpace: public CompactibleSpace {
size_t block_size_nopar(const HeapWord* p) const;
bool block_is_obj_nopar(const HeapWord* p) const;
// iteration support for promotion
// Iteration support for promotion
void save_marks();
bool no_allocs_since_save_marks();
// iteration support for sweeping
// Iteration support for sweeping
void save_sweep_limit() {
_sweep_limit = BlockOffsetArrayUseUnallocatedBlock ?
unallocated_block() : end();
@ -457,7 +458,7 @@ class CompactibleFreeListSpace: public CompactibleSpace {
FreeChunk* allocateScratch(size_t size);
// returns true if either the small or large linear allocation buffer is empty.
// Returns true if either the small or large linear allocation buffer is empty.
bool linearAllocationWouldFail() const;
// Adjust the chunk for the minimum size. This version is called in
@ -477,18 +478,18 @@ class CompactibleFreeListSpace: public CompactibleSpace {
void addChunkAndRepairOffsetTable(HeapWord* chunk, size_t size,
bool coalesced);
// Support for decisions regarding concurrent collection policy
// Support for decisions regarding concurrent collection policy.
bool should_concurrent_collect() const;
// Support for compaction
// Support for compaction.
void prepare_for_compaction(CompactPoint* cp);
void adjust_pointers();
void compact();
// reset the space to reflect the fact that a compaction of the
// Reset the space to reflect the fact that a compaction of the
// space has been done.
virtual void reset_after_compaction();
// Debugging support
// Debugging support.
void print() const;
void print_on(outputStream* st) const;
void prepare_for_verify();
@ -500,7 +501,7 @@ class CompactibleFreeListSpace: public CompactibleSpace {
// i.e. either the binary tree dictionary, the indexed free lists
// or the linear allocation block.
bool verify_chunk_in_free_list(FreeChunk* fc) const;
// Verify that the given chunk is the linear allocation block
// Verify that the given chunk is the linear allocation block.
bool verify_chunk_is_linear_alloc_block(FreeChunk* fc) const;
// Do some basic checks on the the free lists.
void check_free_list_consistency() const PRODUCT_RETURN;
@ -516,7 +517,7 @@ class CompactibleFreeListSpace: public CompactibleSpace {
size_t sumIndexedFreeListArrayReturnedBytes();
// Return the total number of chunks in the indexed free lists.
size_t totalCountInIndexedFreeLists() const;
// Return the total numberof chunks in the space.
// Return the total number of chunks in the space.
size_t totalCount();
)

View File

@ -117,10 +117,10 @@ GCCause::Cause CMSCollector::_full_gc_cause = GCCause::_no_gc;
// hide the naked CGC_lock manipulation in the baton-passing code
// further below. That's something we should try to do. Also, the proof
// of correctness of this 2-level locking scheme is far from obvious,
// and potentially quite slippery. We have an uneasy supsicion, for instance,
// and potentially quite slippery. We have an uneasy suspicion, for instance,
// that there may be a theoretical possibility of delay/starvation in the
// low-level lock/wait/notify scheme used for the baton-passing because of
// potential intereference with the priority scheme embodied in the
// potential interference with the priority scheme embodied in the
// CMS-token-passing protocol. See related comments at a CGC_lock->wait()
// invocation further below and marked with "XXX 20011219YSR".
// Indeed, as we note elsewhere, this may become yet more slippery
@ -259,7 +259,7 @@ ConcurrentMarkSweepGeneration::ConcurrentMarkSweepGeneration(
// Ideally, in the calculation below, we'd compute the dilatation
// factor as: MinChunkSize/(promoting_gen's min object size)
// Since we do not have such a general query interface for the
// promoting generation, we'll instead just use the mimimum
// promoting generation, we'll instead just use the minimum
// object size (which today is a header's worth of space);
// note that all arithmetic is in units of HeapWords.
assert(MinChunkSize >= CollectedHeap::min_fill_size(), "just checking");
@ -274,7 +274,7 @@ ConcurrentMarkSweepGeneration::ConcurrentMarkSweepGeneration(
//
// Let "f" be MinHeapFreeRatio in
//
// _intiating_occupancy = 100-f +
// _initiating_occupancy = 100-f +
// f * (CMSTriggerRatio/100)
// where CMSTriggerRatio is the argument "tr" below.
//
@ -2671,7 +2671,7 @@ bool CMSCollector::waitForForegroundGC() {
// that it's responsible for collecting, while itself doing any
// work common to all generations it's responsible for. A similar
// comment applies to the gc_epilogue()'s.
// The role of the varaible _between_prologue_and_epilogue is to
// The role of the variable _between_prologue_and_epilogue is to
// enforce the invocation protocol.
void CMSCollector::gc_prologue(bool full) {
// Call gc_prologue_work() for the CMSGen
@ -2878,10 +2878,10 @@ bool CMSCollector::have_cms_token() {
// Check reachability of the given heap address in CMS generation,
// treating all other generations as roots.
bool CMSCollector::is_cms_reachable(HeapWord* addr) {
// We could "guarantee" below, rather than assert, but i'll
// We could "guarantee" below, rather than assert, but I'll
// leave these as "asserts" so that an adventurous debugger
// could try this in the product build provided some subset of
// the conditions were met, provided they were intersted in the
// the conditions were met, provided they were interested in the
// results and knew that the computation below wouldn't interfere
// with other concurrent computations mutating the structures
// being read or written.
@ -2982,7 +2982,7 @@ bool CMSCollector::verify_after_remark(bool silent) {
// This is as intended, because by this time
// GC must already have cleared any refs that need to be cleared,
// and traced those that need to be marked; moreover,
// the marking done here is not going to intefere in any
// the marking done here is not going to interfere in any
// way with the marking information used by GC.
NoRefDiscovery no_discovery(ref_processor());
@ -3000,7 +3000,7 @@ bool CMSCollector::verify_after_remark(bool silent) {
if (CMSRemarkVerifyVariant == 1) {
// In this first variant of verification, we complete
// all marking, then check if the new marks-verctor is
// all marking, then check if the new marks-vector is
// a subset of the CMS marks-vector.
verify_after_remark_work_1();
} else if (CMSRemarkVerifyVariant == 2) {
@ -3033,7 +3033,6 @@ void CMSCollector::verify_after_remark_work_1() {
gch->gen_process_strong_roots(_cmsGen->level(),
true, // younger gens are roots
true, // activate StrongRootsScope
false, // not scavenging
SharedHeap::ScanningOption(roots_scanning_options()),
&notOlder,
true, // walk code active on stacks
@ -3101,7 +3100,6 @@ void CMSCollector::verify_after_remark_work_2() {
gch->gen_process_strong_roots(_cmsGen->level(),
true, // younger gens are roots
true, // activate StrongRootsScope
false, // not scavenging
SharedHeap::ScanningOption(roots_scanning_options()),
&notOlder,
true, // walk code active on stacks
@ -3303,7 +3301,7 @@ bool ConcurrentMarkSweepGeneration::is_too_full() const {
void CMSCollector::setup_cms_unloading_and_verification_state() {
const bool should_verify = VerifyBeforeGC || VerifyAfterGC || VerifyDuringGC
|| VerifyBeforeExit;
const int rso = SharedHeap::SO_Strings | SharedHeap::SO_CodeCache;
const int rso = SharedHeap::SO_Strings | SharedHeap::SO_AllCodeCache;
// We set the proper root for this CMS cycle here.
if (should_unload_classes()) { // Should unload classes this cycle
@ -3401,7 +3399,7 @@ HeapWord* ConcurrentMarkSweepGeneration::expand_and_par_lab_allocate(CMSParGCThr
CMSExpansionCause::_allocate_par_lab);
// Now go around the loop and try alloc again;
// A competing par_promote might beat us to the expansion space,
// so we may go around the loop again if promotion fails agaion.
// so we may go around the loop again if promotion fails again.
if (GCExpandToAllocateDelayMillis > 0) {
os::sleep(Thread::current(), GCExpandToAllocateDelayMillis, false);
}
@ -3738,10 +3736,9 @@ void CMSCollector::checkpointRootsInitialWork(bool asynch) {
gch->gen_process_strong_roots(_cmsGen->level(),
true, // younger gens are roots
true, // activate StrongRootsScope
false, // not scavenging
SharedHeap::ScanningOption(roots_scanning_options()),
&notOlder,
true, // walk all of code cache if (so & SO_CodeCache)
true, // walk all of code cache if (so & SO_AllCodeCache)
NULL,
&klass_closure);
}
@ -4373,7 +4370,7 @@ void CMSConcMarkingTask::coordinator_yield() {
// should really use wait/notify, which is the recommended
// way of doing this type of interaction. Additionally, we should
// consolidate the eight methods that do the yield operation and they
// are almost identical into one for better maintenability and
// are almost identical into one for better maintainability and
// readability. See 6445193.
//
// Tony 2006.06.29
@ -4541,7 +4538,7 @@ void CMSCollector::abortable_preclean() {
// If Eden's current occupancy is below this threshold,
// immediately schedule the remark; else preclean
// past the next scavenge in an effort to
// schedule the pause as described avove. By choosing
// schedule the pause as described above. By choosing
// CMSScheduleRemarkEdenSizeThreshold >= max eden size
// we will never do an actual abortable preclean cycle.
if (get_eden_used() > CMSScheduleRemarkEdenSizeThreshold) {
@ -5238,14 +5235,13 @@ void CMSParInitialMarkTask::work(uint worker_id) {
gch->gen_process_strong_roots(_collector->_cmsGen->level(),
false, // yg was scanned above
false, // this is parallel code
false, // not scavenging
SharedHeap::ScanningOption(_collector->CMSCollector::roots_scanning_options()),
&par_mri_cl,
true, // walk all of code cache if (so & SO_CodeCache)
true, // walk all of code cache if (so & SO_AllCodeCache)
NULL,
&klass_closure);
assert(_collector->should_unload_classes()
|| (_collector->CMSCollector::roots_scanning_options() & SharedHeap::SO_CodeCache),
|| (_collector->CMSCollector::roots_scanning_options() & SharedHeap::SO_AllCodeCache),
"if we didn't scan the code cache, we have to be ready to drop nmethods with expired weak oops");
_timer.stop();
if (PrintCMSStatistics != 0) {
@ -5375,14 +5371,13 @@ void CMSParRemarkTask::work(uint worker_id) {
gch->gen_process_strong_roots(_collector->_cmsGen->level(),
false, // yg was scanned above
false, // this is parallel code
false, // not scavenging
SharedHeap::ScanningOption(_collector->CMSCollector::roots_scanning_options()),
&par_mrias_cl,
true, // walk all of code cache if (so & SO_CodeCache)
true, // walk all of code cache if (so & SO_AllCodeCache)
NULL,
NULL); // The dirty klasses will be handled below
assert(_collector->should_unload_classes()
|| (_collector->CMSCollector::roots_scanning_options() & SharedHeap::SO_CodeCache),
|| (_collector->CMSCollector::roots_scanning_options() & SharedHeap::SO_AllCodeCache),
"if we didn't scan the code cache, we have to be ready to drop nmethods with expired weak oops");
_timer.stop();
if (PrintCMSStatistics != 0) {
@ -5537,8 +5532,8 @@ CMSParRemarkTask::do_dirty_card_rescan_tasks(
// CAUTION! CAUTION! CAUTION! CAUTION! CAUTION! CAUTION! CAUTION!
// CAUTION: This closure has state that persists across calls to
// the work method dirty_range_iterate_clear() in that it has
// imbedded in it a (subtype of) UpwardsObjectClosure. The
// use of that state in the imbedded UpwardsObjectClosure instance
// embedded in it a (subtype of) UpwardsObjectClosure. The
// use of that state in the embedded UpwardsObjectClosure instance
// assumes that the cards are always iterated (even if in parallel
// by several threads) in monotonically increasing order per each
// thread. This is true of the implementation below which picks
@ -5553,7 +5548,7 @@ CMSParRemarkTask::do_dirty_card_rescan_tasks(
// sure that the changes there do not run counter to the
// assumptions made here and necessary for correctness and
// efficiency. Note also that this code might yield inefficient
// behaviour in the case of very large objects that span one or
// behavior in the case of very large objects that span one or
// more work chunks. Such objects would potentially be scanned
// several times redundantly. Work on 4756801 should try and
// address that performance anomaly if at all possible. XXX
@ -5579,7 +5574,7 @@ CMSParRemarkTask::do_dirty_card_rescan_tasks(
while (!pst->is_task_claimed(/* reference */ nth_task)) {
// Having claimed the nth_task, compute corresponding mem-region,
// which is a-fortiori aligned correctly (i.e. at a MUT bopundary).
// which is a-fortiori aligned correctly (i.e. at a MUT boundary).
// The alignment restriction ensures that we do not need any
// synchronization with other gang-workers while setting or
// clearing bits in thus chunk of the MUT.
@ -5966,7 +5961,6 @@ void CMSCollector::do_remark_non_parallel() {
gch->gen_process_strong_roots(_cmsGen->level(),
true, // younger gens as roots
false, // use the local StrongRootsScope
false, // not scavenging
SharedHeap::ScanningOption(roots_scanning_options()),
&mrias_cl,
true, // walk code active on stacks
@ -5974,7 +5968,7 @@ void CMSCollector::do_remark_non_parallel() {
NULL); // The dirty klasses will be handled below
assert(should_unload_classes()
|| (roots_scanning_options() & SharedHeap::SO_CodeCache),
|| (roots_scanning_options() & SharedHeap::SO_AllCodeCache),
"if we didn't scan the code cache, we have to be ready to drop nmethods with expired weak oops");
}
@ -6371,7 +6365,7 @@ void CMSCollector::sweep(bool asynch) {
_inter_sweep_timer.reset();
_inter_sweep_timer.start();
// We need to use a monotonically non-deccreasing time in ms
// We need to use a monotonically non-decreasing time in ms
// or we will see time-warp warnings and os::javaTimeMillis()
// does not guarantee monotonicity.
jlong now = os::javaTimeNanos() / NANOSECS_PER_MILLISEC;
@ -6732,7 +6726,7 @@ bool CMSBitMap::allocate(MemRegion mr) {
warning("CMS bit map allocation failure");
return false;
}
// For now we'll just commit all of the bit map up fromt.
// For now we'll just commit all of the bit map up front.
// Later on we'll try to be more parsimonious with swap.
if (!_virtual_space.initialize(brs, brs.size())) {
warning("CMS bit map backing store failure");
@ -6839,8 +6833,8 @@ bool CMSMarkStack::allocate(size_t size) {
// XXX FIX ME !!! In the MT case we come in here holding a
// leaf lock. For printing we need to take a further lock
// which has lower rank. We need to recallibrate the two
// lock-ranks involved in order to be able to rpint the
// which has lower rank. We need to recalibrate the two
// lock-ranks involved in order to be able to print the
// messages below. (Or defer the printing to the caller.
// For now we take the expedient path of just disabling the
// messages for the problematic case.)
@ -7180,7 +7174,7 @@ size_t ScanMarkedObjectsAgainCarefullyClosure::do_object_careful_m(
}
#endif // ASSERT
} else {
// an unitialized object
// An uninitialized object.
assert(_bitMap->isMarked(addr+1), "missing Printezis mark?");
HeapWord* nextOneAddr = _bitMap->getNextMarkedWordAddress(addr + 2);
size = pointer_delta(nextOneAddr + 1, addr);
@ -7188,7 +7182,7 @@ size_t ScanMarkedObjectsAgainCarefullyClosure::do_object_careful_m(
"alignment problem");
// Note that pre-cleaning needn't redirty the card. OopDesc::set_klass()
// will dirty the card when the klass pointer is installed in the
// object (signalling the completion of initialization).
// object (signaling the completion of initialization).
}
} else {
// Either a not yet marked object or an uninitialized object
@ -7999,7 +7993,7 @@ void PushAndMarkClosure::do_oop(oop obj) {
// we need to dirty all of the cards that the object spans,
// since the rescan of object arrays will be limited to the
// dirty cards.
// Note that no one can be intefering with us in this action
// Note that no one can be interfering with us in this action
// of dirtying the mod union table, so no locking or atomics
// are required.
if (obj->is_objArray()) {
@ -9025,7 +9019,7 @@ void CMSParDrainMarkingStackClosure::trim_queue(uint max) {
// It's OK to call this multi-threaded; the worst thing
// that can happen is that we'll get a bunch of closely
// spaced simulated oveflows, but that's OK, in fact
// spaced simulated overflows, but that's OK, in fact
// probably good as it would exercise the overflow code
// under contention.
bool CMSCollector::simulate_overflow() {
@ -9145,7 +9139,7 @@ bool CMSCollector::par_take_from_overflow_list(size_t num,
(void) Atomic::cmpxchg_ptr(NULL, &_overflow_list, BUSY);
}
} else {
// Chop off the suffix and rerturn it to the global list.
// Chop off the suffix and return it to the global list.
assert(cur->mark() != BUSY, "Error");
oop suffix_head = cur->mark(); // suffix will be put back on global list
cur->set_mark(NULL); // break off suffix

View File

@ -171,19 +171,19 @@ class CMSBitMap VALUE_OBJ_CLASS_SPEC {
// Ideally this should be GrowableArray<> just like MSC's marking stack(s).
class CMSMarkStack: public CHeapObj<mtGC> {
//
friend class CMSCollector; // to get at expasion stats further below
friend class CMSCollector; // To get at expansion stats further below.
//
VirtualSpace _virtual_space; // space for the stack
oop* _base; // bottom of stack
size_t _index; // one more than last occupied index
size_t _capacity; // max #elements
Mutex _par_lock; // an advisory lock used in case of parallel access
NOT_PRODUCT(size_t _max_depth;) // max depth plumbed during run
VirtualSpace _virtual_space; // Space for the stack
oop* _base; // Bottom of stack
size_t _index; // One more than last occupied index
size_t _capacity; // Max #elements
Mutex _par_lock; // An advisory lock used in case of parallel access
NOT_PRODUCT(size_t _max_depth;) // Max depth plumbed during run
protected:
size_t _hit_limit; // we hit max stack size limit
size_t _failed_double; // we failed expansion before hitting limit
size_t _hit_limit; // We hit max stack size limit
size_t _failed_double; // We failed expansion before hitting limit
public:
CMSMarkStack():
@ -238,7 +238,7 @@ class CMSMarkStack: public CHeapObj<mtGC> {
_index = 0;
}
// Expand the stack, typically in response to an overflow condition
// Expand the stack, typically in response to an overflow condition.
void expand();
// Compute the least valued stack element.
@ -250,7 +250,7 @@ class CMSMarkStack: public CHeapObj<mtGC> {
return least;
}
// Exposed here to allow stack expansion in || case
// Exposed here to allow stack expansion in || case.
Mutex* par_lock() { return &_par_lock; }
};
@ -557,7 +557,7 @@ class CMSCollector: public CHeapObj<mtGC> {
// Manipulated with CAS in the parallel/multi-threaded case.
oop _overflow_list;
// The following array-pair keeps track of mark words
// displaced for accomodating overflow list above.
// displaced for accommodating overflow list above.
// This code will likely be revisited under RFE#4922830.
Stack<oop, mtGC> _preserved_oop_stack;
Stack<markOop, mtGC> _preserved_mark_stack;
@ -599,7 +599,7 @@ class CMSCollector: public CHeapObj<mtGC> {
void verify_after_remark_work_1();
void verify_after_remark_work_2();
// true if any verification flag is on.
// True if any verification flag is on.
bool _verifying;
bool verifying() const { return _verifying; }
void set_verifying(bool v) { _verifying = v; }
@ -611,9 +611,9 @@ class CMSCollector: public CHeapObj<mtGC> {
void set_did_compact(bool v);
// XXX Move these to CMSStats ??? FIX ME !!!
elapsedTimer _inter_sweep_timer; // time between sweeps
elapsedTimer _intra_sweep_timer; // time _in_ sweeps
// padded decaying average estimates of the above
elapsedTimer _inter_sweep_timer; // Time between sweeps
elapsedTimer _intra_sweep_timer; // Time _in_ sweeps
// Padded decaying average estimates of the above
AdaptivePaddedAverage _inter_sweep_estimate;
AdaptivePaddedAverage _intra_sweep_estimate;
@ -632,16 +632,16 @@ class CMSCollector: public CHeapObj<mtGC> {
void report_heap_summary(GCWhen::Type when);
protected:
ConcurrentMarkSweepGeneration* _cmsGen; // old gen (CMS)
MemRegion _span; // span covering above two
CardTableRS* _ct; // card table
ConcurrentMarkSweepGeneration* _cmsGen; // Old gen (CMS)
MemRegion _span; // Span covering above two
CardTableRS* _ct; // Card table
// CMS marking support structures
CMSBitMap _markBitMap;
CMSBitMap _modUnionTable;
CMSMarkStack _markStack;
HeapWord* _restart_addr; // in support of marking stack overflow
HeapWord* _restart_addr; // In support of marking stack overflow
void lower_restart_addr(HeapWord* low);
// Counters in support of marking stack / work queue overflow handling:
@ -656,12 +656,12 @@ class CMSCollector: public CHeapObj<mtGC> {
size_t _par_kac_ovflw;
NOT_PRODUCT(ssize_t _num_par_pushes;)
// ("Weak") Reference processing support
// ("Weak") Reference processing support.
ReferenceProcessor* _ref_processor;
CMSIsAliveClosure _is_alive_closure;
// keep this textually after _markBitMap and _span; c'tor dependency
// Keep this textually after _markBitMap and _span; c'tor dependency.
ConcurrentMarkSweepThread* _cmsThread; // the thread doing the work
ConcurrentMarkSweepThread* _cmsThread; // The thread doing the work
ModUnionClosure _modUnionClosure;
ModUnionClosurePar _modUnionClosurePar;
@ -697,7 +697,7 @@ class CMSCollector: public CHeapObj<mtGC> {
// State related to prologue/epilogue invocation for my generations
bool _between_prologue_and_epilogue;
// Signalling/State related to coordination between fore- and backgroud GC
// Signaling/State related to coordination between fore- and background GC
// Note: When the baton has been passed from background GC to foreground GC,
// _foregroundGCIsActive is true and _foregroundGCShouldWait is false.
static bool _foregroundGCIsActive; // true iff foreground collector is active or
@ -712,13 +712,13 @@ class CMSCollector: public CHeapObj<mtGC> {
int _numYields;
size_t _numDirtyCards;
size_t _sweep_count;
// number of full gc's since the last concurrent gc.
// Number of full gc's since the last concurrent gc.
uint _full_gcs_since_conc_gc;
// occupancy used for bootstrapping stats
// Occupancy used for bootstrapping stats
double _bootstrap_occupancy;
// timer
// Timer
elapsedTimer _timer;
// Timing, allocation and promotion statistics, used for scheduling.
@ -770,7 +770,7 @@ class CMSCollector: public CHeapObj<mtGC> {
int no_of_gc_threads);
void push_on_overflow_list(oop p);
void par_push_on_overflow_list(oop p);
// the following is, obviously, not, in general, "MT-stable"
// The following is, obviously, not, in general, "MT-stable"
bool overflow_list_is_empty() const;
void preserve_mark_if_necessary(oop p);
@ -778,24 +778,24 @@ class CMSCollector: public CHeapObj<mtGC> {
void preserve_mark_work(oop p, markOop m);
void restore_preserved_marks_if_any();
NOT_PRODUCT(bool no_preserved_marks() const;)
// in support of testing overflow code
// In support of testing overflow code
NOT_PRODUCT(int _overflow_counter;)
NOT_PRODUCT(bool simulate_overflow();) // sequential
NOT_PRODUCT(bool simulate_overflow();) // Sequential
NOT_PRODUCT(bool par_simulate_overflow();) // MT version
// CMS work methods
void checkpointRootsInitialWork(bool asynch); // initial checkpoint work
void checkpointRootsInitialWork(bool asynch); // Initial checkpoint work
// a return value of false indicates failure due to stack overflow
bool markFromRootsWork(bool asynch); // concurrent marking work
// A return value of false indicates failure due to stack overflow
bool markFromRootsWork(bool asynch); // Concurrent marking work
public: // FIX ME!!! only for testing
bool do_marking_st(bool asynch); // single-threaded marking
bool do_marking_mt(bool asynch); // multi-threaded marking
bool do_marking_st(bool asynch); // Single-threaded marking
bool do_marking_mt(bool asynch); // Multi-threaded marking
private:
// concurrent precleaning work
// Concurrent precleaning work
size_t preclean_mod_union_table(ConcurrentMarkSweepGeneration* gen,
ScanMarkedObjectsAgainCarefullyClosure* cl);
size_t preclean_card_table(ConcurrentMarkSweepGeneration* gen,
@ -811,26 +811,26 @@ class CMSCollector: public CHeapObj<mtGC> {
// Resets (i.e. clears) the per-thread plab sample vectors
void reset_survivor_plab_arrays();
// final (second) checkpoint work
// Final (second) checkpoint work
void checkpointRootsFinalWork(bool asynch, bool clear_all_soft_refs,
bool init_mark_was_synchronous);
// work routine for parallel version of remark
// Work routine for parallel version of remark
void do_remark_parallel();
// work routine for non-parallel version of remark
// Work routine for non-parallel version of remark
void do_remark_non_parallel();
// reference processing work routine (during second checkpoint)
// Reference processing work routine (during second checkpoint)
void refProcessingWork(bool asynch, bool clear_all_soft_refs);
// concurrent sweeping work
// Concurrent sweeping work
void sweepWork(ConcurrentMarkSweepGeneration* gen, bool asynch);
// (concurrent) resetting of support data structures
// (Concurrent) resetting of support data structures
void reset(bool asynch);
// Clear _expansion_cause fields of constituent generations
void clear_expansion_cause();
// An auxilliary method used to record the ends of
// An auxiliary method used to record the ends of
// used regions of each generation to limit the extent of sweep
void save_sweep_limits();
@ -854,7 +854,7 @@ class CMSCollector: public CHeapObj<mtGC> {
bool is_external_interruption();
void report_concurrent_mode_interruption();
// If the backgrould GC is active, acquire control from the background
// If the background GC is active, acquire control from the background
// GC and do the collection.
void acquire_control_and_collect(bool full, bool clear_all_soft_refs);
@ -893,7 +893,7 @@ class CMSCollector: public CHeapObj<mtGC> {
ConcurrentMarkSweepGeneration* cmsGen() { return _cmsGen; }
// locking checks
// Locking checks
NOT_PRODUCT(static bool have_cms_token();)
// XXXPERM bool should_collect(bool full, size_t size, bool tlab);
@ -958,7 +958,7 @@ class CMSCollector: public CHeapObj<mtGC> {
CMSBitMap* markBitMap() { return &_markBitMap; }
void directAllocated(HeapWord* start, size_t size);
// main CMS steps and related support
// Main CMS steps and related support
void checkpointRootsInitial(bool asynch);
bool markFromRoots(bool asynch); // a return value of false indicates failure
// due to stack overflow
@ -977,7 +977,7 @@ class CMSCollector: public CHeapObj<mtGC> {
// Performance Counter Support
CollectorCounters* counters() { return _gc_counters; }
// timer stuff
// Timer stuff
void startTimer() { assert(!_timer.is_active(), "Error"); _timer.start(); }
void stopTimer() { assert( _timer.is_active(), "Error"); _timer.stop(); }
void resetTimer() { assert(!_timer.is_active(), "Error"); _timer.reset(); }
@ -1014,18 +1014,18 @@ class CMSCollector: public CHeapObj<mtGC> {
static void print_on_error(outputStream* st);
// debugging
// Debugging
void verify();
bool verify_after_remark(bool silent = VerifySilently);
void verify_ok_to_terminate() const PRODUCT_RETURN;
void verify_work_stacks_empty() const PRODUCT_RETURN;
void verify_overflow_empty() const PRODUCT_RETURN;
// convenience methods in support of debugging
// Convenience methods in support of debugging
static const size_t skip_header_HeapWords() PRODUCT_RETURN0;
HeapWord* block_start(const void* p) const PRODUCT_RETURN0;
// accessors
// Accessors
CMSMarkStack* verification_mark_stack() { return &_markStack; }
CMSBitMap* verification_mark_bm() { return &_verification_mark_bm; }
@ -1109,7 +1109,7 @@ class ConcurrentMarkSweepGeneration: public CardGeneration {
CollectionTypes _debug_collection_type;
// True if a compactiing collection was done.
// True if a compacting collection was done.
bool _did_compact;
bool did_compact() { return _did_compact; }
@ -1203,7 +1203,7 @@ class ConcurrentMarkSweepGeneration: public CardGeneration {
// Support for compaction
CompactibleSpace* first_compaction_space() const;
// Adjust quantites in the generation affected by
// Adjust quantities in the generation affected by
// the compaction.
void reset_after_compaction();
@ -1301,7 +1301,7 @@ class ConcurrentMarkSweepGeneration: public CardGeneration {
void setNearLargestChunk();
bool isNearLargestChunk(HeapWord* addr);
// Get the chunk at the end of the space. Delagates to
// Get the chunk at the end of the space. Delegates to
// the space.
FreeChunk* find_chunk_at_end();
@ -1422,7 +1422,6 @@ class MarkFromRootsClosure: public BitMapClosure {
// marking from the roots following the first checkpoint.
// XXX This should really be a subclass of The serial version
// above, but i have not had the time to refactor things cleanly.
// That willbe done for Dolphin.
class Par_MarkFromRootsClosure: public BitMapClosure {
CMSCollector* _collector;
MemRegion _whole_span;
@ -1780,7 +1779,7 @@ class SweepClosure: public BlkClosureCareful {
void do_already_free_chunk(FreeChunk *fc);
// Work method called when processing an already free or a
// freshly garbage chunk to do a lookahead and possibly a
// premptive flush if crossing over _limit.
// preemptive flush if crossing over _limit.
void lookahead_and_flush(FreeChunk* fc, size_t chunkSize);
// Process a garbage chunk during sweeping.
size_t do_garbage_chunk(FreeChunk *fc);
@ -1879,7 +1878,7 @@ class CMSParDrainMarkingStackClosure: public VoidClosure {
};
// Allow yielding or short-circuiting of reference list
// prelceaning work.
// precleaning work.
class CMSPrecleanRefsYieldClosure: public YieldClosure {
CMSCollector* _collector;
void do_yield_work();

View File

@ -197,13 +197,13 @@ inline HeapWord* CMSBitMap::getNextMarkedWordAddress(
}
// Return the HeapWord address corrsponding to the next "0" bit
// Return the HeapWord address corresponding to the next "0" bit
// (inclusive).
inline HeapWord* CMSBitMap::getNextUnmarkedWordAddress(HeapWord* addr) const {
return getNextUnmarkedWordAddress(addr, endWord());
}
// Return the HeapWord address corrsponding to the next "0" bit
// Return the HeapWord address corresponding to the next "0" bit
// (inclusive).
inline HeapWord* CMSBitMap::getNextUnmarkedWordAddress(
HeapWord* start_addr, HeapWord* end_addr) const {

View File

@ -164,7 +164,7 @@ class ConcurrentMarkSweepThread: public ConcurrentGCThread {
// _pending_yields that holds the sum (of both sync and async requests), and
// a second counter _pending_decrements that only holds the async requests,
// for greater efficiency, since in a typical CMS run, there are many more
// pontential (i.e. static) yield points than there are actual
// potential (i.e. static) yield points than there are actual
// (i.e. dynamic) yields because of requests, which are few and far between.
//
// Note that, while "_pending_yields >= _pending_decrements" is an invariant,

View File

@ -279,7 +279,7 @@ void PromotionInfo::print_statistics(uint worker_id) const {
// When _spoolTail is NULL, then the set of slots with displaced headers
// is all those starting at the slot <_spoolHead, _firstIndex> and
// going up to the last slot of last block in the linked list.
// In this lartter case, _splice_point points to the tail block of
// In this latter case, _splice_point points to the tail block of
// this linked list of blocks holding displaced headers.
void PromotionInfo::verify() const {
// Verify the following:

View File

@ -141,8 +141,7 @@ void VM_CMS_Initial_Mark::doit() {
#ifndef USDT2
HS_DTRACE_PROBE(hs_private, cms__initmark__begin);
#else /* USDT2 */
HS_PRIVATE_CMS_INITMARK_BEGIN(
);
HS_PRIVATE_CMS_INITMARK_BEGIN();
#endif /* USDT2 */
_collector->_gc_timer_cm->register_gc_pause_start("Initial Mark");
@ -162,8 +161,7 @@ void VM_CMS_Initial_Mark::doit() {
#ifndef USDT2
HS_DTRACE_PROBE(hs_private, cms__initmark__end);
#else /* USDT2 */
HS_PRIVATE_CMS_INITMARK_END(
);
HS_PRIVATE_CMS_INITMARK_END();
#endif /* USDT2 */
}
@ -178,8 +176,7 @@ void VM_CMS_Final_Remark::doit() {
#ifndef USDT2
HS_DTRACE_PROBE(hs_private, cms__remark__begin);
#else /* USDT2 */
HS_PRIVATE_CMS_REMARK_BEGIN(
);
HS_PRIVATE_CMS_REMARK_BEGIN();
#endif /* USDT2 */
_collector->_gc_timer_cm->register_gc_pause_start("Final Mark");
@ -200,8 +197,7 @@ void VM_CMS_Final_Remark::doit() {
#ifndef USDT2
HS_DTRACE_PROBE(hs_private, cms__remark__end);
#else /* USDT2 */
HS_PRIVATE_CMS_REMARK_END(
);
HS_PRIVATE_CMS_REMARK_END();
#endif /* USDT2 */
}

View File

@ -39,7 +39,7 @@
// up, the wrapped closure is applied to all elements, keeping track of
// this elapsed time of this process, and leaving the array empty.
// The caller must be sure to call "done" to process any unprocessed
// buffered entriess.
// buffered entries.
class Generation;
class HeapRegion;
@ -98,116 +98,4 @@ public:
_closure_app_seconds(0.0) { }
};
class BufferingOopsInGenClosure: public OopsInGenClosure {
BufferingOopClosure _boc;
OopsInGenClosure* _oc;
protected:
template <class T> inline void do_oop_work(T* p) {
assert(generation()->is_in_reserved((void*)p), "Must be in!");
_boc.do_oop(p);
}
public:
BufferingOopsInGenClosure(OopsInGenClosure *oc) :
_boc(oc), _oc(oc) {}
virtual void do_oop(narrowOop* p) { do_oop_work(p); }
virtual void do_oop(oop* p) { do_oop_work(p); }
void done() {
_boc.done();
}
double closure_app_seconds () {
return _boc.closure_app_seconds();
}
void set_generation(Generation* gen) {
OopsInGenClosure::set_generation(gen);
_oc->set_generation(gen);
}
void reset_generation() {
// Make sure we finish the current work with the current generation.
_boc.done();
OopsInGenClosure::reset_generation();
_oc->reset_generation();
}
};
class BufferingOopsInHeapRegionClosure: public OopsInHeapRegionClosure {
private:
enum PrivateConstants {
BufferLength = 1024
};
StarTask _buffer[BufferLength];
StarTask* _buffer_top;
StarTask* _buffer_curr;
HeapRegion* _hr_buffer[BufferLength];
HeapRegion** _hr_curr;
OopsInHeapRegionClosure* _oc;
double _closure_app_seconds;
void process_buffer () {
assert((_hr_curr - _hr_buffer) == (_buffer_curr - _buffer),
"the two lengths should be the same");
double start = os::elapsedTime();
HeapRegion** hr_curr = _hr_buffer;
HeapRegion* hr_prev = NULL;
for (StarTask* curr = _buffer; curr < _buffer_curr; ++curr) {
HeapRegion* region = *hr_curr;
if (region != hr_prev) {
_oc->set_region(region);
hr_prev = region;
}
if (curr->is_narrow()) {
assert(UseCompressedOops, "Error");
_oc->do_oop((narrowOop*)(*curr));
} else {
_oc->do_oop((oop*)(*curr));
}
++hr_curr;
}
_buffer_curr = _buffer;
_hr_curr = _hr_buffer;
_closure_app_seconds += (os::elapsedTime() - start);
}
public:
virtual void do_oop(narrowOop* p) { do_oop_work(p); }
virtual void do_oop( oop* p) { do_oop_work(p); }
template <class T> void do_oop_work(T* p) {
if (_buffer_curr == _buffer_top) {
assert(_hr_curr > _hr_buffer, "_hr_curr should be consistent with _buffer_curr");
process_buffer();
}
StarTask new_ref(p);
*_buffer_curr = new_ref;
++_buffer_curr;
*_hr_curr = _from;
++_hr_curr;
}
void done () {
if (_buffer_curr > _buffer) {
assert(_hr_curr > _hr_buffer, "_hr_curr should be consistent with _buffer_curr");
process_buffer();
}
}
double closure_app_seconds () {
return _closure_app_seconds;
}
BufferingOopsInHeapRegionClosure (OopsInHeapRegionClosure *oc) :
_oc(oc),
_buffer_curr(_buffer), _buffer_top(_buffer + BufferLength),
_hr_curr(_hr_buffer),
_closure_app_seconds(0.0) { }
};
#endif // SHARE_VM_GC_IMPLEMENTATION_G1_BUFFERINGOOPCLOSURE_HPP

View File

@ -33,7 +33,7 @@ ConcurrentG1Refine::ConcurrentG1Refine(G1CollectedHeap* g1h) :
_threads(NULL), _n_threads(0),
_hot_card_cache(g1h)
{
// Ergomonically select initial concurrent refinement parameters
// Ergonomically select initial concurrent refinement parameters
if (FLAG_IS_DEFAULT(G1ConcRefinementGreenZone)) {
FLAG_SET_DEFAULT(G1ConcRefinementGreenZone, MAX2<int>(ParallelGCThreads, 1));
}

View File

@ -44,8 +44,8 @@ ConcurrentG1RefineThread(ConcurrentG1Refine* cg1r, ConcurrentG1RefineThread *nex
_vtime_accum(0.0)
{
// Each thread has its own monitor. The i-th thread is responsible for signalling
// to thread i+1 if the number of buffers in the queue exceeds a threashold for this
// Each thread has its own monitor. The i-th thread is responsible for signaling
// to thread i+1 if the number of buffers in the queue exceeds a threshold for this
// thread. Monitors are also used to wake up the threads during termination.
// The 0th worker in notified by mutator threads and has a special monitor.
// The last worker is used for young gen rset size sampling.

View File

@ -909,7 +909,7 @@ void ConcurrentMark::checkpointRootsInitialPre() {
}
#endif
// Initialise marking structures. This has to be done in a STW phase.
// Initialize marking structures. This has to be done in a STW phase.
reset();
// For each region note start of marking.
@ -923,8 +923,8 @@ void ConcurrentMark::checkpointRootsInitialPost() {
// If we force an overflow during remark, the remark operation will
// actually abort and we'll restart concurrent marking. If we always
// force an oveflow during remark we'll never actually complete the
// marking phase. So, we initilize this here, at the start of the
// force an overflow during remark we'll never actually complete the
// marking phase. So, we initialize this here, at the start of the
// cycle, so that at the remaining overflow number will decrease at
// every remark and we'll eventually not need to cause one.
force_overflow_stw()->init();
@ -959,7 +959,7 @@ void ConcurrentMark::checkpointRootsInitialPost() {
*
* Note, however, that this code is also used during remark and in
* this case we should not attempt to leave / enter the STS, otherwise
* we'll either hit an asseert (debug / fastdebug) or deadlock
* we'll either hit an assert (debug / fastdebug) or deadlock
* (product). So we should only leave / enter the STS if we are
* operating concurrently.
*
@ -1001,7 +1001,7 @@ void ConcurrentMark::enter_first_sync_barrier(uint worker_id) {
// task 0 is responsible for clearing the global data structures
// We should be here because of an overflow. During STW we should
// not clear the overflow flag since we rely on it being true when
// we exit this method to abort the pause and restart concurent
// we exit this method to abort the pause and restart concurrent
// marking.
reset_marking_state(true /* clear_overflow */);
force_overflow()->update();
@ -1251,7 +1251,7 @@ void ConcurrentMark::markFromRoots() {
CMConcurrentMarkingTask markingTask(this, cmThread());
if (use_parallel_marking_threads()) {
_parallel_workers->set_active_workers((int)active_workers);
// Don't set _n_par_threads because it affects MT in proceess_strong_roots()
// Don't set _n_par_threads because it affects MT in process_strong_roots()
// and the decisions on that MT processing is made elsewhere.
assert(_parallel_workers->active_workers() > 0, "Should have been set");
_parallel_workers->run_task(&markingTask);
@ -1484,7 +1484,7 @@ public:
}
// Set the marked bytes for the current region so that
// it can be queried by a calling verificiation routine
// it can be queried by a calling verification routine
_region_marked_bytes = marked_bytes;
return false;
@ -1619,7 +1619,6 @@ public:
}
};
class G1ParVerifyFinalCountTask: public AbstractGangTask {
protected:
G1CollectedHeap* _g1h;
@ -2307,7 +2306,7 @@ class G1CMDrainMarkingStackClosure: public VoidClosure {
// oop closure (an instance of G1CMKeepAliveAndDrainClosure above).
//
// CMTask::do_marking_step() is called in a loop, which we'll exit
// if there's nothing more to do (i.e. we'completely drained the
// if there's nothing more to do (i.e. we've completely drained the
// entries that were pushed as a a result of applying the 'keep alive'
// closure to the entries on the discovered ref lists) or we overflow
// the global marking stack.
@ -2470,7 +2469,7 @@ void ConcurrentMark::weakRefsWork(bool clear_all_soft_refs) {
// reference processing is not multi-threaded and is thus
// performed by the current thread instead of a gang worker).
//
// The gang tasks involved in parallel reference procssing create
// The gang tasks involved in parallel reference processing create
// their own instances of these closures, which do their own
// synchronization among themselves.
G1CMKeepAliveAndDrainClosure g1_keep_alive(this, task(0), true /* is_serial */);
@ -2529,10 +2528,9 @@ void ConcurrentMark::weakRefsWork(bool clear_all_soft_refs) {
assert(!rp->discovery_enabled(), "Post condition");
}
// Now clean up stale oops in StringTable
StringTable::unlink(&g1_is_alive);
// Clean up unreferenced symbols in symbol table.
SymbolTable::unlink();
g1h->unlink_string_and_symbol_table(&g1_is_alive,
/* process_strings */ false, // currently strings are always roots
/* process_symbols */ true);
}
void ConcurrentMark::swapMarkBitMaps() {
@ -2548,7 +2546,7 @@ private:
public:
void work(uint worker_id) {
// Since all available tasks are actually started, we should
// only proceed if we're supposed to be actived.
// only proceed if we're supposed to be active.
if (worker_id < _cm->active_tasks()) {
CMTask* task = _cm->task(worker_id);
task->record_start_time();
@ -3068,7 +3066,7 @@ class AggregateCountDataHRClosure: public HeapRegionClosure {
// 'start' should be in the heap.
assert(_g1h->is_in_g1_reserved(start) && _ct_bs->is_card_aligned(start), "sanity");
// 'end' *may* be just beyone the end of the heap (if hr is the last region)
// 'end' *may* be just beyond the end of the heap (if hr is the last region)
assert(!_g1h->is_in_g1_reserved(end) || _ct_bs->is_card_aligned(end), "sanity");
BitMap::idx_t start_idx = _cm->card_bitmap_index_for(start);
@ -4416,7 +4414,7 @@ void CMTask::do_marking_step(double time_target_ms,
// overflow was raised. This means we have to restart the
// marking phase and start iterating over regions. However, in
// order to do this we have to make sure that all tasks stop
// what they are doing and re-initialise in a safe manner. We
// what they are doing and re-initialize in a safe manner. We
// will achieve this with the use of two barrier sync points.
if (_cm->verbose_low()) {
@ -4430,7 +4428,7 @@ void CMTask::do_marking_step(double time_target_ms,
// When we exit this sync barrier we know that all tasks have
// stopped doing marking work. So, it's now safe to
// re-initialise our data structures. At the end of this method,
// re-initialize our data structures. At the end of this method,
// task 0 will clear the global data structures.
}

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