Merge
This commit is contained in:
commit
d01edb0815
.hgtags.hgtags-top-repo
common
autoconf
basics.m4build-performance.m4generated-configure.shhotspot-spec.gmk.injdk-options.m4libraries.m4toolchain.m4toolchain_windows.m4
bin
makefiles
corba
hotspot
.hgtags
agent
doc
make
src/share/classes/sun/jvm/hotspot
make
src/cpu
sparc/vm
assembler_sparc.cppassembler_sparc.hppassembler_sparc.inline.hppcodeBuffer_sparc.hppcppInterpreter_sparc.cppframe_sparc.cppframe_sparc.hppframe_sparc.inline.hppicBuffer_sparc.cppicache_sparc.cppinterp_masm_sparc.cppinterp_masm_sparc.hppinterpreter_sparc.cppjniFastGetField_sparc.cppmacroAssembler_sparc.cppmacroAssembler_sparc.hppmacroAssembler_sparc.inline.hppmetaspaceShared_sparc.cppmethodHandles_sparc.cppnativeInst_sparc.cppnativeInst_sparc.hpprelocInfo_sparc.cppruntime_sparc.cppsharedRuntime_sparc.cppstubGenerator_sparc.cppstubRoutines_sparc.cpptemplateInterpreter_sparc.cppvm_version_sparc.cppvmreg_sparc.cppvtableStubs_sparc.cpp
x86/vm
assembler_x86.cppassembler_x86.hppassembler_x86.inline.hppc1_LIRAssembler_x86.cppcppInterpreter_x86.cppframe_x86.cppframe_x86.inline.hppicBuffer_x86.cppicache_x86.cppinterp_masm_x86_32.cppinterp_masm_x86_32.hppinterp_masm_x86_64.cppinterp_masm_x86_64.hppinterpreter_x86_32.cppinterpreter_x86_64.cppjniFastGetField_x86_32.cppjniFastGetField_x86_64.cppmacroAssembler_x86.cppmacroAssembler_x86.hppmetaspaceShared_x86_32.cppmetaspaceShared_x86_64.cppmethodHandles_x86.cppnativeInst_x86.cpprelocInfo_x86.cppruntime_x86_32.cppruntime_x86_64.cppsharedRuntime_x86_32.cppsharedRuntime_x86_64.cppstubGenerator_x86_32.cpp
3
.hgtags
3
.hgtags
@ -186,3 +186,6 @@ cdaa6122185f9bf512dcd6600f56bfccc4824e8c jdk8-b61
|
||||
8d9d430b4244b95f5cf1ebe719f834a1ac5d6cd5 jdk8-b62
|
||||
21ee1dd7b809639284900a128b9b656a592ebc7a jdk8-b63
|
||||
70fa4b11f26522e69b51fd652215f60ce350bac3 jdk8-b64
|
||||
a2cf4d4a484378caea2e827ed604b2bbae58bdba jdk8-b65
|
||||
17820b958ae84f7c1cc6719319c8e2232f7a4f1d jdk8-b66
|
||||
76cc9bd3ece407d3a15d3bea537b57927973c5e7 jdk8-b67
|
||||
|
@ -186,3 +186,6 @@ e07f499b9dccb529ecf74172cf6ac11a195ec57a jdk8-b60
|
||||
8a3fe0ae06a8cc21347da5a18384b0aa6c2349f5 jdk8-b62
|
||||
3229597524cab4239325bc3602df6c486397a511 jdk8-b63
|
||||
1c8370a55b305d35353346202bde042ba9e8a9fd jdk8-b64
|
||||
b772de306dc24c17f7bd1398531ddeb58723b804 jdk8-b65
|
||||
13bb8c326e7b7b0b19d78c8088033e3932e3f7ca jdk8-b66
|
||||
9a6ec97ec45c1a62d5233cefa91e8390e380e13a jdk8-b67
|
||||
|
@ -129,7 +129,7 @@ AC_DEFUN([BASIC_REMOVE_SYMBOLIC_LINKS],
|
||||
if test "x$READLINK_TESTED" != yes; then
|
||||
# On MacOSX there is a readlink tool with a different
|
||||
# purpose than the GNU readlink tool. Check the found readlink.
|
||||
ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
|
||||
ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
|
||||
if test "x$ISGNU" = x; then
|
||||
# A readlink that we do not know how to use.
|
||||
# Are there other non-GNU readlinks out there?
|
||||
@ -141,20 +141,24 @@ AC_DEFUN([BASIC_REMOVE_SYMBOLIC_LINKS],
|
||||
if test "x$READLINK" != x; then
|
||||
$1=`$READLINK -f [$]$1`
|
||||
else
|
||||
# Save the current directory for restoring afterwards
|
||||
STARTDIR=$PWD
|
||||
COUNTER=0
|
||||
sym_link_dir=`$DIRNAME [$]$1`
|
||||
sym_link_file=`$BASENAME [$]$1`
|
||||
# Use the system pwd and not the shell builtin to resolve directory symlinks
|
||||
cd $sym_link_dir
|
||||
cd `$THEPWDCMD`
|
||||
sym_link_dir=`$THEPWDCMD`
|
||||
# Resolve file symlinks
|
||||
while test $COUNTER -lt 20; do
|
||||
ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
|
||||
if test "x$ISLINK" == x; then
|
||||
# This is not a symbolic link! We are done!
|
||||
break
|
||||
fi
|
||||
# The link might be relative! We have to use cd to travel safely.
|
||||
cd $sym_link_dir
|
||||
# ... and we must get the to the absolute path, not one using symbolic links.
|
||||
cd `pwd -P`
|
||||
# Again resolve directory symlinks since the target of the just found
|
||||
# link could be in a different directory
|
||||
cd `$DIRNAME $ISLINK`
|
||||
sym_link_dir=`$THEPWDCMD`
|
||||
sym_link_file=`$BASENAME $ISLINK`
|
||||
@ -286,7 +290,7 @@ AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
|
||||
# Where is the source? It is located two levels above the configure script.
|
||||
CURDIR="$PWD"
|
||||
cd "$AUTOCONF_DIR/../.."
|
||||
SRC_ROOT="`pwd`"
|
||||
SRC_ROOT="`$THEPWDCMD`"
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
PATH_SEP=";"
|
||||
@ -345,7 +349,13 @@ AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name],
|
||||
[ CONF_NAME=${with_conf_name} ])
|
||||
|
||||
# Test from where we are running configure, in or outside of src root.
|
||||
if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
|
||||
# To enable comparison of directories, CURDIR needs to be symlink free
|
||||
# just like SRC_ROOT already is
|
||||
NOSYM_CURDIR="$CURDIR"
|
||||
BASIC_REMOVE_SYMBOLIC_LINKS(NOSYM_CURDIR)
|
||||
if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
|
||||
|| test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
|
||||
|| test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
|
||||
# We are running configure from the src root.
|
||||
# Create a default ./build/target-variant-debuglevel output root.
|
||||
if test "x${CONF_NAME}" = x; then
|
||||
|
@ -204,7 +204,7 @@ AC_DEFUN_ONCE([BPERF_SETUP_PRECOMPILED_HEADERS],
|
||||
#
|
||||
AC_ARG_ENABLE([precompiled-headers], [AS_HELP_STRING([--disable-precompiled-headers],
|
||||
[disable using precompiled headers when compiling C++ @<:@enabled@:>@])],
|
||||
[ENABLE_PRECOMPH=${enable_precompiled-headers}], [ENABLE_PRECOMPH=yes])
|
||||
[ENABLE_PRECOMPH=${enable_precompiled_headers}], [ENABLE_PRECOMPH=yes])
|
||||
|
||||
USE_PRECOMPILED_HEADER=1
|
||||
if test "x$ENABLE_PRECOMPH" = xno; then
|
||||
@ -214,17 +214,16 @@ fi
|
||||
if test "x$ENABLE_PRECOMPH" = xyes; then
|
||||
# Check that the compiler actually supports precomp headers.
|
||||
if test "x$GCC" = xyes; then
|
||||
AC_MSG_CHECKING([that precompiled headers work])
|
||||
AC_MSG_CHECKING([that precompiled headers work])
|
||||
echo "int alfa();" > conftest.h
|
||||
$CXX -x c++-header conftest.h -o conftest.hpp.gch
|
||||
$CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD
|
||||
if test ! -f conftest.hpp.gch; then
|
||||
echo Precompiled header is not working!
|
||||
USE_PRECOMPILED_HEADER=0
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
rm -f conftest.h
|
||||
rm -f conftest.h conftest.hpp.gch
|
||||
fi
|
||||
fi
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -95,6 +95,26 @@ EXTRA_CFLAGS=@LEGACY_EXTRA_CFLAGS@
|
||||
EXTRA_CXXFLAGS=@LEGACY_EXTRA_CXXFLAGS@
|
||||
EXTRA_LDFLAGS=@LEGACY_EXTRA_LDFLAGS@
|
||||
|
||||
USE_PRECOMPILED_HEADER=@USE_PRECOMPILED_HEADER@
|
||||
|
||||
# Hotspot expects the variable FULL_DEBUG_SYMBOLS=1/0 to control debug symbols
|
||||
# creation.
|
||||
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
|
||||
FULL_DEBUG_SYMBOLS=1
|
||||
# Ensure hotspot uses the objcopy that configure located
|
||||
ALT_OBJCOPY:=$(OBJCOPY)
|
||||
else
|
||||
FULL_DEBUG_SYMBOLS=0
|
||||
endif
|
||||
|
||||
# Hotspot expects the variable ZIP_DEBUGINFO_FILES=1/0 and not true/false.
|
||||
ifeq ($(ZIP_DEBUGINFO_FILES)$(ENABLE_DEBUG_SYMBOLS), truetrue)
|
||||
ZIP_DEBUGINFO_FILES:=1
|
||||
endif
|
||||
ifeq ($(ZIP_DEBUGINFO_FILES), false)
|
||||
ZIP_DEBUGINFO_FILES:=0
|
||||
endif
|
||||
|
||||
# Sneak this in via the spec.gmk file, since we don't want to mess around too much with the Hotspot make files.
|
||||
# This is needed to get the LOG setting to work properly.
|
||||
include $(SRC_ROOT)/common/makefiles/MakeBase.gmk
|
||||
|
@ -432,32 +432,30 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
|
||||
# ENABLE_DEBUG_SYMBOLS
|
||||
# This must be done after the toolchain is setup, since we're looking at objcopy.
|
||||
#
|
||||
ENABLE_DEBUG_SYMBOLS=default
|
||||
|
||||
# default on macosx is no...
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
ENABLE_DEBUG_SYMBOLS=no
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE([debug-symbols],
|
||||
[AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])],
|
||||
[ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}],
|
||||
)
|
||||
[AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])])
|
||||
|
||||
AC_MSG_CHECKING([if we should generate debug symbols])
|
||||
|
||||
if test "x$ENABLE_DEBUG_SYMBOLS" = "xyes" && test "x$OBJCOPY" = x; then
|
||||
if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
|
||||
# explicit enabling of enable-debug-symbols and can't find objcopy
|
||||
# this is an error
|
||||
AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols])
|
||||
fi
|
||||
|
||||
if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
|
||||
if test "x$enable_debug_symbols" = "xyes"; then
|
||||
ENABLE_DEBUG_SYMBOLS=true
|
||||
elif test "x$enable_debug_symbols" = "xno"; then
|
||||
ENABLE_DEBUG_SYMBOLS=false
|
||||
else
|
||||
# default on macosx is false
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
ENABLE_DEBUG_SYMBOLS=false
|
||||
# Default is on if objcopy is found, otherwise off
|
||||
if test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
ENABLE_DEBUG_SYMBOLS=yes
|
||||
elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
ENABLE_DEBUG_SYMBOLS=true
|
||||
else
|
||||
ENABLE_DEBUG_SYMBOLS=no
|
||||
ENABLE_DEBUG_SYMBOLS=false
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -466,22 +464,16 @@ AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS])
|
||||
#
|
||||
# ZIP_DEBUGINFO_FILES
|
||||
#
|
||||
ZIP_DEBUGINFO_FILES=yes
|
||||
|
||||
AC_ARG_ENABLE([zip-debug-info],
|
||||
[AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])],
|
||||
[ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}],
|
||||
)
|
||||
[AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])])
|
||||
|
||||
AC_MSG_CHECKING([if we should zip debug-info files])
|
||||
AC_MSG_RESULT([$ZIP_DEBUGINFO_FILES])
|
||||
AC_MSG_RESULT([${enable_zip_debug_info}])
|
||||
|
||||
# Hotspot wants ZIP_DEBUGINFO_FILES to be 1 for yes
|
||||
# use that...
|
||||
if test "x$ZIP_DEBUGINFO_FILES" = "xyes"; then
|
||||
ZIP_DEBUGINFO_FILES=1
|
||||
if test "x${enable_zip_debug_info}" = "xno"; then
|
||||
ZIP_DEBUGINFO_FILES=false
|
||||
else
|
||||
ZIP_DEBUGINFO_FILES=0
|
||||
ZIP_DEBUGINFO_FILES=true
|
||||
fi
|
||||
|
||||
AC_SUBST(ENABLE_DEBUG_SYMBOLS)
|
||||
|
@ -601,11 +601,16 @@ AC_DEFUN_ONCE([LIB_SETUP_STATIC_LINK_LIBSTDCPP],
|
||||
# statically link libstdc++ before C++ ABI is stablized on Linux unless
|
||||
# dynamic build is configured on command line.
|
||||
#
|
||||
AC_ARG_ENABLE([static-link-stdc++], [AS_HELP_STRING([--disable-static-link-stdc++],
|
||||
[disable static linking of the C++ runtime on Linux @<:@enabled@:>@])],,
|
||||
[
|
||||
enable_static_link_stdc__=yes
|
||||
])
|
||||
AC_ARG_WITH([stdc++lib], [AS_HELP_STRING([--with-stdc++lib=<static>,<dynamic>,<default>],
|
||||
[force linking of the C++ runtime on Linux to either static or dynamic, default is static with dynamic as fallback])],
|
||||
[
|
||||
if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
|
||||
&& test "x$with_stdc__lib" != xdefault; then
|
||||
AC_MSG_ERROR([Bad parameter value --with-stdc++lib=$with_stdc__lib!])
|
||||
fi
|
||||
],
|
||||
[with_stdc__lib=default]
|
||||
)
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
# Test if -lstdc++ works.
|
||||
@ -636,31 +641,31 @@ if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
AC_LANG_POP(C++)
|
||||
AC_MSG_RESULT([$has_static_libstdcxx])
|
||||
|
||||
if test "x$has_static_libcxx" = xno && test "x$has_dynamic_libcxx" = xno; then
|
||||
AC_MSG_ERROR([I cannot link to stdc++! Neither dynamically nor statically.])
|
||||
if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
|
||||
AC_MSG_ERROR([Cannot link to stdc++, neither dynamically nor statically!])
|
||||
fi
|
||||
|
||||
if test "x$enable_static_link_stdc__" = xyes && test "x$has_static_libstdcxx" = xno; then
|
||||
AC_MSG_NOTICE([Static linking of libstdc++ was not possible reverting to dynamic linking.])
|
||||
enable_static_link_stdc__=no
|
||||
if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
|
||||
AC_MSG_ERROR([Static linking of libstdc++ was not possible!])
|
||||
fi
|
||||
|
||||
if test "x$enable_static_link_stdc__" = xno && test "x$has_dynamic_libstdcxx" = xno; then
|
||||
AC_MSG_NOTICE([Dynamic linking of libstdc++ was not possible reverting to static linking.])
|
||||
enable_static_link_stdc__=yes
|
||||
if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
|
||||
AC_MSG_ERROR([Dynamic linking of libstdc++ was not possible!])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([how to link with libstdc++])
|
||||
if test "x$enable_static_link_stdc__" = xyes; then
|
||||
LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
|
||||
LDCXX="$CC"
|
||||
STATIC_CXX_SETTING="STATIC_CXX=true"
|
||||
AC_MSG_RESULT([static])
|
||||
else
|
||||
# If dynamic was requested, it's available since it would fail above otherwise.
|
||||
# If dynamic wasn't requested, go with static unless it isn't available.
|
||||
if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
|
||||
LIBCXX="$LIBCXX -lstdc++"
|
||||
LDCXX="$CXX"
|
||||
STATIC_CXX_SETTING="STATIC_CXX=false"
|
||||
AC_MSG_RESULT([dynamic])
|
||||
else
|
||||
LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
|
||||
LDCXX="$CC"
|
||||
STATIC_CXX_SETTING="STATIC_CXX=true"
|
||||
AC_MSG_RESULT([static])
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(STATIC_CXX_SETTING)
|
||||
|
@ -114,13 +114,25 @@ AC_DEFUN([TOOLCHAIN_FIND_COMPILER],
|
||||
[
|
||||
COMPILER_NAME=$2
|
||||
|
||||
# Do a first initial attempt at searching the list of compiler names.
|
||||
$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"
|
||||
fi
|
||||
|
||||
# AC_PATH_PROGS can't be run multiple times with the same variable,
|
||||
# so create a new name for this run.
|
||||
AC_PATH_PROGS(POTENTIAL_$1, $3)
|
||||
$1=$POTENTIAL_$1
|
||||
if test "x[$]$1" = x; then
|
||||
AC_PATH_PROGS(POTENTIAL_$1, $3)
|
||||
$1=$POTENTIAL_$1
|
||||
fi
|
||||
|
||||
if test "x$[$]$1" = x; then
|
||||
if test "x[$]$1" = x; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([devkit])
|
||||
AC_MSG_ERROR([Could not find a $COMPILER_NAME compiler. $HELP_MSG])
|
||||
fi
|
||||
@ -437,7 +449,10 @@ fi
|
||||
# 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_FIXUP_EXECUTABLE(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])
|
||||
@ -935,10 +950,19 @@ else
|
||||
fi
|
||||
fi
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
|
||||
-L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server \
|
||||
-L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client \
|
||||
-L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
|
||||
|
||||
# On some platforms (mac) the linker warns about non existing -L dirs.
|
||||
# Add server first if available. Linking aginst client does not always produce the same results.
|
||||
# Only add client dir if client is being built. Default to server for other variants.
|
||||
if test "x$JVM_VARIANT_SERVER" = xtrue; then
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
|
||||
elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
|
||||
else
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
|
||||
fi
|
||||
|
||||
LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
|
||||
if test "x$COMPILER_NAME" = xossc; then
|
||||
LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
|
||||
|
@ -48,7 +48,12 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT],
|
||||
METHOD="$2"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(WIN_SDK_BASE)
|
||||
if test -d "$WIN_SDK_BASE"; then
|
||||
if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
|
||||
# There have been cases of partial or broken SDK installations. A missing
|
||||
# lib dir is not going to work.
|
||||
if test ! -d "$WIN_SDK_BASE/../lib"; then
|
||||
AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
|
||||
AC_MSG_NOTICE([Warning: Installation is broken, lib dir is missing. Ignoring])
|
||||
elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
|
||||
AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
|
||||
VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
|
||||
@ -200,8 +205,9 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
|
||||
AC_MSG_ERROR([Your VC command prompt seems broken, INCLUDE and/or LIB is missing.])
|
||||
else
|
||||
AC_MSG_RESULT([ok])
|
||||
VS_INCLUDE="$INCLUDE"
|
||||
VS_LIB="$LIB"
|
||||
# Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
|
||||
VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
|
||||
VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
|
||||
VS_PATH="$PATH"
|
||||
AC_SUBST(VS_INCLUDE)
|
||||
AC_SUBST(VS_LIB)
|
||||
|
@ -283,13 +283,14 @@ compare_general_files() {
|
||||
! -name "*.debuginfo" ! -name "*.dylib" ! -name "jexec" \
|
||||
! -name "ct.sym" ! -name "*.diz" ! -name "*.dll" \
|
||||
! -name "*.pdb" ! -name "*.exp" ! -name "*.ilk" \
|
||||
! -name "*.lib" ! -name "*.war" \
|
||||
! -name "*.lib" ! -name "*.war" ! -name "JavaControlPanel" \
|
||||
| $GREP -v "./bin/" | $SORT | $FILTER)
|
||||
|
||||
echo General files...
|
||||
for f in $GENERAL_FILES
|
||||
do
|
||||
if [ -e $OTHER_DIR/$f ]; then
|
||||
SUFFIX="${f##*.}"
|
||||
if [ "$(basename $f)" = "release" ]; then
|
||||
# Ignore differences in change numbers in release file.
|
||||
OTHER_FILE=$WORK_DIR/$f.other
|
||||
@ -298,6 +299,22 @@ compare_general_files() {
|
||||
$MKDIR -p $(dirname $THIS_FILE)
|
||||
$CAT $OTHER_DIR/$f | $SED 's/\:[0-9a-f]\{12,12\}/:CHANGE/g' > $OTHER_FILE
|
||||
$CAT $THIS_DIR/$f | $SED 's/\:[0-9a-f]\{12,12\}/:CHANGE/g' > $THIS_FILE
|
||||
elif [ "x$SUFFIX" = "xhtml" ]; then
|
||||
# Ignore time stamps in docs files
|
||||
OTHER_FILE=$WORK_DIR/$f.other
|
||||
THIS_FILE=$WORK_DIR/$f.this
|
||||
$MKDIR -p $(dirname $OTHER_FILE)
|
||||
$MKDIR -p $(dirname $THIS_FILE)
|
||||
$CAT $OTHER_DIR/$f | $SED -e 's/\(-- Generated by javadoc \).*\( --\)/\1(removed)\2/' \
|
||||
-e 's/\(<meta name="date" content="\).*\(">\)/\1(removed)\2/' \
|
||||
-e 's/\(Monday\|Tuesday\|Wednesday\|Thursday\|Friday\|Saturday\|Sunday\), [A-Z][a-z]* [0-9][0-9]*, [12][0-9]* [0-9][0-9:]* \(AM\|PM\) [A-Z][A-Z]*/(removed)/' \
|
||||
-e 's/^\( from \).*\(\.idl\)$/\1(removed)\2/' \
|
||||
> $OTHER_FILE
|
||||
$CAT $THIS_DIR/$f | $SED -e 's/\(-- Generated by javadoc \).*\( --\)/\1(removed)\2/' \
|
||||
-e 's/\(<meta name="date" content="\).*\(">\)/\1(removed)\2/' \
|
||||
-e 's/\(Monday\|Tuesday\|Wednesday\|Thursday\|Friday\|Saturday\|Sunday\), [A-Z][a-z]* [0-9][0-9]*, [12][0-9]* [0-9][0-9:]* \(AM\|PM\) [A-Z][A-Z]*/(removed)/' \
|
||||
-e 's/^\( from \).*\(\.idl\)$/\1(removed)\2/' \
|
||||
> $THIS_FILE
|
||||
else
|
||||
OTHER_FILE=$OTHER_DIR/$f
|
||||
THIS_FILE=$THIS_DIR/$f
|
||||
@ -611,10 +628,19 @@ compare_bin_file() {
|
||||
DIFF_SIZE_NUM=$($EXPR $THIS_SIZE - $OTHER_SIZE)
|
||||
DIFF_SIZE_REL=$($EXPR $THIS_SIZE \* 100 / $OTHER_SIZE)
|
||||
SIZE_MSG=$($PRINTF "%3d%% %4d" $DIFF_SIZE_REL $DIFF_SIZE_NUM)
|
||||
if [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] && [ "$DIFF_SIZE_REL" -gt 98 ] && [ "$DIFF_SIZE_REL" -lt 102 ]; then
|
||||
if [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] && [ "$DIFF_SIZE_REL" -gt 98 ] \
|
||||
&& [ "$DIFF_SIZE_REL" -lt 102 ]; then
|
||||
SIZE_MSG="($SIZE_MSG)"
|
||||
DIFF_SIZE=
|
||||
elif [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] && [ "$DIFF_SIZE_NUM" = 512 ]; then
|
||||
elif [ "$OPENJDK_TARGET_OS" = "windows" ] \
|
||||
&& [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] \
|
||||
&& [ "$DIFF_SIZE_NUM" = 512 ]; then
|
||||
# On windows, size of binaries increase in 512 increments.
|
||||
SIZE_MSG="($SIZE_MSG)"
|
||||
DIFF_SIZE=
|
||||
elif [ "$OPENJDK_TARGET_OS" = "windows" ] \
|
||||
&& [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] \
|
||||
&& [ "$DIFF_SIZE_NUM" = -512 ]; then
|
||||
# On windows, size of binaries increase in 512 increments.
|
||||
SIZE_MSG="($SIZE_MSG)"
|
||||
DIFF_SIZE=
|
||||
@ -840,7 +866,7 @@ compare_all_libs() {
|
||||
OTHER_DIR=$2
|
||||
WORK_DIR=$3
|
||||
|
||||
LIBS=$(cd $THIS_DIR && $FIND . -type f \( -name 'lib*.so' -o -name '*.dylib' -o -name '*.dll' \) | $SORT | $FILTER)
|
||||
LIBS=$(cd $THIS_DIR && $FIND . -type f \( -name 'lib*.so' -o -name '*.dylib' -o -name '*.dll' -o -name 'JavaControlPanel' \) | $SORT | $FILTER)
|
||||
|
||||
if [ -n "$LIBS" ]; then
|
||||
echo Libraries...
|
||||
@ -1102,6 +1128,22 @@ if [ -z "$THIS_J2SDK_BUNDLE" ] && [ -n "$OTHER_J2SDK_BUNDLE" ]; then
|
||||
echo "Skipping bundle compare!"
|
||||
fi
|
||||
|
||||
if [ -d "$THIS/docs" ]; then
|
||||
THIS_DOCS="$THIS/docs"
|
||||
fi
|
||||
|
||||
if [ -d "$OTHER/docs" ]; then
|
||||
OTHER_DOCS="$OTHER/docs"
|
||||
fi
|
||||
|
||||
if [ -z "$THIS_DOCS" ]; then
|
||||
echo "WARNING! Docs haven't been built and won't be compared."
|
||||
fi
|
||||
|
||||
if [ -z "$OTHER_DOCS" ]; then
|
||||
echo "WARNING! Other build doesn't contain docs, skipping doc compare."
|
||||
fi
|
||||
|
||||
##########################################################################################
|
||||
# Do the work
|
||||
|
||||
@ -1139,6 +1181,12 @@ if [ "$CMP_NAMES" = "true" ]; then
|
||||
echo -n "J2RE Bundle "
|
||||
compare_files $THIS_J2RE_BUNDLE $OTHER_J2RE_BUNDLE $COMPARE_ROOT/j2re-bundle
|
||||
fi
|
||||
if [ -n "$THIS_DOCS" ] && [ -n "$OTHER_DOCS" ]; then
|
||||
echo -n "Docs "
|
||||
compare_dirs $THIS_DOCS $OTHER_DOCS $COMPARE_ROOT/docs
|
||||
echo -n "Docs "
|
||||
compare_files $THIS_DOCS $OTHER_DOCS $COMPARE_ROOT/docs
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CMP_PERMS" = "true" ]; then
|
||||
@ -1202,6 +1250,10 @@ if [ "$CMP_GENERAL" = "true" ]; then
|
||||
echo -n "J2RE Bundle "
|
||||
compare_general_files $THIS_J2RE_BUNDLE $OTHER_J2RE_BUNDLE $COMPARE_ROOT/j2re-bundle
|
||||
fi
|
||||
if [ -n "$THIS_DOCS" ] && [ -n "$OTHER_DOCS" ]; then
|
||||
echo -n "Docs "
|
||||
compare_general_files $THIS_DOCS $OTHER_DOCS $COMPARE_ROOT/docs
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CMP_ZIPS" = "true" ]; then
|
||||
@ -1218,7 +1270,12 @@ fi
|
||||
|
||||
if [ "$CMP_LIBS" = "true" ]; then
|
||||
if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
|
||||
echo -n "J2SDK "
|
||||
compare_all_libs $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
|
||||
if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
|
||||
echo -n "J2RE "
|
||||
compare_all_libs $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
|
||||
fi
|
||||
fi
|
||||
if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
|
||||
echo -n "Bundle "
|
||||
|
@ -291,6 +291,14 @@ ACCEPTED_SMALL_SIZE_DIFF="
|
||||
./jre/plugin/i386/ns4/libjavaplugin.so
|
||||
./jre/plugin/i386/ns7/libjavaplugin_oji.so
|
||||
./jre/lib/i386/server/libjvm.so
|
||||
./jre/lib/i386/client/64/libjvm_db.so
|
||||
./jre/lib/i386/client/64/libjvm_dtrace.so
|
||||
./jre/lib/i386/client/libjvm_db.so
|
||||
./jre/lib/i386/client/libjvm_dtrace.so
|
||||
./jre/lib/i386/server/64/libjvm_db.so
|
||||
./jre/lib/i386/server/64/libjvm_dtrace.so
|
||||
./jre/lib/i386/server/libjvm_db.so
|
||||
./jre/lib/i386/server/libjvm_dtrace.so
|
||||
./bin/appletviewer
|
||||
./bin/extcheck
|
||||
./bin/idlj
|
||||
@ -348,7 +356,9 @@ ACCEPTED_SMALL_SIZE_DIFF="
|
||||
SKIP_FULLDUMP_DIFF="true"
|
||||
|
||||
# Filter random C++ symbol strings.
|
||||
DIS_DIFF_FILTER="$SED -e s/\.[a-zA-Z0-9_\$]\{15,15\}/<SYM>/g"
|
||||
# Some numbers differ randomly.
|
||||
# Can't use space in these expressions as the shell will mess with them.
|
||||
DIS_DIFF_FILTER="$SED -e s/\.[a-zA-Z0-9_\$]\{15,15\}/<SYM>/g -e s/\([0-9a-f][0-9a-f].\)\{2,8\}[0-9a-f][0-9a-f]/<NUMS>/g -e s/\(0x\)[0-9a-f]*\([,(>]\)/\1<HEX>\2/g -e s/\(0x\)[0-9a-f]*$/\1<HEX>/g -e s/\(\#.\)[0-9a-f]*\(.<\)/\1<HEX>\2/g -e s/[\.A-Za-z0-9%]\{16,16\}$/<BIN>/g"
|
||||
|
||||
fi
|
||||
|
||||
@ -426,6 +436,9 @@ ACCEPTED_SMALL_SIZE_DIFF="
|
||||
./jre/lib/amd64/libzip.so
|
||||
./jre/lib/amd64/server/64/libjvm_db.so
|
||||
./jre/lib/amd64/server/64/libjvm_dtrace.so
|
||||
./jre/lib/amd64/server/libjvm.so
|
||||
./jre/lib/amd64/server/libjvm_db.so
|
||||
./jre/lib/amd64/server/libjvm_dtrace.so
|
||||
./bin/amd64/appletviewer
|
||||
./bin/amd64/extcheck
|
||||
./bin/amd64/idlj
|
||||
@ -480,7 +493,9 @@ ACCEPTED_SMALL_SIZE_DIFF="
|
||||
SKIP_FULLDUMP_DIFF="true"
|
||||
|
||||
# Filter random C++ symbol strings.
|
||||
DIS_DIFF_FILTER="$SED -e s/\.[a-zA-Z0-9_\$]\{15,15\}/<SYM>/g"
|
||||
# Some numbers differ randomly.
|
||||
# Can't use space in these expressions as the shell will mess with them.
|
||||
DIS_DIFF_FILTER="$SED -e s/\.[a-zA-Z0-9_\$]\{15,15\}/<SYM>/g -e s/\([0-9a-f][0-9a-f].\)\{2,8\}[0-9a-f][0-9a-f]/<NUMS>/g -e s/\(0x\)[0-9a-f]*\([,(>]\)/\1<HEX>\2/g -e s/\(0x\)[0-9a-f]*$/\1<HEX>/g -e s/\(\#.\)[0-9a-f]*\(.<\)/\1<HEX>\2/g -e s/[\.A-Za-z0-9%]\{16,16\}$/<BIN>/g"
|
||||
|
||||
fi
|
||||
|
||||
@ -881,6 +896,7 @@ ACCEPTED_JARZIP_CONTENTS="
|
||||
|
||||
KNOWN_BIN_DIFF="
|
||||
./jre/lib/libJObjC.dylib
|
||||
./lib/libJObjC.dylib
|
||||
"
|
||||
|
||||
ACCEPTED_BIN_DIFF="
|
||||
@ -932,26 +948,34 @@ ACCEPTED_BIN_DIFF="
|
||||
./jre/bin/tnameserv
|
||||
./jre/lib/libsaproc.dylib
|
||||
./jre/lib/server/libjvm.dylib
|
||||
./lib/libsaproc.dylib
|
||||
./lib/server/libjvm.dylib
|
||||
./lib/deploy/JavaControlPanel.prefPane/Contents/MacOS/JavaControlPanel
|
||||
"
|
||||
|
||||
KNOWN_SIZE_DIFF="
|
||||
./jre/lib/libJObjC.dylib
|
||||
./lib/libJObjC.dylib
|
||||
"
|
||||
|
||||
SORT_SYMBOLS="
|
||||
./jre/lib/libJObjC.dylib
|
||||
./lib/libJObjC.dylib
|
||||
"
|
||||
|
||||
KNOWN_SYM_DIFF="
|
||||
./jre/lib/libJObjC.dylib
|
||||
./lib/libJObjC.dylib
|
||||
"
|
||||
|
||||
KNOWN_ELF_DIFF="
|
||||
./jre/lib/libJObjC.dylib
|
||||
./lib/libJObjC.dylib
|
||||
"
|
||||
|
||||
KNOWN_DIS_DIFF="
|
||||
./jre/lib/libJObjC.dylib
|
||||
./lib/libJObjC.dylib
|
||||
"
|
||||
|
||||
fi
|
||||
|
@ -149,7 +149,7 @@ define SetupArchive
|
||||
$$($1_GREP_INCLUDES) $$($1_GREP_EXCLUDES)) \
|
||||
$$(subst \,,$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/,$$($1_EXTRA_FILES))))
|
||||
ifeq (,$$($1_SKIP_METAINF))
|
||||
$1_DEPS+=$$(shell $(FIND) $$(addsuffix /META-INF,$$($1_SRCS)) -type f 2> /dev/null))
|
||||
$1_DEPS+=$$(shell $(FIND) $$(addsuffix /META-INF,$$($1_SRCS)) -type f 2> /dev/null)
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -275,10 +275,12 @@ define SetupZipArchive
|
||||
# Explicitly excluded files can be given with absolute path. The patsubst solution
|
||||
# isn't perfect but the likelyhood of an absolute path to match something in a src
|
||||
# dir is very small.
|
||||
# If zip has nothing to do, it returns 12 and would fail the build. Check for 12
|
||||
# and only fail if it's not.
|
||||
$$($1_ZIP) : $$($1_ALL_SRCS) $$($1_EXTRA_DEPS)
|
||||
$(MKDIR) -p $$(@D)
|
||||
$(ECHO) Updating $$($1_NAME)
|
||||
$$(foreach i,$$($1_SRC),(cd $$i && $(ZIP) -qru $$@ . $$($1_ZIP_INCLUDES) $$($1_ZIP_EXCLUDES) -x \*_the.\* $$(addprefix -x$(SPACE),$$(patsubst $$i/%,%,$$($1_EXCLUDE_FILES))))$$(NEWLINE)) true
|
||||
$$(foreach i,$$($1_SRC),(cd $$i && $(ZIP) -qru $$@ . $$($1_ZIP_INCLUDES) $$($1_ZIP_EXCLUDES) -x \*_the.\* $$(addprefix -x$(SPACE),$$(patsubst $$i/%,%,$$($1_EXCLUDE_FILES))) || test "$$$$?" = "12" )$$(NEWLINE)) true
|
||||
$(TOUCH) $$@
|
||||
endef
|
||||
|
||||
|
@ -165,7 +165,7 @@ $(OUTPUT_ROOT)/source_tips: FRC
|
||||
|
||||
|
||||
# Remove everything, except the output from configure.
|
||||
clean: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-images clean-overlay-images clean-bootcycle-build
|
||||
clean: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-images clean-overlay-images clean-bootcycle-build clean-docs
|
||||
@($(CD) $(OUTPUT_ROOT) && $(RM) -r tmp source_tips build.log* build-trace*.log*)
|
||||
@$(ECHO) Cleaned all build artifacts.
|
||||
|
||||
@ -201,6 +201,9 @@ clean-overlay-images:
|
||||
$(call CleanComponent,overlay-images)
|
||||
clean-bootcycle-build:
|
||||
$(call CleanComponent,bootcycle-build)
|
||||
clean-docs:
|
||||
$(call CleanComponent,docs)
|
||||
$(call CleanComponent,docstemp)
|
||||
|
||||
.PHONY: langtools corba jaxp jaxws hotspot jdk images overlay-images install
|
||||
.PHONY: langtools-only corba-only jaxp-only jaxws-only hotspot-only jdk-only images-only overlay-images-only install-only
|
||||
|
@ -142,7 +142,7 @@ endef
|
||||
define TargetExit
|
||||
$(call RecordEndTime,$(patsubst %-only,%,$@))
|
||||
$(BUILD_LOG_WRAPPER) $(PRINTF) "## Finished $(patsubst %-only,%,$@) (build time %s)\n\n" \
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_diff_$(patsubst %-only,%,$@) | $(CUT) -f 1 -d " "`"
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_diff_$(patsubst %-only,%,$@) | $(CUT) -f 1 -d ' '`"
|
||||
$(call CheckIfMakeAtEnd)
|
||||
endef
|
||||
|
||||
|
@ -302,7 +302,7 @@ define SetupNativeCompilation
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_DEBUG_SYMBOLS))
|
||||
ifeq ($(ENABLE_DEBUG_SYMBOLS), yes)
|
||||
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
|
||||
# Programs don't get the debug symbols added in the old build. It's not clear if
|
||||
# this is intentional.
|
||||
ifeq ($$($1_PROGRAM),)
|
||||
@ -394,7 +394,7 @@ define SetupNativeCompilation
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_DEBUG_SYMBOLS))
|
||||
ifeq ($(ENABLE_DEBUG_SYMBOLS), yes)
|
||||
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
$1_EXTRA_LDFLAGS+="-pdb:$$($1_OBJECT_DIR)/$$($1_LIBRARY).pdb" \
|
||||
"-map:$$($1_OBJECT_DIR)/$$($1_LIBRARY).map"
|
||||
@ -429,7 +429,7 @@ define SetupNativeCompilation
|
||||
endif # Touch to not retrigger rule on rebuild
|
||||
$(TOUCH) $$@
|
||||
|
||||
ifeq ($(ZIP_DEBUGINFO_FILES), 1)
|
||||
ifeq ($(ZIP_DEBUGINFO_FILES), true)
|
||||
$1 += $$($1_OUTPUT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).diz
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
@ -472,7 +472,7 @@ define SetupNativeCompilation
|
||||
ifneq (,$$($1_PROGRAM))
|
||||
# A executable binary has been specified, setup the target for it.
|
||||
ifneq (,$$($1_DEBUG_SYMBOLS))
|
||||
ifeq ($(ENABLE_DEBUG_SYMBOLS), yes)
|
||||
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
$1_EXTRA_LDFLAGS+="-pdb:$$($1_OBJECT_DIR)/$$($1_PROGRAM).pdb" \
|
||||
"-map:$$($1_OBJECT_DIR)/$$($1_PROGRAM).map"
|
||||
@ -507,7 +507,7 @@ define SetupNativeCompilation
|
||||
endif
|
||||
$(TOUCH) $$@
|
||||
|
||||
ifeq ($(ZIP_DEBUGINFO_FILES), 1)
|
||||
ifeq ($(ZIP_DEBUGINFO_FILES), true)
|
||||
$1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).diz
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
|
@ -50,17 +50,12 @@ BUILD_NUMBER=$(JDK_BUILD_NUMBER)
|
||||
|
||||
BOOT_JAVA_CMD=$(JAVA)
|
||||
|
||||
# Langtools
|
||||
JAVAC_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/javac.jar
|
||||
JAVADOC_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/javadoc.jar
|
||||
DOCLETS_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/doclets.jar
|
||||
JAVADOC_CMD = $(BOOT_JAVA_CMD) \
|
||||
-Xmx1024m \
|
||||
-Djava.awt.headless=true \
|
||||
"-Xbootclasspath/p:$(JAVADOC_JAR)$(CLASSPATH_SEPARATOR)$(JAVAC_JAR)$(CLASSPATH_SEPARATOR)$(DOCLETS_JAR)" \
|
||||
-jar $(JAVADOC_JAR)
|
||||
|
||||
JAVADOC_CMD = javadoc
|
||||
"-Xbootclasspath/p:$(JAVADOC_JAR)" \
|
||||
-jar $(JAVADOC_JAR) -bootclasspath $(JDK_OUTPUTDIR)/classes
|
||||
|
||||
# Copyright year for beginning of Java and some of the apis
|
||||
# (Needed when creating the javadocs)
|
||||
@ -113,7 +108,8 @@ DOCSDIR_URL = {@docroot}/$(GET2DOCSDIR)
|
||||
|
||||
# Url to copyright html file
|
||||
COPYRIGHT_URL-7 = $(DOCSDIR_URL)/legal/cpyr.html
|
||||
COPYRIGHT_URL-8 = $(DOCSDIR_URL)/legal/cpyr.html
|
||||
# This isn't added in old build yet.
|
||||
#COPYRIGHT_URL-8 = $(DOCSDIR_URL)/legal/cpyr.html
|
||||
COPYRIGHT_URL = $(COPYRIGHT_URL-$(JDK_MINOR_VERSION))
|
||||
|
||||
# Url to bug filing site
|
||||
@ -125,7 +121,8 @@ BUG_SUBMIT_LINE = <a href="$(BUG_SUBMIT_URL)">Submit a bug or feature</a>
|
||||
# Url to devdocs page
|
||||
# Was: http://java.sun.com/javase/6/webnotes/devdocs-vs-specs.html
|
||||
DEV_DOCS_URL-7 = http://download.oracle.com/javase/7/docs/index.html
|
||||
DEV_DOCS_URL-8 = http://download.oracle.com/javase/7/docs/index.html
|
||||
# This isn't added in old build yet.
|
||||
#DEV_DOCS_URL-8 = http://download.oracle.com/javase/7/docs/index.html
|
||||
DEV_DOCS_URL = $(DEV_DOCS_URL-$(JDK_MINOR_VERSION))
|
||||
DOCS_BASE_URL = http://download.oracle.com/javase/7/docs
|
||||
|
||||
@ -142,9 +139,10 @@ $(FULL_COMPANY_NAME) in the US and other countries.
|
||||
# Otherwise, you get "No packages or classes specified." due
|
||||
# to $(CLASSPATH_SEPARATOR) being interpreted as an end of
|
||||
# command (newline or shell ; character)
|
||||
ALL_SOURCE_DIRS = $(JDK_IMPSRC) \
|
||||
ALL_SOURCE_DIRS = $(JDK_SHARE_CLASSES) \
|
||||
$(JDK_IMPSRC) \
|
||||
$(JDK_GENSRC) \
|
||||
$(JDK_SHARE_CLASSES) \
|
||||
$(JDK_OUTPUTDIR)/gendocsrc_rmic \
|
||||
$(JDK_TOPDIR)/src/solaris/classes \
|
||||
$(JDK_TOPDIR)/src/windows/classes \
|
||||
$(JDK_SHARE_SRC)/doc/stub
|
||||
@ -440,7 +438,7 @@ docletapidocs: $(DOCLETAPI_INDEX_FILE)
|
||||
$(DOCLETAPI_INDEX_FILE): GET2DOCSDIR=$(DOCLETAPI2COREAPI)/..
|
||||
|
||||
# Run javadoc if the index file is out of date or missing
|
||||
$(DOCLETAPI_INDEX_FILE): $(DOCLETAPI_OPTIONS_FILE) $(DOCLETAPI_PACKAGES_FILE)
|
||||
$(DOCLETAPI_INDEX_FILE): $(DOCLETAPI_OPTIONS_FILE) $(DOCLETAPI_PACKAGES_FILE) coredocs
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(DOCLETAPI_OPTIONS_FILE),$(DOCLETAPI_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@ -481,7 +479,7 @@ TAGLETAPI_BOTTOM := $(call CommonTrademarkBottom,$(TAGLETAPI_FIRST_COPYRIGHT_Y
|
||||
TAGLETAPI_TEMPDIR = $(DOCSTMPDIR)/taglets_temp
|
||||
|
||||
# The index.html, options, and packages files
|
||||
TAGLETAPI_INDEX_FILE = $(TAGLETAPI_DOCDIR)/com/sun/tools/doclets/Taglet.html
|
||||
TAGLETAPI_INDEX_FILE = $(TAGLETAPI_DOCDIR)/index.html
|
||||
TAGLETAPI_OPTIONS_FILE = $(DOCSTMPDIR)/tagletapi.options
|
||||
TAGLETAPI_PACKAGES_FILE = $(DOCSTMPDIR)/tagletapi.packages
|
||||
|
||||
@ -491,7 +489,7 @@ tagletapidocs: $(TAGLETAPI_INDEX_FILE)
|
||||
$(TAGLETAPI_INDEX_FILE): GET2DOCSDIR=$(TAGLETAPI2COREAPI)/..
|
||||
|
||||
# Run javadoc if the index file is out of date or missing
|
||||
$(TAGLETAPI_INDEX_FILE): $(TAGLETAPI_OPTIONS_FILE) $(TAGLETAPI_PACKAGES_FILE)
|
||||
$(TAGLETAPI_INDEX_FILE): $(TAGLETAPI_OPTIONS_FILE) $(TAGLETAPI_PACKAGES_FILE) coredocs
|
||||
$(prep-javadoc)
|
||||
$(RM) -r $(TAGLETAPI_TEMPDIR)
|
||||
$(MKDIR) -p $(TAGLETAPI_TEMPDIR)
|
||||
@ -517,9 +515,7 @@ $(TAGLETAPI_OPTIONS_FILE):
|
||||
# Create a file with the package names in it
|
||||
$(TAGLETAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(TAGLETAPI_PKGS))
|
||||
$(prep-target)
|
||||
$(call PackageFilter,$(TAGLETAPI_PKGS))
|
||||
$(GREP) "$(TAGLETAPI_FILE)" $@ > $@.tmp
|
||||
$(MV) $@.tmp $@
|
||||
@($(ECHO) "$(JDK_IMPSRC)/$(TAGLETAPI_FILE)" ) > $@
|
||||
|
||||
#############################################################
|
||||
#
|
||||
@ -549,7 +545,7 @@ domapidocs: $(DOMAPI_INDEX_FILE)
|
||||
$(DOMAPI_INDEX_FILE): GET2DOCSDIR=$(DOMAPI2COREAPI)/..
|
||||
|
||||
# Run javadoc if the index file is out of date or missing
|
||||
$(DOMAPI_INDEX_FILE): $(DOMAPI_OPTIONS_FILE) $(DOMAPI_PACKAGES_FILE)
|
||||
$(DOMAPI_INDEX_FILE): $(DOMAPI_OPTIONS_FILE) $(DOMAPI_PACKAGES_FILE) coredocs
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(DOMAPI_OPTIONS_FILE),$(DOMAPI_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@ -611,7 +607,7 @@ jdidocs: $(JDI_INDEX_FILE)
|
||||
$(JDI_INDEX_FILE): GET2DOCSDIR=$(JDI2COREAPI)/..
|
||||
|
||||
# Run javadoc if the index file is out of date or missing
|
||||
$(JDI_INDEX_FILE): $(JDI_OPTIONS_FILE) $(JDI_PACKAGES_FILE)
|
||||
$(JDI_INDEX_FILE): $(JDI_OPTIONS_FILE) $(JDI_PACKAGES_FILE) coredocs
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(JDI_OPTIONS_FILE),$(JDI_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@ -698,7 +694,7 @@ jaasdocs: $(JAAS_INDEX_FILE)
|
||||
$(JAAS_INDEX_FILE): GET2DOCSDIR=$(JAAS2COREAPI)/..
|
||||
|
||||
# Run javadoc if the index file is out of date or missing
|
||||
$(JAAS_INDEX_FILE): $(JAAS_OPTIONS_FILE) $(JAAS_PACKAGES_FILE)
|
||||
$(JAAS_INDEX_FILE): $(JAAS_OPTIONS_FILE) $(JAAS_PACKAGES_FILE) coredocs
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(JAAS_OPTIONS_FILE),$(JAAS_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@ -750,7 +746,7 @@ jgssdocs: $(JGSS_INDEX_FILE)
|
||||
$(JGSS_INDEX_FILE): GET2DOCSDIR=$(JGSS2COREAPI)/..
|
||||
|
||||
# Run javadoc if the index file is out of date or missing
|
||||
$(JGSS_INDEX_FILE): $(JGSS_OPTIONS_FILE) $(JGSS_PACKAGES_FILE)
|
||||
$(JGSS_INDEX_FILE): $(JGSS_OPTIONS_FILE) $(JGSS_PACKAGES_FILE) coredocs
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(JGSS_OPTIONS_FILE),$(JGSS_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@ -802,7 +798,7 @@ smartcardiodocs: $(SMARTCARDIO_INDEX_FILE)
|
||||
$(SMARTCARDIO_INDEX_FILE): GET2DOCSDIR=$(SMARTCARDIO2COREAPI)/..
|
||||
|
||||
# Run javadoc if the index file is out of date or missing
|
||||
$(SMARTCARDIO_INDEX_FILE): $(SMARTCARDIO_OPTIONS_FILE) $(SMARTCARDIO_PACKAGES_FILE)
|
||||
$(SMARTCARDIO_INDEX_FILE): $(SMARTCARDIO_OPTIONS_FILE) $(SMARTCARDIO_PACKAGES_FILE) coredocs
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(SMARTCARDIO_OPTIONS_FILE),$(SMARTCARDIO_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@ -852,7 +848,7 @@ httpserverdocs: $(HTTPSERVER_INDEX_HTML)
|
||||
$(HTTPSERVER_INDEX_HTML): GET2DOCSDIR=$(HTTPSERVER2COREAPI)/..
|
||||
|
||||
# Run javadoc if the index file is out of date or missing
|
||||
$(HTTPSERVER_INDEX_HTML): $(HTTPSERVER_OPTIONS_FILE) $(HTTPSERVER_PACKAGES_FILE)
|
||||
$(HTTPSERVER_INDEX_HTML): $(HTTPSERVER_OPTIONS_FILE) $(HTTPSERVER_PACKAGES_FILE) coredocs
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(HTTPSERVER_OPTIONS_FILE),$(HTTPSERVER_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@ -887,7 +883,7 @@ ALL_OTHER_TARGETS += mgmtdocs
|
||||
MGMT_DOCDIR := $(JRE_API_DOCSDIR)/management/extension
|
||||
MGMT2COREAPI := ../../$(JDKJRE2COREAPI)
|
||||
JVM_MIB_NAME := JVM-MANAGEMENT-MIB.mib
|
||||
JVM_MIB_SRC := $(CLOSED_SRC)/share/classes/sun/management/snmp/$(JVM_MIB_NAME)
|
||||
JVM_MIB_SRC := $(JDK_TOPDIR)/src/closed/share/classes/sun/management/snmp/$(JVM_MIB_NAME)
|
||||
MGMT_DOCTITLE := Monitoring and Management Interface for the Java$(TRADEMARK) Platform
|
||||
MGMT_WINDOWTITLE := Monitoring and Management Interface for the Java Platform
|
||||
MGMT_HEADER := <strong>Monitoring and Management Interface for the Java Platform</strong>
|
||||
@ -906,7 +902,7 @@ mgmtdocs: $(MGMT_INDEX_FILE)
|
||||
$(MGMT_INDEX_FILE): GET2DOCSDIR=$(MGMT2COREAPI)/..
|
||||
|
||||
# Run javadoc if the index file is out of date or missing
|
||||
$(MGMT_INDEX_FILE): $(MGMT_OPTIONS_FILE) $(MGMT_PACKAGES_FILE)
|
||||
$(MGMT_INDEX_FILE): $(MGMT_OPTIONS_FILE) $(MGMT_PACKAGES_FILE) coredocs
|
||||
$(prep-javadoc)
|
||||
@if [ -f $(JVM_MIB_SRC) ] ; then \
|
||||
$(ECHO) "$(CP) $(JVM_MIB_SRC) $(@D)/.."; \
|
||||
@ -963,7 +959,7 @@ attachdocs: $(ATTACH_INDEX_HTML)
|
||||
$(ATTACH_INDEX_HTML): GET2DOCSDIR=$(ATTACH2COREAPI)/..
|
||||
|
||||
# Run javadoc if the index file is out of date or missing
|
||||
$(ATTACH_INDEX_HTML): $(ATTACH_OPTIONS_FILE) $(ATTACH_PACKAGES_FILE)
|
||||
$(ATTACH_INDEX_HTML): $(ATTACH_OPTIONS_FILE) $(ATTACH_PACKAGES_FILE) coredocs
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(ATTACH_OPTIONS_FILE),$(ATTACH_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@ -1013,7 +1009,7 @@ jconsoledocs: $(JCONSOLE_INDEX_HTML)
|
||||
$(JCONSOLE_INDEX_HTML): GET2DOCSDIR=$(JCONSOLE2COREAPI)/..
|
||||
|
||||
# Run javadoc if the index file is out of date or missing
|
||||
$(JCONSOLE_INDEX_HTML): $(JCONSOLE_OPTIONS_FILE) $(JCONSOLE_PACKAGES_FILE)
|
||||
$(JCONSOLE_INDEX_HTML): $(JCONSOLE_OPTIONS_FILE) $(JCONSOLE_PACKAGES_FILE) coredocs
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(JCONSOLE_OPTIONS_FILE),$(JCONSOLE_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@ -1065,7 +1061,7 @@ treeapidocs: $(TREEAPI_INDEX_HTML)
|
||||
$(TREEAPI_INDEX_HTML): GET2DOCSDIR=$(TREEAPI2COREAPI)/..
|
||||
|
||||
# Run javadoc if the index file is out of date or missing
|
||||
$(TREEAPI_INDEX_HTML): $(TREEAPI_OPTIONS_FILE) $(TREEAPI_PACKAGES_FILE)
|
||||
$(TREEAPI_INDEX_HTML): $(TREEAPI_OPTIONS_FILE) $(TREEAPI_PACKAGES_FILE) coredocs
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(TREEAPI_OPTIONS_FILE),$(TREEAPI_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@ -1116,7 +1112,7 @@ sctpdocs: $(SCTPAPI_INDEX_HTML)
|
||||
$(SCTPAPI_INDEX_HTML): GET2DOCSDIR=$(SCTPAPI2COREAPI)/..
|
||||
|
||||
# Run javadoc if the index file is out of date or missing
|
||||
$(SCTPAPI_INDEX_HTML): $(SCTPAPI_OPTIONS_FILE) $(SCTPAPI_PACKAGES_FILE)
|
||||
$(SCTPAPI_INDEX_HTML): $(SCTPAPI_OPTIONS_FILE) $(SCTPAPI_PACKAGES_FILE) coredocs
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(SCTPAPI_OPTIONS_FILE),$(SCTPAPI_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
|
@ -186,3 +186,6 @@ d54dc53e223ed9ce7d5f4d2cd02ad9d5def3c2db jdk8-b59
|
||||
08afb9c6f44f11c3595b01fd0985db64b29834dd jdk8-b62
|
||||
6ccbf67b68bfed1ab9c44ab8748a5bdc7df33506 jdk8-b63
|
||||
54d599a5b4aad83c235d590652fc81f41c2824fb jdk8-b64
|
||||
5132f7900a8f0c30c3ca7f7a32f9433f4fee7745 jdk8-b65
|
||||
65771ad1ca557ca26e4979d4dc633cf685435cb8 jdk8-b66
|
||||
394515ad2a55d4d54df990b36065505d3e7a3cbb jdk8-b67
|
||||
|
@ -293,3 +293,9 @@ acabb5c282f59be7e3238920b2ea06b684ab68f7 jdk8-b63
|
||||
8cb93eadfb6dcab88d91b8e2cd3e0e07d0ac4048 hs25-b08
|
||||
5920f72e799c8133d1066c4a62fa1fafcb729966 jdk8-b64
|
||||
b4ee7b773144a88af8b6b92e4384dea82cb948d8 hs25-b09
|
||||
0f7290a03b24bd562583fa325d3566c21c51fb94 jdk8-b65
|
||||
cfc5309f03b7bd6c1567618b63cf1fc74c0f2a8f hs25-b10
|
||||
01684f7fee1b86222be69bc23841ec2a4416696c jdk8-b66
|
||||
b61d9c88b759d1594b8af1655598e8fa00393672 hs25-b11
|
||||
25bdce771bb3a7ae9825261a284d292cda700122 jdk8-b67
|
||||
a35a72dd2e1255239d31f796f9f693e49b36bc9f hs25-b12
|
||||
|
41
hotspot/agent/doc/c2replay.html
Normal file
41
hotspot/agent/doc/c2replay.html
Normal file
@ -0,0 +1,41 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
C2 Replay
|
||||
</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>C2 compiler replay</h1>
|
||||
<p>
|
||||
The C2 compiler replay is a function to repeat the compiling process from a crashed java process in compiled method<br>
|
||||
This function only exists in debug version of VM
|
||||
</p>
|
||||
<h2>Usage</h2>
|
||||
<pre>
|
||||
First, use SA to attach to the core file, if suceeded, do
|
||||
clhsdb>dumpreplaydata <address> | -a | <thread_id> [> replay.txt]
|
||||
create file replay.txt, address is address of Method, or nmethod(CodeBlob)
|
||||
clhsdb>buildreplayjars [all | boot | app]
|
||||
create files:
|
||||
all:
|
||||
app.jar, boot.jar
|
||||
boot:
|
||||
boot.jar
|
||||
app:
|
||||
app.jar
|
||||
exit SA now.
|
||||
Second, use the obtained replay text file, replay.txt and jar files, app.jar and boot.jar, using debug version of java
|
||||
java -Xbootclasspath/p:boot.jar -cp app.jar -XX:ReplayDataFile=<datafile> -XX:+ReplayCompiles ....
|
||||
This will replay the compiling process.
|
||||
|
||||
With ReplayCompiles, the replay will recompile all the methods in app.jar, and in boot.jar to emulate the process in java app.
|
||||
|
||||
notes:
|
||||
1) Most time, we don't need the boot.jar which is the classes loaded from JDK. It will be only modified when an agent(JVMDI) is running and modifies the classes.
|
||||
2) If encounter error as "<flag>" not found, that means the SA is using a VMStructs which is different from the one with corefile. In this case, SA has a utility tool vmstructsdump which is located at agent/src/os/<os>/proc/<os_platform>
|
||||
|
||||
Use this tool to dump VM type library:
|
||||
vmstructsdump libjvm.so > <type_name>.db
|
||||
|
||||
set env SA_TYPEDB=<type_name>.db (refer different shell for set envs)
|
@ -37,12 +37,19 @@ Each CLHSDB command can have zero or more arguments and optionally end with outp
|
||||
Available commands:
|
||||
assert true | false <font color="red">turn on/off asserts in SA code</font>
|
||||
attach pid | exec core <font color="red">attach SA to a process or core</font>
|
||||
buildreplayjars [all | boot | app] <font color="red">build jars for replay, boot.jar for bootclasses, app.jar for application classes</font>
|
||||
class name <font color="red">find a Java class from debuggee and print oop</font>
|
||||
classes <font color="red">print all loaded Java classes with Klass*</font>
|
||||
detach <font color="red">detach SA from current target</font>
|
||||
dis address [ length ] <font color="red">disassemble (sparc/x86) specified number of instructions from given address</font>
|
||||
dissemble address <font color="red">disassemble nmethod</font>
|
||||
dumpcfg -a | id <font color="red">Dump the PhaseCFG for every compiler thread that has one live</font>
|
||||
dumpclass { address | name } [ directory ] <font color="red">dump .class file for given Klass* or class name</font>
|
||||
dumpcodecache <font color="red">dump codecache contents</font>
|
||||
dumpheap [ file ] <font color="red">dump heap in hprof binary format</font>
|
||||
dumpideal -a | id <font color="red">dump ideal graph like debug flag -XX:+PrintIdeal</font>
|
||||
dumpilt -a | id <font color="red">dump inline tree for C2 compilation</font>
|
||||
dumpreplaydata <address> | -a | <thread_id> [>replay.txt] <font color="red">dump replay data into a file</font>
|
||||
echo [ true | false ] <font color="red">turn on/off command echo mode</font>
|
||||
examine [ address/count ] | [ address,address] <font color="red">show contents of memory from given address</font>
|
||||
field [ type [ name fieldtype isStatic offset address ] ] <font color="red">print info about a field of HotSpot type</font>
|
||||
@ -51,29 +58,35 @@ Available commands:
|
||||
help [ command ] <font color="red">print help message for all commands or just given command</font>
|
||||
history <font color="red">show command history. usual !command-number syntax works.</font>
|
||||
inspect expression <font color="red">inspect a given oop</font>
|
||||
intConstant [ name [ value ] ] <font color="red">print out hotspot integer constant(s)</font>
|
||||
jdis address <font color="red">show bytecode disassembly of a given Method*</font>
|
||||
jhisto <font color="red">show Java heap histogram</font>
|
||||
jseval script <font color="red">evaluate a given string as JavaScript code</font>
|
||||
jsload file <font color="red">load and evaluate a JavaScript file</font>
|
||||
jstack [-v] <font color="red">show Java stack trace of all Java threads. -v is verbose mode</font>
|
||||
livenmethods <font color="red">show all live nmethods</font>
|
||||
longConstant [ name [ value ] ] <font color="red">print out hotspot long constant(s)s</font>
|
||||
mem address [ length ] <font color="red">show contents of memory -- also shows closest ELF/COFF symbol if found</font>
|
||||
pmap <font color="red">show Solaris pmap-like output</font>
|
||||
print expression <font color="red">print given Klass*, Method* or arbitrary address</font>
|
||||
printas type expression <font color="red">print given address as given HotSpot type. eg. print JavaThread <address></font>
|
||||
printmdo -a | expression <font color="red">print method data oop</font>
|
||||
printstatics [ type ] <font color="red">print static fields of given HotSpot type (or all types if none specified)</font>
|
||||
pstack [-v] <font color="red">show mixed mode stack trace for all Java, non-Java threads. -v is verbose mode</font>
|
||||
quit <font color="red">quit CLHSDB tool</font>
|
||||
reattach <font color="red">detach and re-attach SA to current target</font>
|
||||
revptrs <font color="red">find liveness of oops</font>
|
||||
scanoops start end [ type ] <font color="red">scan a Oop from given start to end address</font>
|
||||
search [ heap | codecache | threads ] value <font color="red">search a value in heap or codecache or threads</font>
|
||||
source filename <font color="red">load and execute CLHSDB commands from given file</font>
|
||||
symbol name <font color="red">show address of a given ELF/COFF symbol</font>
|
||||
sysprops <font color="red">show all Java System properties</font>
|
||||
thread id <font color="red">show thread of id</font>
|
||||
threads <font color="red">show all Java threads</font>
|
||||
tokenize ...
|
||||
type [ type [ name super isOop isInteger isUnsigned size ] ] <font color="red">show info. on HotSpot type</font>
|
||||
universe <font color="red">print gc universe</font>
|
||||
vmstructsdump <font color="red">dump hotspot type library in text</font>
|
||||
verbose true | false <font color="red">turn on/off verbose mode</font>
|
||||
versioncheck [ true | false ] <font color="red">turn on/off debuggee VM version check</font>
|
||||
whatis address <font color="red">print info about any arbitrary address</font>
|
||||
@ -114,5 +127,11 @@ hsdb> jsload test.js
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
<h3>C2 Compilation Replay</h3>
|
||||
<p>
|
||||
When a java process crashes in compiled method, usually a core file is saved.
|
||||
The C2 replay function can reproduce the compiling process in the core.
|
||||
<a href="c2replay.html">c2replay.html</a>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -220,6 +220,12 @@ These scripts are used to run SA remotely.
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>C2 Compilation Replay</h3>
|
||||
<p>
|
||||
When a java process crashes in compiled method, usually a core file is saved.
|
||||
The C2 replay function can reproduce the compiling process in the core.
|
||||
<a href="c2replay.html">c2replay.html</a>
|
||||
|
||||
<h3>Debugging transported core dumps</h3>
|
||||
<p>
|
||||
When a core dump is moved from the machine where it was produced to a
|
||||
|
@ -58,10 +58,8 @@ sun.jvm.hotspot.debugger.cdbg.basic \
|
||||
sun.jvm.hotspot.debugger.cdbg.basic.amd64 \
|
||||
sun.jvm.hotspot.debugger.cdbg.basic.x86 \
|
||||
sun.jvm.hotspot.debugger.dummy \
|
||||
sun.jvm.hotspot.debugger.ia64 \
|
||||
sun.jvm.hotspot.debugger.linux \
|
||||
sun.jvm.hotspot.debugger.linux.amd64 \
|
||||
sun.jvm.hotspot.debugger.linux.ia64 \
|
||||
sun.jvm.hotspot.debugger.linux.x86 \
|
||||
sun.jvm.hotspot.debugger.posix \
|
||||
sun.jvm.hotspot.debugger.posix.elf \
|
||||
@ -77,7 +75,6 @@ sun.jvm.hotspot.debugger.sparc \
|
||||
sun.jvm.hotspot.debugger.win32.coff \
|
||||
sun.jvm.hotspot.debugger.windbg \
|
||||
sun.jvm.hotspot.debugger.windbg.amd64 \
|
||||
sun.jvm.hotspot.debugger.windbg.ia64 \
|
||||
sun.jvm.hotspot.debugger.windbg.x86 \
|
||||
sun.jvm.hotspot.debugger.x86 \
|
||||
sun.jvm.hotspot.gc_implementation \
|
||||
@ -97,10 +94,8 @@ sun.jvm.hotspot.runtime.amd64 \
|
||||
sun.jvm.hotspot.runtime.bsd \
|
||||
sun.jvm.hotspot.runtime.bsd_amd64 \
|
||||
sun.jvm.hotspot.runtime.bsd_x86 \
|
||||
sun.jvm.hotspot.runtime.ia64 \
|
||||
sun.jvm.hotspot.runtime.linux \
|
||||
sun.jvm.hotspot.runtime.linux_amd64 \
|
||||
sun.jvm.hotspot.runtime.linux_ia64 \
|
||||
sun.jvm.hotspot.runtime.linux_sparc \
|
||||
sun.jvm.hotspot.runtime.linux_x86 \
|
||||
sun.jvm.hotspot.runtime.posix \
|
||||
@ -109,7 +104,6 @@ sun.jvm.hotspot.runtime.solaris_sparc \
|
||||
sun.jvm.hotspot.runtime.solaris_x86 \
|
||||
sun.jvm.hotspot.runtime.sparc \
|
||||
sun.jvm.hotspot.runtime.win32_amd64 \
|
||||
sun.jvm.hotspot.runtime.win32_ia64 \
|
||||
sun.jvm.hotspot.runtime.win32_x86 \
|
||||
sun.jvm.hotspot.runtime.x86 \
|
||||
sun.jvm.hotspot.tools \
|
||||
@ -152,7 +146,6 @@ sun/jvm/hotspot/debugger/cdbg/basic/*.java \
|
||||
sun/jvm/hotspot/debugger/cdbg/basic/amd64/*.java \
|
||||
sun/jvm/hotspot/debugger/cdbg/basic/x86/*.java \
|
||||
sun/jvm/hotspot/debugger/dummy/*.java \
|
||||
sun/jvm/hotspot/debugger/ia64/*.java \
|
||||
sun/jvm/hotspot/debugger/linux/*.java \
|
||||
sun/jvm/hotspot/debugger/linux/x86/*.java \
|
||||
sun/jvm/hotspot/debugger/posix/*.java \
|
||||
@ -168,7 +161,6 @@ sun/jvm/hotspot/debugger/remote/x86/*.java \
|
||||
sun/jvm/hotspot/debugger/sparc/*.java \
|
||||
sun/jvm/hotspot/debugger/win32/coff/*.java \
|
||||
sun/jvm/hotspot/debugger/windbg/*.java \
|
||||
sun/jvm/hotspot/debugger/windbg/ia64/*.java \
|
||||
sun/jvm/hotspot/debugger/windbg/x86/*.java \
|
||||
sun/jvm/hotspot/debugger/x86/*.java \
|
||||
sun/jvm/hotspot/gc_implementation/g1/*.java \
|
||||
@ -186,10 +178,8 @@ sun/jvm/hotspot/runtime/amd64/*.java \
|
||||
sun/jvm/hotspot/runtime/bsd/*.java \
|
||||
sun/jvm/hotspot/runtime/bsd_amd64/*.java \
|
||||
sun/jvm/hotspot/runtime/bsd_x86/*.java \
|
||||
sun/jvm/hotspot/runtime/ia64/*.java \
|
||||
sun/jvm/hotspot/runtime/linux/*.java \
|
||||
sun/jvm/hotspot/runtime/linux_amd64/*.java \
|
||||
sun/jvm/hotspot/runtime/linux_ia64/*.java \
|
||||
sun/jvm/hotspot/runtime/linux_sparc/*.java \
|
||||
sun/jvm/hotspot/runtime/linux_x86/*.java \
|
||||
sun/jvm/hotspot/runtime/posix/*.java \
|
||||
@ -198,7 +188,6 @@ sun/jvm/hotspot/runtime/solaris_sparc/*.java \
|
||||
sun/jvm/hotspot/runtime/solaris_x86/*.java \
|
||||
sun/jvm/hotspot/runtime/sparc/*.java \
|
||||
sun/jvm/hotspot/runtime/win32_amd64/*.java \
|
||||
sun/jvm/hotspot/runtime/win32_ia64/*.java \
|
||||
sun/jvm/hotspot/runtime/win32_x86/*.java \
|
||||
sun/jvm/hotspot/runtime/x86/*.java \
|
||||
sun/jvm/hotspot/tools/*.java \
|
||||
@ -258,6 +247,7 @@ SA_BUILD_VERSION_PROP = "sun.jvm.hotspot.runtime.VM.saBuildVersion=$(SA_BUILD_VE
|
||||
|
||||
SA_PROPERTIES = $(OUTPUT_DIR)/sa.properties
|
||||
JAVAC = $(JDK_HOME)/bin/javac
|
||||
JAVA = $(JDK_HOME)/bin/java
|
||||
JAVADOC = $(JDK_HOME)/bin/javadoc
|
||||
RMIC = $(JDK_HOME)/bin/rmic
|
||||
|
||||
@ -298,7 +288,7 @@ filelist: $(ALLFILES)
|
||||
|
||||
.PHONY: natives
|
||||
natives:
|
||||
cd ../src/os/`java -classpath $(OUTPUT_DIR) sun.jvm.hotspot.utilities.PlatformInfo`; $(MAKE) all
|
||||
cd ../src/os/`$(JAVA) -classpath $(OUTPUT_DIR) sun.jvm.hotspot.utilities.PlatformInfo`; $(MAKE) all
|
||||
|
||||
.PHONY: sa-jdi.jar
|
||||
sa-jdi.jar:
|
||||
@ -323,5 +313,5 @@ sa.jar:
|
||||
|
||||
clean::
|
||||
rm -rf filelist
|
||||
cd ../src/os/`java -classpath $(OUTPUT_DIR) sun.jvm.hotspot.utilities.PlatformInfo`; $(MAKE) clean
|
||||
cd ../src/os/`$(JAVA) -classpath $(OUTPUT_DIR) sun.jvm.hotspot.utilities.PlatformInfo`; $(MAKE) clean
|
||||
rm -rf $(BUILD_DIR)/*
|
||||
|
@ -33,6 +33,7 @@ import sun.jvm.hotspot.types.Type;
|
||||
import sun.jvm.hotspot.types.Field;
|
||||
import sun.jvm.hotspot.HotSpotTypeDataBase;
|
||||
import sun.jvm.hotspot.types.basic.BasicType;
|
||||
import sun.jvm.hotspot.types.basic.BasicTypeDataBase;
|
||||
import sun.jvm.hotspot.types.CIntegerType;
|
||||
import sun.jvm.hotspot.code.*;
|
||||
import sun.jvm.hotspot.compiler.*;
|
||||
@ -448,6 +449,112 @@ public class CommandProcessor {
|
||||
}
|
||||
}
|
||||
},
|
||||
new Command("dumpreplaydata", "dumpreplaydata { <address > | -a | <thread_id> }", false) {
|
||||
// This is used to dump replay data from ciInstanceKlass, ciMethodData etc
|
||||
// default file name is replay.txt, also if java crashes in compiler
|
||||
// thread, this file will be dumped in error processing.
|
||||
public void doit(Tokens t) {
|
||||
if (t.countTokens() != 1) {
|
||||
usage();
|
||||
return;
|
||||
}
|
||||
String name = t.nextToken();
|
||||
Address a = null;
|
||||
try {
|
||||
a = VM.getVM().getDebugger().parseAddress(name);
|
||||
} catch (NumberFormatException e) { }
|
||||
if (a != null) {
|
||||
// only nmethod, Method, MethodData and InstanceKlass needed to
|
||||
// dump replay data
|
||||
|
||||
CodeBlob cb = VM.getVM().getCodeCache().findBlob(a);
|
||||
if (cb != null && (cb instanceof NMethod)) {
|
||||
((NMethod)cb).dumpReplayData(out);
|
||||
return;
|
||||
}
|
||||
// assume it is Metadata
|
||||
Metadata meta = Metadata.instantiateWrapperFor(a);
|
||||
if (meta != null) {
|
||||
meta.dumpReplayData(out);
|
||||
} else {
|
||||
usage();
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Not an address
|
||||
boolean all = name.equals("-a");
|
||||
Threads threads = VM.getVM().getThreads();
|
||||
for (JavaThread thread = threads.first(); thread != null; thread = thread.next()) {
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
thread.printThreadIDOn(new PrintStream(bos));
|
||||
if (all || bos.toString().equals(name)) {
|
||||
if (thread instanceof CompilerThread) {
|
||||
CompilerThread ct = (CompilerThread)thread;
|
||||
ciEnv env = ct.env();
|
||||
if (env != null) {
|
||||
env.dumpReplayData(out);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
new Command("buildreplayjars", "buildreplayjars [ all | app | boot ] | [ prefix ]", false) {
|
||||
// This is used to dump jar files of all the classes
|
||||
// loaded in the core. Everything on the bootclasspath
|
||||
// will go in boot.jar and everything else will go in
|
||||
// app.jar. Then the classes can be loaded by the replay
|
||||
// jvm using -Xbootclasspath/p:boot.jar -cp app.jar. boot.jar usually
|
||||
// not needed, unless changed by jvmti.
|
||||
public void doit(Tokens t) {
|
||||
int tcount = t.countTokens();
|
||||
if (tcount > 2) {
|
||||
usage();
|
||||
return;
|
||||
}
|
||||
try {
|
||||
String prefix = "";
|
||||
String option = "all"; // default
|
||||
switch(tcount) {
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
option = t.nextToken();
|
||||
if (!option.equalsIgnoreCase("all") && !option.equalsIgnoreCase("app") &&
|
||||
!option.equalsIgnoreCase("root")) {
|
||||
prefix = option;
|
||||
option = "all";
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
option = t.nextToken();
|
||||
prefix = t.nextToken();
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
return;
|
||||
}
|
||||
if (!option.equalsIgnoreCase("all") && !option.equalsIgnoreCase("app") &&
|
||||
!option.equalsIgnoreCase("boot")) {
|
||||
usage();
|
||||
return;
|
||||
}
|
||||
ClassDump cd = new ClassDump();
|
||||
if (option.equalsIgnoreCase("all") || option.equalsIgnoreCase("boot")) {
|
||||
cd.setClassFilter(new BootFilter());
|
||||
cd.setJarOutput(prefix + "boot.jar");
|
||||
cd.run();
|
||||
}
|
||||
if (option.equalsIgnoreCase("all") || option.equalsIgnoreCase("app")) {
|
||||
cd.setClassFilter(new NonBootFilter());
|
||||
cd.setJarOutput(prefix + "app.jar");
|
||||
cd.run();
|
||||
}
|
||||
} catch (IOException ioe) {
|
||||
ioe.printStackTrace();
|
||||
}
|
||||
}
|
||||
},
|
||||
new Command("findpc", "findpc address", false) {
|
||||
public void doit(Tokens t) {
|
||||
if (t.countTokens() != 1) {
|
||||
|
@ -16,9 +16,9 @@
|
||||
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
@ -50,4 +50,8 @@ public class ciBaseObject extends VMObject {
|
||||
public ciBaseObject(Address addr) {
|
||||
super(addr);
|
||||
}
|
||||
|
||||
public void dumpReplayData(PrintStream out) {
|
||||
out.println("# Unknown ci type " + getAddress().getAddressAt(0));
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2012, 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
|
||||
@ -16,9 +16,9 @@
|
||||
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
@ -60,4 +60,8 @@ public class ciConstant extends VMObject {
|
||||
public ciConstant(Address addr) {
|
||||
super(addr);
|
||||
}
|
||||
|
||||
public void dumpReplayData(PrintStream out) {
|
||||
// Nothing to be done
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2012, 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
|
||||
@ -16,9 +16,9 @@
|
||||
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
@ -74,4 +74,29 @@ public class ciEnv extends VMObject {
|
||||
public CompileTask task() {
|
||||
return new CompileTask(taskField.getValue(this.getAddress()));
|
||||
}
|
||||
|
||||
public void dumpReplayData(PrintStream out) {
|
||||
out.println("JvmtiExport can_access_local_variables " +
|
||||
(JvmtiExport.canAccessLocalVariables() ? '1' : '0'));
|
||||
out.println("JvmtiExport can_hotswap_or_post_breakpoint " +
|
||||
(JvmtiExport.canHotswapOrPostBreakpoint() ? '1' : '0'));
|
||||
out.println("JvmtiExport can_post_on_exceptions " +
|
||||
(JvmtiExport.canPostOnExceptions() ? '1' : '0'));
|
||||
|
||||
GrowableArray<ciMetadata> objects = factory().objects();
|
||||
out.println("# " + objects.length() + " ciObject found");
|
||||
for (int i = 0; i < objects.length(); i++) {
|
||||
ciMetadata o = objects.at(i);
|
||||
out.println("# ciMetadata" + i + " @ " + o);
|
||||
o.dumpReplayData(out);
|
||||
}
|
||||
CompileTask task = task();
|
||||
Method method = task.method();
|
||||
int entryBci = task.osrBci();
|
||||
Klass holder = method.getMethodHolder();
|
||||
out.println("compile " + holder.getName().asString() + " " +
|
||||
OopUtilities.escapeString(method.getName().asString()) + " " +
|
||||
method.getSignature().asString() + " " +
|
||||
entryBci);
|
||||
}
|
||||
}
|
||||
|
@ -16,9 +16,9 @@
|
||||
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
@ -80,4 +80,84 @@ public class ciInstanceKlass extends ciKlass {
|
||||
public boolean isInitialized() {
|
||||
return initState() == CLASS_STATE_FULLY_INITIALIZED;
|
||||
}
|
||||
|
||||
public void dumpReplayData(PrintStream out) {
|
||||
InstanceKlass ik = (InstanceKlass)getMetadata();
|
||||
ConstantPool cp = ik.getConstants();
|
||||
|
||||
// Try to record related loaded classes
|
||||
Klass sub = ik.getSubklassKlass();
|
||||
while (sub != null) {
|
||||
if (sub instanceof InstanceKlass) {
|
||||
out.println("instanceKlass " + sub.getName().asString());
|
||||
}
|
||||
sub = sub.getNextSiblingKlass();
|
||||
}
|
||||
|
||||
final int length = (int) cp.getLength();
|
||||
out.print("ciInstanceKlass " + name() + " " + (isLinked() ? 1 : 0) + " " + (isInitialized() ? 1 : 0) + " " + length);
|
||||
for (int index = 1; index < length; index++) {
|
||||
out.print(" " + cp.getTags().at(index));
|
||||
}
|
||||
out.println();
|
||||
if (isInitialized()) {
|
||||
Field[] staticFields = ik.getStaticFields();
|
||||
for (int i = 0; i < staticFields.length; i++) {
|
||||
Field f = staticFields[i];
|
||||
Oop mirror = ik.getJavaMirror();
|
||||
if (f.isFinal() && !f.hasInitialValue()) {
|
||||
out.print("staticfield " + name() + " " +
|
||||
OopUtilities.escapeString(f.getID().getName()) + " " +
|
||||
f.getFieldType().getSignature().asString() + " ");
|
||||
if (f instanceof ByteField) {
|
||||
ByteField bf = (ByteField)f;
|
||||
out.println(bf.getValue(mirror));
|
||||
} else if (f instanceof BooleanField) {
|
||||
BooleanField bf = (BooleanField)f;
|
||||
out.println(bf.getValue(mirror) ? 1 : 0);
|
||||
} else if (f instanceof ShortField) {
|
||||
ShortField bf = (ShortField)f;
|
||||
out.println(bf.getValue(mirror));
|
||||
} else if (f instanceof CharField) {
|
||||
CharField bf = (CharField)f;
|
||||
out.println(bf.getValue(mirror) & 0xffff);
|
||||
} else if (f instanceof IntField) {
|
||||
IntField bf = (IntField)f;
|
||||
out.println(bf.getValue(mirror));
|
||||
} else if (f instanceof LongField) {
|
||||
LongField bf = (LongField)f;
|
||||
out.println(bf.getValue(mirror));
|
||||
} else if (f instanceof FloatField) {
|
||||
FloatField bf = (FloatField)f;
|
||||
out.println(Float.floatToRawIntBits(bf.getValue(mirror)));
|
||||
} else if (f instanceof DoubleField) {
|
||||
DoubleField bf = (DoubleField)f;
|
||||
out.println(Double.doubleToRawLongBits(bf.getValue(mirror)));
|
||||
} else if (f instanceof OopField) {
|
||||
OopField bf = (OopField)f;
|
||||
Oop value = bf.getValue(mirror);
|
||||
if (value == null) {
|
||||
out.println("null");
|
||||
} else if (value.isInstance()) {
|
||||
Instance inst = (Instance)value;
|
||||
if (inst.isA(SystemDictionary.getStringKlass())) {
|
||||
out.println("\"" + OopUtilities.stringOopToEscapedString(inst) + "\"");
|
||||
} else {
|
||||
out.println(inst.getKlass().getName().asString());
|
||||
}
|
||||
} else if (value.isObjArray()) {
|
||||
ObjArray oa = (ObjArray)value;
|
||||
Klass ek = (ObjArrayKlass)oa.getKlass();
|
||||
out.println(oa.getLength() + " " + ek.getName().asString());
|
||||
} else if (value.isTypeArray()) {
|
||||
TypeArray ta = (TypeArray)value;
|
||||
out.println(ta.getLength());
|
||||
} else {
|
||||
out.println(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,9 +16,9 @@
|
||||
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
@ -88,4 +88,19 @@ public class ciMethod extends ciMetadata {
|
||||
st.printf(" %s::%s", method.getMethodHolder().getName().asString().replace('/', '.'),
|
||||
method.getName().asString());
|
||||
}
|
||||
|
||||
public void dumpReplayData(PrintStream out) {
|
||||
Method method = (Method)getMetadata();
|
||||
NMethod nm = method.getNativeMethod();
|
||||
Klass holder = method.getMethodHolder();
|
||||
out.println("ciMethod " +
|
||||
holder.getName().asString() + " " +
|
||||
OopUtilities.escapeString(method.getName().asString()) + " " +
|
||||
method.getSignature().asString() + " " +
|
||||
method.getInvocationCounter() + " " +
|
||||
method.getBackedgeCounter() + " " +
|
||||
interpreterInvocationCount() + " " +
|
||||
interpreterThrowoutCount() + " " +
|
||||
instructionsSize());
|
||||
}
|
||||
}
|
||||
|
@ -16,9 +16,9 @@
|
||||
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
@ -174,4 +174,52 @@ public class ciMethodData extends ciMetadata {
|
||||
}
|
||||
}
|
||||
|
||||
public void dumpReplayData(PrintStream out) {
|
||||
MethodData mdo = (MethodData)getMetadata();
|
||||
Method method = mdo.getMethod();
|
||||
Klass holder = method.getMethodHolder();
|
||||
out.print("ciMethodData " +
|
||||
holder.getName().asString() + " " +
|
||||
OopUtilities.escapeString(method.getName().asString()) + " " +
|
||||
method.getSignature().asString() + " " +
|
||||
state() + " " + currentMileage());
|
||||
byte[] orig = orig();
|
||||
out.print(" orig " + orig.length);
|
||||
for (int i = 0; i < orig.length; i++) {
|
||||
out.print(" " + (orig[i] & 0xff));
|
||||
}
|
||||
|
||||
long[] data = data();
|
||||
out.print(" data " + data.length);
|
||||
for (int i = 0; i < data.length; i++) {
|
||||
out.print(" 0x" + Long.toHexString(data[i]));
|
||||
}
|
||||
int count = 0;
|
||||
for (int round = 0; round < 2; round++) {
|
||||
if (round == 1) out.print(" oops " + count);
|
||||
ProfileData pdata = firstData();
|
||||
for ( ; isValid(pdata); pdata = nextData(pdata)) {
|
||||
if (pdata instanceof ciReceiverTypeData) {
|
||||
ciReceiverTypeData vdata = (ciReceiverTypeData)pdata;
|
||||
for (int i = 0; i < vdata.rowLimit(); i++) {
|
||||
ciKlass k = vdata.receiverAt(i);
|
||||
if (k != null) {
|
||||
if (round == 0) count++;
|
||||
else out.print(" " + ((vdata.dp() + vdata.cellOffset(vdata.receiverCellIndex(i))) / MethodData.cellSize) + " " + k.name());
|
||||
}
|
||||
}
|
||||
} else if (pdata instanceof ciVirtualCallData) {
|
||||
ciVirtualCallData vdata = (ciVirtualCallData)pdata;
|
||||
for (int i = 0; i < vdata.rowLimit(); i++) {
|
||||
ciKlass k = vdata.receiverAt(i);
|
||||
if (k != null) {
|
||||
if (round == 0) count++;
|
||||
else out.print(" " + ((vdata.dp() + vdata.cellOffset(vdata.receiverCellIndex(i))) / MethodData.cellSize + " " + k.name()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
out.println();
|
||||
}
|
||||
}
|
||||
|
@ -498,6 +498,42 @@ public class NMethod extends CodeBlob {
|
||||
method.getSignature().asString();
|
||||
}
|
||||
|
||||
public void dumpReplayData(PrintStream out) {
|
||||
HashMap h = new HashMap();
|
||||
for (int i = 1; i < getMetadataLength(); i++) {
|
||||
Metadata meta = Metadata.instantiateWrapperFor(getMetadataAt(i));
|
||||
System.err.println(meta);
|
||||
if (h.get(meta) != null) continue;
|
||||
h.put(meta, meta);
|
||||
if (meta instanceof InstanceKlass) {
|
||||
((InstanceKlass)meta).dumpReplayData(out);
|
||||
} else if (meta instanceof Method) {
|
||||
((Method)meta).dumpReplayData(out);
|
||||
MethodData mdo = ((Method)meta).getMethodData();
|
||||
if (mdo != null) {
|
||||
mdo.dumpReplayData(out);
|
||||
}
|
||||
}
|
||||
}
|
||||
Method method = getMethod();
|
||||
if (h.get(method) == null) {
|
||||
method.dumpReplayData(out);
|
||||
MethodData mdo = method.getMethodData();
|
||||
if (mdo != null) {
|
||||
mdo.dumpReplayData(out);
|
||||
}
|
||||
}
|
||||
if (h.get(method.getMethodHolder()) == null) {
|
||||
((InstanceKlass)method.getMethodHolder()).dumpReplayData(out);
|
||||
}
|
||||
Klass holder = method.getMethodHolder();
|
||||
out.println("compile " + holder.getName().asString() + " " +
|
||||
OopUtilities.escapeString(method.getName().asString()) + " " +
|
||||
method.getSignature().asString() + " " +
|
||||
getEntryBCI());
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Internals only below this point
|
||||
//
|
||||
|
@ -56,7 +56,7 @@ public class CompileTask extends VMObject {
|
||||
}
|
||||
|
||||
public Method method() {
|
||||
Address oh = methodField.getValue(getAddress()).getAddressAt(0);
|
||||
Address oh = methodField.getValue(getAddress());
|
||||
return (Method)Metadata.instantiateWrapperFor(oh);
|
||||
}
|
||||
|
||||
|
@ -48,6 +48,7 @@ public class ConstMethod extends VMObject {
|
||||
private static int HAS_CHECKED_EXCEPTIONS;
|
||||
private static int HAS_LOCALVARIABLE_TABLE;
|
||||
private static int HAS_EXCEPTION_TABLE;
|
||||
private static int HAS_GENERIC_SIGNATURE;
|
||||
|
||||
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
|
||||
Type type = db.lookupType("ConstMethod");
|
||||
@ -60,13 +61,14 @@ public class ConstMethod extends VMObject {
|
||||
HAS_CHECKED_EXCEPTIONS = db.lookupIntConstant("ConstMethod::_has_checked_exceptions").intValue();
|
||||
HAS_LOCALVARIABLE_TABLE = db.lookupIntConstant("ConstMethod::_has_localvariable_table").intValue();
|
||||
HAS_EXCEPTION_TABLE = db.lookupIntConstant("ConstMethod::_has_exception_table").intValue();
|
||||
HAS_GENERIC_SIGNATURE = db.lookupIntConstant("ConstMethod::_has_generic_signature").intValue();
|
||||
|
||||
// Size of Java bytecodes allocated immediately after ConstMethod*.
|
||||
codeSize = new CIntField(type.getCIntegerField("_code_size"), 0);
|
||||
nameIndex = new CIntField(type.getCIntegerField("_name_index"), 0);
|
||||
signatureIndex = new CIntField(type.getCIntegerField("_signature_index"), 0);
|
||||
genericSignatureIndex = new CIntField(type.getCIntegerField("_generic_signature_index"),0);
|
||||
idnum = new CIntField(type.getCIntegerField("_method_idnum"), 0);
|
||||
maxStack = new CIntField(type.getCIntegerField("_max_stack"), 0);
|
||||
|
||||
// start of byte code
|
||||
bytecodeOffset = type.getSize();
|
||||
@ -92,8 +94,8 @@ public class ConstMethod extends VMObject {
|
||||
private static CIntField codeSize;
|
||||
private static CIntField nameIndex;
|
||||
private static CIntField signatureIndex;
|
||||
private static CIntField genericSignatureIndex;
|
||||
private static CIntField idnum;
|
||||
private static CIntField maxStack;
|
||||
|
||||
// start of bytecode
|
||||
private static long bytecodeOffset;
|
||||
@ -134,13 +136,21 @@ public class ConstMethod extends VMObject {
|
||||
}
|
||||
|
||||
public long getGenericSignatureIndex() {
|
||||
return genericSignatureIndex.getValue(this);
|
||||
if (hasGenericSignature()) {
|
||||
return getAddress().getCIntegerAt(offsetOfGenericSignatureIndex(), 2, true);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public long getIdNum() {
|
||||
return idnum.getValue(this);
|
||||
}
|
||||
|
||||
public long getMaxStack() {
|
||||
return maxStack.getValue(this);
|
||||
}
|
||||
|
||||
public Symbol getName() {
|
||||
return getMethod().getName();
|
||||
}
|
||||
@ -235,8 +245,8 @@ public class ConstMethod extends VMObject {
|
||||
visitor.doCInt(codeSize, true);
|
||||
visitor.doCInt(nameIndex, true);
|
||||
visitor.doCInt(signatureIndex, true);
|
||||
visitor.doCInt(genericSignatureIndex, true);
|
||||
visitor.doCInt(codeSize, true);
|
||||
visitor.doCInt(maxStack, true);
|
||||
}
|
||||
|
||||
// Accessors
|
||||
@ -353,6 +363,10 @@ public class ConstMethod extends VMObject {
|
||||
return ret;
|
||||
}
|
||||
|
||||
private boolean hasGenericSignature() {
|
||||
return (getFlags() & HAS_GENERIC_SIGNATURE) != 0;
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Internals only below this point
|
||||
@ -377,10 +391,16 @@ public class ConstMethod extends VMObject {
|
||||
return getSize() * VM.getVM().getObjectHeap().getOopSize() - 2;
|
||||
}
|
||||
|
||||
private long offsetOfCheckedExceptionsLength() {
|
||||
// Offset of the generic signature index
|
||||
private long offsetOfGenericSignatureIndex() {
|
||||
return offsetOfLastU2Element();
|
||||
}
|
||||
|
||||
private long offsetOfCheckedExceptionsLength() {
|
||||
return hasGenericSignature() ? offsetOfLastU2Element() - 2 :
|
||||
offsetOfLastU2Element();
|
||||
}
|
||||
|
||||
private int getCheckedExceptionsLength() {
|
||||
if (hasCheckedExceptions()) {
|
||||
return (int) getAddress().getCIntegerAt(offsetOfCheckedExceptionsLength(), 2, true);
|
||||
@ -431,7 +451,8 @@ public class ConstMethod extends VMObject {
|
||||
} else if (hasCheckedExceptions()) {
|
||||
return offsetOfCheckedExceptions() - 2;
|
||||
} else {
|
||||
return offsetOfLastU2Element();
|
||||
return hasGenericSignature() ? offsetOfLastU2Element() - 2 :
|
||||
offsetOfLastU2Element();
|
||||
}
|
||||
}
|
||||
|
||||
@ -460,7 +481,8 @@ public class ConstMethod extends VMObject {
|
||||
if (hasCheckedExceptions()) {
|
||||
return offsetOfCheckedExceptions() - 2;
|
||||
} else {
|
||||
return offsetOfLastU2Element();
|
||||
return hasGenericSignature() ? offsetOfLastU2Element() - 2 :
|
||||
offsetOfLastU2Element();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,7 @@ public class ConstantPoolCache extends Metadata {
|
||||
|
||||
|
||||
public void printValueOn(PrintStream tty) {
|
||||
tty.print("ConstantPoolCache for " + getConstants().getPoolHolder().getName().asString());
|
||||
tty.print("ConstantPoolCache for " + getConstants().getPoolHolder().getName().asString() + " address = " + getAddress() + " offset = " + baseOffset);
|
||||
}
|
||||
|
||||
public int getLength() {
|
||||
|
@ -110,6 +110,8 @@ public class Field {
|
||||
public Symbol getSignature() { return signature; }
|
||||
public Symbol getGenericSignature() { return genericSignature; }
|
||||
|
||||
public boolean hasInitialValue() { return holder.getFieldInitialValueIndex(fieldIndex) != 0; }
|
||||
|
||||
//
|
||||
// Following acccessors are for named, non-VM fields only
|
||||
//
|
||||
|
@ -278,7 +278,7 @@ public class InstanceKlass extends Klass {
|
||||
}
|
||||
|
||||
public short getFieldGenericSignatureIndex(int index) {
|
||||
int len = getFields().length();
|
||||
// int len = getFields().length();
|
||||
int allFieldsCount = getAllFieldsCount();
|
||||
int generic_signature_slot = allFieldsCount * FIELD_SLOTS;
|
||||
for (int i = 0; i < allFieldsCount; i++) {
|
||||
@ -325,7 +325,7 @@ public class InstanceKlass extends Klass {
|
||||
public KlassArray getTransitiveInterfaces() { return new KlassArray(transitiveInterfaces.getValue(getAddress())); }
|
||||
public int getJavaFieldsCount() { return (int) javaFieldsCount.getValue(this); }
|
||||
public int getAllFieldsCount() {
|
||||
int len = getFields().length();
|
||||
int len = getFields().length();
|
||||
int allFieldsCount = 0;
|
||||
for (; allFieldsCount*FIELD_SLOTS < len; allFieldsCount++) {
|
||||
short flags = getFieldAccessFlags(allFieldsCount);
|
||||
@ -581,6 +581,19 @@ public class InstanceKlass extends Klass {
|
||||
}
|
||||
}
|
||||
|
||||
public Field[] getStaticFields() {
|
||||
U2Array fields = getFields();
|
||||
int length = getJavaFieldsCount();
|
||||
ArrayList result = new ArrayList();
|
||||
for (int index = 0; index < length; index++) {
|
||||
Field f = newField(index);
|
||||
if (f.isStatic()) {
|
||||
result.add(f);
|
||||
}
|
||||
}
|
||||
return (Field[])result.toArray(new Field[result.size()]);
|
||||
}
|
||||
|
||||
public void iterateNonStaticFields(OopVisitor visitor, Oop obj) {
|
||||
if (getSuper() != null) {
|
||||
((InstanceKlass) getSuper()).iterateNonStaticFields(visitor, obj);
|
||||
@ -979,4 +992,84 @@ public class InstanceKlass extends Klass {
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public void dumpReplayData(PrintStream out) {
|
||||
ConstantPool cp = getConstants();
|
||||
|
||||
// Try to record related loaded classes
|
||||
Klass sub = getSubklassKlass();
|
||||
while (sub != null) {
|
||||
if (sub instanceof InstanceKlass) {
|
||||
out.println("instanceKlass " + sub.getName().asString());
|
||||
}
|
||||
sub = sub.getNextSiblingKlass();
|
||||
}
|
||||
|
||||
final int length = (int) cp.getLength();
|
||||
out.print("ciInstanceKlass " + getName().asString() + " " + (isLinked() ? 1 : 0) + " " + (isInitialized() ? 1 : 0) + " " + length);
|
||||
for (int index = 1; index < length; index++) {
|
||||
out.print(" " + cp.getTags().at(index));
|
||||
}
|
||||
out.println();
|
||||
if (isInitialized()) {
|
||||
Field[] staticFields = getStaticFields();
|
||||
for (int i = 0; i < staticFields.length; i++) {
|
||||
Field f = staticFields[i];
|
||||
Oop mirror = getJavaMirror();
|
||||
if (f.isFinal() && !f.hasInitialValue()) {
|
||||
out.print("staticfield " + getName().asString() + " " +
|
||||
OopUtilities.escapeString(f.getID().getName()) + " " +
|
||||
f.getFieldType().getSignature().asString() + " ");
|
||||
if (f instanceof ByteField) {
|
||||
ByteField bf = (ByteField)f;
|
||||
out.println(bf.getValue(mirror));
|
||||
} else if (f instanceof BooleanField) {
|
||||
BooleanField bf = (BooleanField)f;
|
||||
out.println(bf.getValue(mirror) ? 1 : 0);
|
||||
} else if (f instanceof ShortField) {
|
||||
ShortField bf = (ShortField)f;
|
||||
out.println(bf.getValue(mirror));
|
||||
} else if (f instanceof CharField) {
|
||||
CharField bf = (CharField)f;
|
||||
out.println(bf.getValue(mirror) & 0xffff);
|
||||
} else if (f instanceof IntField) {
|
||||
IntField bf = (IntField)f;
|
||||
out.println(bf.getValue(mirror));
|
||||
} else if (f instanceof LongField) {
|
||||
LongField bf = (LongField)f;
|
||||
out.println(bf.getValue(mirror));
|
||||
} else if (f instanceof FloatField) {
|
||||
FloatField bf = (FloatField)f;
|
||||
out.println(Float.floatToRawIntBits(bf.getValue(mirror)));
|
||||
} else if (f instanceof DoubleField) {
|
||||
DoubleField bf = (DoubleField)f;
|
||||
out.println(Double.doubleToRawLongBits(bf.getValue(mirror)));
|
||||
} else if (f instanceof OopField) {
|
||||
OopField bf = (OopField)f;
|
||||
|
||||
Oop value = bf.getValue(mirror);
|
||||
if (value == null) {
|
||||
out.println("null");
|
||||
} else if (value.isInstance()) {
|
||||
Instance inst = (Instance)value;
|
||||
if (inst.isA(SystemDictionary.getStringKlass())) {
|
||||
out.println("\"" + OopUtilities.stringOopToEscapedString(inst) + "\"");
|
||||
} else {
|
||||
out.println(inst.getKlass().getName().asString());
|
||||
}
|
||||
} else if (value.isObjArray()) {
|
||||
ObjArray oa = (ObjArray)value;
|
||||
Klass ek = (ObjArrayKlass)oa.getKlass();
|
||||
out.println(oa.getLength() + " " + ek.getName().asString());
|
||||
} else if (value.isTypeArray()) {
|
||||
TypeArray ta = (TypeArray)value;
|
||||
out.println(ta.getLength());
|
||||
} else {
|
||||
out.println(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -79,4 +79,7 @@ abstract public class Metadata extends VMObject {
|
||||
}
|
||||
|
||||
abstract public void printValueOn(PrintStream tty);
|
||||
public void dumpReplayData(PrintStream out) {
|
||||
out.println("# Unknown Metadata");
|
||||
}
|
||||
}
|
||||
|
@ -50,7 +50,6 @@ public class Method extends Metadata {
|
||||
constMethod = type.getAddressField("_constMethod");
|
||||
methodData = type.getAddressField("_method_data");
|
||||
methodSize = new CIntField(type.getCIntegerField("_method_size"), 0);
|
||||
maxStack = new CIntField(type.getCIntegerField("_max_stack"), 0);
|
||||
maxLocals = new CIntField(type.getCIntegerField("_max_locals"), 0);
|
||||
sizeOfParameters = new CIntField(type.getCIntegerField("_size_of_parameters"), 0);
|
||||
accessFlags = new CIntField(type.getCIntegerField("_access_flags"), 0);
|
||||
@ -84,7 +83,6 @@ public class Method extends Metadata {
|
||||
private static AddressField constMethod;
|
||||
private static AddressField methodData;
|
||||
private static CIntField methodSize;
|
||||
private static CIntField maxStack;
|
||||
private static CIntField maxLocals;
|
||||
private static CIntField sizeOfParameters;
|
||||
private static CIntField accessFlags;
|
||||
@ -135,7 +133,7 @@ public class Method extends Metadata {
|
||||
}
|
||||
/** WARNING: this is in words, not useful in this system; use getObjectSize() instead */
|
||||
public long getMethodSize() { return methodSize.getValue(this); }
|
||||
public long getMaxStack() { return maxStack.getValue(this); }
|
||||
public long getMaxStack() { return getConstMethod().getMaxStack(); }
|
||||
public long getMaxLocals() { return maxLocals.getValue(this); }
|
||||
public long getSizeOfParameters() { return sizeOfParameters.getValue(this); }
|
||||
public long getNameIndex() { return getConstMethod().getNameIndex(); }
|
||||
@ -284,7 +282,6 @@ public class Method extends Metadata {
|
||||
|
||||
public void iterateFields(MetadataVisitor visitor) {
|
||||
visitor.doCInt(methodSize, true);
|
||||
visitor.doCInt(maxStack, true);
|
||||
visitor.doCInt(maxLocals, true);
|
||||
visitor.doCInt(sizeOfParameters, true);
|
||||
visitor.doCInt(accessFlags, true);
|
||||
@ -358,6 +355,25 @@ public class Method extends Metadata {
|
||||
buf.append(")");
|
||||
return buf.toString().replace('/', '.');
|
||||
}
|
||||
|
||||
public void dumpReplayData(PrintStream out) {
|
||||
NMethod nm = getNativeMethod();
|
||||
int code_size = 0;
|
||||
if (nm != null) {
|
||||
code_size = (int)nm.codeEnd().minus(nm.getVerifiedEntryPoint());
|
||||
}
|
||||
Klass holder = getMethodHolder();
|
||||
out.println("ciMethod " +
|
||||
holder.getName().asString() + " " +
|
||||
OopUtilities.escapeString(getName().asString()) + " " +
|
||||
getSignature().asString() + " " +
|
||||
getInvocationCounter() + " " +
|
||||
getBackedgeCounter() + " " +
|
||||
interpreterInvocationCount() + " " +
|
||||
interpreterThrowoutCount() + " " +
|
||||
code_size);
|
||||
}
|
||||
|
||||
public int interpreterThrowoutCount() {
|
||||
return (int) interpreterThrowoutCountField.getValue(this);
|
||||
}
|
||||
|
@ -332,4 +332,59 @@ public class MethodData extends Metadata {
|
||||
public int currentMileage() {
|
||||
return 20000;
|
||||
}
|
||||
|
||||
public void dumpReplayData(PrintStream out) {
|
||||
Method method = getMethod();
|
||||
Klass holder = method.getMethodHolder();
|
||||
out.print("ciMethodData " +
|
||||
holder.getName().asString() + " " +
|
||||
OopUtilities.escapeString(method.getName().asString()) + " " +
|
||||
method.getSignature().asString() + " " +
|
||||
"2" + " " +
|
||||
currentMileage());
|
||||
byte[] orig = orig();
|
||||
out.print(" orig " + orig.length);
|
||||
for (int i = 0; i < orig.length; i++) {
|
||||
out.print(" " + (orig[i] & 0xff));
|
||||
}
|
||||
|
||||
long[] data = data();
|
||||
out.print(" data " + data.length);
|
||||
for (int i = 0; i < data.length; i++) {
|
||||
out.print(" 0x" + Long.toHexString(data[i]));
|
||||
}
|
||||
int count = 0;
|
||||
for (int round = 0; round < 2; round++) {
|
||||
if (round == 1) out.print(" oops " + count);
|
||||
ProfileData pdata = firstData();
|
||||
for ( ; isValid(pdata); pdata = nextData(pdata)) {
|
||||
if (pdata instanceof ReceiverTypeData) {
|
||||
ReceiverTypeData vdata = (ReceiverTypeData)pdata;
|
||||
for (int i = 0; i < vdata.rowLimit(); i++) {
|
||||
Klass k = vdata.receiver(i);
|
||||
if (k != null) {
|
||||
if (round == 0) count++;
|
||||
else out.print(" " +
|
||||
(dpToDi(vdata.dp() +
|
||||
vdata.cellOffset(vdata.receiverCellIndex(i))) / cellSize) + " " +
|
||||
k.getName().asString());
|
||||
}
|
||||
}
|
||||
} else if (pdata instanceof VirtualCallData) {
|
||||
VirtualCallData vdata = (VirtualCallData)pdata;
|
||||
for (int i = 0; i < vdata.rowLimit(); i++) {
|
||||
Klass k = vdata.receiver(i);
|
||||
if (k != null) {
|
||||
if (round == 0) count++;
|
||||
else out.print(" " +
|
||||
(dpToDi(vdata.dp() +
|
||||
vdata.cellOffset(vdata.receiverCellIndex(i))) / cellSize) + " " +
|
||||
k.getName().asString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
out.println();
|
||||
}
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2012
|
||||
|
||||
HS_MAJOR_VER=25
|
||||
HS_MINOR_VER=0
|
||||
HS_BUILD_NUMBER=09
|
||||
HS_BUILD_NUMBER=12
|
||||
|
||||
JDK_MAJOR_VER=1
|
||||
JDK_MINOR_VER=8
|
||||
|
@ -71,41 +71,36 @@ default:: $(AdditionalTargets) $(JvmtiGeneratedFiles)
|
||||
|
||||
!include $(HOTSPOTWORKSPACE)/make/hotspot_version
|
||||
|
||||
!if "$(HOTSPOT_RELEASE_VERSION)" != ""
|
||||
HOTSPOT_RELEASE_VERSION="$(HOTSPOT_RELEASE_VERSION)"
|
||||
!else
|
||||
HOTSPOT_RELEASE_VERSION="$(HS_MAJOR_VER).$(HS_MINOR_VER)-b$(HS_BUILD_NUMBER)"
|
||||
!endif
|
||||
!if "$(USER_RELEASE_SUFFIX)" != ""
|
||||
HOTSPOT_BUILD_VERSION$(HOTSPOT_BUILD_VERSION) = internal-$(USER_RELEASE_SUFFIX)
|
||||
HOTSPOT_BUILD_VERSION = internal-$(USER_RELEASE_SUFFIX)
|
||||
!else
|
||||
HOTSPOT_BUILD_VERSION$(HOTSPOT_BUILD_VERSION) = internal
|
||||
HOTSPOT_BUILD_VERSION = internal
|
||||
!endif
|
||||
!if "$(HOTSPOT_BUILD_VERSION)" != ""
|
||||
HOTSPOT_RELEASE_VERSION="$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)"
|
||||
!if "$(HOTSPOT_RELEASE_VERSION)" != ""
|
||||
HOTSPOT_RELEASE_VERSION="\\\"$(HOTSPOT_RELEASE_VERSION)\\\""
|
||||
!else
|
||||
HOTSPOT_RELEASE_VERSION="\\\"$(HS_MAJOR_VER).$(HS_MINOR_VER)-b$(HS_BUILD_NUMBER)-$(HOTSPOT_BUILD_VERSION)\\\""
|
||||
!endif
|
||||
!if "$(JRE_RELEASE_VERSION)" != ""
|
||||
JRE_RELEASE_VERSION="$(JRE_RELEASE_VERSION)"
|
||||
JRE_RELEASE_VERSION="\\\"$(JRE_RELEASE_VERSION)\\\""
|
||||
!else
|
||||
JRE_RELEASE_VERSION="$(JDK_MAJOR_VER).$(JDK_MINOR_VER).$(JDK_MICRO_VER)"
|
||||
JRE_RELEASE_VERSION="\\\"$(JDK_MAJOR_VER).$(JDK_MINOR_VER).$(JDK_MICRO_VER)\\\""
|
||||
!endif
|
||||
|
||||
# Define HOTSPOT_VM_DISTRO if HOTSPOT_VM_DISTRO is set,
|
||||
# and if it is not see if we have the src/closed directory
|
||||
!if "$(HOTSPOT_VM_DISTRO)" != ""
|
||||
HOTSPOT_VM_DISTRO="$(HOTSPOT_VM_DISTRO)"
|
||||
HOTSPOT_VM_DISTRO=$(HOTSPOT_VM_DISTRO)
|
||||
!else
|
||||
!if exists($(HOTSPOTWORKSPACE)\src\closed)
|
||||
HOTSPOT_VM_DISTRO="Java HotSpot(TM)"
|
||||
HOTSPOT_VM_DISTRO="\\\"Java HotSpot(TM)\\\""
|
||||
!else
|
||||
HOTSPOT_VM_DISTRO="OpenJDK"
|
||||
HOTSPOT_VM_DISTRO="\\\"OpenJDK\\\""
|
||||
!endif
|
||||
!endif
|
||||
|
||||
ProjectCreatorIDEOptions = $(ProjectCreatorIDEOptions) \
|
||||
-define HOTSPOT_RELEASE_VERSION=\\\"$(HOTSPOT_RELEASE_VERSION)\\\" \
|
||||
-define JRE_RELEASE_VERSION=\\\"$(JRE_RELEASE_VERSION)\\\" \
|
||||
-define HOTSPOT_VM_DISTRO=\\\"$(HOTSPOT_VM_DISTRO)\\\"
|
||||
ReleaseOptions = -define HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) -define JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION) -define HOTSPOT_VM_DISTRO=$(HOTSPOT_VM_DISTRO)
|
||||
ProjectCreatorIDEOptions = $(ProjectCreatorIDEOptions) $(ReleaseOptions)
|
||||
|
||||
$(HOTSPOTBUILDSPACE)/$(ProjectFile): $(HOTSPOTBUILDSPACE)/classes/ProjectCreator.class
|
||||
@$(RUN_JAVA) -Djava.class.path="$(HOTSPOTBUILDSPACE)/classes" ProjectCreator WinGammaPlatform$(VcVersion) $(ProjectCreatorIDEOptions)
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -25,33 +25,8 @@
|
||||
#ifndef CPU_SPARC_VM_ASSEMBLER_SPARC_INLINE_HPP
|
||||
#define CPU_SPARC_VM_ASSEMBLER_SPARC_INLINE_HPP
|
||||
|
||||
#include "asm/assembler.inline.hpp"
|
||||
#include "asm/codeBuffer.hpp"
|
||||
#include "code/codeCache.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
#include "asm/assembler.hpp"
|
||||
|
||||
inline void MacroAssembler::pd_patch_instruction(address branch, address target) {
|
||||
jint& stub_inst = *(jint*) branch;
|
||||
stub_inst = patched_branch(target - branch, stub_inst, 0);
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
inline void MacroAssembler::pd_print_patched_instruction(address branch) {
|
||||
jint stub_inst = *(jint*) branch;
|
||||
print_instruction(stub_inst);
|
||||
::tty->print("%s", " (unresolved)");
|
||||
}
|
||||
#endif // PRODUCT
|
||||
|
||||
inline bool Address::is_simm13(int offset) { return Assembler::is_simm13(disp() + offset); }
|
||||
|
||||
|
||||
inline int AddressLiteral::low10() const {
|
||||
return Assembler::low10(value());
|
||||
}
|
||||
|
||||
|
||||
// inlines for SPARC assembler -- dmu 5/97
|
||||
|
||||
inline void Assembler::check_delay() {
|
||||
# ifdef CHECK_DELAY
|
||||
@ -76,9 +51,8 @@ inline void Assembler::emit_data(int x, RelocationHolder const& rspec) {
|
||||
}
|
||||
|
||||
|
||||
inline void Assembler::add(Register s1, Register s2, Register d ) { emit_long( op(arith_op) | rd(d) | op3(add_op3) | rs1(s1) | rs2(s2) ); }
|
||||
inline void Assembler::add(Register s1, int simm13a, Register d, relocInfo::relocType rtype ) { emit_data( op(arith_op) | rd(d) | op3(add_op3) | rs1(s1) | immed(true) | simm(simm13a, 13), rtype ); }
|
||||
inline void Assembler::add(Register s1, int simm13a, Register d, RelocationHolder const& rspec ) { emit_data( op(arith_op) | rd(d) | op3(add_op3) | rs1(s1) | immed(true) | simm(simm13a, 13), rspec ); }
|
||||
inline void Assembler::add(Register s1, Register s2, Register d ) { emit_long( op(arith_op) | rd(d) | op3(add_op3) | rs1(s1) | rs2(s2) ); }
|
||||
inline void Assembler::add(Register s1, int simm13a, Register d ) { emit_long( op(arith_op) | rd(d) | op3(add_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
|
||||
|
||||
inline void Assembler::bpr( RCondition c, bool a, Predict p, Register s1, address d, relocInfo::relocType rt ) { v9_only(); cti(); emit_data( op(branch_op) | annul(a) | cond(c) | op2(bpr_op2) | wdisp16(intptr_t(d), intptr_t(pc())) | predict(p) | rs1(s1), rt); has_delay_slot(); }
|
||||
inline void Assembler::bpr( RCondition c, bool a, Predict p, Register s1, Label& L) { bpr( c, a, p, s1, target(L)); }
|
||||
@ -111,16 +85,9 @@ inline void Assembler::flush( Register s1, int simm13a) { emit_data( op(arith_op
|
||||
inline void Assembler::jmpl( Register s1, Register s2, Register d ) { cti(); emit_long( op(arith_op) | rd(d) | op3(jmpl_op3) | rs1(s1) | rs2(s2)); has_delay_slot(); }
|
||||
inline void Assembler::jmpl( Register s1, int simm13a, Register d, RelocationHolder const& rspec ) { cti(); emit_data( op(arith_op) | rd(d) | op3(jmpl_op3) | rs1(s1) | immed(true) | simm(simm13a, 13), rspec); has_delay_slot(); }
|
||||
|
||||
inline void Assembler::ldf(FloatRegisterImpl::Width w, Register s1, RegisterOrConstant s2, FloatRegister d) {
|
||||
if (s2.is_register()) ldf(w, s1, s2.as_register(), d);
|
||||
else ldf(w, s1, s2.as_constant(), d);
|
||||
}
|
||||
|
||||
inline void Assembler::ldf(FloatRegisterImpl::Width w, Register s1, Register s2, FloatRegister d) { emit_long( op(ldst_op) | fd(d, w) | alt_op3(ldf_op3, w) | rs1(s1) | rs2(s2) ); }
|
||||
inline void Assembler::ldf(FloatRegisterImpl::Width w, Register s1, int simm13a, FloatRegister d, RelocationHolder const& rspec) { emit_data( op(ldst_op) | fd(d, w) | alt_op3(ldf_op3, w) | rs1(s1) | immed(true) | simm(simm13a, 13), rspec); }
|
||||
|
||||
inline void Assembler::ldf(FloatRegisterImpl::Width w, const Address& a, FloatRegister d, int offset) { relocate(a.rspec(offset)); ldf( w, a.base(), a.disp() + offset, d); }
|
||||
|
||||
inline void Assembler::ldfsr( Register s1, Register s2) { v9_dep(); emit_long( op(ldst_op) | op3(ldfsr_op3) | rs1(s1) | rs2(s2) ); }
|
||||
inline void Assembler::ldfsr( Register s1, int simm13a) { v9_dep(); emit_data( op(ldst_op) | op3(ldfsr_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
|
||||
inline void Assembler::ldxfsr( Register s1, Register s2) { v9_only(); emit_long( op(ldst_op) | rd(G1) | op3(ldfsr_op3) | rs1(s1) | rs2(s2) ); }
|
||||
@ -152,98 +119,9 @@ inline void Assembler::ldx( Register s1, int simm13a, Register d) { v9_only();
|
||||
inline void Assembler::ldd( Register s1, Register s2, Register d) { v9_dep(); assert(d->is_even(), "not even"); emit_long( op(ldst_op) | rd(d) | op3(ldd_op3) | rs1(s1) | rs2(s2) ); }
|
||||
inline void Assembler::ldd( Register s1, int simm13a, Register d) { v9_dep(); assert(d->is_even(), "not even"); emit_data( op(ldst_op) | rd(d) | op3(ldd_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
|
||||
|
||||
#ifdef _LP64
|
||||
// Make all 32 bit loads signed so 64 bit registers maintain proper sign
|
||||
inline void Assembler::ld( Register s1, Register s2, Register d) { ldsw( s1, s2, d); }
|
||||
inline void Assembler::ld( Register s1, int simm13a, Register d) { ldsw( s1, simm13a, d); }
|
||||
#else
|
||||
inline void Assembler::ld( Register s1, Register s2, Register d) { lduw( s1, s2, d); }
|
||||
inline void Assembler::ld( Register s1, int simm13a, Register d) { lduw( s1, simm13a, d); }
|
||||
#endif
|
||||
|
||||
#ifdef ASSERT
|
||||
// ByteSize is only a class when ASSERT is defined, otherwise it's an int.
|
||||
# ifdef _LP64
|
||||
inline void Assembler::ld( Register s1, ByteSize simm13a, Register d) { ldsw( s1, in_bytes(simm13a), d); }
|
||||
# else
|
||||
inline void Assembler::ld( Register s1, ByteSize simm13a, Register d) { lduw( s1, in_bytes(simm13a), d); }
|
||||
# endif
|
||||
#endif
|
||||
|
||||
inline void Assembler::ld( const Address& a, Register d, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); ld( a.base(), a.index(), d); }
|
||||
else { ld( a.base(), a.disp() + offset, d); }
|
||||
}
|
||||
inline void Assembler::ldsb(const Address& a, Register d, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); ldsb(a.base(), a.index(), d); }
|
||||
else { ldsb(a.base(), a.disp() + offset, d); }
|
||||
}
|
||||
inline void Assembler::ldsh(const Address& a, Register d, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); ldsh(a.base(), a.index(), d); }
|
||||
else { ldsh(a.base(), a.disp() + offset, d); }
|
||||
}
|
||||
inline void Assembler::ldsw(const Address& a, Register d, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); ldsw(a.base(), a.index(), d); }
|
||||
else { ldsw(a.base(), a.disp() + offset, d); }
|
||||
}
|
||||
inline void Assembler::ldub(const Address& a, Register d, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); ldub(a.base(), a.index(), d); }
|
||||
else { ldub(a.base(), a.disp() + offset, d); }
|
||||
}
|
||||
inline void Assembler::lduh(const Address& a, Register d, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); lduh(a.base(), a.index(), d); }
|
||||
else { lduh(a.base(), a.disp() + offset, d); }
|
||||
}
|
||||
inline void Assembler::lduw(const Address& a, Register d, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); lduw(a.base(), a.index(), d); }
|
||||
else { lduw(a.base(), a.disp() + offset, d); }
|
||||
}
|
||||
inline void Assembler::ldd( const Address& a, Register d, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); ldd( a.base(), a.index(), d); }
|
||||
else { ldd( a.base(), a.disp() + offset, d); }
|
||||
}
|
||||
inline void Assembler::ldx( const Address& a, Register d, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); ldx( a.base(), a.index(), d); }
|
||||
else { ldx( a.base(), a.disp() + offset, d); }
|
||||
}
|
||||
|
||||
inline void Assembler::ldub(Register s1, RegisterOrConstant s2, Register d) { ldub(Address(s1, s2), d); }
|
||||
inline void Assembler::ldsb(Register s1, RegisterOrConstant s2, Register d) { ldsb(Address(s1, s2), d); }
|
||||
inline void Assembler::lduh(Register s1, RegisterOrConstant s2, Register d) { lduh(Address(s1, s2), d); }
|
||||
inline void Assembler::ldsh(Register s1, RegisterOrConstant s2, Register d) { ldsh(Address(s1, s2), d); }
|
||||
inline void Assembler::lduw(Register s1, RegisterOrConstant s2, Register d) { lduw(Address(s1, s2), d); }
|
||||
inline void Assembler::ldsw(Register s1, RegisterOrConstant s2, Register d) { ldsw(Address(s1, s2), d); }
|
||||
inline void Assembler::ldx( Register s1, RegisterOrConstant s2, Register d) { ldx( Address(s1, s2), d); }
|
||||
inline void Assembler::ld( Register s1, RegisterOrConstant s2, Register d) { ld( Address(s1, s2), d); }
|
||||
inline void Assembler::ldd( Register s1, RegisterOrConstant s2, Register d) { ldd( Address(s1, s2), d); }
|
||||
|
||||
// form effective addresses this way:
|
||||
inline void Assembler::add(const Address& a, Register d, int offset) {
|
||||
if (a.has_index()) add(a.base(), a.index(), d);
|
||||
else { add(a.base(), a.disp() + offset, d, a.rspec(offset)); offset = 0; }
|
||||
if (offset != 0) add(d, offset, d);
|
||||
}
|
||||
inline void Assembler::add(Register s1, RegisterOrConstant s2, Register d, int offset) {
|
||||
if (s2.is_register()) add(s1, s2.as_register(), d);
|
||||
else { add(s1, s2.as_constant() + offset, d); offset = 0; }
|
||||
if (offset != 0) add(d, offset, d);
|
||||
}
|
||||
|
||||
inline void Assembler::andn(Register s1, RegisterOrConstant s2, Register d) {
|
||||
if (s2.is_register()) andn(s1, s2.as_register(), d);
|
||||
else andn(s1, s2.as_constant(), d);
|
||||
}
|
||||
|
||||
inline void Assembler::ldstub( Register s1, Register s2, Register d) { emit_long( op(ldst_op) | rd(d) | op3(ldstub_op3) | rs1(s1) | rs2(s2) ); }
|
||||
inline void Assembler::ldstub( Register s1, int simm13a, Register d) { emit_data( op(ldst_op) | rd(d) | op3(ldstub_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
|
||||
|
||||
|
||||
inline void Assembler::prefetch(Register s1, Register s2, PrefetchFcn f) { v9_only(); emit_long( op(ldst_op) | fcn(f) | op3(prefetch_op3) | rs1(s1) | rs2(s2) ); }
|
||||
inline void Assembler::prefetch(Register s1, int simm13a, PrefetchFcn f) { v9_only(); emit_data( op(ldst_op) | fcn(f) | op3(prefetch_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
|
||||
|
||||
inline void Assembler::prefetch(const Address& a, PrefetchFcn f, int offset) { v9_only(); relocate(a.rspec(offset)); prefetch(a.base(), a.disp() + offset, f); }
|
||||
|
||||
|
||||
inline void Assembler::rett( Register s1, Register s2 ) { cti(); emit_long( op(arith_op) | op3(rett_op3) | rs1(s1) | rs2(s2)); has_delay_slot(); }
|
||||
inline void Assembler::rett( Register s1, int simm13a, relocInfo::relocType rt) { cti(); emit_data( op(arith_op) | op3(rett_op3) | rs1(s1) | immed(true) | simm(simm13a, 13), rt); has_delay_slot(); }
|
||||
|
||||
@ -251,20 +129,9 @@ inline void Assembler::sethi( int imm22a, Register d, RelocationHolder const& rs
|
||||
|
||||
// pp 222
|
||||
|
||||
inline void Assembler::stf( FloatRegisterImpl::Width w, FloatRegister d, Register s1, RegisterOrConstant s2) {
|
||||
if (s2.is_register()) stf(w, d, s1, s2.as_register());
|
||||
else stf(w, d, s1, s2.as_constant());
|
||||
}
|
||||
|
||||
inline void Assembler::stf( FloatRegisterImpl::Width w, FloatRegister d, Register s1, Register s2) { emit_long( op(ldst_op) | fd(d, w) | alt_op3(stf_op3, w) | rs1(s1) | rs2(s2) ); }
|
||||
inline void Assembler::stf( FloatRegisterImpl::Width w, FloatRegister d, Register s1, int simm13a) { emit_data( op(ldst_op) | fd(d, w) | alt_op3(stf_op3, w) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
|
||||
|
||||
inline void Assembler::stf( FloatRegisterImpl::Width w, FloatRegister d, const Address& a, int offset) {
|
||||
relocate(a.rspec(offset));
|
||||
if (a.has_index()) { assert(offset == 0, ""); stf(w, d, a.base(), a.index() ); }
|
||||
else { stf(w, d, a.base(), a.disp() + offset); }
|
||||
}
|
||||
|
||||
inline void Assembler::stfsr( Register s1, Register s2) { v9_dep(); emit_long( op(ldst_op) | op3(stfsr_op3) | rs1(s1) | rs2(s2) ); }
|
||||
inline void Assembler::stfsr( Register s1, int simm13a) { v9_dep(); emit_data( op(ldst_op) | op3(stfsr_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
|
||||
inline void Assembler::stxfsr( Register s1, Register s2) { v9_only(); emit_long( op(ldst_op) | rd(G1) | op3(stfsr_op3) | rs1(s1) | rs2(s2) ); }
|
||||
@ -285,46 +152,6 @@ inline void Assembler::stx( Register d, Register s1, int simm13a) { v9_only();
|
||||
inline void Assembler::std( Register d, Register s1, Register s2) { v9_dep(); assert(d->is_even(), "not even"); emit_long( op(ldst_op) | rd(d) | op3(std_op3) | rs1(s1) | rs2(s2) ); }
|
||||
inline void Assembler::std( Register d, Register s1, int simm13a) { v9_dep(); assert(d->is_even(), "not even"); emit_data( op(ldst_op) | rd(d) | op3(std_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
|
||||
|
||||
inline void Assembler::st( Register d, Register s1, Register s2) { stw(d, s1, s2); }
|
||||
inline void Assembler::st( Register d, Register s1, int simm13a) { stw(d, s1, simm13a); }
|
||||
|
||||
#ifdef ASSERT
|
||||
// ByteSize is only a class when ASSERT is defined, otherwise it's an int.
|
||||
inline void Assembler::st( Register d, Register s1, ByteSize simm13a) { stw(d, s1, in_bytes(simm13a)); }
|
||||
#endif
|
||||
|
||||
inline void Assembler::stb(Register d, const Address& a, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); stb(d, a.base(), a.index() ); }
|
||||
else { stb(d, a.base(), a.disp() + offset); }
|
||||
}
|
||||
inline void Assembler::sth(Register d, const Address& a, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); sth(d, a.base(), a.index() ); }
|
||||
else { sth(d, a.base(), a.disp() + offset); }
|
||||
}
|
||||
inline void Assembler::stw(Register d, const Address& a, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); stw(d, a.base(), a.index() ); }
|
||||
else { stw(d, a.base(), a.disp() + offset); }
|
||||
}
|
||||
inline void Assembler::st( Register d, const Address& a, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); st( d, a.base(), a.index() ); }
|
||||
else { st( d, a.base(), a.disp() + offset); }
|
||||
}
|
||||
inline void Assembler::std(Register d, const Address& a, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); std(d, a.base(), a.index() ); }
|
||||
else { std(d, a.base(), a.disp() + offset); }
|
||||
}
|
||||
inline void Assembler::stx(Register d, const Address& a, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); stx(d, a.base(), a.index() ); }
|
||||
else { stx(d, a.base(), a.disp() + offset); }
|
||||
}
|
||||
|
||||
inline void Assembler::stb(Register d, Register s1, RegisterOrConstant s2) { stb(d, Address(s1, s2)); }
|
||||
inline void Assembler::sth(Register d, Register s1, RegisterOrConstant s2) { sth(d, Address(s1, s2)); }
|
||||
inline void Assembler::stw(Register d, Register s1, RegisterOrConstant s2) { stw(d, Address(s1, s2)); }
|
||||
inline void Assembler::stx(Register d, Register s1, RegisterOrConstant s2) { stx(d, Address(s1, s2)); }
|
||||
inline void Assembler::std(Register d, Register s1, RegisterOrConstant s2) { std(d, Address(s1, s2)); }
|
||||
inline void Assembler::st( Register d, Register s1, RegisterOrConstant s2) { st( d, Address(s1, s2)); }
|
||||
|
||||
// v8 p 99
|
||||
|
||||
inline void Assembler::stc( int crd, Register s1, Register s2) { v8_only(); emit_long( op(ldst_op) | fcn(crd) | op3(stc_op3 ) | rs1(s1) | rs2(s2) ); }
|
||||
@ -336,561 +163,9 @@ inline void Assembler::stcsr( int crd, Register s1, int simm13a) { v8_only();
|
||||
inline void Assembler::stdcq( int crd, Register s1, Register s2) { v8_only(); emit_long( op(ldst_op) | fcn(crd) | op3(stdcq_op3) | rs1(s1) | rs2(s2) ); }
|
||||
inline void Assembler::stdcq( int crd, Register s1, int simm13a) { v8_only(); emit_data( op(ldst_op) | fcn(crd) | op3(stdcq_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
|
||||
|
||||
inline void Assembler::sub(Register s1, RegisterOrConstant s2, Register d, int offset) {
|
||||
if (s2.is_register()) sub(s1, s2.as_register(), d);
|
||||
else { sub(s1, s2.as_constant() + offset, d); offset = 0; }
|
||||
if (offset != 0) sub(d, offset, d);
|
||||
}
|
||||
|
||||
// pp 231
|
||||
|
||||
inline void Assembler::swap( Register s1, Register s2, Register d) { v9_dep(); emit_long( op(ldst_op) | rd(d) | op3(swap_op3) | rs1(s1) | rs2(s2) ); }
|
||||
inline void Assembler::swap( Register s1, int simm13a, Register d) { v9_dep(); emit_data( op(ldst_op) | rd(d) | op3(swap_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
|
||||
|
||||
inline void Assembler::swap( Address& a, Register d, int offset ) {
|
||||
relocate(a.rspec(offset));
|
||||
if (a.has_index()) { assert(offset == 0, ""); swap( a.base(), a.index(), d ); }
|
||||
else { swap( a.base(), a.disp() + offset, d ); }
|
||||
}
|
||||
|
||||
|
||||
// Use the right loads/stores for the platform
|
||||
inline void MacroAssembler::ld_ptr( Register s1, Register s2, Register d ) {
|
||||
#ifdef _LP64
|
||||
Assembler::ldx(s1, s2, d);
|
||||
#else
|
||||
Assembler::ld( s1, s2, d);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::ld_ptr( Register s1, int simm13a, Register d ) {
|
||||
#ifdef _LP64
|
||||
Assembler::ldx(s1, simm13a, d);
|
||||
#else
|
||||
Assembler::ld( s1, simm13a, d);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef ASSERT
|
||||
// ByteSize is only a class when ASSERT is defined, otherwise it's an int.
|
||||
inline void MacroAssembler::ld_ptr( Register s1, ByteSize simm13a, Register d ) {
|
||||
ld_ptr(s1, in_bytes(simm13a), d);
|
||||
}
|
||||
#endif
|
||||
|
||||
inline void MacroAssembler::ld_ptr( Register s1, RegisterOrConstant s2, Register d ) {
|
||||
#ifdef _LP64
|
||||
Assembler::ldx(s1, s2, d);
|
||||
#else
|
||||
Assembler::ld( s1, s2, d);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::ld_ptr(const Address& a, Register d, int offset) {
|
||||
#ifdef _LP64
|
||||
Assembler::ldx(a, d, offset);
|
||||
#else
|
||||
Assembler::ld( a, d, offset);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::st_ptr( Register d, Register s1, Register s2 ) {
|
||||
#ifdef _LP64
|
||||
Assembler::stx(d, s1, s2);
|
||||
#else
|
||||
Assembler::st( d, s1, s2);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::st_ptr( Register d, Register s1, int simm13a ) {
|
||||
#ifdef _LP64
|
||||
Assembler::stx(d, s1, simm13a);
|
||||
#else
|
||||
Assembler::st( d, s1, simm13a);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef ASSERT
|
||||
// ByteSize is only a class when ASSERT is defined, otherwise it's an int.
|
||||
inline void MacroAssembler::st_ptr( Register d, Register s1, ByteSize simm13a ) {
|
||||
st_ptr(d, s1, in_bytes(simm13a));
|
||||
}
|
||||
#endif
|
||||
|
||||
inline void MacroAssembler::st_ptr( Register d, Register s1, RegisterOrConstant s2 ) {
|
||||
#ifdef _LP64
|
||||
Assembler::stx(d, s1, s2);
|
||||
#else
|
||||
Assembler::st( d, s1, s2);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::st_ptr(Register d, const Address& a, int offset) {
|
||||
#ifdef _LP64
|
||||
Assembler::stx(d, a, offset);
|
||||
#else
|
||||
Assembler::st( d, a, offset);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Use the right loads/stores for the platform
|
||||
inline void MacroAssembler::ld_long( Register s1, Register s2, Register d ) {
|
||||
#ifdef _LP64
|
||||
Assembler::ldx(s1, s2, d);
|
||||
#else
|
||||
Assembler::ldd(s1, s2, d);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::ld_long( Register s1, int simm13a, Register d ) {
|
||||
#ifdef _LP64
|
||||
Assembler::ldx(s1, simm13a, d);
|
||||
#else
|
||||
Assembler::ldd(s1, simm13a, d);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::ld_long( Register s1, RegisterOrConstant s2, Register d ) {
|
||||
#ifdef _LP64
|
||||
Assembler::ldx(s1, s2, d);
|
||||
#else
|
||||
Assembler::ldd(s1, s2, d);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::ld_long(const Address& a, Register d, int offset) {
|
||||
#ifdef _LP64
|
||||
Assembler::ldx(a, d, offset);
|
||||
#else
|
||||
Assembler::ldd(a, d, offset);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::st_long( Register d, Register s1, Register s2 ) {
|
||||
#ifdef _LP64
|
||||
Assembler::stx(d, s1, s2);
|
||||
#else
|
||||
Assembler::std(d, s1, s2);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::st_long( Register d, Register s1, int simm13a ) {
|
||||
#ifdef _LP64
|
||||
Assembler::stx(d, s1, simm13a);
|
||||
#else
|
||||
Assembler::std(d, s1, simm13a);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::st_long( Register d, Register s1, RegisterOrConstant s2 ) {
|
||||
#ifdef _LP64
|
||||
Assembler::stx(d, s1, s2);
|
||||
#else
|
||||
Assembler::std(d, s1, s2);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::st_long( Register d, const Address& a, int offset ) {
|
||||
#ifdef _LP64
|
||||
Assembler::stx(d, a, offset);
|
||||
#else
|
||||
Assembler::std(d, a, offset);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Functions for isolating 64 bit shifts for LP64
|
||||
|
||||
inline void MacroAssembler::sll_ptr( Register s1, Register s2, Register d ) {
|
||||
#ifdef _LP64
|
||||
Assembler::sllx(s1, s2, d);
|
||||
#else
|
||||
Assembler::sll( s1, s2, d);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::sll_ptr( Register s1, int imm6a, Register d ) {
|
||||
#ifdef _LP64
|
||||
Assembler::sllx(s1, imm6a, d);
|
||||
#else
|
||||
Assembler::sll( s1, imm6a, d);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::srl_ptr( Register s1, Register s2, Register d ) {
|
||||
#ifdef _LP64
|
||||
Assembler::srlx(s1, s2, d);
|
||||
#else
|
||||
Assembler::srl( s1, s2, d);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::srl_ptr( Register s1, int imm6a, Register d ) {
|
||||
#ifdef _LP64
|
||||
Assembler::srlx(s1, imm6a, d);
|
||||
#else
|
||||
Assembler::srl( s1, imm6a, d);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::sll_ptr( Register s1, RegisterOrConstant s2, Register d ) {
|
||||
if (s2.is_register()) sll_ptr(s1, s2.as_register(), d);
|
||||
else sll_ptr(s1, s2.as_constant(), d);
|
||||
}
|
||||
|
||||
// Use the right branch for the platform
|
||||
|
||||
inline void MacroAssembler::br( Condition c, bool a, Predict p, address d, relocInfo::relocType rt ) {
|
||||
if (VM_Version::v9_instructions_work())
|
||||
Assembler::bp(c, a, icc, p, d, rt);
|
||||
else
|
||||
Assembler::br(c, a, d, rt);
|
||||
}
|
||||
|
||||
inline void MacroAssembler::br( Condition c, bool a, Predict p, Label& L ) {
|
||||
br(c, a, p, target(L));
|
||||
}
|
||||
|
||||
|
||||
// Branch that tests either xcc or icc depending on the
|
||||
// architecture compiled (LP64 or not)
|
||||
inline void MacroAssembler::brx( Condition c, bool a, Predict p, address d, relocInfo::relocType rt ) {
|
||||
#ifdef _LP64
|
||||
Assembler::bp(c, a, xcc, p, d, rt);
|
||||
#else
|
||||
MacroAssembler::br(c, a, p, d, rt);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::brx( Condition c, bool a, Predict p, Label& L ) {
|
||||
brx(c, a, p, target(L));
|
||||
}
|
||||
|
||||
inline void MacroAssembler::ba( Label& L ) {
|
||||
br(always, false, pt, L);
|
||||
}
|
||||
|
||||
// Warning: V9 only functions
|
||||
inline void MacroAssembler::bp( Condition c, bool a, CC cc, Predict p, address d, relocInfo::relocType rt ) {
|
||||
Assembler::bp(c, a, cc, p, d, rt);
|
||||
}
|
||||
|
||||
inline void MacroAssembler::bp( Condition c, bool a, CC cc, Predict p, Label& L ) {
|
||||
Assembler::bp(c, a, cc, p, L);
|
||||
}
|
||||
|
||||
inline void MacroAssembler::fb( Condition c, bool a, Predict p, address d, relocInfo::relocType rt ) {
|
||||
if (VM_Version::v9_instructions_work())
|
||||
fbp(c, a, fcc0, p, d, rt);
|
||||
else
|
||||
Assembler::fb(c, a, d, rt);
|
||||
}
|
||||
|
||||
inline void MacroAssembler::fb( Condition c, bool a, Predict p, Label& L ) {
|
||||
fb(c, a, p, target(L));
|
||||
}
|
||||
|
||||
inline void MacroAssembler::fbp( Condition c, bool a, CC cc, Predict p, address d, relocInfo::relocType rt ) {
|
||||
Assembler::fbp(c, a, cc, p, d, rt);
|
||||
}
|
||||
|
||||
inline void MacroAssembler::fbp( Condition c, bool a, CC cc, Predict p, Label& L ) {
|
||||
Assembler::fbp(c, a, cc, p, L);
|
||||
}
|
||||
|
||||
inline void MacroAssembler::jmp( Register s1, Register s2 ) { jmpl( s1, s2, G0 ); }
|
||||
inline void MacroAssembler::jmp( Register s1, int simm13a, RelocationHolder const& rspec ) { jmpl( s1, simm13a, G0, rspec); }
|
||||
|
||||
inline bool MacroAssembler::is_far_target(address d) {
|
||||
if (ForceUnreachable) {
|
||||
// References outside the code cache should be treated as far
|
||||
return d < CodeCache::low_bound() || d > CodeCache::high_bound();
|
||||
}
|
||||
return !is_in_wdisp30_range(d, CodeCache::low_bound()) || !is_in_wdisp30_range(d, CodeCache::high_bound());
|
||||
}
|
||||
|
||||
// Call with a check to see if we need to deal with the added
|
||||
// expense of relocation and if we overflow the displacement
|
||||
// of the quick call instruction.
|
||||
inline void MacroAssembler::call( address d, relocInfo::relocType rt ) {
|
||||
#ifdef _LP64
|
||||
intptr_t disp;
|
||||
// NULL is ok because it will be relocated later.
|
||||
// Must change NULL to a reachable address in order to
|
||||
// pass asserts here and in wdisp.
|
||||
if ( d == NULL )
|
||||
d = pc();
|
||||
|
||||
// Is this address within range of the call instruction?
|
||||
// If not, use the expensive instruction sequence
|
||||
if (is_far_target(d)) {
|
||||
relocate(rt);
|
||||
AddressLiteral dest(d);
|
||||
jumpl_to(dest, O7, O7);
|
||||
} else {
|
||||
Assembler::call(d, rt);
|
||||
}
|
||||
#else
|
||||
Assembler::call( d, rt );
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::call( Label& L, relocInfo::relocType rt ) {
|
||||
MacroAssembler::call( target(L), rt);
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline void MacroAssembler::callr( Register s1, Register s2 ) { jmpl( s1, s2, O7 ); }
|
||||
inline void MacroAssembler::callr( Register s1, int simm13a, RelocationHolder const& rspec ) { jmpl( s1, simm13a, O7, rspec); }
|
||||
|
||||
// prefetch instruction
|
||||
inline void MacroAssembler::iprefetch( address d, relocInfo::relocType rt ) {
|
||||
if (VM_Version::v9_instructions_work())
|
||||
Assembler::bp( never, true, xcc, pt, d, rt );
|
||||
}
|
||||
inline void MacroAssembler::iprefetch( Label& L) { iprefetch( target(L) ); }
|
||||
|
||||
|
||||
// clobbers o7 on V8!!
|
||||
// returns delta from gotten pc to addr after
|
||||
inline int MacroAssembler::get_pc( Register d ) {
|
||||
int x = offset();
|
||||
if (VM_Version::v9_instructions_work())
|
||||
rdpc(d);
|
||||
else {
|
||||
Label lbl;
|
||||
Assembler::call(lbl, relocInfo::none); // No relocation as this is call to pc+0x8
|
||||
if (d == O7) delayed()->nop();
|
||||
else delayed()->mov(O7, d);
|
||||
bind(lbl);
|
||||
}
|
||||
return offset() - x;
|
||||
}
|
||||
|
||||
|
||||
// Note: All MacroAssembler::set_foo functions are defined out-of-line.
|
||||
|
||||
|
||||
// Loads the current PC of the following instruction as an immediate value in
|
||||
// 2 instructions. All PCs in the CodeCache are within 2 Gig of each other.
|
||||
inline intptr_t MacroAssembler::load_pc_address( Register reg, int bytes_to_skip ) {
|
||||
intptr_t thepc = (intptr_t)pc() + 2*BytesPerInstWord + bytes_to_skip;
|
||||
#ifdef _LP64
|
||||
Unimplemented();
|
||||
#else
|
||||
Assembler::sethi( thepc & ~0x3ff, reg, internal_word_Relocation::spec((address)thepc));
|
||||
Assembler::add(reg,thepc & 0x3ff, reg, internal_word_Relocation::spec((address)thepc));
|
||||
#endif
|
||||
return thepc;
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::load_contents(const AddressLiteral& addrlit, Register d, int offset) {
|
||||
assert_not_delayed();
|
||||
if (ForceUnreachable) {
|
||||
patchable_sethi(addrlit, d);
|
||||
} else {
|
||||
sethi(addrlit, d);
|
||||
}
|
||||
ld(d, addrlit.low10() + offset, d);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::load_bool_contents(const AddressLiteral& addrlit, Register d, int offset) {
|
||||
assert_not_delayed();
|
||||
if (ForceUnreachable) {
|
||||
patchable_sethi(addrlit, d);
|
||||
} else {
|
||||
sethi(addrlit, d);
|
||||
}
|
||||
ldub(d, addrlit.low10() + offset, d);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::load_ptr_contents(const AddressLiteral& addrlit, Register d, int offset) {
|
||||
assert_not_delayed();
|
||||
if (ForceUnreachable) {
|
||||
patchable_sethi(addrlit, d);
|
||||
} else {
|
||||
sethi(addrlit, d);
|
||||
}
|
||||
ld_ptr(d, addrlit.low10() + offset, d);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::store_contents(Register s, const AddressLiteral& addrlit, Register temp, int offset) {
|
||||
assert_not_delayed();
|
||||
if (ForceUnreachable) {
|
||||
patchable_sethi(addrlit, temp);
|
||||
} else {
|
||||
sethi(addrlit, temp);
|
||||
}
|
||||
st(s, temp, addrlit.low10() + offset);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::store_ptr_contents(Register s, const AddressLiteral& addrlit, Register temp, int offset) {
|
||||
assert_not_delayed();
|
||||
if (ForceUnreachable) {
|
||||
patchable_sethi(addrlit, temp);
|
||||
} else {
|
||||
sethi(addrlit, temp);
|
||||
}
|
||||
st_ptr(s, temp, addrlit.low10() + offset);
|
||||
}
|
||||
|
||||
|
||||
// This code sequence is relocatable to any address, even on LP64.
|
||||
inline void MacroAssembler::jumpl_to(const AddressLiteral& addrlit, Register temp, Register d, int offset) {
|
||||
assert_not_delayed();
|
||||
// Force fixed length sethi because NativeJump and NativeFarCall don't handle
|
||||
// variable length instruction streams.
|
||||
patchable_sethi(addrlit, temp);
|
||||
jmpl(temp, addrlit.low10() + offset, d);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::jump_to(const AddressLiteral& addrlit, Register temp, int offset) {
|
||||
jumpl_to(addrlit, temp, G0, offset);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::jump_indirect_to(Address& a, Register temp,
|
||||
int ld_offset, int jmp_offset) {
|
||||
assert_not_delayed();
|
||||
//sethi(al); // sethi is caller responsibility for this one
|
||||
ld_ptr(a, temp, ld_offset);
|
||||
jmp(temp, jmp_offset);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::set_metadata(Metadata* obj, Register d) {
|
||||
set_metadata(allocate_metadata_address(obj), d);
|
||||
}
|
||||
|
||||
inline void MacroAssembler::set_metadata_constant(Metadata* obj, Register d) {
|
||||
set_metadata(constant_metadata_address(obj), d);
|
||||
}
|
||||
|
||||
inline void MacroAssembler::set_metadata(const AddressLiteral& obj_addr, Register d) {
|
||||
assert(obj_addr.rspec().type() == relocInfo::metadata_type, "must be a metadata reloc");
|
||||
set(obj_addr, d);
|
||||
}
|
||||
|
||||
inline void MacroAssembler::set_oop(jobject obj, Register d) {
|
||||
set_oop(allocate_oop_address(obj), d);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::set_oop_constant(jobject obj, Register d) {
|
||||
set_oop(constant_oop_address(obj), d);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::set_oop(const AddressLiteral& obj_addr, Register d) {
|
||||
assert(obj_addr.rspec().type() == relocInfo::oop_type, "must be an oop reloc");
|
||||
set(obj_addr, d);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::load_argument( Argument& a, Register d ) {
|
||||
if (a.is_register())
|
||||
mov(a.as_register(), d);
|
||||
else
|
||||
ld (a.as_address(), d);
|
||||
}
|
||||
|
||||
inline void MacroAssembler::store_argument( Register s, Argument& a ) {
|
||||
if (a.is_register())
|
||||
mov(s, a.as_register());
|
||||
else
|
||||
st_ptr (s, a.as_address()); // ABI says everything is right justified.
|
||||
}
|
||||
|
||||
inline void MacroAssembler::store_ptr_argument( Register s, Argument& a ) {
|
||||
if (a.is_register())
|
||||
mov(s, a.as_register());
|
||||
else
|
||||
st_ptr (s, a.as_address());
|
||||
}
|
||||
|
||||
|
||||
#ifdef _LP64
|
||||
inline void MacroAssembler::store_float_argument( FloatRegister s, Argument& a ) {
|
||||
if (a.is_float_register())
|
||||
// V9 ABI has F1, F3, F5 are used to pass instead of O0, O1, O2
|
||||
fmov(FloatRegisterImpl::S, s, a.as_float_register() );
|
||||
else
|
||||
// Floats are stored in the high half of the stack entry
|
||||
// The low half is undefined per the ABI.
|
||||
stf(FloatRegisterImpl::S, s, a.as_address(), sizeof(jfloat));
|
||||
}
|
||||
|
||||
inline void MacroAssembler::store_double_argument( FloatRegister s, Argument& a ) {
|
||||
if (a.is_float_register())
|
||||
// V9 ABI has D0, D2, D4 are used to pass instead of O0, O1, O2
|
||||
fmov(FloatRegisterImpl::D, s, a.as_double_register() );
|
||||
else
|
||||
stf(FloatRegisterImpl::D, s, a.as_address());
|
||||
}
|
||||
|
||||
inline void MacroAssembler::store_long_argument( Register s, Argument& a ) {
|
||||
if (a.is_register())
|
||||
mov(s, a.as_register());
|
||||
else
|
||||
stx(s, a.as_address());
|
||||
}
|
||||
#endif
|
||||
|
||||
inline void MacroAssembler::clrb( Register s1, Register s2) { stb( G0, s1, s2 ); }
|
||||
inline void MacroAssembler::clrh( Register s1, Register s2) { sth( G0, s1, s2 ); }
|
||||
inline void MacroAssembler::clr( Register s1, Register s2) { stw( G0, s1, s2 ); }
|
||||
inline void MacroAssembler::clrx( Register s1, Register s2) { stx( G0, s1, s2 ); }
|
||||
|
||||
inline void MacroAssembler::clrb( Register s1, int simm13a) { stb( G0, s1, simm13a); }
|
||||
inline void MacroAssembler::clrh( Register s1, int simm13a) { sth( G0, s1, simm13a); }
|
||||
inline void MacroAssembler::clr( Register s1, int simm13a) { stw( G0, s1, simm13a); }
|
||||
inline void MacroAssembler::clrx( Register s1, int simm13a) { stx( G0, s1, simm13a); }
|
||||
|
||||
// returns if membar generates anything, obviously this code should mirror
|
||||
// membar below.
|
||||
inline bool MacroAssembler::membar_has_effect( Membar_mask_bits const7a ) {
|
||||
if( !os::is_MP() ) return false; // Not needed on single CPU
|
||||
if( VM_Version::v9_instructions_work() ) {
|
||||
const Membar_mask_bits effective_mask =
|
||||
Membar_mask_bits(const7a & ~(LoadLoad | LoadStore | StoreStore));
|
||||
return (effective_mask != 0);
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
inline void MacroAssembler::membar( Membar_mask_bits const7a ) {
|
||||
// Uniprocessors do not need memory barriers
|
||||
if (!os::is_MP()) return;
|
||||
// Weakened for current Sparcs and TSO. See the v9 manual, sections 8.4.3,
|
||||
// 8.4.4.3, a.31 and a.50.
|
||||
if( VM_Version::v9_instructions_work() ) {
|
||||
// Under TSO, setting bit 3, 2, or 0 is redundant, so the only value
|
||||
// of the mmask subfield of const7a that does anything that isn't done
|
||||
// implicitly is StoreLoad.
|
||||
const Membar_mask_bits effective_mask =
|
||||
Membar_mask_bits(const7a & ~(LoadLoad | LoadStore | StoreStore));
|
||||
if ( effective_mask != 0 ) {
|
||||
Assembler::membar( effective_mask );
|
||||
}
|
||||
} else {
|
||||
// stbar is the closest there is on v8. Equivalent to membar(StoreStore). We
|
||||
// do not issue the stbar because to my knowledge all v8 machines implement TSO,
|
||||
// which guarantees that all stores behave as if an stbar were issued just after
|
||||
// each one of them. On these machines, stbar ought to be a nop. There doesn't
|
||||
// appear to be an equivalent of membar(StoreLoad) on v8: TSO doesn't require it,
|
||||
// it can't be specified by stbar, nor have I come up with a way to simulate it.
|
||||
//
|
||||
// Addendum. Dave says that ldstub guarantees a write buffer flush to coherent
|
||||
// space. Put one here to be on the safe side.
|
||||
Assembler::ldstub(SP, 0, G0);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // CPU_SPARC_VM_ASSEMBLER_SPARC_INLINE_HPP
|
||||
|
@ -31,9 +31,4 @@ private:
|
||||
public:
|
||||
void flush_bundle(bool start_new_bundle) {}
|
||||
|
||||
// Heuristic for pre-packing the pt/pn bit of a predicted branch.
|
||||
bool is_backward_branch(Label& L) {
|
||||
return L.is_bound() && insts_end() <= locator_address(L.loc());
|
||||
}
|
||||
|
||||
#endif // CPU_SPARC_VM_CODEBUFFER_SPARC_HPP
|
||||
|
@ -1048,7 +1048,6 @@ void CppInterpreterGenerator::generate_compute_interpreter_state(const Register
|
||||
const Address constMethod (G5_method, 0, in_bytes(Method::const_offset()));
|
||||
const Address access_flags (G5_method, 0, in_bytes(Method::access_flags_offset()));
|
||||
const Address size_of_parameters(G5_method, 0, in_bytes(Method::size_of_parameters_offset()));
|
||||
const Address max_stack (G5_method, 0, in_bytes(Method::max_stack_offset()));
|
||||
const Address size_of_locals (G5_method, 0, in_bytes(Method::size_of_locals_offset()));
|
||||
|
||||
// slop factor is two extra slots on the expression stack so that
|
||||
@ -1070,7 +1069,9 @@ void CppInterpreterGenerator::generate_compute_interpreter_state(const Register
|
||||
__ lduh( size_of_parameters, Gtmp );
|
||||
__ calc_mem_param_words(Gtmp, Gtmp); // space for native call parameters passed on the stack in words
|
||||
} else {
|
||||
__ lduh(max_stack, Gtmp); // Full size expression stack
|
||||
// Full size expression stack
|
||||
__ ld_ptr(constMethod, Gtmp);
|
||||
__ lduh(Gtmp, in_bytes(ConstMethod::max_stack_offset()), Gtmp);
|
||||
}
|
||||
__ add(Gtmp, fixed_size, Gtmp); // plus the fixed portion
|
||||
|
||||
@ -1206,7 +1207,9 @@ void CppInterpreterGenerator::generate_compute_interpreter_state(const Register
|
||||
__ sub(O2, wordSize, O2); // prepush
|
||||
__ st_ptr(O2, XXX_STATE(_stack)); // PREPUSH
|
||||
|
||||
__ lduh(max_stack, O3); // Full size expression stack
|
||||
// Full size expression stack
|
||||
__ ld_ptr(constMethod, O3);
|
||||
__ lduh(O3, in_bytes(ConstMethod::max_stack_offset()), O3);
|
||||
guarantee(!EnableInvokeDynamic, "no support yet for java.lang.invoke.MethodHandle"); //6815692
|
||||
//6815692//if (EnableInvokeDynamic)
|
||||
//6815692// __ inc(O3, Method::extra_stack_entries());
|
||||
@ -1539,7 +1542,6 @@ address InterpreterGenerator::generate_normal_entry(bool synchronized) {
|
||||
const Address constMethod (G5_method, 0, in_bytes(Method::const_offset()));
|
||||
const Address access_flags (G5_method, 0, in_bytes(Method::access_flags_offset()));
|
||||
const Address size_of_parameters(G5_method, 0, in_bytes(Method::size_of_parameters_offset()));
|
||||
const Address max_stack (G5_method, 0, in_bytes(Method::max_stack_offset()));
|
||||
const Address size_of_locals (G5_method, 0, in_bytes(Method::size_of_locals_offset()));
|
||||
|
||||
address entry_point = __ pc();
|
||||
|
@ -648,7 +648,7 @@ bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
|
||||
Method* m = *interpreter_frame_method_addr();
|
||||
|
||||
// validate the method we'd find in this potential sender
|
||||
if (!Universe::heap()->is_valid_method(m)) return false;
|
||||
if (!m->is_valid_method()) return false;
|
||||
|
||||
// stack frames shouldn't be much larger than max_stack elements
|
||||
|
||||
|
@ -204,25 +204,6 @@
|
||||
intptr_t* out_register_addr(Register reg) const {
|
||||
return younger_sp_addr_at(reg->after_save()->sp_offset_in_saved_window());
|
||||
}
|
||||
intptr_t* memory_param_addr(int param_ix, bool is_in) const {
|
||||
int offset = callee_register_argument_save_area_sp_offset + param_ix;
|
||||
if (is_in)
|
||||
return fp_addr_at(offset);
|
||||
else
|
||||
return sp_addr_at(offset);
|
||||
}
|
||||
intptr_t* param_addr(int param_ix, bool is_in) const {
|
||||
if (param_ix >= callee_register_argument_save_area_words)
|
||||
return memory_param_addr(param_ix, is_in);
|
||||
else if (is_in)
|
||||
return register_addr(Argument(param_ix, true).as_register());
|
||||
else {
|
||||
// the registers are stored in the next younger frame
|
||||
// %%% is this really necessary?
|
||||
ShouldNotReachHere();
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Interpreter frames
|
||||
@ -269,12 +250,8 @@
|
||||
#ifndef CC_INTERP
|
||||
|
||||
// where Lmonitors is saved:
|
||||
BasicObjectLock** interpreter_frame_monitors_addr() const {
|
||||
return (BasicObjectLock**) sp_addr_at(Lmonitors->sp_offset_in_saved_window());
|
||||
}
|
||||
intptr_t** interpreter_frame_esp_addr() const {
|
||||
return (intptr_t**)sp_addr_at(Lesp->sp_offset_in_saved_window());
|
||||
}
|
||||
inline BasicObjectLock** interpreter_frame_monitors_addr() const;
|
||||
inline intptr_t** interpreter_frame_esp_addr() const;
|
||||
|
||||
inline void interpreter_frame_set_tos_address(intptr_t* x);
|
||||
|
||||
|
@ -25,6 +25,8 @@
|
||||
#ifndef CPU_SPARC_VM_FRAME_SPARC_INLINE_HPP
|
||||
#define CPU_SPARC_VM_FRAME_SPARC_INLINE_HPP
|
||||
|
||||
#include "asm/macroAssembler.hpp"
|
||||
|
||||
// Inline functions for SPARC frames:
|
||||
|
||||
// Constructors
|
||||
@ -185,6 +187,13 @@ inline intptr_t* frame::interpreter_frame_tos_address() const {
|
||||
return *interpreter_frame_esp_addr() + 1;
|
||||
}
|
||||
|
||||
inline BasicObjectLock** frame::interpreter_frame_monitors_addr() const {
|
||||
return (BasicObjectLock**) sp_addr_at(Lmonitors->sp_offset_in_saved_window());
|
||||
}
|
||||
inline intptr_t** frame::interpreter_frame_esp_addr() const {
|
||||
return (intptr_t**)sp_addr_at(Lesp->sp_offset_in_saved_window());
|
||||
}
|
||||
|
||||
inline void frame::interpreter_frame_set_tos_address( intptr_t* x ) {
|
||||
*interpreter_frame_esp_addr() = x - 1;
|
||||
}
|
||||
|
@ -23,8 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/assembler.hpp"
|
||||
#include "assembler_sparc.inline.hpp"
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "code/icBuffer.hpp"
|
||||
#include "gc_interface/collectedHeap.inline.hpp"
|
||||
#include "interpreter/bytecodes.hpp"
|
||||
|
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "assembler_sparc.inline.hpp"
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "runtime/icache.hpp"
|
||||
|
||||
#define __ _masm->
|
||||
|
@ -36,12 +36,7 @@
|
||||
#include "runtime/basicLock.hpp"
|
||||
#include "runtime/biasedLocking.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#ifdef TARGET_OS_FAMILY_linux
|
||||
# include "thread_linux.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_OS_FAMILY_solaris
|
||||
# include "thread_solaris.inline.hpp"
|
||||
#endif
|
||||
#include "runtime/thread.inline.hpp"
|
||||
|
||||
#ifndef CC_INTERP
|
||||
#ifndef FAST_DISPATCH
|
||||
@ -523,7 +518,8 @@ void InterpreterMacroAssembler::empty_expression_stack() {
|
||||
delayed()->nop();
|
||||
|
||||
// Compute max expression stack+register save area
|
||||
lduh(Lmethod, in_bytes(Method::max_stack_offset()), Gframe_size); // Load max stack.
|
||||
ld_ptr(Lmethod, in_bytes(Method::const_offset()), Gframe_size);
|
||||
lduh(Gframe_size, in_bytes(ConstMethod::max_stack_offset()), Gframe_size); // Load max stack.
|
||||
add( Gframe_size, frame::memory_parameter_word_sp_offset, Gframe_size );
|
||||
|
||||
//
|
||||
|
@ -25,7 +25,7 @@
|
||||
#ifndef CPU_SPARC_VM_INTERP_MASM_SPARC_HPP
|
||||
#define CPU_SPARC_VM_INTERP_MASM_SPARC_HPP
|
||||
|
||||
#include "assembler_sparc.inline.hpp"
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "interpreter/invocationCounter.hpp"
|
||||
|
||||
// This file specializes the assember with interpreter-specific macros
|
||||
|
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/assembler.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "interpreter/bytecodeHistogram.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterGenerator.hpp"
|
||||
|
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "assembler_sparc.inline.hpp"
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "prims/jniFastGetField.hpp"
|
||||
#include "prims/jvm_misc.hpp"
|
||||
|
4610
hotspot/src/cpu/sparc/vm/macroAssembler_sparc.cpp
Normal file
4610
hotspot/src/cpu/sparc/vm/macroAssembler_sparc.cpp
Normal file
File diff suppressed because it is too large
Load Diff
1504
hotspot/src/cpu/sparc/vm/macroAssembler_sparc.hpp
Normal file
1504
hotspot/src/cpu/sparc/vm/macroAssembler_sparc.hpp
Normal file
File diff suppressed because it is too large
Load Diff
765
hotspot/src/cpu/sparc/vm/macroAssembler_sparc.inline.hpp
Normal file
765
hotspot/src/cpu/sparc/vm/macroAssembler_sparc.inline.hpp
Normal file
@ -0,0 +1,765 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_SPARC_VM_MACROASSEMBLER_SPARC_INLINE_HPP
|
||||
#define CPU_SPARC_VM_MACROASSEMBLER_SPARC_INLINE_HPP
|
||||
|
||||
#include "asm/assembler.inline.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "asm/codeBuffer.hpp"
|
||||
#include "code/codeCache.hpp"
|
||||
|
||||
inline bool Address::is_simm13(int offset) { return Assembler::is_simm13(disp() + offset); }
|
||||
|
||||
|
||||
inline int AddressLiteral::low10() const {
|
||||
return Assembler::low10(value());
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::pd_patch_instruction(address branch, address target) {
|
||||
jint& stub_inst = *(jint*) branch;
|
||||
stub_inst = patched_branch(target - branch, stub_inst, 0);
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
inline void MacroAssembler::pd_print_patched_instruction(address branch) {
|
||||
jint stub_inst = *(jint*) branch;
|
||||
print_instruction(stub_inst);
|
||||
::tty->print("%s", " (unresolved)");
|
||||
}
|
||||
#endif // PRODUCT
|
||||
|
||||
// Use the right loads/stores for the platform
|
||||
inline void MacroAssembler::ld_ptr( Register s1, Register s2, Register d ) {
|
||||
#ifdef _LP64
|
||||
Assembler::ldx(s1, s2, d);
|
||||
#else
|
||||
ld( s1, s2, d);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::ld_ptr( Register s1, int simm13a, Register d ) {
|
||||
#ifdef _LP64
|
||||
Assembler::ldx(s1, simm13a, d);
|
||||
#else
|
||||
ld( s1, simm13a, d);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef ASSERT
|
||||
// ByteSize is only a class when ASSERT is defined, otherwise it's an int.
|
||||
inline void MacroAssembler::ld_ptr( Register s1, ByteSize simm13a, Register d ) {
|
||||
ld_ptr(s1, in_bytes(simm13a), d);
|
||||
}
|
||||
#endif
|
||||
|
||||
inline void MacroAssembler::ld_ptr( Register s1, RegisterOrConstant s2, Register d ) {
|
||||
#ifdef _LP64
|
||||
ldx(s1, s2, d);
|
||||
#else
|
||||
ld( s1, s2, d);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::ld_ptr(const Address& a, Register d, int offset) {
|
||||
#ifdef _LP64
|
||||
ldx(a, d, offset);
|
||||
#else
|
||||
ld( a, d, offset);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::st_ptr( Register d, Register s1, Register s2 ) {
|
||||
#ifdef _LP64
|
||||
Assembler::stx(d, s1, s2);
|
||||
#else
|
||||
st( d, s1, s2);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::st_ptr( Register d, Register s1, int simm13a ) {
|
||||
#ifdef _LP64
|
||||
Assembler::stx(d, s1, simm13a);
|
||||
#else
|
||||
st( d, s1, simm13a);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef ASSERT
|
||||
// ByteSize is only a class when ASSERT is defined, otherwise it's an int.
|
||||
inline void MacroAssembler::st_ptr( Register d, Register s1, ByteSize simm13a ) {
|
||||
st_ptr(d, s1, in_bytes(simm13a));
|
||||
}
|
||||
#endif
|
||||
|
||||
inline void MacroAssembler::st_ptr( Register d, Register s1, RegisterOrConstant s2 ) {
|
||||
#ifdef _LP64
|
||||
stx(d, s1, s2);
|
||||
#else
|
||||
st( d, s1, s2);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::st_ptr(Register d, const Address& a, int offset) {
|
||||
#ifdef _LP64
|
||||
stx(d, a, offset);
|
||||
#else
|
||||
st( d, a, offset);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Use the right loads/stores for the platform
|
||||
inline void MacroAssembler::ld_long( Register s1, Register s2, Register d ) {
|
||||
#ifdef _LP64
|
||||
Assembler::ldx(s1, s2, d);
|
||||
#else
|
||||
Assembler::ldd(s1, s2, d);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::ld_long( Register s1, int simm13a, Register d ) {
|
||||
#ifdef _LP64
|
||||
Assembler::ldx(s1, simm13a, d);
|
||||
#else
|
||||
Assembler::ldd(s1, simm13a, d);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::ld_long( Register s1, RegisterOrConstant s2, Register d ) {
|
||||
#ifdef _LP64
|
||||
ldx(s1, s2, d);
|
||||
#else
|
||||
ldd(s1, s2, d);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::ld_long(const Address& a, Register d, int offset) {
|
||||
#ifdef _LP64
|
||||
ldx(a, d, offset);
|
||||
#else
|
||||
ldd(a, d, offset);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::st_long( Register d, Register s1, Register s2 ) {
|
||||
#ifdef _LP64
|
||||
Assembler::stx(d, s1, s2);
|
||||
#else
|
||||
Assembler::std(d, s1, s2);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::st_long( Register d, Register s1, int simm13a ) {
|
||||
#ifdef _LP64
|
||||
Assembler::stx(d, s1, simm13a);
|
||||
#else
|
||||
Assembler::std(d, s1, simm13a);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::st_long( Register d, Register s1, RegisterOrConstant s2 ) {
|
||||
#ifdef _LP64
|
||||
stx(d, s1, s2);
|
||||
#else
|
||||
std(d, s1, s2);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::st_long( Register d, const Address& a, int offset ) {
|
||||
#ifdef _LP64
|
||||
stx(d, a, offset);
|
||||
#else
|
||||
std(d, a, offset);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Functions for isolating 64 bit shifts for LP64
|
||||
|
||||
inline void MacroAssembler::sll_ptr( Register s1, Register s2, Register d ) {
|
||||
#ifdef _LP64
|
||||
Assembler::sllx(s1, s2, d);
|
||||
#else
|
||||
Assembler::sll( s1, s2, d);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::sll_ptr( Register s1, int imm6a, Register d ) {
|
||||
#ifdef _LP64
|
||||
Assembler::sllx(s1, imm6a, d);
|
||||
#else
|
||||
Assembler::sll( s1, imm6a, d);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::srl_ptr( Register s1, Register s2, Register d ) {
|
||||
#ifdef _LP64
|
||||
Assembler::srlx(s1, s2, d);
|
||||
#else
|
||||
Assembler::srl( s1, s2, d);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::srl_ptr( Register s1, int imm6a, Register d ) {
|
||||
#ifdef _LP64
|
||||
Assembler::srlx(s1, imm6a, d);
|
||||
#else
|
||||
Assembler::srl( s1, imm6a, d);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::sll_ptr( Register s1, RegisterOrConstant s2, Register d ) {
|
||||
if (s2.is_register()) sll_ptr(s1, s2.as_register(), d);
|
||||
else sll_ptr(s1, s2.as_constant(), d);
|
||||
}
|
||||
|
||||
// Use the right branch for the platform
|
||||
|
||||
inline void MacroAssembler::br( Condition c, bool a, Predict p, address d, relocInfo::relocType rt ) {
|
||||
if (VM_Version::v9_instructions_work())
|
||||
Assembler::bp(c, a, icc, p, d, rt);
|
||||
else
|
||||
Assembler::br(c, a, d, rt);
|
||||
}
|
||||
|
||||
inline void MacroAssembler::br( Condition c, bool a, Predict p, Label& L ) {
|
||||
br(c, a, p, target(L));
|
||||
}
|
||||
|
||||
|
||||
// Branch that tests either xcc or icc depending on the
|
||||
// architecture compiled (LP64 or not)
|
||||
inline void MacroAssembler::brx( Condition c, bool a, Predict p, address d, relocInfo::relocType rt ) {
|
||||
#ifdef _LP64
|
||||
Assembler::bp(c, a, xcc, p, d, rt);
|
||||
#else
|
||||
MacroAssembler::br(c, a, p, d, rt);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::brx( Condition c, bool a, Predict p, Label& L ) {
|
||||
brx(c, a, p, target(L));
|
||||
}
|
||||
|
||||
inline void MacroAssembler::ba( Label& L ) {
|
||||
br(always, false, pt, L);
|
||||
}
|
||||
|
||||
// Warning: V9 only functions
|
||||
inline void MacroAssembler::bp( Condition c, bool a, CC cc, Predict p, address d, relocInfo::relocType rt ) {
|
||||
Assembler::bp(c, a, cc, p, d, rt);
|
||||
}
|
||||
|
||||
inline void MacroAssembler::bp( Condition c, bool a, CC cc, Predict p, Label& L ) {
|
||||
Assembler::bp(c, a, cc, p, L);
|
||||
}
|
||||
|
||||
inline void MacroAssembler::fb( Condition c, bool a, Predict p, address d, relocInfo::relocType rt ) {
|
||||
if (VM_Version::v9_instructions_work())
|
||||
fbp(c, a, fcc0, p, d, rt);
|
||||
else
|
||||
Assembler::fb(c, a, d, rt);
|
||||
}
|
||||
|
||||
inline void MacroAssembler::fb( Condition c, bool a, Predict p, Label& L ) {
|
||||
fb(c, a, p, target(L));
|
||||
}
|
||||
|
||||
inline void MacroAssembler::fbp( Condition c, bool a, CC cc, Predict p, address d, relocInfo::relocType rt ) {
|
||||
Assembler::fbp(c, a, cc, p, d, rt);
|
||||
}
|
||||
|
||||
inline void MacroAssembler::fbp( Condition c, bool a, CC cc, Predict p, Label& L ) {
|
||||
Assembler::fbp(c, a, cc, p, L);
|
||||
}
|
||||
|
||||
inline void MacroAssembler::jmp( Register s1, Register s2 ) { jmpl( s1, s2, G0 ); }
|
||||
inline void MacroAssembler::jmp( Register s1, int simm13a, RelocationHolder const& rspec ) { jmpl( s1, simm13a, G0, rspec); }
|
||||
|
||||
inline bool MacroAssembler::is_far_target(address d) {
|
||||
if (ForceUnreachable) {
|
||||
// References outside the code cache should be treated as far
|
||||
return d < CodeCache::low_bound() || d > CodeCache::high_bound();
|
||||
}
|
||||
return !is_in_wdisp30_range(d, CodeCache::low_bound()) || !is_in_wdisp30_range(d, CodeCache::high_bound());
|
||||
}
|
||||
|
||||
// Call with a check to see if we need to deal with the added
|
||||
// expense of relocation and if we overflow the displacement
|
||||
// of the quick call instruction.
|
||||
inline void MacroAssembler::call( address d, relocInfo::relocType rt ) {
|
||||
#ifdef _LP64
|
||||
intptr_t disp;
|
||||
// NULL is ok because it will be relocated later.
|
||||
// Must change NULL to a reachable address in order to
|
||||
// pass asserts here and in wdisp.
|
||||
if ( d == NULL )
|
||||
d = pc();
|
||||
|
||||
// Is this address within range of the call instruction?
|
||||
// If not, use the expensive instruction sequence
|
||||
if (is_far_target(d)) {
|
||||
relocate(rt);
|
||||
AddressLiteral dest(d);
|
||||
jumpl_to(dest, O7, O7);
|
||||
} else {
|
||||
Assembler::call(d, rt);
|
||||
}
|
||||
#else
|
||||
Assembler::call( d, rt );
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::call( Label& L, relocInfo::relocType rt ) {
|
||||
MacroAssembler::call( target(L), rt);
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline void MacroAssembler::callr( Register s1, Register s2 ) { jmpl( s1, s2, O7 ); }
|
||||
inline void MacroAssembler::callr( Register s1, int simm13a, RelocationHolder const& rspec ) { jmpl( s1, simm13a, O7, rspec); }
|
||||
|
||||
// prefetch instruction
|
||||
inline void MacroAssembler::iprefetch( address d, relocInfo::relocType rt ) {
|
||||
if (VM_Version::v9_instructions_work())
|
||||
Assembler::bp( never, true, xcc, pt, d, rt );
|
||||
}
|
||||
inline void MacroAssembler::iprefetch( Label& L) { iprefetch( target(L) ); }
|
||||
|
||||
|
||||
// clobbers o7 on V8!!
|
||||
// returns delta from gotten pc to addr after
|
||||
inline int MacroAssembler::get_pc( Register d ) {
|
||||
int x = offset();
|
||||
if (VM_Version::v9_instructions_work())
|
||||
rdpc(d);
|
||||
else {
|
||||
Label lbl;
|
||||
Assembler::call(lbl, relocInfo::none); // No relocation as this is call to pc+0x8
|
||||
if (d == O7) delayed()->nop();
|
||||
else delayed()->mov(O7, d);
|
||||
bind(lbl);
|
||||
}
|
||||
return offset() - x;
|
||||
}
|
||||
|
||||
|
||||
// Note: All MacroAssembler::set_foo functions are defined out-of-line.
|
||||
|
||||
|
||||
// Loads the current PC of the following instruction as an immediate value in
|
||||
// 2 instructions. All PCs in the CodeCache are within 2 Gig of each other.
|
||||
inline intptr_t MacroAssembler::load_pc_address( Register reg, int bytes_to_skip ) {
|
||||
intptr_t thepc = (intptr_t)pc() + 2*BytesPerInstWord + bytes_to_skip;
|
||||
#ifdef _LP64
|
||||
Unimplemented();
|
||||
#else
|
||||
Assembler::sethi( thepc & ~0x3ff, reg, internal_word_Relocation::spec((address)thepc));
|
||||
add(reg, thepc & 0x3ff, reg, internal_word_Relocation::spec((address)thepc));
|
||||
#endif
|
||||
return thepc;
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::load_contents(const AddressLiteral& addrlit, Register d, int offset) {
|
||||
assert_not_delayed();
|
||||
if (ForceUnreachable) {
|
||||
patchable_sethi(addrlit, d);
|
||||
} else {
|
||||
sethi(addrlit, d);
|
||||
}
|
||||
ld(d, addrlit.low10() + offset, d);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::load_bool_contents(const AddressLiteral& addrlit, Register d, int offset) {
|
||||
assert_not_delayed();
|
||||
if (ForceUnreachable) {
|
||||
patchable_sethi(addrlit, d);
|
||||
} else {
|
||||
sethi(addrlit, d);
|
||||
}
|
||||
ldub(d, addrlit.low10() + offset, d);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::load_ptr_contents(const AddressLiteral& addrlit, Register d, int offset) {
|
||||
assert_not_delayed();
|
||||
if (ForceUnreachable) {
|
||||
patchable_sethi(addrlit, d);
|
||||
} else {
|
||||
sethi(addrlit, d);
|
||||
}
|
||||
ld_ptr(d, addrlit.low10() + offset, d);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::store_contents(Register s, const AddressLiteral& addrlit, Register temp, int offset) {
|
||||
assert_not_delayed();
|
||||
if (ForceUnreachable) {
|
||||
patchable_sethi(addrlit, temp);
|
||||
} else {
|
||||
sethi(addrlit, temp);
|
||||
}
|
||||
st(s, temp, addrlit.low10() + offset);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::store_ptr_contents(Register s, const AddressLiteral& addrlit, Register temp, int offset) {
|
||||
assert_not_delayed();
|
||||
if (ForceUnreachable) {
|
||||
patchable_sethi(addrlit, temp);
|
||||
} else {
|
||||
sethi(addrlit, temp);
|
||||
}
|
||||
st_ptr(s, temp, addrlit.low10() + offset);
|
||||
}
|
||||
|
||||
|
||||
// This code sequence is relocatable to any address, even on LP64.
|
||||
inline void MacroAssembler::jumpl_to(const AddressLiteral& addrlit, Register temp, Register d, int offset) {
|
||||
assert_not_delayed();
|
||||
// Force fixed length sethi because NativeJump and NativeFarCall don't handle
|
||||
// variable length instruction streams.
|
||||
patchable_sethi(addrlit, temp);
|
||||
jmpl(temp, addrlit.low10() + offset, d);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::jump_to(const AddressLiteral& addrlit, Register temp, int offset) {
|
||||
jumpl_to(addrlit, temp, G0, offset);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::jump_indirect_to(Address& a, Register temp,
|
||||
int ld_offset, int jmp_offset) {
|
||||
assert_not_delayed();
|
||||
//sethi(al); // sethi is caller responsibility for this one
|
||||
ld_ptr(a, temp, ld_offset);
|
||||
jmp(temp, jmp_offset);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::set_metadata(Metadata* obj, Register d) {
|
||||
set_metadata(allocate_metadata_address(obj), d);
|
||||
}
|
||||
|
||||
inline void MacroAssembler::set_metadata_constant(Metadata* obj, Register d) {
|
||||
set_metadata(constant_metadata_address(obj), d);
|
||||
}
|
||||
|
||||
inline void MacroAssembler::set_metadata(const AddressLiteral& obj_addr, Register d) {
|
||||
assert(obj_addr.rspec().type() == relocInfo::metadata_type, "must be a metadata reloc");
|
||||
set(obj_addr, d);
|
||||
}
|
||||
|
||||
inline void MacroAssembler::set_oop(jobject obj, Register d) {
|
||||
set_oop(allocate_oop_address(obj), d);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::set_oop_constant(jobject obj, Register d) {
|
||||
set_oop(constant_oop_address(obj), d);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::set_oop(const AddressLiteral& obj_addr, Register d) {
|
||||
assert(obj_addr.rspec().type() == relocInfo::oop_type, "must be an oop reloc");
|
||||
set(obj_addr, d);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::load_argument( Argument& a, Register d ) {
|
||||
if (a.is_register())
|
||||
mov(a.as_register(), d);
|
||||
else
|
||||
ld (a.as_address(), d);
|
||||
}
|
||||
|
||||
inline void MacroAssembler::store_argument( Register s, Argument& a ) {
|
||||
if (a.is_register())
|
||||
mov(s, a.as_register());
|
||||
else
|
||||
st_ptr (s, a.as_address()); // ABI says everything is right justified.
|
||||
}
|
||||
|
||||
inline void MacroAssembler::store_ptr_argument( Register s, Argument& a ) {
|
||||
if (a.is_register())
|
||||
mov(s, a.as_register());
|
||||
else
|
||||
st_ptr (s, a.as_address());
|
||||
}
|
||||
|
||||
|
||||
#ifdef _LP64
|
||||
inline void MacroAssembler::store_float_argument( FloatRegister s, Argument& a ) {
|
||||
if (a.is_float_register())
|
||||
// V9 ABI has F1, F3, F5 are used to pass instead of O0, O1, O2
|
||||
fmov(FloatRegisterImpl::S, s, a.as_float_register() );
|
||||
else
|
||||
// Floats are stored in the high half of the stack entry
|
||||
// The low half is undefined per the ABI.
|
||||
stf(FloatRegisterImpl::S, s, a.as_address(), sizeof(jfloat));
|
||||
}
|
||||
|
||||
inline void MacroAssembler::store_double_argument( FloatRegister s, Argument& a ) {
|
||||
if (a.is_float_register())
|
||||
// V9 ABI has D0, D2, D4 are used to pass instead of O0, O1, O2
|
||||
fmov(FloatRegisterImpl::D, s, a.as_double_register() );
|
||||
else
|
||||
stf(FloatRegisterImpl::D, s, a.as_address());
|
||||
}
|
||||
|
||||
inline void MacroAssembler::store_long_argument( Register s, Argument& a ) {
|
||||
if (a.is_register())
|
||||
mov(s, a.as_register());
|
||||
else
|
||||
stx(s, a.as_address());
|
||||
}
|
||||
#endif
|
||||
|
||||
inline void MacroAssembler::add(Register s1, int simm13a, Register d, relocInfo::relocType rtype) {
|
||||
relocate(rtype);
|
||||
add(s1, simm13a, d);
|
||||
}
|
||||
inline void MacroAssembler::add(Register s1, int simm13a, Register d, RelocationHolder const& rspec) {
|
||||
relocate(rspec);
|
||||
add(s1, simm13a, d);
|
||||
}
|
||||
|
||||
// form effective addresses this way:
|
||||
inline void MacroAssembler::add(const Address& a, Register d, int offset) {
|
||||
if (a.has_index()) add(a.base(), a.index(), d);
|
||||
else { add(a.base(), a.disp() + offset, d, a.rspec(offset)); offset = 0; }
|
||||
if (offset != 0) add(d, offset, d);
|
||||
}
|
||||
inline void MacroAssembler::add(Register s1, RegisterOrConstant s2, Register d, int offset) {
|
||||
if (s2.is_register()) add(s1, s2.as_register(), d);
|
||||
else { add(s1, s2.as_constant() + offset, d); offset = 0; }
|
||||
if (offset != 0) add(d, offset, d);
|
||||
}
|
||||
|
||||
inline void MacroAssembler::andn(Register s1, RegisterOrConstant s2, Register d) {
|
||||
if (s2.is_register()) andn(s1, s2.as_register(), d);
|
||||
else andn(s1, s2.as_constant(), d);
|
||||
}
|
||||
|
||||
inline void MacroAssembler::clrb( Register s1, Register s2) { stb( G0, s1, s2 ); }
|
||||
inline void MacroAssembler::clrh( Register s1, Register s2) { sth( G0, s1, s2 ); }
|
||||
inline void MacroAssembler::clr( Register s1, Register s2) { stw( G0, s1, s2 ); }
|
||||
inline void MacroAssembler::clrx( Register s1, Register s2) { stx( G0, s1, s2 ); }
|
||||
|
||||
inline void MacroAssembler::clrb( Register s1, int simm13a) { stb( G0, s1, simm13a); }
|
||||
inline void MacroAssembler::clrh( Register s1, int simm13a) { sth( G0, s1, simm13a); }
|
||||
inline void MacroAssembler::clr( Register s1, int simm13a) { stw( G0, s1, simm13a); }
|
||||
inline void MacroAssembler::clrx( Register s1, int simm13a) { stx( G0, s1, simm13a); }
|
||||
|
||||
#ifdef _LP64
|
||||
// Make all 32 bit loads signed so 64 bit registers maintain proper sign
|
||||
inline void MacroAssembler::ld( Register s1, Register s2, Register d) { ldsw( s1, s2, d); }
|
||||
inline void MacroAssembler::ld( Register s1, int simm13a, Register d) { ldsw( s1, simm13a, d); }
|
||||
#else
|
||||
inline void MacroAssembler::ld( Register s1, Register s2, Register d) { lduw( s1, s2, d); }
|
||||
inline void MacroAssembler::ld( Register s1, int simm13a, Register d) { lduw( s1, simm13a, d); }
|
||||
#endif
|
||||
|
||||
#ifdef ASSERT
|
||||
// ByteSize is only a class when ASSERT is defined, otherwise it's an int.
|
||||
# ifdef _LP64
|
||||
inline void MacroAssembler::ld(Register s1, ByteSize simm13a, Register d) { ldsw( s1, in_bytes(simm13a), d); }
|
||||
# else
|
||||
inline void MacroAssembler::ld(Register s1, ByteSize simm13a, Register d) { lduw( s1, in_bytes(simm13a), d); }
|
||||
# endif
|
||||
#endif
|
||||
|
||||
inline void MacroAssembler::ld( const Address& a, Register d, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); ld( a.base(), a.index(), d); }
|
||||
else { ld( a.base(), a.disp() + offset, d); }
|
||||
}
|
||||
|
||||
inline void MacroAssembler::ldsb(const Address& a, Register d, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); ldsb(a.base(), a.index(), d); }
|
||||
else { ldsb(a.base(), a.disp() + offset, d); }
|
||||
}
|
||||
inline void MacroAssembler::ldsh(const Address& a, Register d, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); ldsh(a.base(), a.index(), d); }
|
||||
else { ldsh(a.base(), a.disp() + offset, d); }
|
||||
}
|
||||
inline void MacroAssembler::ldsw(const Address& a, Register d, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); ldsw(a.base(), a.index(), d); }
|
||||
else { ldsw(a.base(), a.disp() + offset, d); }
|
||||
}
|
||||
inline void MacroAssembler::ldub(const Address& a, Register d, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); ldub(a.base(), a.index(), d); }
|
||||
else { ldub(a.base(), a.disp() + offset, d); }
|
||||
}
|
||||
inline void MacroAssembler::lduh(const Address& a, Register d, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); lduh(a.base(), a.index(), d); }
|
||||
else { lduh(a.base(), a.disp() + offset, d); }
|
||||
}
|
||||
inline void MacroAssembler::lduw(const Address& a, Register d, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); lduw(a.base(), a.index(), d); }
|
||||
else { lduw(a.base(), a.disp() + offset, d); }
|
||||
}
|
||||
inline void MacroAssembler::ldd( const Address& a, Register d, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); ldd( a.base(), a.index(), d); }
|
||||
else { ldd( a.base(), a.disp() + offset, d); }
|
||||
}
|
||||
inline void MacroAssembler::ldx( const Address& a, Register d, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); ldx( a.base(), a.index(), d); }
|
||||
else { ldx( a.base(), a.disp() + offset, d); }
|
||||
}
|
||||
|
||||
inline void MacroAssembler::ldub(Register s1, RegisterOrConstant s2, Register d) { ldub(Address(s1, s2), d); }
|
||||
inline void MacroAssembler::ldsb(Register s1, RegisterOrConstant s2, Register d) { ldsb(Address(s1, s2), d); }
|
||||
inline void MacroAssembler::lduh(Register s1, RegisterOrConstant s2, Register d) { lduh(Address(s1, s2), d); }
|
||||
inline void MacroAssembler::ldsh(Register s1, RegisterOrConstant s2, Register d) { ldsh(Address(s1, s2), d); }
|
||||
inline void MacroAssembler::lduw(Register s1, RegisterOrConstant s2, Register d) { lduw(Address(s1, s2), d); }
|
||||
inline void MacroAssembler::ldsw(Register s1, RegisterOrConstant s2, Register d) { ldsw(Address(s1, s2), d); }
|
||||
inline void MacroAssembler::ldx( Register s1, RegisterOrConstant s2, Register d) { ldx( Address(s1, s2), d); }
|
||||
inline void MacroAssembler::ld( Register s1, RegisterOrConstant s2, Register d) { ld( Address(s1, s2), d); }
|
||||
inline void MacroAssembler::ldd( Register s1, RegisterOrConstant s2, Register d) { ldd( Address(s1, s2), d); }
|
||||
|
||||
inline void MacroAssembler::ldf(FloatRegisterImpl::Width w, Register s1, RegisterOrConstant s2, FloatRegister d) {
|
||||
if (s2.is_register()) ldf(w, s1, s2.as_register(), d);
|
||||
else ldf(w, s1, s2.as_constant(), d);
|
||||
}
|
||||
|
||||
inline void MacroAssembler::ldf(FloatRegisterImpl::Width w, const Address& a, FloatRegister d, int offset) {
|
||||
relocate(a.rspec(offset));
|
||||
ldf(w, a.base(), a.disp() + offset, d);
|
||||
}
|
||||
|
||||
// returns if membar generates anything, obviously this code should mirror
|
||||
// membar below.
|
||||
inline bool MacroAssembler::membar_has_effect( Membar_mask_bits const7a ) {
|
||||
if( !os::is_MP() ) return false; // Not needed on single CPU
|
||||
if( VM_Version::v9_instructions_work() ) {
|
||||
const Membar_mask_bits effective_mask =
|
||||
Membar_mask_bits(const7a & ~(LoadLoad | LoadStore | StoreStore));
|
||||
return (effective_mask != 0);
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
inline void MacroAssembler::membar( Membar_mask_bits const7a ) {
|
||||
// Uniprocessors do not need memory barriers
|
||||
if (!os::is_MP()) return;
|
||||
// Weakened for current Sparcs and TSO. See the v9 manual, sections 8.4.3,
|
||||
// 8.4.4.3, a.31 and a.50.
|
||||
if( VM_Version::v9_instructions_work() ) {
|
||||
// Under TSO, setting bit 3, 2, or 0 is redundant, so the only value
|
||||
// of the mmask subfield of const7a that does anything that isn't done
|
||||
// implicitly is StoreLoad.
|
||||
const Membar_mask_bits effective_mask =
|
||||
Membar_mask_bits(const7a & ~(LoadLoad | LoadStore | StoreStore));
|
||||
if ( effective_mask != 0 ) {
|
||||
Assembler::membar( effective_mask );
|
||||
}
|
||||
} else {
|
||||
// stbar is the closest there is on v8. Equivalent to membar(StoreStore). We
|
||||
// do not issue the stbar because to my knowledge all v8 machines implement TSO,
|
||||
// which guarantees that all stores behave as if an stbar were issued just after
|
||||
// each one of them. On these machines, stbar ought to be a nop. There doesn't
|
||||
// appear to be an equivalent of membar(StoreLoad) on v8: TSO doesn't require it,
|
||||
// it can't be specified by stbar, nor have I come up with a way to simulate it.
|
||||
//
|
||||
// Addendum. Dave says that ldstub guarantees a write buffer flush to coherent
|
||||
// space. Put one here to be on the safe side.
|
||||
Assembler::ldstub(SP, 0, G0);
|
||||
}
|
||||
}
|
||||
|
||||
inline void MacroAssembler::prefetch(const Address& a, PrefetchFcn f, int offset) {
|
||||
relocate(a.rspec(offset));
|
||||
assert(!a.has_index(), "");
|
||||
prefetch(a.base(), a.disp() + offset, f);
|
||||
}
|
||||
|
||||
inline void MacroAssembler::st(Register d, Register s1, Register s2) { stw(d, s1, s2); }
|
||||
inline void MacroAssembler::st(Register d, Register s1, int simm13a) { stw(d, s1, simm13a); }
|
||||
|
||||
#ifdef ASSERT
|
||||
// ByteSize is only a class when ASSERT is defined, otherwise it's an int.
|
||||
inline void MacroAssembler::st(Register d, Register s1, ByteSize simm13a) { stw(d, s1, in_bytes(simm13a)); }
|
||||
#endif
|
||||
|
||||
inline void MacroAssembler::st(Register d, const Address& a, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); st( d, a.base(), a.index() ); }
|
||||
else { st( d, a.base(), a.disp() + offset); }
|
||||
}
|
||||
|
||||
inline void MacroAssembler::stb(Register d, const Address& a, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); stb(d, a.base(), a.index() ); }
|
||||
else { stb(d, a.base(), a.disp() + offset); }
|
||||
}
|
||||
inline void MacroAssembler::sth(Register d, const Address& a, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); sth(d, a.base(), a.index() ); }
|
||||
else { sth(d, a.base(), a.disp() + offset); }
|
||||
}
|
||||
inline void MacroAssembler::stw(Register d, const Address& a, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); stw(d, a.base(), a.index() ); }
|
||||
else { stw(d, a.base(), a.disp() + offset); }
|
||||
}
|
||||
inline void MacroAssembler::std(Register d, const Address& a, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); std(d, a.base(), a.index() ); }
|
||||
else { std(d, a.base(), a.disp() + offset); }
|
||||
}
|
||||
inline void MacroAssembler::stx(Register d, const Address& a, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); stx(d, a.base(), a.index() ); }
|
||||
else { stx(d, a.base(), a.disp() + offset); }
|
||||
}
|
||||
|
||||
inline void MacroAssembler::stb(Register d, Register s1, RegisterOrConstant s2) { stb(d, Address(s1, s2)); }
|
||||
inline void MacroAssembler::sth(Register d, Register s1, RegisterOrConstant s2) { sth(d, Address(s1, s2)); }
|
||||
inline void MacroAssembler::stw(Register d, Register s1, RegisterOrConstant s2) { stw(d, Address(s1, s2)); }
|
||||
inline void MacroAssembler::stx(Register d, Register s1, RegisterOrConstant s2) { stx(d, Address(s1, s2)); }
|
||||
inline void MacroAssembler::std(Register d, Register s1, RegisterOrConstant s2) { std(d, Address(s1, s2)); }
|
||||
inline void MacroAssembler::st( Register d, Register s1, RegisterOrConstant s2) { st( d, Address(s1, s2)); }
|
||||
|
||||
inline void MacroAssembler::stf(FloatRegisterImpl::Width w, FloatRegister d, Register s1, RegisterOrConstant s2) {
|
||||
if (s2.is_register()) stf(w, d, s1, s2.as_register());
|
||||
else stf(w, d, s1, s2.as_constant());
|
||||
}
|
||||
|
||||
inline void MacroAssembler::stf(FloatRegisterImpl::Width w, FloatRegister d, const Address& a, int offset) {
|
||||
relocate(a.rspec(offset));
|
||||
if (a.has_index()) { assert(offset == 0, ""); stf(w, d, a.base(), a.index() ); }
|
||||
else { stf(w, d, a.base(), a.disp() + offset); }
|
||||
}
|
||||
|
||||
inline void MacroAssembler::sub(Register s1, RegisterOrConstant s2, Register d, int offset) {
|
||||
if (s2.is_register()) sub(s1, s2.as_register(), d);
|
||||
else { sub(s1, s2.as_constant() + offset, d); offset = 0; }
|
||||
if (offset != 0) sub(d, offset, d);
|
||||
}
|
||||
|
||||
inline void MacroAssembler::swap(Address& a, Register d, int offset) {
|
||||
relocate(a.rspec(offset));
|
||||
if (a.has_index()) { assert(offset == 0, ""); swap(a.base(), a.index(), d ); }
|
||||
else { swap(a.base(), a.disp() + offset, d); }
|
||||
}
|
||||
|
||||
#endif // CPU_SPARC_VM_MACROASSEMBLER_SPARC_INLINE_HPP
|
@ -23,7 +23,8 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "assembler_sparc.inline.hpp"
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "asm/codeBuffer.hpp"
|
||||
#include "memory/metaspaceShared.hpp"
|
||||
|
||||
// Generate the self-patching vtable method:
|
||||
|
@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "prims/methodHandles.hpp"
|
||||
|
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "assembler_sparc.inline.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "nativeInst_sparc.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
|
@ -25,7 +25,7 @@
|
||||
#ifndef CPU_SPARC_VM_NATIVEINST_SPARC_HPP
|
||||
#define CPU_SPARC_VM_NATIVEINST_SPARC_HPP
|
||||
|
||||
#include "asm/assembler.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "memory/allocation.hpp"
|
||||
#include "runtime/icache.hpp"
|
||||
#include "runtime/os.hpp"
|
||||
@ -194,11 +194,10 @@ class NativeInstruction VALUE_OBJ_CLASS_SPEC {
|
||||
static int inv_simm( int x, int nbits ) { return Assembler::inv_simm(x, nbits); }
|
||||
static intptr_t inv_wdisp( int x, int nbits ) { return Assembler::inv_wdisp( x, 0, nbits); }
|
||||
static intptr_t inv_wdisp16( int x ) { return Assembler::inv_wdisp16(x, 0); }
|
||||
static int branch_destination_offset(int x) { return Assembler::branch_destination(x, 0); }
|
||||
static int branch_destination_offset(int x) { return MacroAssembler::branch_destination(x, 0); }
|
||||
static int patch_branch_destination_offset(int dest_offset, int x) {
|
||||
return Assembler::patched_branch(dest_offset, x, 0);
|
||||
return MacroAssembler::patched_branch(dest_offset, x, 0);
|
||||
}
|
||||
void set_annul_bit() { set_long_at(0, long_at(0) | Assembler::annul(true)); }
|
||||
|
||||
// utility for checking if x is either of 2 small constants
|
||||
static bool is_either(int x, int k1, int k2) {
|
||||
@ -889,7 +888,6 @@ class NativeGeneralJump: public NativeInstruction {
|
||||
int patched_instr = patch_branch_destination_offset(dest - addr_at(0), long_at(0));
|
||||
set_long_at(0, patched_instr);
|
||||
}
|
||||
void set_annul() { set_annul_bit(); }
|
||||
NativeInstruction *delay_slot_instr() { return nativeInstruction_at(addr_at(4));}
|
||||
void fill_delay_slot(int instr) { set_long_at(4, instr);}
|
||||
Assembler::Condition condition() {
|
||||
|
@ -23,8 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/assembler.inline.hpp"
|
||||
#include "assembler_sparc.inline.hpp"
|
||||
#include "asm/assembler.hpp"
|
||||
#include "code/relocInfo.hpp"
|
||||
#include "nativeInst_sparc.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
|
@ -24,8 +24,7 @@
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#ifdef COMPILER2
|
||||
#include "asm/assembler.hpp"
|
||||
#include "assembler_sparc.inline.hpp"
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "classfile/systemDictionary.hpp"
|
||||
#include "code/vmreg.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
|
@ -23,8 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/assembler.hpp"
|
||||
#include "assembler_sparc.inline.hpp"
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "code/debugInfoRec.hpp"
|
||||
#include "code/icBuffer.hpp"
|
||||
#include "code/vtableStubs.hpp"
|
||||
|
@ -23,8 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/assembler.hpp"
|
||||
#include "assembler_sparc.inline.hpp"
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "nativeInst_sparc.hpp"
|
||||
#include "oops/instanceOop.hpp"
|
||||
@ -37,13 +36,8 @@
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubCodeGenerator.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "runtime/thread.inline.hpp"
|
||||
#include "utilities/top.hpp"
|
||||
#ifdef TARGET_OS_FAMILY_linux
|
||||
# include "thread_linux.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_OS_FAMILY_solaris
|
||||
# include "thread_solaris.inline.hpp"
|
||||
#endif
|
||||
#ifdef COMPILER2
|
||||
#include "opto/runtime.hpp"
|
||||
#endif
|
||||
|
@ -26,12 +26,7 @@
|
||||
#include "runtime/deoptimization.hpp"
|
||||
#include "runtime/frame.inline.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#ifdef TARGET_OS_FAMILY_linux
|
||||
# include "thread_linux.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_OS_FAMILY_solaris
|
||||
# include "thread_solaris.inline.hpp"
|
||||
#endif
|
||||
#include "runtime/thread.inline.hpp"
|
||||
|
||||
// Implementation of the platform-specific part of StubRoutines - for
|
||||
// a description of how to extend it, see the stubRoutines.hpp file.
|
||||
|
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/assembler.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "interpreter/bytecodeHistogram.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterGenerator.hpp"
|
||||
@ -496,7 +496,7 @@ void TemplateInterpreterGenerator::generate_fixed_frame(bool native_call) {
|
||||
|
||||
const Address size_of_parameters(G5_method, Method::size_of_parameters_offset());
|
||||
const Address size_of_locals (G5_method, Method::size_of_locals_offset());
|
||||
const Address max_stack (G5_method, Method::max_stack_offset());
|
||||
const Address constMethod (G5_method, Method::const_offset());
|
||||
int rounded_vm_local_words = round_to( frame::interpreter_frame_vm_local_words, WordsPerLong );
|
||||
|
||||
const int extra_space =
|
||||
@ -538,7 +538,8 @@ void TemplateInterpreterGenerator::generate_fixed_frame(bool native_call) {
|
||||
// see if the frame is greater than one page in size. If so,
|
||||
// then we need to verify there is enough stack space remaining
|
||||
// Frame_size = (max_stack + extra_space) * BytesPerWord;
|
||||
__ lduh( max_stack, Gframe_size );
|
||||
__ ld_ptr( constMethod, Gframe_size );
|
||||
__ lduh( Gframe_size, in_bytes(ConstMethod::max_stack_offset()), Gframe_size );
|
||||
__ add( Gframe_size, extra_space, Gframe_size );
|
||||
__ round_to( Gframe_size, WordsPerLong );
|
||||
__ sll( Gframe_size, Interpreter::logStackElementSize, Gframe_size);
|
||||
|
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "assembler_sparc.inline.hpp"
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "runtime/java.hpp"
|
||||
#include "runtime/stubCodeGenerator.hpp"
|
||||
|
@ -23,7 +23,6 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/assembler.hpp"
|
||||
#include "code/vmreg.hpp"
|
||||
|
||||
|
||||
|
@ -23,8 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/assembler.hpp"
|
||||
#include "assembler_sparc.inline.hpp"
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "code/vtableStubs.hpp"
|
||||
#include "interp_masm_sparc.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -28,48 +28,6 @@
|
||||
#include "asm/assembler.inline.hpp"
|
||||
#include "asm/codeBuffer.hpp"
|
||||
#include "code/codeCache.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
|
||||
inline void MacroAssembler::pd_patch_instruction(address branch, address target) {
|
||||
unsigned char op = branch[0];
|
||||
assert(op == 0xE8 /* call */ ||
|
||||
op == 0xE9 /* jmp */ ||
|
||||
op == 0xEB /* short jmp */ ||
|
||||
(op & 0xF0) == 0x70 /* short jcc */ ||
|
||||
op == 0x0F && (branch[1] & 0xF0) == 0x80 /* jcc */,
|
||||
"Invalid opcode at patch point");
|
||||
|
||||
if (op == 0xEB || (op & 0xF0) == 0x70) {
|
||||
// short offset operators (jmp and jcc)
|
||||
char* disp = (char*) &branch[1];
|
||||
int imm8 = target - (address) &disp[1];
|
||||
guarantee(this->is8bit(imm8), "Short forward jump exceeds 8-bit offset");
|
||||
*disp = imm8;
|
||||
} else {
|
||||
int* disp = (int*) &branch[(op == 0x0F)? 2: 1];
|
||||
int imm32 = target - (address) &disp[1];
|
||||
*disp = imm32;
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
inline void MacroAssembler::pd_print_patched_instruction(address branch) {
|
||||
const char* s;
|
||||
unsigned char op = branch[0];
|
||||
if (op == 0xE8) {
|
||||
s = "call";
|
||||
} else if (op == 0xE9 || op == 0xEB) {
|
||||
s = "jmp";
|
||||
} else if ((op & 0xF0) == 0x70) {
|
||||
s = "jcc";
|
||||
} else if (op == 0x0F) {
|
||||
s = "jcc";
|
||||
} else {
|
||||
s = "????";
|
||||
}
|
||||
tty->print("%s (unresolved)", s);
|
||||
}
|
||||
#endif // ndef PRODUCT
|
||||
|
||||
#ifndef _LP64
|
||||
inline int Assembler::prefix_and_encode(int reg_enc, bool byteinst) { return reg_enc; }
|
||||
@ -87,12 +45,6 @@ inline void Assembler::prefixq(Address adr, Register reg) {}
|
||||
|
||||
inline void Assembler::prefix(Address adr, XMMRegister reg) {}
|
||||
inline void Assembler::prefixq(Address adr, XMMRegister reg) {}
|
||||
#else
|
||||
inline void Assembler::emit_long64(jlong x) {
|
||||
*(jlong*) _code_pos = x;
|
||||
_code_pos += sizeof(jlong);
|
||||
code_section()->set_end(_code_pos);
|
||||
}
|
||||
#endif // _LP64
|
||||
|
||||
#endif // CPU_X86_VM_ASSEMBLER_X86_INLINE_HPP
|
||||
|
@ -23,7 +23,8 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/assembler.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "c1/c1_Compilation.hpp"
|
||||
#include "c1/c1_LIRAssembler.hpp"
|
||||
#include "c1/c1_MacroAssembler.hpp"
|
||||
|
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/assembler.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "interpreter/bytecodeHistogram.hpp"
|
||||
#include "interpreter/cppInterpreter.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
@ -538,9 +538,9 @@ void CppInterpreterGenerator::generate_compute_interpreter_state(const Register
|
||||
|
||||
// compute full expression stack limit
|
||||
|
||||
const Address size_of_stack (rbx, Method::max_stack_offset());
|
||||
const int extra_stack = 0; //6815692//Method::extra_stack_words();
|
||||
__ load_unsigned_short(rdx, size_of_stack); // get size of expression stack in words
|
||||
__ movptr(rdx, Address(rbx, Method::const_offset()));
|
||||
__ load_unsigned_short(rdx, Address(rdx, ConstMethod::max_stack_offset())); // get size of expression stack in words
|
||||
__ negptr(rdx); // so we can subtract in next step
|
||||
// Allocate expression stack
|
||||
__ lea(rsp, Address(rsp, rdx, Address::times_ptr, -extra_stack));
|
||||
@ -682,12 +682,12 @@ void InterpreterGenerator::generate_stack_overflow_check(void) {
|
||||
const Address stack_size(thread, Thread::stack_size_offset());
|
||||
|
||||
// locals + overhead, in bytes
|
||||
const Address size_of_stack (rbx, Method::max_stack_offset());
|
||||
// Always give one monitor to allow us to start interp if sync method.
|
||||
// Any additional monitors need a check when moving the expression stack
|
||||
const int one_monitor = frame::interpreter_frame_monitor_size() * wordSize;
|
||||
const int extra_stack = 0; //6815692//Method::extra_stack_entries();
|
||||
__ load_unsigned_short(rax, size_of_stack); // get size of expression stack in words
|
||||
// Always give one monitor to allow us to start interp if sync method.
|
||||
// Any additional monitors need a check when moving the expression stack
|
||||
const int one_monitor = frame::interpreter_frame_monitor_size() * wordSize;
|
||||
const int extra_stack = 0; //6815692//Method::extra_stack_entries();
|
||||
__ movptr(rax, Address(rbx, Method::const_offset()));
|
||||
__ load_unsigned_short(rax, Address(rax, ConstMethod::max_stack_offset())); // get size of expression stack in words
|
||||
__ lea(rax, Address(noreg, rax, Interpreter::stackElementScale(), extra_stack + one_monitor));
|
||||
__ lea(rax, Address(rax, rdx, Interpreter::stackElementScale(), overhead_size));
|
||||
|
||||
|
@ -534,7 +534,7 @@ bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
|
||||
Method* m = *interpreter_frame_method_addr();
|
||||
|
||||
// validate the method we'd find in this potential sender
|
||||
if (!Universe::heap()->is_valid_method(m)) return false;
|
||||
if (!m->is_valid_method()) return false;
|
||||
|
||||
// stack frames shouldn't be much larger than max_stack elements
|
||||
|
||||
|
@ -25,6 +25,8 @@
|
||||
#ifndef CPU_X86_VM_FRAME_X86_INLINE_HPP
|
||||
#define CPU_X86_VM_FRAME_X86_INLINE_HPP
|
||||
|
||||
#include "code/codeCache.hpp"
|
||||
|
||||
// Inline functions for Intel frames:
|
||||
|
||||
// Constructors:
|
||||
|
@ -23,8 +23,8 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/assembler.hpp"
|
||||
#include "assembler_x86.inline.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "code/icBuffer.hpp"
|
||||
#include "gc_interface/collectedHeap.inline.hpp"
|
||||
#include "interpreter/bytecodes.hpp"
|
||||
|
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "assembler_x86.inline.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "runtime/icache.hpp"
|
||||
|
||||
#define __ _masm->
|
||||
|
@ -36,18 +36,7 @@
|
||||
#include "runtime/basicLock.hpp"
|
||||
#include "runtime/biasedLocking.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#ifdef TARGET_OS_FAMILY_linux
|
||||
# include "thread_linux.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_OS_FAMILY_solaris
|
||||
# include "thread_solaris.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_OS_FAMILY_windows
|
||||
# include "thread_windows.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_OS_FAMILY_bsd
|
||||
# include "thread_bsd.inline.hpp"
|
||||
#endif
|
||||
#include "runtime/thread.inline.hpp"
|
||||
|
||||
|
||||
// Implementation of InterpreterMacroAssembler
|
||||
|
@ -25,8 +25,10 @@
|
||||
#ifndef CPU_X86_VM_INTERP_MASM_X86_32_HPP
|
||||
#define CPU_X86_VM_INTERP_MASM_X86_32_HPP
|
||||
|
||||
#include "assembler_x86.inline.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "interpreter/invocationCounter.hpp"
|
||||
#include "runtime/frame.hpp"
|
||||
|
||||
// This file specializes the assember with interpreter-specific macros
|
||||
|
||||
|
@ -36,18 +36,7 @@
|
||||
#include "runtime/basicLock.hpp"
|
||||
#include "runtime/biasedLocking.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#ifdef TARGET_OS_FAMILY_linux
|
||||
# include "thread_linux.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_OS_FAMILY_solaris
|
||||
# include "thread_solaris.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_OS_FAMILY_windows
|
||||
# include "thread_windows.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_OS_FAMILY_bsd
|
||||
# include "thread_bsd.inline.hpp"
|
||||
#endif
|
||||
#include "runtime/thread.inline.hpp"
|
||||
|
||||
|
||||
// Implementation of InterpreterMacroAssembler
|
||||
|
@ -25,8 +25,10 @@
|
||||
#ifndef CPU_X86_VM_INTERP_MASM_X86_64_HPP
|
||||
#define CPU_X86_VM_INTERP_MASM_X86_64_HPP
|
||||
|
||||
#include "assembler_x86.inline.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "interpreter/invocationCounter.hpp"
|
||||
#include "runtime/frame.hpp"
|
||||
|
||||
// This file specializes the assember with interpreter-specific macros
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/assembler.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "interpreter/bytecodeHistogram.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterGenerator.hpp"
|
||||
|
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/assembler.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "interpreter/bytecodeHistogram.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterGenerator.hpp"
|
||||
|
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "assembler_x86.inline.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "prims/jniFastGetField.hpp"
|
||||
#include "prims/jvm_misc.hpp"
|
||||
|
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "assembler_x86.inline.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "prims/jniFastGetField.hpp"
|
||||
#include "prims/jvm_misc.hpp"
|
||||
|
6099
hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp
Normal file
6099
hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp
Normal file
File diff suppressed because it is too large
Load Diff
1172
hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp
Normal file
1172
hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp
Normal file
File diff suppressed because it is too large
Load Diff
@ -23,7 +23,8 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "assembler_x86.inline.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "asm/codeBuffer.hpp"
|
||||
#include "memory/metaspaceShared.hpp"
|
||||
|
||||
// Generate the self-patching vtable method:
|
||||
|
@ -23,7 +23,8 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "assembler_x86.inline.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "asm/codeBuffer.hpp"
|
||||
#include "memory/metaspaceShared.hpp"
|
||||
|
||||
// Generate the self-patching vtable method:
|
||||
|
@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
|
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "assembler_x86.inline.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "nativeInst_x86.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
|
@ -23,8 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/assembler.inline.hpp"
|
||||
#include "assembler_x86.inline.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "code/relocInfo.hpp"
|
||||
#include "nativeInst_x86.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
|
@ -24,12 +24,11 @@
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#ifdef COMPILER2
|
||||
#include "asm/assembler.hpp"
|
||||
#include "assembler_x86.inline.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "classfile/systemDictionary.hpp"
|
||||
#include "code/vmreg.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "nativeInst_x86.hpp"
|
||||
#include "opto/runtime.hpp"
|
||||
#include "runtime/interfaceSupport.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
|
@ -24,12 +24,11 @@
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#ifdef COMPILER2
|
||||
#include "asm/assembler.hpp"
|
||||
#include "assembler_x86.inline.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "classfile/systemDictionary.hpp"
|
||||
#include "code/vmreg.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "nativeInst_x86.hpp"
|
||||
#include "opto/runtime.hpp"
|
||||
#include "runtime/interfaceSupport.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
|
@ -23,8 +23,8 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/assembler.hpp"
|
||||
#include "assembler_x86.inline.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "code/debugInfoRec.hpp"
|
||||
#include "code/icBuffer.hpp"
|
||||
#include "code/vtableStubs.hpp"
|
||||
|
@ -23,8 +23,8 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/assembler.hpp"
|
||||
#include "assembler_x86.inline.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "code/debugInfoRec.hpp"
|
||||
#include "code/icBuffer.hpp"
|
||||
#include "code/vtableStubs.hpp"
|
||||
|
@ -23,8 +23,8 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/assembler.hpp"
|
||||
#include "assembler_x86.inline.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "nativeInst_x86.hpp"
|
||||
#include "oops/instanceOop.hpp"
|
||||
@ -37,19 +37,8 @@
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubCodeGenerator.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "runtime/thread.inline.hpp"
|
||||
#include "utilities/top.hpp"
|
||||
#ifdef TARGET_OS_FAMILY_linux
|
||||
# include "thread_linux.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_OS_FAMILY_solaris
|
||||
# include "thread_solaris.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_OS_FAMILY_windows
|
||||
# include "thread_windows.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_OS_FAMILY_bsd
|
||||
# include "thread_bsd.inline.hpp"
|
||||
#endif
|
||||
#ifdef COMPILER2
|
||||
#include "opto/runtime.hpp"
|
||||
#endif
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user