Merge
This commit is contained in:
commit
94e122ba3e
2
.hgtags
2
.hgtags
@ -217,3 +217,5 @@ f09ab0c416185e3cba371e81bcb6a16060c90f44 jdk8-b90
|
||||
b72ae39e1329fefae50d4690db4fde43f3841a95 jdk8-b93
|
||||
0d804e3b955dce406af6a79ac1cc35c696aff7fb jdk8-b94
|
||||
49fe9c8049132647ad38837a877dd473e6c9b0e5 jdk8-b95
|
||||
ea73f01b9053e7165e7ba80f242bafecbc6af712 jdk8-b96
|
||||
0a85476a0b9cb876d5666d45097dac68bef3fce1 jdk8-b97
|
||||
|
@ -217,3 +217,5 @@ cb51fb4789ac0b8be4056482077ddfb8f3bd3805 jdk8-b91
|
||||
27c51c6e31c1ef36afa0e6efb031f9b13f26c12b jdk8-b93
|
||||
50d2bde060f2a9bbbe4da0c8986e20aca61f2e2e jdk8-b94
|
||||
785d07fe38901ecc1b7e0145e53e1c3da9361fee jdk8-b95
|
||||
c156084add486f941c12d886a0b1b2854795d557 jdk8-b96
|
||||
a1c1e8bf71f354f3aec0214cf13d6668811e021d jdk8-b97
|
||||
|
@ -68,12 +68,15 @@ else
|
||||
# First, find out the valid targets
|
||||
# Run the makefile with an arbitraty SPEC using -p -q (quiet dry-run and dump rules) to find
|
||||
# available PHONY targets. Use this list as valid targets to pass on to the repeated calls.
|
||||
all_phony_targets=$(filter-out $(global_targets), $(strip $(shell \
|
||||
$(MAKE) -p -q -f common/makefiles SPEC=$(firstword $(SPEC)) | \
|
||||
all_phony_targets=$(filter-out $(global_targets) bundles-only, $(strip $(shell \
|
||||
$(MAKE) -p -q -f common/makefiles/Main.gmk SPEC=$(firstword $(SPEC)) | \
|
||||
grep ^.PHONY: | head -n 1 | cut -d " " -f 2-)))
|
||||
|
||||
$(all_phony_targets):
|
||||
@$(foreach spec,$(SPEC),($(MAKE) -f NewMakefile.gmk SPEC=$(spec) $(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $@) &&) true
|
||||
$(all_phony_targets):
|
||||
$(foreach spec,$(SPEC),($(MAKE) -f NewMakefile.gmk SPEC=$(spec) \
|
||||
$(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $@) &&) true
|
||||
|
||||
.PHONY: $(all_phony_targets)
|
||||
|
||||
endif
|
||||
endif
|
||||
|
@ -43,6 +43,16 @@ AC_DEFUN([ADD_JVM_ARG_IF_OK],
|
||||
fi
|
||||
])
|
||||
|
||||
# Appends a string to a path variable, only adding the : when needed.
|
||||
AC_DEFUN([BASIC_APPEND_TO_PATH],
|
||||
[
|
||||
if test "x[$]$1" = x; then
|
||||
$1="$2"
|
||||
else
|
||||
$1="[$]$1:$2"
|
||||
fi
|
||||
])
|
||||
|
||||
# This will make sure the given variable points to a full and proper
|
||||
# path. This means:
|
||||
# 1) There will be no spaces in the path. On posix platforms,
|
||||
@ -351,7 +361,9 @@ fi
|
||||
AC_SUBST(SYS_ROOT)
|
||||
|
||||
AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir],
|
||||
[search this directory for compilers and tools (for cross-compiling)])], [TOOLS_DIR=$with_tools_dir])
|
||||
[search this directory for compilers and tools (for cross-compiling)])],
|
||||
[TOOLS_DIR=$with_tools_dir]
|
||||
)
|
||||
|
||||
AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
|
||||
[use this directory as base for tools-dir and sys-root (for cross-compiling)])],
|
||||
@ -359,17 +371,14 @@ AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
|
||||
if test "x$with_sys_root" != x; then
|
||||
AC_MSG_ERROR([Cannot specify both --with-devkit and --with-sys-root at the same time])
|
||||
fi
|
||||
if test "x$with_tools_dir" != x; then
|
||||
AC_MSG_ERROR([Cannot specify both --with-devkit and --with-tools-dir at the same time])
|
||||
fi
|
||||
TOOLS_DIR=$with_devkit/bin
|
||||
BASIC_FIXUP_PATH([with_devkit])
|
||||
BASIC_APPEND_TO_PATH([TOOLS_DIR],$with_devkit/bin)
|
||||
if test -d "$with_devkit/$host_alias/libc"; then
|
||||
SYS_ROOT=$with_devkit/$host_alias/libc
|
||||
elif test -d "$with_devkit/$host/sys-root"; then
|
||||
SYS_ROOT=$with_devkit/$host/sys-root
|
||||
fi
|
||||
])
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
|
||||
@ -612,6 +621,14 @@ AC_PATH_PROGS(READELF, [readelf greadelf])
|
||||
AC_PATH_PROG(HG, hg)
|
||||
AC_PATH_PROG(STAT, stat)
|
||||
AC_PATH_PROG(TIME, time)
|
||||
# Check if it's GNU time
|
||||
IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
|
||||
if test "x$IS_GNU_TIME" != x; then
|
||||
IS_GNU_TIME=yes
|
||||
else
|
||||
IS_GNU_TIME=no
|
||||
fi
|
||||
AC_SUBST(IS_GNU_TIME)
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
BASIC_REQUIRE_PROG(COMM, comm)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -510,6 +510,7 @@ TAR:=@TAR@
|
||||
TAIL:=@TAIL@
|
||||
TEE:=@TEE@
|
||||
TIME:=@TIME@
|
||||
IS_GNU_TIME:=@IS_GNU_TIME@
|
||||
TR:=@TR@
|
||||
TOUCH:=@TOUCH@
|
||||
UNIQ:=@UNIQ@
|
||||
|
@ -47,7 +47,7 @@ AC_DEFUN([TOOLCHAIN_CHECK_COMPILER_VERSION],
|
||||
elif test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
# First line typically looks something like:
|
||||
# Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
|
||||
COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
|
||||
COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
|
||||
COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \(@<:@1-9@:>@@<:@0-9.@:>@*\) .*/\1/p"`
|
||||
COMPILER_VENDOR="Microsoft CL.EXE"
|
||||
COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
|
||||
@ -226,15 +226,6 @@ BDEPS_CHECK_MODULE(DEVKIT, devkit, xxx,
|
||||
],
|
||||
[])
|
||||
|
||||
if test "x$SYS_ROOT" != "x/" ; then
|
||||
CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
|
||||
CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
|
||||
OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
|
||||
OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
|
||||
CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
|
||||
LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
|
||||
fi
|
||||
|
||||
# Store the CFLAGS etal passed to the configure script.
|
||||
ORG_CFLAGS="$CFLAGS"
|
||||
ORG_CXXFLAGS="$CXXFLAGS"
|
||||
@ -378,17 +369,20 @@ AS_IF([test "x$OPENJDK_TARGET_OS" = xwindows], [
|
||||
AS_IF([test "x$VARIANT" = xOPT], [
|
||||
RC_FLAGS="$RC_FLAGS -d NDEBUG"
|
||||
])
|
||||
JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
|
||||
AS_IF([test "x$JDK_UPDATE_VERSION" = x], [
|
||||
JDK_UPDATE_VERSION_NOTNULL=0
|
||||
])
|
||||
RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
|
||||
RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
|
||||
RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
|
||||
RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
|
||||
RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
|
||||
RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
|
||||
RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
|
||||
|
||||
# The version variables used to create RC_FLAGS may be overridden
|
||||
# in a custom configure script, or possibly the command line.
|
||||
# Let those variables be expanded at make time in spec.gmk.
|
||||
# The \$ are escaped to the shell, and the $(...) variables
|
||||
# are evaluated by make.
|
||||
RC_FLAGS="$RC_FLAGS \
|
||||
-d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
|
||||
-d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
|
||||
-d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
|
||||
-d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
|
||||
-d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
|
||||
-d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
|
||||
-d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
|
||||
|
||||
# lib.exe is used to create static libraries.
|
||||
AC_CHECK_PROG([WINAR], [lib],[lib],,,)
|
||||
|
@ -208,6 +208,8 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
|
||||
# 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/\\\\$//'`
|
||||
# Remove any paths containing # (typically F#) as that messes up make
|
||||
PATH=`$ECHO "$PATH" | $SED 's/[[^:#]]*#[^:]*://g'`
|
||||
VS_PATH="$PATH"
|
||||
AC_SUBST(VS_INCLUDE)
|
||||
AC_SUBST(VS_LIB)
|
||||
|
@ -155,7 +155,7 @@ define SetupArchive
|
||||
# lines, but not here for use in make dependencies.
|
||||
$1_DEPS+=$$(subst \,,$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/,$$($1_EXTRA_FILES))))
|
||||
ifeq (,$$($1_SKIP_METAINF))
|
||||
$1_DEPS+=$$(call CacheFind $$(wildcard $$(addsuffix /META-INF,$$($1_SRCS))))
|
||||
$1_DEPS+=$$(call CacheFind,$$(wildcard $$(addsuffix /META-INF,$$($1_SRCS))))
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -255,12 +255,21 @@ define SetupZipArchive
|
||||
$(call LogSetupMacroEntry,SetupZipArchive($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
|
||||
$(if $(16),$(error Internal makefile error: Too many arguments to SetupZipArchive, please update JavaCompilation.gmk))
|
||||
|
||||
# To avoid running find over too large sets of files, which causes make to crash
|
||||
# on some configurations (cygwin), use INCLUDES and INCLUDE_FILES to build a set
|
||||
# of directories to run find in, if available.
|
||||
ifneq ($$($1_INCLUDES)$$($1_INCLUDE_FILES),)
|
||||
$1_FIND_LIST := $$(wildcard $$(foreach i,$$($1_SRC),\
|
||||
$$(addprefix $$i/,$$($1_INCLUDES) $$($1_INCLUDE_FILES))))
|
||||
else
|
||||
$1_FIND_LIST := $$($1_SRC)
|
||||
endif
|
||||
|
||||
# Find all files in the source tree.
|
||||
$1_ALL_SRCS := $$(call not-containing,_the.,\
|
||||
$$(filter $$(addprefix %,$$($1_SUFFIXES)),$$(call CacheFind $$($1_SRC))))
|
||||
$$(filter $$(addprefix %,$$($1_SUFFIXES)),$$(call CacheFind,$$($1_FIND_LIST))))
|
||||
|
||||
ifneq ($$($1_INCLUDES),)
|
||||
$1_SRC_INCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_INCLUDES))))
|
||||
ifneq ($$($1_SUFFIXES),)
|
||||
$1_ZIP_INCLUDES := $$(foreach s,$$($1_SUFFIXES),\
|
||||
$$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$$s$(DQUOTE),$$($1_INCLUDES))))
|
||||
@ -269,12 +278,8 @@ define SetupZipArchive
|
||||
endif
|
||||
endif
|
||||
ifneq ($$($1_INCLUDE_FILES),)
|
||||
$1_SRC_INCLUDES += $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_INCLUDE_FILES)))
|
||||
$1_ZIP_INCLUDES += $$(addprefix -i$(SPACE),$$($1_INCLUDE_FILES))
|
||||
endif
|
||||
ifneq ($$($1_SRC_INCLUDES),)
|
||||
$1_ALL_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_ALL_SRCS))
|
||||
endif
|
||||
ifneq ($$($1_EXCLUDES),)
|
||||
$1_SRC_EXCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
|
||||
$1_ZIP_EXCLUDES := $$(addprefix -x$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_EXCLUDES)))
|
||||
|
@ -332,9 +332,11 @@ define SetupLogging
|
||||
# Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
|
||||
# For each target executed, will print
|
||||
# Building <TARGET> (from <FIRST PREREQUISITE>) (<ALL NEWER PREREQUISITES> newer)
|
||||
# but with a limit of 20 on <ALL NEWER PREREQUISITES>, to avoid cluttering logs too much (and causing a crash on Cygwin).
|
||||
OLD_SHELL:=$$(SHELL)
|
||||
WRAPPER_SHELL:=$$(OLD_SHELL) $$(SRC_ROOT)/common/bin/shell-tracer.sh $$(if $$(TIME),$$(TIME),-) $$(OUTPUT_ROOT)/build-trace-time.log $$(OLD_SHELL)
|
||||
# but with a limit of 20 on <ALL NEWER PREREQUISITES>, to avoid cluttering logs too much
|
||||
# (and causing a crash on Cygwin).
|
||||
# Default shell seems to always be /bin/sh. Must override with bash to get this to work on Solaris.
|
||||
# Only use time if it's GNU time which supports format and output file.
|
||||
WRAPPER_SHELL:=/bin/bash $$(SRC_ROOT)/common/bin/shell-tracer.sh $$(if $$(findstring yes,$$(IS_GNU_TIME)),$$(TIME),-) $$(OUTPUT_ROOT)/build-trace-time.log /bin/bash
|
||||
SHELL=$$(warning $$(if $$@,Building $$@,Running shell command) $$(if $$<, (from $$<))$$(if $$?, ($$(wordlist 1, 20, $$?) $$(if $$(wordlist 21, 22, $$?), ... [in total $$(words $$?) files]) newer)))$$(WRAPPER_SHELL)
|
||||
endif
|
||||
# Never remove warning messages; this is just for completeness
|
||||
|
@ -217,3 +217,5 @@ c8286839d0df04aba819ec4bef12b86babccf30e jdk8-b90
|
||||
8dc9d7ccbb2d77fd89bc321bb02e67c152aca257 jdk8-b93
|
||||
22f5d7f261d9d61a953d2d9a53f2e9ce0ca361d1 jdk8-b94
|
||||
2cf36f43df36137980d9828cec27003ec10daeee jdk8-b95
|
||||
3357c2776431d51a8de326a85e0f41420e40774f jdk8-b96
|
||||
469995a8e97424f450c880606d689bf345277b19 jdk8-b97
|
||||
|
@ -353,3 +353,7 @@ b786c04b7be15194febe88dc1f0c9443e737a84b hs25-b35
|
||||
69689078dff8b21e6df30870464f5d736eebdf72 hs25-b37
|
||||
5d65c078cd0ac455aa5e58a09844c7acce54b487 jdk8-b95
|
||||
2cc5a9d1ba66dfdff578918b393c727bd9450210 hs25-b38
|
||||
e6a4b8c71fa6f225bd989a34de2d0d0a656a8be8 jdk8-b96
|
||||
2b9380b0bf0b649f40704735773e8956c2d88ba0 hs25-b39
|
||||
d197d377ab2e016d024e8c86cb06a57bd7eae590 jdk8-b97
|
||||
c9dd82da51ed34a28f7c6b3245163ee962e94572 hs25-b40
|
||||
|
@ -31,13 +31,19 @@ import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
public class CLHSDB {
|
||||
|
||||
public CLHSDB(JVMDebugger d) {
|
||||
jvmDebugger = d;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
new CLHSDB(args).run();
|
||||
}
|
||||
|
||||
private void run() {
|
||||
// At this point, if pidText != null we are supposed to attach to it.
|
||||
// Else, if execPath != null, it is the path of a jdk/bin/java
|
||||
public void run() {
|
||||
// If jvmDebugger is already set, we have been given a JVMDebugger.
|
||||
// Otherwise, if pidText != null we are supposed to attach to it.
|
||||
// Finally, if execPath != null, it is the path of a jdk/bin/java
|
||||
// and coreFilename is the pathname of a core file we are
|
||||
// supposed to attach to.
|
||||
|
||||
@ -49,7 +55,9 @@ public class CLHSDB {
|
||||
}
|
||||
});
|
||||
|
||||
if (pidText != null) {
|
||||
if (jvmDebugger != null) {
|
||||
attachDebugger(jvmDebugger);
|
||||
} else if (pidText != null) {
|
||||
attachDebugger(pidText);
|
||||
} else if (execPath != null) {
|
||||
attachDebugger(execPath, coreFilename);
|
||||
@ -96,6 +104,7 @@ public class CLHSDB {
|
||||
// Internals only below this point
|
||||
//
|
||||
private HotSpotAgent agent;
|
||||
private JVMDebugger jvmDebugger;
|
||||
private boolean attached;
|
||||
// These had to be made data members because they are referenced in inner classes.
|
||||
private String pidText;
|
||||
@ -120,7 +129,7 @@ public class CLHSDB {
|
||||
case (1):
|
||||
if (args[0].equals("help") || args[0].equals("-help")) {
|
||||
doUsage();
|
||||
System.exit(0);
|
||||
return;
|
||||
}
|
||||
// If all numbers, it is a PID to attach to
|
||||
// Else, it is a pathname to a .../bin/java for a core file.
|
||||
@ -142,10 +151,15 @@ public class CLHSDB {
|
||||
default:
|
||||
System.out.println("HSDB Error: Too many options specified");
|
||||
doUsage();
|
||||
System.exit(1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private void attachDebugger(JVMDebugger d) {
|
||||
agent.attach(d);
|
||||
attached = true;
|
||||
}
|
||||
|
||||
/** NOTE we are in a different thread here than either the main
|
||||
thread or the Swing/AWT event handler thread, so we must be very
|
||||
careful when creating or removing widgets */
|
||||
|
@ -101,6 +101,9 @@ import sun.jvm.hotspot.utilities.soql.JSJavaFactoryImpl;
|
||||
import sun.jvm.hotspot.utilities.soql.JSJavaScriptEngine;
|
||||
|
||||
public class CommandProcessor {
|
||||
|
||||
volatile boolean quit;
|
||||
|
||||
public abstract static class DebuggerInterface {
|
||||
public abstract HotSpotAgent getAgent();
|
||||
public abstract boolean isAttached();
|
||||
@ -1135,7 +1138,7 @@ public class CommandProcessor {
|
||||
usage();
|
||||
} else {
|
||||
debugger.detach();
|
||||
System.exit(0);
|
||||
quit = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -1714,7 +1717,7 @@ public class CommandProcessor {
|
||||
}
|
||||
protected void quit() {
|
||||
debugger.detach();
|
||||
System.exit(0);
|
||||
quit = true;
|
||||
}
|
||||
protected BufferedReader getInputReader() {
|
||||
return in;
|
||||
@ -1781,7 +1784,7 @@ public class CommandProcessor {
|
||||
|
||||
public void run(boolean prompt) {
|
||||
// Process interactive commands.
|
||||
while (true) {
|
||||
while (!quit) {
|
||||
if (prompt) printPrompt();
|
||||
String ln = null;
|
||||
try {
|
||||
|
@ -59,8 +59,11 @@ public class HSDB implements ObjectHistogramPanel.Listener, SAListener {
|
||||
// Internals only below this point
|
||||
//
|
||||
private HotSpotAgent agent;
|
||||
private JVMDebugger jvmDebugger;
|
||||
private JDesktopPane desktop;
|
||||
private boolean attached;
|
||||
private boolean argError;
|
||||
private JFrame frame;
|
||||
/** List <JMenuItem> */
|
||||
private java.util.List attachMenuItems;
|
||||
/** List <JMenuItem> */
|
||||
@ -85,6 +88,11 @@ public class HSDB implements ObjectHistogramPanel.Listener, SAListener {
|
||||
System.out.println(" path-to-corefile: Debug this corefile. The default is 'core'");
|
||||
System.out.println(" If no arguments are specified, you can select what to do from the GUI.\n");
|
||||
HotSpotAgent.showUsage();
|
||||
argError = true;
|
||||
}
|
||||
|
||||
public HSDB(JVMDebugger d) {
|
||||
jvmDebugger = d;
|
||||
}
|
||||
|
||||
private HSDB(String[] args) {
|
||||
@ -95,7 +103,6 @@ public class HSDB implements ObjectHistogramPanel.Listener, SAListener {
|
||||
case (1):
|
||||
if (args[0].equals("help") || args[0].equals("-help")) {
|
||||
doUsage();
|
||||
System.exit(0);
|
||||
}
|
||||
// If all numbers, it is a PID to attach to
|
||||
// Else, it is a pathname to a .../bin/java for a core file.
|
||||
@ -117,24 +124,29 @@ public class HSDB implements ObjectHistogramPanel.Listener, SAListener {
|
||||
default:
|
||||
System.out.println("HSDB Error: Too many options specified");
|
||||
doUsage();
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
private void run() {
|
||||
// At this point, if pidText != null we are supposed to attach to it.
|
||||
// Else, if execPath != null, it is the path of a jdk/bin/java
|
||||
// and coreFilename is the pathname of a core file we are
|
||||
// supposed to attach to.
|
||||
// close this tool without calling System.exit
|
||||
protected void closeUI() {
|
||||
workerThread.shutdown();
|
||||
frame.dispose();
|
||||
}
|
||||
|
||||
public void run() {
|
||||
// Don't start the UI if there were bad arguments.
|
||||
if (argError) {
|
||||
return;
|
||||
}
|
||||
|
||||
agent = new HotSpotAgent();
|
||||
workerThread = new WorkerThread();
|
||||
attachMenuItems = new java.util.ArrayList();
|
||||
detachMenuItems = new java.util.ArrayList();
|
||||
|
||||
JFrame frame = new JFrame("HSDB - HotSpot Debugger");
|
||||
frame = new JFrame("HSDB - HotSpot Debugger");
|
||||
frame.setSize(800, 600);
|
||||
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
|
||||
frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
|
||||
|
||||
JMenuBar menuBar = new JMenuBar();
|
||||
|
||||
@ -197,7 +209,7 @@ public class HSDB implements ObjectHistogramPanel.Listener, SAListener {
|
||||
item = createMenuItem("Exit",
|
||||
new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
System.exit(0);
|
||||
closeUI();
|
||||
}
|
||||
});
|
||||
item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, ActionEvent.ALT_MASK));
|
||||
@ -406,7 +418,15 @@ public class HSDB implements ObjectHistogramPanel.Listener, SAListener {
|
||||
}
|
||||
});
|
||||
|
||||
if (pidText != null) {
|
||||
// If jvmDebugger is already set, we have been given a JVMDebugger.
|
||||
// Otherwise, if pidText != null we are supposed to attach to it.
|
||||
// Finally, if execPath != null, it is the path of a jdk/bin/java
|
||||
// and coreFilename is the pathname of a core file we are
|
||||
// supposed to attach to.
|
||||
|
||||
if (jvmDebugger != null) {
|
||||
attach(jvmDebugger);
|
||||
} else if (pidText != null) {
|
||||
attach(pidText);
|
||||
} else if (execPath != null) {
|
||||
attach(execPath, coreFilename);
|
||||
@ -1113,6 +1133,12 @@ public class HSDB implements ObjectHistogramPanel.Listener, SAListener {
|
||||
});
|
||||
}
|
||||
|
||||
// Attach to existing JVMDebugger, which should be already attached to a core/process.
|
||||
private void attach(JVMDebugger d) {
|
||||
attached = true;
|
||||
showThreadsDialog();
|
||||
}
|
||||
|
||||
/** NOTE we are in a different thread here than either the main
|
||||
thread or the Swing/AWT event handler thread, so we must be very
|
||||
careful when creating or removing widgets */
|
||||
|
@ -25,6 +25,8 @@
|
||||
package sun.jvm.hotspot;
|
||||
|
||||
import java.rmi.RemoteException;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
import sun.jvm.hotspot.debugger.Debugger;
|
||||
import sun.jvm.hotspot.debugger.DebuggerException;
|
||||
@ -63,7 +65,6 @@ public class HotSpotAgent {
|
||||
|
||||
private String os;
|
||||
private String cpu;
|
||||
private String fileSep;
|
||||
|
||||
// The system can work in several ways:
|
||||
// - Attaching to local process
|
||||
@ -155,6 +156,14 @@ public class HotSpotAgent {
|
||||
go();
|
||||
}
|
||||
|
||||
/** This uses a JVMDebugger that is already attached to the core or process */
|
||||
public synchronized void attach(JVMDebugger d)
|
||||
throws DebuggerException {
|
||||
debugger = d;
|
||||
isServer = false;
|
||||
go();
|
||||
}
|
||||
|
||||
/** This attaches to a "debug server" on a remote machine; this
|
||||
remote server has already attached to a process or opened a
|
||||
core file and is waiting for RMI calls on the Debugger object to
|
||||
@ -303,28 +312,37 @@ public class HotSpotAgent {
|
||||
// server, but not client attaching to server)
|
||||
//
|
||||
|
||||
try {
|
||||
os = PlatformInfo.getOS();
|
||||
cpu = PlatformInfo.getCPU();
|
||||
}
|
||||
catch (UnsupportedPlatformException e) {
|
||||
throw new DebuggerException(e);
|
||||
}
|
||||
fileSep = System.getProperty("file.separator");
|
||||
// Handle existing or alternate JVMDebugger:
|
||||
// these will set os, cpu independently of our PlatformInfo implementation.
|
||||
String alternateDebugger = System.getProperty("sa.altDebugger");
|
||||
if (debugger != null) {
|
||||
setupDebuggerExisting();
|
||||
|
||||
} else if (alternateDebugger != null) {
|
||||
setupDebuggerAlternate(alternateDebugger);
|
||||
|
||||
if (os.equals("solaris")) {
|
||||
setupDebuggerSolaris();
|
||||
} else if (os.equals("win32")) {
|
||||
setupDebuggerWin32();
|
||||
} else if (os.equals("linux")) {
|
||||
setupDebuggerLinux();
|
||||
} else if (os.equals("bsd")) {
|
||||
setupDebuggerBsd();
|
||||
} else if (os.equals("darwin")) {
|
||||
setupDebuggerDarwin();
|
||||
} else {
|
||||
// Add support for more operating systems here
|
||||
throw new DebuggerException("Operating system " + os + " not yet supported");
|
||||
// Otherwise, os, cpu are those of our current platform:
|
||||
try {
|
||||
os = PlatformInfo.getOS();
|
||||
cpu = PlatformInfo.getCPU();
|
||||
} catch (UnsupportedPlatformException e) {
|
||||
throw new DebuggerException(e);
|
||||
}
|
||||
if (os.equals("solaris")) {
|
||||
setupDebuggerSolaris();
|
||||
} else if (os.equals("win32")) {
|
||||
setupDebuggerWin32();
|
||||
} else if (os.equals("linux")) {
|
||||
setupDebuggerLinux();
|
||||
} else if (os.equals("bsd")) {
|
||||
setupDebuggerBsd();
|
||||
} else if (os.equals("darwin")) {
|
||||
setupDebuggerDarwin();
|
||||
} else {
|
||||
// Add support for more operating systems here
|
||||
throw new DebuggerException("Operating system " + os + " not yet supported");
|
||||
}
|
||||
}
|
||||
|
||||
if (isServer) {
|
||||
@ -423,6 +441,41 @@ public class HotSpotAgent {
|
||||
// OS-specific debugger setup/connect routines
|
||||
//
|
||||
|
||||
// Use the existing JVMDebugger, as passed to our constructor.
|
||||
// Retrieve os and cpu from that debugger, not the current platform.
|
||||
private void setupDebuggerExisting() {
|
||||
|
||||
os = debugger.getOS();
|
||||
cpu = debugger.getCPU();
|
||||
setupJVMLibNames(os);
|
||||
machDesc = debugger.getMachineDescription();
|
||||
}
|
||||
|
||||
// Given a classname, load an alternate implementation of JVMDebugger.
|
||||
private void setupDebuggerAlternate(String alternateName) {
|
||||
|
||||
try {
|
||||
Class c = Class.forName(alternateName);
|
||||
Constructor cons = c.getConstructor();
|
||||
debugger = (JVMDebugger) cons.newInstance();
|
||||
attachDebugger();
|
||||
setupDebuggerExisting();
|
||||
|
||||
} catch (ClassNotFoundException cnfe) {
|
||||
throw new DebuggerException("Cannot find alternate SA Debugger: '" + alternateName + "'");
|
||||
} catch (NoSuchMethodException nsme) {
|
||||
throw new DebuggerException("Alternate SA Debugger: '" + alternateName + "' has missing constructor.");
|
||||
} catch (InstantiationException ie) {
|
||||
throw new DebuggerException("Alternate SA Debugger: '" + alternateName + "' fails to initialise: ", ie);
|
||||
} catch (IllegalAccessException iae) {
|
||||
throw new DebuggerException("Alternate SA Debugger: '" + alternateName + "' fails to initialise: ", iae);
|
||||
} catch (InvocationTargetException iae) {
|
||||
throw new DebuggerException("Alternate SA Debugger: '" + alternateName + "' fails to initialise: ", iae);
|
||||
}
|
||||
|
||||
System.err.println("Loaded alternate HotSpot SA Debugger: " + alternateName);
|
||||
}
|
||||
|
||||
//
|
||||
// Solaris
|
||||
//
|
||||
@ -466,6 +519,11 @@ public class HotSpotAgent {
|
||||
debugger = new RemoteDebuggerClient(remote);
|
||||
machDesc = ((RemoteDebuggerClient) debugger).getMachineDescription();
|
||||
os = debugger.getOS();
|
||||
setupJVMLibNames(os);
|
||||
cpu = debugger.getCPU();
|
||||
}
|
||||
|
||||
private void setupJVMLibNames(String os) {
|
||||
if (os.equals("solaris")) {
|
||||
setupJVMLibNamesSolaris();
|
||||
} else if (os.equals("win32")) {
|
||||
@ -479,8 +537,6 @@ public class HotSpotAgent {
|
||||
} else {
|
||||
throw new RuntimeException("Unknown OS type");
|
||||
}
|
||||
|
||||
cpu = debugger.getCPU();
|
||||
}
|
||||
|
||||
private void setupJVMLibNamesSolaris() {
|
||||
|
@ -26,11 +26,11 @@ package sun.jvm.hotspot.debugger.linux;
|
||||
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
|
||||
class LinuxAddress implements Address {
|
||||
public class LinuxAddress implements Address {
|
||||
protected LinuxDebugger debugger;
|
||||
protected long addr;
|
||||
|
||||
LinuxAddress(LinuxDebugger debugger, long addr) {
|
||||
public LinuxAddress(LinuxDebugger debugger, long addr) {
|
||||
this.debugger = debugger;
|
||||
this.addr = addr;
|
||||
}
|
||||
|
@ -26,8 +26,8 @@ package sun.jvm.hotspot.debugger.linux;
|
||||
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
|
||||
class LinuxOopHandle extends LinuxAddress implements OopHandle {
|
||||
LinuxOopHandle(LinuxDebugger debugger, long addr) {
|
||||
public class LinuxOopHandle extends LinuxAddress implements OopHandle {
|
||||
public LinuxOopHandle(LinuxDebugger debugger, long addr) {
|
||||
super(debugger, addr);
|
||||
}
|
||||
|
||||
|
@ -246,7 +246,7 @@ public class VM {
|
||||
}
|
||||
}
|
||||
|
||||
private static final boolean disableDerivedPrinterTableCheck;
|
||||
private static final boolean disableDerivedPointerTableCheck;
|
||||
private static final Properties saProps;
|
||||
|
||||
static {
|
||||
@ -256,12 +256,12 @@ public class VM {
|
||||
url = VM.class.getClassLoader().getResource("sa.properties");
|
||||
saProps.load(new BufferedInputStream(url.openStream()));
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Unable to load properties " +
|
||||
System.err.println("Unable to load properties " +
|
||||
(url == null ? "null" : url.toString()) +
|
||||
": " + e.getMessage());
|
||||
}
|
||||
|
||||
disableDerivedPrinterTableCheck = System.getProperty("sun.jvm.hotspot.runtime.VM.disableDerivedPointerTableCheck") != null;
|
||||
disableDerivedPointerTableCheck = System.getProperty("sun.jvm.hotspot.runtime.VM.disableDerivedPointerTableCheck") != null;
|
||||
}
|
||||
|
||||
private VM(TypeDataBase db, JVMDebugger debugger, boolean isBigEndian) {
|
||||
@ -371,7 +371,8 @@ public class VM {
|
||||
/** This is used by the debugging system */
|
||||
public static void initialize(TypeDataBase db, JVMDebugger debugger) {
|
||||
if (soleInstance != null) {
|
||||
throw new RuntimeException("Attempt to initialize VM twice");
|
||||
// Using multiple SA Tool classes in the same process creates a call here.
|
||||
return;
|
||||
}
|
||||
soleInstance = new VM(db, debugger, debugger.getMachineDescription().isBigEndian());
|
||||
|
||||
@ -683,7 +684,7 @@ public class VM {
|
||||
|
||||
/** Returns true if C2 derived pointer table should be used, false otherwise */
|
||||
public boolean useDerivedPointerTable() {
|
||||
return !disableDerivedPrinterTableCheck;
|
||||
return !disableDerivedPointerTableCheck;
|
||||
}
|
||||
|
||||
/** Returns the code cache; should not be used if is core build */
|
||||
|
@ -41,6 +41,14 @@ import sun.jvm.hotspot.utilities.*;
|
||||
public class ClassLoaderStats extends Tool {
|
||||
boolean verbose = true;
|
||||
|
||||
public ClassLoaderStats() {
|
||||
super();
|
||||
}
|
||||
|
||||
public ClassLoaderStats(JVMDebugger d) {
|
||||
super(d);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
ClassLoaderStats cls = new ClassLoaderStats();
|
||||
cls.start(args);
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
package sun.jvm.hotspot.tools;
|
||||
|
||||
import sun.jvm.hotspot.debugger.JVMDebugger;
|
||||
import sun.jvm.hotspot.tools.*;
|
||||
|
||||
import sun.jvm.hotspot.oops.*;
|
||||
@ -42,6 +43,15 @@ import java.util.Comparator;
|
||||
* summary of these objects in the form of a histogram.
|
||||
*/
|
||||
public class FinalizerInfo extends Tool {
|
||||
|
||||
public FinalizerInfo() {
|
||||
super();
|
||||
}
|
||||
|
||||
public FinalizerInfo(JVMDebugger d) {
|
||||
super(d);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
FinalizerInfo finfo = new FinalizerInfo();
|
||||
finfo.start(args);
|
||||
|
@ -25,10 +25,19 @@
|
||||
package sun.jvm.hotspot.tools;
|
||||
|
||||
import java.io.PrintStream;
|
||||
import sun.jvm.hotspot.debugger.JVMDebugger;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
|
||||
public class FlagDumper extends Tool {
|
||||
|
||||
public FlagDumper() {
|
||||
super();
|
||||
}
|
||||
|
||||
public FlagDumper(JVMDebugger d) {
|
||||
super(d);
|
||||
}
|
||||
|
||||
public void run() {
|
||||
VM.Flag[] flags = VM.getVM().getCommandLineFlags();
|
||||
PrintStream out = System.out;
|
||||
|
@ -25,6 +25,7 @@
|
||||
package sun.jvm.hotspot.tools;
|
||||
|
||||
import sun.jvm.hotspot.utilities.HeapHprofBinWriter;
|
||||
import sun.jvm.hotspot.debugger.JVMDebugger;
|
||||
import java.io.IOException;
|
||||
|
||||
/*
|
||||
@ -42,6 +43,11 @@ public class HeapDumper extends Tool {
|
||||
this.dumpFile = dumpFile;
|
||||
}
|
||||
|
||||
public HeapDumper(String dumpFile, JVMDebugger d) {
|
||||
super(d);
|
||||
this.dumpFile = dumpFile;
|
||||
}
|
||||
|
||||
protected void printFlagsUsage() {
|
||||
System.out.println(" <no option>\tto dump heap to " +
|
||||
DEFAULT_DUMP_FILE);
|
||||
|
@ -29,12 +29,21 @@ import sun.jvm.hotspot.gc_interface.*;
|
||||
import sun.jvm.hotspot.gc_implementation.g1.*;
|
||||
import sun.jvm.hotspot.gc_implementation.parallelScavenge.*;
|
||||
import sun.jvm.hotspot.gc_implementation.shared.*;
|
||||
import sun.jvm.hotspot.debugger.JVMDebugger;
|
||||
import sun.jvm.hotspot.memory.*;
|
||||
import sun.jvm.hotspot.oops.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
|
||||
public class HeapSummary extends Tool {
|
||||
|
||||
public HeapSummary() {
|
||||
super();
|
||||
}
|
||||
|
||||
public HeapSummary(JVMDebugger d) {
|
||||
super(d);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
HeapSummary hs = new HeapSummary();
|
||||
hs.start(args);
|
||||
|
@ -25,12 +25,21 @@
|
||||
package sun.jvm.hotspot.tools;
|
||||
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.debugger.JVMDebugger;
|
||||
|
||||
public class JInfo extends Tool {
|
||||
public JInfo() {
|
||||
super();
|
||||
}
|
||||
|
||||
public JInfo(int m) {
|
||||
mode = m;
|
||||
}
|
||||
|
||||
public JInfo(JVMDebugger d) {
|
||||
super(d);
|
||||
}
|
||||
|
||||
protected boolean needsJavaPrefix() {
|
||||
return false;
|
||||
}
|
||||
|
@ -25,6 +25,7 @@
|
||||
package sun.jvm.hotspot.tools;
|
||||
|
||||
import java.io.*;
|
||||
import sun.jvm.hotspot.debugger.JVMDebugger;
|
||||
import sun.jvm.hotspot.utilities.*;
|
||||
|
||||
public class JMap extends Tool {
|
||||
@ -36,6 +37,10 @@ public class JMap extends Tool {
|
||||
this(MODE_PMAP);
|
||||
}
|
||||
|
||||
public JMap(JVMDebugger d) {
|
||||
super(d);
|
||||
}
|
||||
|
||||
protected boolean needsJavaPrefix() {
|
||||
return false;
|
||||
}
|
||||
|
@ -25,9 +25,19 @@
|
||||
package sun.jvm.hotspot.tools;
|
||||
|
||||
import java.io.*;
|
||||
import sun.jvm.hotspot.debugger.JVMDebugger;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
|
||||
public class JSnap extends Tool {
|
||||
|
||||
public JSnap() {
|
||||
super();
|
||||
}
|
||||
|
||||
public JSnap(JVMDebugger d) {
|
||||
super(d);
|
||||
}
|
||||
|
||||
public void run() {
|
||||
final PrintStream out = System.out;
|
||||
if (PerfMemory.initialized()) {
|
||||
|
@ -24,6 +24,8 @@
|
||||
|
||||
package sun.jvm.hotspot.tools;
|
||||
|
||||
import sun.jvm.hotspot.debugger.JVMDebugger;
|
||||
|
||||
public class JStack extends Tool {
|
||||
public JStack(boolean mixedMode, boolean concurrentLocks) {
|
||||
this.mixedMode = mixedMode;
|
||||
@ -34,6 +36,10 @@ public class JStack extends Tool {
|
||||
this(true, true);
|
||||
}
|
||||
|
||||
public JStack(JVMDebugger d) {
|
||||
super(d);
|
||||
}
|
||||
|
||||
protected boolean needsJavaPrefix() {
|
||||
return false;
|
||||
}
|
||||
|
@ -33,6 +33,14 @@ import java.io.PrintStream;
|
||||
an object histogram from a remote or crashed VM. */
|
||||
public class ObjectHistogram extends Tool {
|
||||
|
||||
public ObjectHistogram() {
|
||||
super();
|
||||
}
|
||||
|
||||
public ObjectHistogram(JVMDebugger d) {
|
||||
super(d);
|
||||
}
|
||||
|
||||
public void run() {
|
||||
run(System.out, System.err);
|
||||
}
|
||||
|
@ -31,6 +31,15 @@ import sun.jvm.hotspot.debugger.cdbg.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
|
||||
public class PMap extends Tool {
|
||||
|
||||
public PMap() {
|
||||
super();
|
||||
}
|
||||
|
||||
public PMap(JVMDebugger d) {
|
||||
super(d);
|
||||
}
|
||||
|
||||
public void run() {
|
||||
run(System.out);
|
||||
}
|
||||
|
@ -45,6 +45,10 @@ public class PStack extends Tool {
|
||||
this(true, true);
|
||||
}
|
||||
|
||||
public PStack(JVMDebugger d) {
|
||||
super(d);
|
||||
}
|
||||
|
||||
public void run() {
|
||||
run(System.out);
|
||||
}
|
||||
|
@ -45,6 +45,16 @@ public class StackTrace extends Tool {
|
||||
run(System.out);
|
||||
}
|
||||
|
||||
public StackTrace(JVMDebugger d) {
|
||||
super(d);
|
||||
}
|
||||
|
||||
public StackTrace(JVMDebugger d, boolean v, boolean concurrentLocks) {
|
||||
super(d);
|
||||
this.verbose = v;
|
||||
this.concurrentLocks = concurrentLocks;
|
||||
}
|
||||
|
||||
public void run(java.io.PrintStream tty) {
|
||||
// Ready to go with the database...
|
||||
try {
|
||||
|
@ -27,10 +27,19 @@ package sun.jvm.hotspot.tools;
|
||||
import java.io.PrintStream;
|
||||
import java.util.*;
|
||||
|
||||
import sun.jvm.hotspot.debugger.JVMDebugger;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
|
||||
public class SysPropsDumper extends Tool {
|
||||
|
||||
public SysPropsDumper() {
|
||||
super();
|
||||
}
|
||||
|
||||
public SysPropsDumper(JVMDebugger d) {
|
||||
super(d);
|
||||
}
|
||||
|
||||
public void run() {
|
||||
Properties sysProps = VM.getVM().getSystemProperties();
|
||||
PrintStream out = System.out;
|
||||
|
@ -35,6 +35,7 @@ import sun.jvm.hotspot.debugger.*;
|
||||
|
||||
public abstract class Tool implements Runnable {
|
||||
private HotSpotAgent agent;
|
||||
private JVMDebugger jvmDebugger;
|
||||
private int debugeeType;
|
||||
|
||||
// debugeeType is one of constants below
|
||||
@ -42,6 +43,13 @@ public abstract class Tool implements Runnable {
|
||||
protected static final int DEBUGEE_CORE = 1;
|
||||
protected static final int DEBUGEE_REMOTE = 2;
|
||||
|
||||
public Tool() {
|
||||
}
|
||||
|
||||
public Tool(JVMDebugger d) {
|
||||
jvmDebugger = d;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return getClass().getName();
|
||||
}
|
||||
@ -90,7 +98,6 @@ public abstract class Tool implements Runnable {
|
||||
|
||||
protected void usage() {
|
||||
printUsage();
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -106,13 +113,13 @@ public abstract class Tool implements Runnable {
|
||||
protected void stop() {
|
||||
if (agent != null) {
|
||||
agent.detach();
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
protected void start(String[] args) {
|
||||
if ((args.length < 1) || (args.length > 2)) {
|
||||
usage();
|
||||
return;
|
||||
}
|
||||
|
||||
// Attempt to handle -h or -help or some invalid flag
|
||||
@ -185,13 +192,31 @@ public abstract class Tool implements Runnable {
|
||||
}
|
||||
if (e.getMessage() != null) {
|
||||
err.print(e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
err.println();
|
||||
System.exit(1);
|
||||
return;
|
||||
}
|
||||
|
||||
err.println("Debugger attached successfully.");
|
||||
startInternal();
|
||||
}
|
||||
|
||||
// When using an existing JVMDebugger.
|
||||
public void start() {
|
||||
|
||||
if (jvmDebugger == null) {
|
||||
throw new RuntimeException("Tool.start() called with no JVMDebugger set.");
|
||||
}
|
||||
agent = new HotSpotAgent();
|
||||
agent.attach(jvmDebugger);
|
||||
startInternal();
|
||||
}
|
||||
|
||||
// Remains of the start mechanism, common to both start methods.
|
||||
private void startInternal() {
|
||||
|
||||
PrintStream err = System.err;
|
||||
VM vm = VM.getVM();
|
||||
if (vm.isCore()) {
|
||||
err.println("Core build detected.");
|
||||
|
@ -25,6 +25,7 @@
|
||||
package sun.jvm.hotspot.tools.jcore;
|
||||
|
||||
import java.io.*;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.util.jar.JarOutputStream;
|
||||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.Manifest;
|
||||
@ -38,6 +39,16 @@ public class ClassDump extends Tool {
|
||||
private ClassFilter classFilter;
|
||||
private String outputDirectory;
|
||||
private JarOutputStream jarStream;
|
||||
private String pkgList;
|
||||
|
||||
public ClassDump() {
|
||||
super();
|
||||
}
|
||||
|
||||
public ClassDump(JVMDebugger d, String pkgList) {
|
||||
super(d);
|
||||
this.pkgList = pkgList;
|
||||
}
|
||||
|
||||
public void setClassFilter(ClassFilter cf) {
|
||||
classFilter = cf;
|
||||
@ -63,6 +74,25 @@ public class ClassDump extends Tool {
|
||||
public void run() {
|
||||
// Ready to go with the database...
|
||||
try {
|
||||
// The name of the filter always comes from a System property.
|
||||
// If we have a pkgList, pass it, otherwise let the filter read
|
||||
// its own System property for the list of classes.
|
||||
String filterClassName = System.getProperty("sun.jvm.hotspot.tools.jcore.filter",
|
||||
"sun.jvm.hotspot.tools.jcore.PackageNameFilter");
|
||||
try {
|
||||
Class filterClass = Class.forName(filterClassName);
|
||||
if (pkgList == null) {
|
||||
classFilter = (ClassFilter) filterClass.newInstance();
|
||||
} else {
|
||||
Constructor con = filterClass.getConstructor(String.class);
|
||||
classFilter = (ClassFilter) con.newInstance(pkgList);
|
||||
}
|
||||
} catch(Exception exp) {
|
||||
System.err.println("Warning: Can not create class filter!");
|
||||
}
|
||||
|
||||
String outputDirectory = System.getProperty("sun.jvm.hotspot.tools.jcore.outputDir", ".");
|
||||
setOutputDirectory(outputDirectory);
|
||||
|
||||
// walk through the system dictionary
|
||||
SystemDictionary dict = VM.getVM().getSystemDictionary();
|
||||
@ -139,26 +169,8 @@ public class ClassDump extends Tool {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
// load class filters
|
||||
ClassFilter classFilter = null;
|
||||
String filterClassName = System.getProperty("sun.jvm.hotspot.tools.jcore.filter");
|
||||
if (filterClassName != null) {
|
||||
try {
|
||||
Class filterClass = Class.forName(filterClassName);
|
||||
classFilter = (ClassFilter) filterClass.newInstance();
|
||||
} catch(Exception exp) {
|
||||
System.err.println("Warning: Can not create class filter!");
|
||||
}
|
||||
}
|
||||
|
||||
String outputDirectory = System.getProperty("sun.jvm.hotspot.tools.jcore.outputDir");
|
||||
if (outputDirectory == null)
|
||||
outputDirectory = ".";
|
||||
|
||||
|
||||
ClassDump cd = new ClassDump();
|
||||
cd.setClassFilter(classFilter);
|
||||
cd.setOutputDirectory(outputDirectory);
|
||||
cd.start(args);
|
||||
cd.stop();
|
||||
}
|
||||
|
@ -24,12 +24,22 @@
|
||||
|
||||
package sun.jvm.hotspot.tools.soql;
|
||||
|
||||
import sun.jvm.hotspot.debugger.JVMDebugger;
|
||||
import sun.jvm.hotspot.tools.*;
|
||||
import sun.jvm.hotspot.utilities.*;
|
||||
import sun.jvm.hotspot.utilities.soql.*;
|
||||
|
||||
/** This is command line JavaScript debugger console */
|
||||
public class JSDB extends Tool {
|
||||
|
||||
public JSDB() {
|
||||
super();
|
||||
}
|
||||
|
||||
public JSDB(JVMDebugger d) {
|
||||
super(d);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
JSDB jsdb = new JSDB();
|
||||
jsdb.start(args);
|
||||
|
@ -44,6 +44,14 @@ public class SOQL extends Tool {
|
||||
soql.stop();
|
||||
}
|
||||
|
||||
public SOQL() {
|
||||
super();
|
||||
}
|
||||
|
||||
public SOQL(JVMDebugger d) {
|
||||
super(d);
|
||||
}
|
||||
|
||||
protected SOQLEngine soqlEngine;
|
||||
protected BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
|
||||
protected PrintStream out = System.out;
|
||||
|
@ -7,6 +7,6 @@ else
|
||||
NM=nm
|
||||
fi
|
||||
|
||||
$NM --defined-only $* | awk '
|
||||
{ if ($3 ~ /^_ZTV/ || $3 ~ /^gHotSpotVM/) print "\t" $3 ";" }
|
||||
$NM -Uj $* | awk '
|
||||
{ if ($3 ~ /^_ZTV/ || $3 ~ /^gHotSpotVM/) print "\t" $3 }
|
||||
'
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -368,8 +368,8 @@ ifeq ($(OS_VENDOR), Darwin)
|
||||
# Standard linker flags
|
||||
LFLAGS +=
|
||||
|
||||
# Darwin doesn't use ELF and doesn't support version scripts
|
||||
LDNOMAP = true
|
||||
# The apple linker has its own variant of mapfiles/version-scripts
|
||||
MAPFLAG = -Xlinker -exported_symbols_list -Xlinker FILENAME
|
||||
|
||||
# Use $(SONAMEFLAG:SONAME=soname) to specify the intrinsic name of a shared obj
|
||||
SONAMEFLAG =
|
||||
|
@ -1,7 +1,3 @@
|
||||
#
|
||||
# @(#)mapfile-vers-debug 1.18 07/10/25 16:47:35
|
||||
#
|
||||
|
||||
#
|
||||
# Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
@ -23,273 +19,244 @@
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
#
|
||||
# Only used for OSX/Darwin builds
|
||||
|
||||
# Define public interface.
|
||||
# _JNI
|
||||
_JNI_CreateJavaVM
|
||||
_JNI_GetCreatedJavaVMs
|
||||
_JNI_GetDefaultJavaVMInitArgs
|
||||
|
||||
SUNWprivate_1.1 {
|
||||
global:
|
||||
# JNI
|
||||
JNI_CreateJavaVM;
|
||||
JNI_GetCreatedJavaVMs;
|
||||
JNI_GetDefaultJavaVMInitArgs;
|
||||
# _JVM
|
||||
_JVM_Accept
|
||||
_JVM_ActiveProcessorCount
|
||||
_JVM_AllocateNewArray
|
||||
_JVM_AllocateNewObject
|
||||
_JVM_ArrayCopy
|
||||
_JVM_AssertionStatusDirectives
|
||||
_JVM_Available
|
||||
_JVM_Bind
|
||||
_JVM_ClassDepth
|
||||
_JVM_ClassLoaderDepth
|
||||
_JVM_Clone
|
||||
_JVM_Close
|
||||
_JVM_CX8Field
|
||||
_JVM_CompileClass
|
||||
_JVM_CompileClasses
|
||||
_JVM_CompilerCommand
|
||||
_JVM_Connect
|
||||
_JVM_ConstantPoolGetClassAt
|
||||
_JVM_ConstantPoolGetClassAtIfLoaded
|
||||
_JVM_ConstantPoolGetDoubleAt
|
||||
_JVM_ConstantPoolGetFieldAt
|
||||
_JVM_ConstantPoolGetFieldAtIfLoaded
|
||||
_JVM_ConstantPoolGetFloatAt
|
||||
_JVM_ConstantPoolGetIntAt
|
||||
_JVM_ConstantPoolGetLongAt
|
||||
_JVM_ConstantPoolGetMethodAt
|
||||
_JVM_ConstantPoolGetMethodAtIfLoaded
|
||||
_JVM_ConstantPoolGetMemberRefInfoAt
|
||||
_JVM_ConstantPoolGetSize
|
||||
_JVM_ConstantPoolGetStringAt
|
||||
_JVM_ConstantPoolGetUTF8At
|
||||
_JVM_CountStackFrames
|
||||
_JVM_CurrentClassLoader
|
||||
_JVM_CurrentLoadedClass
|
||||
_JVM_CurrentThread
|
||||
_JVM_CurrentTimeMillis
|
||||
_JVM_DefineClass
|
||||
_JVM_DefineClassWithSource
|
||||
_JVM_DefineClassWithSourceCond
|
||||
_JVM_DesiredAssertionStatus
|
||||
_JVM_DisableCompiler
|
||||
_JVM_DoPrivileged
|
||||
_JVM_DTraceGetVersion
|
||||
_JVM_DTraceActivate
|
||||
_JVM_DTraceIsProbeEnabled
|
||||
_JVM_DTraceIsSupported
|
||||
_JVM_DTraceDispose
|
||||
_JVM_DumpAllStacks
|
||||
_JVM_DumpThreads
|
||||
_JVM_EnableCompiler
|
||||
_JVM_Exit
|
||||
_JVM_FillInStackTrace
|
||||
_JVM_FindClassFromClass
|
||||
_JVM_FindClassFromClassLoader
|
||||
_JVM_FindClassFromBootLoader
|
||||
_JVM_FindLibraryEntry
|
||||
_JVM_FindLoadedClass
|
||||
_JVM_FindPrimitiveClass
|
||||
_JVM_FindSignal
|
||||
_JVM_FreeMemory
|
||||
_JVM_GC
|
||||
_JVM_GetAllThreads
|
||||
_JVM_GetArrayElement
|
||||
_JVM_GetArrayLength
|
||||
_JVM_GetCPClassNameUTF
|
||||
_JVM_GetCPFieldClassNameUTF
|
||||
_JVM_GetCPFieldModifiers
|
||||
_JVM_GetCPFieldNameUTF
|
||||
_JVM_GetCPFieldSignatureUTF
|
||||
_JVM_GetCPMethodClassNameUTF
|
||||
_JVM_GetCPMethodModifiers
|
||||
_JVM_GetCPMethodNameUTF
|
||||
_JVM_GetCPMethodSignatureUTF
|
||||
_JVM_GetCallerClass
|
||||
_JVM_GetClassAccessFlags
|
||||
_JVM_GetClassAnnotations
|
||||
_JVM_GetClassCPEntriesCount
|
||||
_JVM_GetClassCPTypes
|
||||
_JVM_GetClassConstantPool
|
||||
_JVM_GetClassContext
|
||||
_JVM_GetClassDeclaredConstructors
|
||||
_JVM_GetClassDeclaredFields
|
||||
_JVM_GetClassDeclaredMethods
|
||||
_JVM_GetClassFieldsCount
|
||||
_JVM_GetClassInterfaces
|
||||
_JVM_GetClassLoader
|
||||
_JVM_GetClassMethodsCount
|
||||
_JVM_GetClassModifiers
|
||||
_JVM_GetClassName
|
||||
_JVM_GetClassNameUTF
|
||||
_JVM_GetClassSignature
|
||||
_JVM_GetClassSigners
|
||||
_JVM_GetClassTypeAnnotations
|
||||
_JVM_GetComponentType
|
||||
_JVM_GetDeclaredClasses
|
||||
_JVM_GetDeclaringClass
|
||||
_JVM_GetEnclosingMethodInfo
|
||||
_JVM_GetFieldAnnotations
|
||||
_JVM_GetFieldIxModifiers
|
||||
_JVM_GetFieldTypeAnnotations
|
||||
_JVM_GetHostName
|
||||
_JVM_GetInheritedAccessControlContext
|
||||
_JVM_GetInterfaceVersion
|
||||
_JVM_GetLastErrorString
|
||||
_JVM_GetManagement
|
||||
_JVM_GetMethodAnnotations
|
||||
_JVM_GetMethodDefaultAnnotationValue
|
||||
_JVM_GetMethodIxArgsSize
|
||||
_JVM_GetMethodIxByteCode
|
||||
_JVM_GetMethodIxByteCodeLength
|
||||
_JVM_GetMethodIxExceptionIndexes
|
||||
_JVM_GetMethodIxExceptionTableEntry
|
||||
_JVM_GetMethodIxExceptionTableLength
|
||||
_JVM_GetMethodIxExceptionsCount
|
||||
_JVM_GetMethodIxLocalsCount
|
||||
_JVM_GetMethodIxMaxStack
|
||||
_JVM_GetMethodIxModifiers
|
||||
_JVM_GetMethodIxNameUTF
|
||||
_JVM_GetMethodIxSignatureUTF
|
||||
_JVM_GetMethodParameterAnnotations
|
||||
_JVM_GetMethodParameters
|
||||
_JVM_GetMethodTypeAnnotations
|
||||
_JVM_GetPrimitiveArrayElement
|
||||
_JVM_GetProtectionDomain
|
||||
_JVM_GetSockName
|
||||
_JVM_GetSockOpt
|
||||
_JVM_GetStackAccessControlContext
|
||||
_JVM_GetStackTraceDepth
|
||||
_JVM_GetStackTraceElement
|
||||
_JVM_GetSystemPackage
|
||||
_JVM_GetSystemPackages
|
||||
_JVM_GetThreadStateNames
|
||||
_JVM_GetThreadStateValues
|
||||
_JVM_GetVersionInfo
|
||||
_JVM_Halt
|
||||
_JVM_HoldsLock
|
||||
_JVM_IHashCode
|
||||
_JVM_InitAgentProperties
|
||||
_JVM_InitProperties
|
||||
_JVM_InitializeCompiler
|
||||
_JVM_InitializeSocketLibrary
|
||||
_JVM_InternString
|
||||
_JVM_Interrupt
|
||||
_JVM_InvokeMethod
|
||||
_JVM_IsArrayClass
|
||||
_JVM_IsConstructorIx
|
||||
_JVM_IsInterface
|
||||
_JVM_IsInterrupted
|
||||
_JVM_IsNaN
|
||||
_JVM_IsPrimitiveClass
|
||||
_JVM_IsSameClassPackage
|
||||
_JVM_IsSilentCompiler
|
||||
_JVM_IsSupportedJNIVersion
|
||||
_JVM_IsThreadAlive
|
||||
_JVM_IsVMGeneratedMethodIx
|
||||
_JVM_LatestUserDefinedLoader
|
||||
_JVM_Listen
|
||||
_JVM_LoadClass0
|
||||
_JVM_LoadLibrary
|
||||
_JVM_Lseek
|
||||
_JVM_MaxObjectInspectionAge
|
||||
_JVM_MaxMemory
|
||||
_JVM_MonitorNotify
|
||||
_JVM_MonitorNotifyAll
|
||||
_JVM_MonitorWait
|
||||
_JVM_NanoTime
|
||||
_JVM_NativePath
|
||||
_JVM_NewArray
|
||||
_JVM_NewInstanceFromConstructor
|
||||
_JVM_NewMultiArray
|
||||
_JVM_OnExit
|
||||
_JVM_Open
|
||||
_JVM_RaiseSignal
|
||||
_JVM_RawMonitorCreate
|
||||
_JVM_RawMonitorDestroy
|
||||
_JVM_RawMonitorEnter
|
||||
_JVM_RawMonitorExit
|
||||
_JVM_Read
|
||||
_JVM_Recv
|
||||
_JVM_RecvFrom
|
||||
_JVM_RegisterSignal
|
||||
_JVM_ReleaseUTF
|
||||
_JVM_ResolveClass
|
||||
_JVM_ResumeThread
|
||||
_JVM_Send
|
||||
_JVM_SendTo
|
||||
_JVM_SetArrayElement
|
||||
_JVM_SetClassSigners
|
||||
_JVM_SetLength
|
||||
_JVM_SetNativeThreadName
|
||||
_JVM_SetPrimitiveArrayElement
|
||||
_JVM_SetProtectionDomain
|
||||
_JVM_SetSockOpt
|
||||
_JVM_SetThreadPriority
|
||||
_JVM_Sleep
|
||||
_JVM_Socket
|
||||
_JVM_SocketAvailable
|
||||
_JVM_SocketClose
|
||||
_JVM_SocketShutdown
|
||||
_JVM_StartThread
|
||||
_JVM_StopThread
|
||||
_JVM_SuspendThread
|
||||
_JVM_SupportsCX8
|
||||
_JVM_Sync
|
||||
_JVM_Timeout
|
||||
_JVM_TotalMemory
|
||||
_JVM_TraceInstructions
|
||||
_JVM_TraceMethodCalls
|
||||
_JVM_UnloadLibrary
|
||||
_JVM_Write
|
||||
_JVM_Yield
|
||||
_JVM_handle_bsd_signal
|
||||
|
||||
# JVM
|
||||
JVM_Accept;
|
||||
JVM_ActiveProcessorCount;
|
||||
JVM_AllocateNewArray;
|
||||
JVM_AllocateNewObject;
|
||||
JVM_ArrayCopy;
|
||||
JVM_AssertionStatusDirectives;
|
||||
JVM_Available;
|
||||
JVM_Bind;
|
||||
JVM_ClassDepth;
|
||||
JVM_ClassLoaderDepth;
|
||||
JVM_Clone;
|
||||
JVM_Close;
|
||||
JVM_CX8Field;
|
||||
JVM_CompileClass;
|
||||
JVM_CompileClasses;
|
||||
JVM_CompilerCommand;
|
||||
JVM_Connect;
|
||||
JVM_ConstantPoolGetClassAt;
|
||||
JVM_ConstantPoolGetClassAtIfLoaded;
|
||||
JVM_ConstantPoolGetDoubleAt;
|
||||
JVM_ConstantPoolGetFieldAt;
|
||||
JVM_ConstantPoolGetFieldAtIfLoaded;
|
||||
JVM_ConstantPoolGetFloatAt;
|
||||
JVM_ConstantPoolGetIntAt;
|
||||
JVM_ConstantPoolGetLongAt;
|
||||
JVM_ConstantPoolGetMethodAt;
|
||||
JVM_ConstantPoolGetMethodAtIfLoaded;
|
||||
JVM_ConstantPoolGetMemberRefInfoAt;
|
||||
JVM_ConstantPoolGetSize;
|
||||
JVM_ConstantPoolGetStringAt;
|
||||
JVM_ConstantPoolGetUTF8At;
|
||||
JVM_CountStackFrames;
|
||||
JVM_CurrentClassLoader;
|
||||
JVM_CurrentLoadedClass;
|
||||
JVM_CurrentThread;
|
||||
JVM_CurrentTimeMillis;
|
||||
JVM_DefineClass;
|
||||
JVM_DefineClassWithSource;
|
||||
JVM_DefineClassWithSourceCond;
|
||||
JVM_DesiredAssertionStatus;
|
||||
JVM_DisableCompiler;
|
||||
JVM_DoPrivileged;
|
||||
JVM_DTraceGetVersion;
|
||||
JVM_DTraceActivate;
|
||||
JVM_DTraceIsProbeEnabled;
|
||||
JVM_DTraceIsSupported;
|
||||
JVM_DTraceDispose;
|
||||
JVM_DumpAllStacks;
|
||||
JVM_DumpThreads;
|
||||
JVM_EnableCompiler;
|
||||
JVM_Exit;
|
||||
JVM_FillInStackTrace;
|
||||
JVM_FindClassFromClass;
|
||||
JVM_FindClassFromClassLoader;
|
||||
JVM_FindClassFromBootLoader;
|
||||
JVM_FindLibraryEntry;
|
||||
JVM_FindLoadedClass;
|
||||
JVM_FindPrimitiveClass;
|
||||
JVM_FindSignal;
|
||||
JVM_FreeMemory;
|
||||
JVM_GC;
|
||||
JVM_GetAllThreads;
|
||||
JVM_GetArrayElement;
|
||||
JVM_GetArrayLength;
|
||||
JVM_GetCPClassNameUTF;
|
||||
JVM_GetCPFieldClassNameUTF;
|
||||
JVM_GetCPFieldModifiers;
|
||||
JVM_GetCPFieldNameUTF;
|
||||
JVM_GetCPFieldSignatureUTF;
|
||||
JVM_GetCPMethodClassNameUTF;
|
||||
JVM_GetCPMethodModifiers;
|
||||
JVM_GetCPMethodNameUTF;
|
||||
JVM_GetCPMethodSignatureUTF;
|
||||
JVM_GetCallerClass;
|
||||
JVM_GetClassAccessFlags;
|
||||
JVM_GetClassAnnotations;
|
||||
JVM_GetClassCPEntriesCount;
|
||||
JVM_GetClassCPTypes;
|
||||
JVM_GetClassConstantPool;
|
||||
JVM_GetClassContext;
|
||||
JVM_GetClassDeclaredConstructors;
|
||||
JVM_GetClassDeclaredFields;
|
||||
JVM_GetClassDeclaredMethods;
|
||||
JVM_GetClassFieldsCount;
|
||||
JVM_GetClassInterfaces;
|
||||
JVM_GetClassLoader;
|
||||
JVM_GetClassMethodsCount;
|
||||
JVM_GetClassModifiers;
|
||||
JVM_GetClassName;
|
||||
JVM_GetClassNameUTF;
|
||||
JVM_GetClassSignature;
|
||||
JVM_GetClassSigners;
|
||||
JVM_GetClassTypeAnnotations;
|
||||
JVM_GetComponentType;
|
||||
JVM_GetDeclaredClasses;
|
||||
JVM_GetDeclaringClass;
|
||||
JVM_GetEnclosingMethodInfo;
|
||||
JVM_GetFieldAnnotations;
|
||||
JVM_GetFieldIxModifiers;
|
||||
JVM_GetFieldTypeAnnotations;
|
||||
JVM_GetHostName;
|
||||
JVM_GetInheritedAccessControlContext;
|
||||
JVM_GetInterfaceVersion;
|
||||
JVM_GetLastErrorString;
|
||||
JVM_GetManagement;
|
||||
JVM_GetMethodAnnotations;
|
||||
JVM_GetMethodDefaultAnnotationValue;
|
||||
JVM_GetMethodIxArgsSize;
|
||||
JVM_GetMethodIxByteCode;
|
||||
JVM_GetMethodIxByteCodeLength;
|
||||
JVM_GetMethodIxExceptionIndexes;
|
||||
JVM_GetMethodIxExceptionTableEntry;
|
||||
JVM_GetMethodIxExceptionTableLength;
|
||||
JVM_GetMethodIxExceptionsCount;
|
||||
JVM_GetMethodIxLocalsCount;
|
||||
JVM_GetMethodIxMaxStack;
|
||||
JVM_GetMethodIxModifiers;
|
||||
JVM_GetMethodIxNameUTF;
|
||||
JVM_GetMethodIxSignatureUTF;
|
||||
JVM_GetMethodParameterAnnotations;
|
||||
JVM_GetMethodParameters;
|
||||
JVM_GetMethodTypeAnnotations;
|
||||
JVM_GetPrimitiveArrayElement;
|
||||
JVM_GetProtectionDomain;
|
||||
JVM_GetSockName;
|
||||
JVM_GetSockOpt;
|
||||
JVM_GetStackAccessControlContext;
|
||||
JVM_GetStackTraceDepth;
|
||||
JVM_GetStackTraceElement;
|
||||
JVM_GetSystemPackage;
|
||||
JVM_GetSystemPackages;
|
||||
JVM_GetThreadStateNames;
|
||||
JVM_GetThreadStateValues;
|
||||
JVM_GetVersionInfo;
|
||||
JVM_Halt;
|
||||
JVM_HoldsLock;
|
||||
JVM_IHashCode;
|
||||
JVM_InitAgentProperties;
|
||||
JVM_InitProperties;
|
||||
JVM_InitializeCompiler;
|
||||
JVM_InitializeSocketLibrary;
|
||||
JVM_InternString;
|
||||
JVM_Interrupt;
|
||||
JVM_InvokeMethod;
|
||||
JVM_IsArrayClass;
|
||||
JVM_IsConstructorIx;
|
||||
JVM_IsInterface;
|
||||
JVM_IsInterrupted;
|
||||
JVM_IsNaN;
|
||||
JVM_IsPrimitiveClass;
|
||||
JVM_IsSameClassPackage;
|
||||
JVM_IsSilentCompiler;
|
||||
JVM_IsSupportedJNIVersion;
|
||||
JVM_IsThreadAlive;
|
||||
JVM_IsVMGeneratedMethodIx;
|
||||
JVM_LatestUserDefinedLoader;
|
||||
JVM_Listen;
|
||||
JVM_LoadClass0;
|
||||
JVM_LoadLibrary;
|
||||
JVM_Lseek;
|
||||
JVM_MaxObjectInspectionAge;
|
||||
JVM_MaxMemory;
|
||||
JVM_MonitorNotify;
|
||||
JVM_MonitorNotifyAll;
|
||||
JVM_MonitorWait;
|
||||
JVM_NanoTime;
|
||||
JVM_NativePath;
|
||||
JVM_NewArray;
|
||||
JVM_NewInstanceFromConstructor;
|
||||
JVM_NewMultiArray;
|
||||
JVM_OnExit;
|
||||
JVM_Open;
|
||||
JVM_RaiseSignal;
|
||||
JVM_RawMonitorCreate;
|
||||
JVM_RawMonitorDestroy;
|
||||
JVM_RawMonitorEnter;
|
||||
JVM_RawMonitorExit;
|
||||
JVM_Read;
|
||||
JVM_Recv;
|
||||
JVM_RecvFrom;
|
||||
JVM_RegisterSignal;
|
||||
JVM_ReleaseUTF;
|
||||
JVM_ResolveClass;
|
||||
JVM_ResumeThread;
|
||||
JVM_Send;
|
||||
JVM_SendTo;
|
||||
JVM_SetArrayElement;
|
||||
JVM_SetClassSigners;
|
||||
JVM_SetLength;
|
||||
JVM_SetPrimitiveArrayElement;
|
||||
JVM_SetProtectionDomain;
|
||||
JVM_SetSockOpt;
|
||||
JVM_SetThreadPriority;
|
||||
JVM_Sleep;
|
||||
JVM_Socket;
|
||||
JVM_SocketAvailable;
|
||||
JVM_SocketClose;
|
||||
JVM_SocketShutdown;
|
||||
JVM_StartThread;
|
||||
JVM_StopThread;
|
||||
JVM_SuspendThread;
|
||||
JVM_SupportsCX8;
|
||||
JVM_Sync;
|
||||
JVM_Timeout;
|
||||
JVM_TotalMemory;
|
||||
JVM_TraceInstructions;
|
||||
JVM_TraceMethodCalls;
|
||||
JVM_UnloadLibrary;
|
||||
JVM_Write;
|
||||
JVM_Yield;
|
||||
JVM_handle_bsd_signal;
|
||||
|
||||
# Old reflection routines
|
||||
# These do not need to be present in the product build in JDK 1.4
|
||||
# but their code has not been removed yet because there will not
|
||||
# be a substantial code savings until JVM_InvokeMethod and
|
||||
# JVM_NewInstanceFromConstructor can also be removed; see
|
||||
# reflectionCompat.hpp.
|
||||
JVM_GetClassConstructor;
|
||||
JVM_GetClassConstructors;
|
||||
JVM_GetClassField;
|
||||
JVM_GetClassFields;
|
||||
JVM_GetClassMethod;
|
||||
JVM_GetClassMethods;
|
||||
JVM_GetField;
|
||||
JVM_GetPrimitiveField;
|
||||
JVM_NewInstance;
|
||||
JVM_SetField;
|
||||
JVM_SetPrimitiveField;
|
||||
|
||||
# debug JVM
|
||||
JVM_AccessVMBooleanFlag;
|
||||
JVM_AccessVMIntFlag;
|
||||
JVM_VMBreakPoint;
|
||||
# debug _JVM
|
||||
_JVM_AccessVMBooleanFlag
|
||||
_JVM_AccessVMIntFlag
|
||||
_JVM_VMBreakPoint
|
||||
|
||||
# miscellaneous functions
|
||||
jio_fprintf;
|
||||
jio_printf;
|
||||
jio_snprintf;
|
||||
jio_vfprintf;
|
||||
jio_vsnprintf;
|
||||
fork1;
|
||||
numa_warn;
|
||||
numa_error;
|
||||
|
||||
# Needed because there is no JVM interface for this.
|
||||
sysThreadAvailableStackWithSlack;
|
||||
_jio_fprintf
|
||||
_jio_printf
|
||||
_jio_snprintf
|
||||
_jio_vfprintf
|
||||
_jio_vsnprintf
|
||||
|
||||
# This is for Forte Analyzer profiling support.
|
||||
AsyncGetCallTrace;
|
||||
_AsyncGetCallTrace
|
||||
|
||||
# INSERT VTABLE SYMBOLS HERE
|
||||
|
||||
local:
|
||||
*;
|
||||
};
|
||||
|
||||
|
@ -1,7 +1,3 @@
|
||||
#
|
||||
# @(#)mapfile-vers-product 1.19 08/02/12 10:56:37
|
||||
#
|
||||
|
||||
#
|
||||
# Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
@ -23,268 +19,239 @@
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
#
|
||||
# Only used for OSX/Darwin builds
|
||||
|
||||
# Define public interface.
|
||||
# _JNI
|
||||
_JNI_CreateJavaVM
|
||||
_JNI_GetCreatedJavaVMs
|
||||
_JNI_GetDefaultJavaVMInitArgs
|
||||
|
||||
SUNWprivate_1.1 {
|
||||
global:
|
||||
# JNI
|
||||
JNI_CreateJavaVM;
|
||||
JNI_GetCreatedJavaVMs;
|
||||
JNI_GetDefaultJavaVMInitArgs;
|
||||
|
||||
# JVM
|
||||
JVM_Accept;
|
||||
JVM_ActiveProcessorCount;
|
||||
JVM_AllocateNewArray;
|
||||
JVM_AllocateNewObject;
|
||||
JVM_ArrayCopy;
|
||||
JVM_AssertionStatusDirectives;
|
||||
JVM_Available;
|
||||
JVM_Bind;
|
||||
JVM_ClassDepth;
|
||||
JVM_ClassLoaderDepth;
|
||||
JVM_Clone;
|
||||
JVM_Close;
|
||||
JVM_CX8Field;
|
||||
JVM_CompileClass;
|
||||
JVM_CompileClasses;
|
||||
JVM_CompilerCommand;
|
||||
JVM_Connect;
|
||||
JVM_ConstantPoolGetClassAt;
|
||||
JVM_ConstantPoolGetClassAtIfLoaded;
|
||||
JVM_ConstantPoolGetDoubleAt;
|
||||
JVM_ConstantPoolGetFieldAt;
|
||||
JVM_ConstantPoolGetFieldAtIfLoaded;
|
||||
JVM_ConstantPoolGetFloatAt;
|
||||
JVM_ConstantPoolGetIntAt;
|
||||
JVM_ConstantPoolGetLongAt;
|
||||
JVM_ConstantPoolGetMethodAt;
|
||||
JVM_ConstantPoolGetMethodAtIfLoaded;
|
||||
JVM_ConstantPoolGetMemberRefInfoAt;
|
||||
JVM_ConstantPoolGetSize;
|
||||
JVM_ConstantPoolGetStringAt;
|
||||
JVM_ConstantPoolGetUTF8At;
|
||||
JVM_CountStackFrames;
|
||||
JVM_CurrentClassLoader;
|
||||
JVM_CurrentLoadedClass;
|
||||
JVM_CurrentThread;
|
||||
JVM_CurrentTimeMillis;
|
||||
JVM_DefineClass;
|
||||
JVM_DefineClassWithSource;
|
||||
JVM_DefineClassWithSourceCond;
|
||||
JVM_DesiredAssertionStatus;
|
||||
JVM_DisableCompiler;
|
||||
JVM_DoPrivileged;
|
||||
JVM_DTraceGetVersion;
|
||||
JVM_DTraceActivate;
|
||||
JVM_DTraceIsProbeEnabled;
|
||||
JVM_DTraceIsSupported;
|
||||
JVM_DTraceDispose;
|
||||
JVM_DumpAllStacks;
|
||||
JVM_DumpThreads;
|
||||
JVM_EnableCompiler;
|
||||
JVM_Exit;
|
||||
JVM_FillInStackTrace;
|
||||
JVM_FindClassFromClass;
|
||||
JVM_FindClassFromClassLoader;
|
||||
JVM_FindClassFromBootLoader;
|
||||
JVM_FindLibraryEntry;
|
||||
JVM_FindLoadedClass;
|
||||
JVM_FindPrimitiveClass;
|
||||
JVM_FindSignal;
|
||||
JVM_FreeMemory;
|
||||
JVM_GC;
|
||||
JVM_GetAllThreads;
|
||||
JVM_GetArrayElement;
|
||||
JVM_GetArrayLength;
|
||||
JVM_GetCPClassNameUTF;
|
||||
JVM_GetCPFieldClassNameUTF;
|
||||
JVM_GetCPFieldModifiers;
|
||||
JVM_GetCPFieldNameUTF;
|
||||
JVM_GetCPFieldSignatureUTF;
|
||||
JVM_GetCPMethodClassNameUTF;
|
||||
JVM_GetCPMethodModifiers;
|
||||
JVM_GetCPMethodNameUTF;
|
||||
JVM_GetCPMethodSignatureUTF;
|
||||
JVM_GetCallerClass;
|
||||
JVM_GetClassAccessFlags;
|
||||
JVM_GetClassAnnotations;
|
||||
JVM_GetClassCPEntriesCount;
|
||||
JVM_GetClassCPTypes;
|
||||
JVM_GetClassConstantPool;
|
||||
JVM_GetClassContext;
|
||||
JVM_GetClassDeclaredConstructors;
|
||||
JVM_GetClassDeclaredFields;
|
||||
JVM_GetClassDeclaredMethods;
|
||||
JVM_GetClassFieldsCount;
|
||||
JVM_GetClassInterfaces;
|
||||
JVM_GetClassLoader;
|
||||
JVM_GetClassMethodsCount;
|
||||
JVM_GetClassModifiers;
|
||||
JVM_GetClassName;
|
||||
JVM_GetClassNameUTF;
|
||||
JVM_GetClassSignature;
|
||||
JVM_GetClassSigners;
|
||||
JVM_GetClassTypeAnnotations;
|
||||
JVM_GetComponentType;
|
||||
JVM_GetDeclaredClasses;
|
||||
JVM_GetDeclaringClass;
|
||||
JVM_GetEnclosingMethodInfo;
|
||||
JVM_GetFieldAnnotations;
|
||||
JVM_GetFieldIxModifiers;
|
||||
JVM_GetFieldTypeAnnotations;
|
||||
JVM_GetHostName;
|
||||
JVM_GetInheritedAccessControlContext;
|
||||
JVM_GetInterfaceVersion;
|
||||
JVM_GetLastErrorString;
|
||||
JVM_GetManagement;
|
||||
JVM_GetMethodAnnotations;
|
||||
JVM_GetMethodDefaultAnnotationValue;
|
||||
JVM_GetMethodIxArgsSize;
|
||||
JVM_GetMethodIxByteCode;
|
||||
JVM_GetMethodIxByteCodeLength;
|
||||
JVM_GetMethodIxExceptionIndexes;
|
||||
JVM_GetMethodIxExceptionTableEntry;
|
||||
JVM_GetMethodIxExceptionTableLength;
|
||||
JVM_GetMethodIxExceptionsCount;
|
||||
JVM_GetMethodIxLocalsCount;
|
||||
JVM_GetMethodIxMaxStack;
|
||||
JVM_GetMethodIxModifiers;
|
||||
JVM_GetMethodIxNameUTF;
|
||||
JVM_GetMethodIxSignatureUTF;
|
||||
JVM_GetMethodParameterAnnotations;
|
||||
JVM_GetMethodParameters;
|
||||
JVM_GetMethodTypeAnnotations;
|
||||
JVM_GetPrimitiveArrayElement;
|
||||
JVM_GetProtectionDomain;
|
||||
JVM_GetSockName;
|
||||
JVM_GetSockOpt;
|
||||
JVM_GetStackAccessControlContext;
|
||||
JVM_GetStackTraceDepth;
|
||||
JVM_GetStackTraceElement;
|
||||
JVM_GetSystemPackage;
|
||||
JVM_GetSystemPackages;
|
||||
JVM_GetThreadStateNames;
|
||||
JVM_GetThreadStateValues;
|
||||
JVM_GetVersionInfo;
|
||||
JVM_Halt;
|
||||
JVM_HoldsLock;
|
||||
JVM_IHashCode;
|
||||
JVM_InitAgentProperties;
|
||||
JVM_InitProperties;
|
||||
JVM_InitializeCompiler;
|
||||
JVM_InitializeSocketLibrary;
|
||||
JVM_InternString;
|
||||
JVM_Interrupt;
|
||||
JVM_InvokeMethod;
|
||||
JVM_IsArrayClass;
|
||||
JVM_IsConstructorIx;
|
||||
JVM_IsInterface;
|
||||
JVM_IsInterrupted;
|
||||
JVM_IsNaN;
|
||||
JVM_IsPrimitiveClass;
|
||||
JVM_IsSameClassPackage;
|
||||
JVM_IsSilentCompiler;
|
||||
JVM_IsSupportedJNIVersion;
|
||||
JVM_IsThreadAlive;
|
||||
JVM_IsVMGeneratedMethodIx;
|
||||
JVM_LatestUserDefinedLoader;
|
||||
JVM_Listen;
|
||||
JVM_LoadClass0;
|
||||
JVM_LoadLibrary;
|
||||
JVM_Lseek;
|
||||
JVM_MaxObjectInspectionAge;
|
||||
JVM_MaxMemory;
|
||||
JVM_MonitorNotify;
|
||||
JVM_MonitorNotifyAll;
|
||||
JVM_MonitorWait;
|
||||
JVM_NanoTime;
|
||||
JVM_NativePath;
|
||||
JVM_NewArray;
|
||||
JVM_NewInstanceFromConstructor;
|
||||
JVM_NewMultiArray;
|
||||
JVM_OnExit;
|
||||
JVM_Open;
|
||||
JVM_RaiseSignal;
|
||||
JVM_RawMonitorCreate;
|
||||
JVM_RawMonitorDestroy;
|
||||
JVM_RawMonitorEnter;
|
||||
JVM_RawMonitorExit;
|
||||
JVM_Read;
|
||||
JVM_Recv;
|
||||
JVM_RecvFrom;
|
||||
JVM_RegisterSignal;
|
||||
JVM_ReleaseUTF;
|
||||
JVM_ResolveClass;
|
||||
JVM_ResumeThread;
|
||||
JVM_Send;
|
||||
JVM_SendTo;
|
||||
JVM_SetArrayElement;
|
||||
JVM_SetClassSigners;
|
||||
JVM_SetLength;
|
||||
JVM_SetPrimitiveArrayElement;
|
||||
JVM_SetProtectionDomain;
|
||||
JVM_SetSockOpt;
|
||||
JVM_SetThreadPriority;
|
||||
JVM_Sleep;
|
||||
JVM_Socket;
|
||||
JVM_SocketAvailable;
|
||||
JVM_SocketClose;
|
||||
JVM_SocketShutdown;
|
||||
JVM_StartThread;
|
||||
JVM_StopThread;
|
||||
JVM_SuspendThread;
|
||||
JVM_SupportsCX8;
|
||||
JVM_Sync;
|
||||
JVM_Timeout;
|
||||
JVM_TotalMemory;
|
||||
JVM_TraceInstructions;
|
||||
JVM_TraceMethodCalls;
|
||||
JVM_UnloadLibrary;
|
||||
JVM_Write;
|
||||
JVM_Yield;
|
||||
JVM_handle_bsd_signal;
|
||||
|
||||
# Old reflection routines
|
||||
# These do not need to be present in the product build in JDK 1.4
|
||||
# but their code has not been removed yet because there will not
|
||||
# be a substantial code savings until JVM_InvokeMethod and
|
||||
# JVM_NewInstanceFromConstructor can also be removed; see
|
||||
# reflectionCompat.hpp.
|
||||
JVM_GetClassConstructor;
|
||||
JVM_GetClassConstructors;
|
||||
JVM_GetClassField;
|
||||
JVM_GetClassFields;
|
||||
JVM_GetClassMethod;
|
||||
JVM_GetClassMethods;
|
||||
JVM_GetField;
|
||||
JVM_GetPrimitiveField;
|
||||
JVM_NewInstance;
|
||||
JVM_SetField;
|
||||
JVM_SetPrimitiveField;
|
||||
# _JVM
|
||||
_JVM_Accept
|
||||
_JVM_ActiveProcessorCount
|
||||
_JVM_AllocateNewArray
|
||||
_JVM_AllocateNewObject
|
||||
_JVM_ArrayCopy
|
||||
_JVM_AssertionStatusDirectives
|
||||
_JVM_Available
|
||||
_JVM_Bind
|
||||
_JVM_ClassDepth
|
||||
_JVM_ClassLoaderDepth
|
||||
_JVM_Clone
|
||||
_JVM_Close
|
||||
_JVM_CX8Field
|
||||
_JVM_CompileClass
|
||||
_JVM_CompileClasses
|
||||
_JVM_CompilerCommand
|
||||
_JVM_Connect
|
||||
_JVM_ConstantPoolGetClassAt
|
||||
_JVM_ConstantPoolGetClassAtIfLoaded
|
||||
_JVM_ConstantPoolGetDoubleAt
|
||||
_JVM_ConstantPoolGetFieldAt
|
||||
_JVM_ConstantPoolGetFieldAtIfLoaded
|
||||
_JVM_ConstantPoolGetFloatAt
|
||||
_JVM_ConstantPoolGetIntAt
|
||||
_JVM_ConstantPoolGetLongAt
|
||||
_JVM_ConstantPoolGetMethodAt
|
||||
_JVM_ConstantPoolGetMethodAtIfLoaded
|
||||
_JVM_ConstantPoolGetMemberRefInfoAt
|
||||
_JVM_ConstantPoolGetSize
|
||||
_JVM_ConstantPoolGetStringAt
|
||||
_JVM_ConstantPoolGetUTF8At
|
||||
_JVM_CountStackFrames
|
||||
_JVM_CurrentClassLoader
|
||||
_JVM_CurrentLoadedClass
|
||||
_JVM_CurrentThread
|
||||
_JVM_CurrentTimeMillis
|
||||
_JVM_DefineClass
|
||||
_JVM_DefineClassWithSource
|
||||
_JVM_DefineClassWithSourceCond
|
||||
_JVM_DesiredAssertionStatus
|
||||
_JVM_DisableCompiler
|
||||
_JVM_DoPrivileged
|
||||
_JVM_DTraceGetVersion
|
||||
_JVM_DTraceActivate
|
||||
_JVM_DTraceIsProbeEnabled
|
||||
_JVM_DTraceIsSupported
|
||||
_JVM_DTraceDispose
|
||||
_JVM_DumpAllStacks
|
||||
_JVM_DumpThreads
|
||||
_JVM_EnableCompiler
|
||||
_JVM_Exit
|
||||
_JVM_FillInStackTrace
|
||||
_JVM_FindClassFromClass
|
||||
_JVM_FindClassFromClassLoader
|
||||
_JVM_FindClassFromBootLoader
|
||||
_JVM_FindLibraryEntry
|
||||
_JVM_FindLoadedClass
|
||||
_JVM_FindPrimitiveClass
|
||||
_JVM_FindSignal
|
||||
_JVM_FreeMemory
|
||||
_JVM_GC
|
||||
_JVM_GetAllThreads
|
||||
_JVM_GetArrayElement
|
||||
_JVM_GetArrayLength
|
||||
_JVM_GetCPClassNameUTF
|
||||
_JVM_GetCPFieldClassNameUTF
|
||||
_JVM_GetCPFieldModifiers
|
||||
_JVM_GetCPFieldNameUTF
|
||||
_JVM_GetCPFieldSignatureUTF
|
||||
_JVM_GetCPMethodClassNameUTF
|
||||
_JVM_GetCPMethodModifiers
|
||||
_JVM_GetCPMethodNameUTF
|
||||
_JVM_GetCPMethodSignatureUTF
|
||||
_JVM_GetCallerClass
|
||||
_JVM_GetClassAccessFlags
|
||||
_JVM_GetClassAnnotations
|
||||
_JVM_GetClassCPEntriesCount
|
||||
_JVM_GetClassCPTypes
|
||||
_JVM_GetClassConstantPool
|
||||
_JVM_GetClassContext
|
||||
_JVM_GetClassDeclaredConstructors
|
||||
_JVM_GetClassDeclaredFields
|
||||
_JVM_GetClassDeclaredMethods
|
||||
_JVM_GetClassFieldsCount
|
||||
_JVM_GetClassInterfaces
|
||||
_JVM_GetClassLoader
|
||||
_JVM_GetClassMethodsCount
|
||||
_JVM_GetClassModifiers
|
||||
_JVM_GetClassName
|
||||
_JVM_GetClassNameUTF
|
||||
_JVM_GetClassSignature
|
||||
_JVM_GetClassSigners
|
||||
_JVM_GetClassTypeAnnotations
|
||||
_JVM_GetComponentType
|
||||
_JVM_GetDeclaredClasses
|
||||
_JVM_GetDeclaringClass
|
||||
_JVM_GetEnclosingMethodInfo
|
||||
_JVM_GetFieldAnnotations
|
||||
_JVM_GetFieldIxModifiers
|
||||
_JVM_GetFieldTypeAnnotations
|
||||
_JVM_GetHostName
|
||||
_JVM_GetInheritedAccessControlContext
|
||||
_JVM_GetInterfaceVersion
|
||||
_JVM_GetLastErrorString
|
||||
_JVM_GetManagement
|
||||
_JVM_GetMethodAnnotations
|
||||
_JVM_GetMethodDefaultAnnotationValue
|
||||
_JVM_GetMethodIxArgsSize
|
||||
_JVM_GetMethodIxByteCode
|
||||
_JVM_GetMethodIxByteCodeLength
|
||||
_JVM_GetMethodIxExceptionIndexes
|
||||
_JVM_GetMethodIxExceptionTableEntry
|
||||
_JVM_GetMethodIxExceptionTableLength
|
||||
_JVM_GetMethodIxExceptionsCount
|
||||
_JVM_GetMethodIxLocalsCount
|
||||
_JVM_GetMethodIxMaxStack
|
||||
_JVM_GetMethodIxModifiers
|
||||
_JVM_GetMethodIxNameUTF
|
||||
_JVM_GetMethodIxSignatureUTF
|
||||
_JVM_GetMethodParameterAnnotations
|
||||
_JVM_GetMethodParameters
|
||||
_JVM_GetMethodTypeAnnotations
|
||||
_JVM_GetPrimitiveArrayElement
|
||||
_JVM_GetProtectionDomain
|
||||
_JVM_GetSockName
|
||||
_JVM_GetSockOpt
|
||||
_JVM_GetStackAccessControlContext
|
||||
_JVM_GetStackTraceDepth
|
||||
_JVM_GetStackTraceElement
|
||||
_JVM_GetSystemPackage
|
||||
_JVM_GetSystemPackages
|
||||
_JVM_GetThreadStateNames
|
||||
_JVM_GetThreadStateValues
|
||||
_JVM_GetVersionInfo
|
||||
_JVM_Halt
|
||||
_JVM_HoldsLock
|
||||
_JVM_IHashCode
|
||||
_JVM_InitAgentProperties
|
||||
_JVM_InitProperties
|
||||
_JVM_InitializeCompiler
|
||||
_JVM_InitializeSocketLibrary
|
||||
_JVM_InternString
|
||||
_JVM_Interrupt
|
||||
_JVM_InvokeMethod
|
||||
_JVM_IsArrayClass
|
||||
_JVM_IsConstructorIx
|
||||
_JVM_IsInterface
|
||||
_JVM_IsInterrupted
|
||||
_JVM_IsNaN
|
||||
_JVM_IsPrimitiveClass
|
||||
_JVM_IsSameClassPackage
|
||||
_JVM_IsSilentCompiler
|
||||
_JVM_IsSupportedJNIVersion
|
||||
_JVM_IsThreadAlive
|
||||
_JVM_IsVMGeneratedMethodIx
|
||||
_JVM_LatestUserDefinedLoader
|
||||
_JVM_Listen
|
||||
_JVM_LoadClass0
|
||||
_JVM_LoadLibrary
|
||||
_JVM_Lseek
|
||||
_JVM_MaxObjectInspectionAge
|
||||
_JVM_MaxMemory
|
||||
_JVM_MonitorNotify
|
||||
_JVM_MonitorNotifyAll
|
||||
_JVM_MonitorWait
|
||||
_JVM_NanoTime
|
||||
_JVM_NativePath
|
||||
_JVM_NewArray
|
||||
_JVM_NewInstanceFromConstructor
|
||||
_JVM_NewMultiArray
|
||||
_JVM_OnExit
|
||||
_JVM_Open
|
||||
_JVM_RaiseSignal
|
||||
_JVM_RawMonitorCreate
|
||||
_JVM_RawMonitorDestroy
|
||||
_JVM_RawMonitorEnter
|
||||
_JVM_RawMonitorExit
|
||||
_JVM_Read
|
||||
_JVM_Recv
|
||||
_JVM_RecvFrom
|
||||
_JVM_RegisterSignal
|
||||
_JVM_ReleaseUTF
|
||||
_JVM_ResolveClass
|
||||
_JVM_ResumeThread
|
||||
_JVM_Send
|
||||
_JVM_SendTo
|
||||
_JVM_SetArrayElement
|
||||
_JVM_SetClassSigners
|
||||
_JVM_SetLength
|
||||
_JVM_SetNativeThreadName
|
||||
_JVM_SetPrimitiveArrayElement
|
||||
_JVM_SetProtectionDomain
|
||||
_JVM_SetSockOpt
|
||||
_JVM_SetThreadPriority
|
||||
_JVM_Sleep
|
||||
_JVM_Socket
|
||||
_JVM_SocketAvailable
|
||||
_JVM_SocketClose
|
||||
_JVM_SocketShutdown
|
||||
_JVM_StartThread
|
||||
_JVM_StopThread
|
||||
_JVM_SuspendThread
|
||||
_JVM_SupportsCX8
|
||||
_JVM_Sync
|
||||
_JVM_Timeout
|
||||
_JVM_TotalMemory
|
||||
_JVM_TraceInstructions
|
||||
_JVM_TraceMethodCalls
|
||||
_JVM_UnloadLibrary
|
||||
_JVM_Write
|
||||
_JVM_Yield
|
||||
_JVM_handle_bsd_signal
|
||||
|
||||
# miscellaneous functions
|
||||
jio_fprintf;
|
||||
jio_printf;
|
||||
jio_snprintf;
|
||||
jio_vfprintf;
|
||||
jio_vsnprintf;
|
||||
fork1;
|
||||
numa_warn;
|
||||
numa_error;
|
||||
|
||||
# Needed because there is no JVM interface for this.
|
||||
sysThreadAvailableStackWithSlack;
|
||||
_jio_fprintf
|
||||
_jio_printf
|
||||
_jio_snprintf
|
||||
_jio_vfprintf
|
||||
_jio_vsnprintf
|
||||
|
||||
# This is for Forte Analyzer profiling support.
|
||||
AsyncGetCallTrace;
|
||||
_AsyncGetCallTrace
|
||||
|
||||
# INSERT VTABLE SYMBOLS HERE
|
||||
|
||||
local:
|
||||
*;
|
||||
};
|
||||
# INSERT VTABLE SYMBOLS HERE
|
||||
|
||||
|
@ -112,3 +112,5 @@ ifeq ($(INCLUDE_NMT), false)
|
||||
endif
|
||||
|
||||
-include $(HS_ALT_MAKE)/excludeSrc.make
|
||||
|
||||
.PHONY: $(HS_ALT_MAKE)/excludeSrc.make
|
||||
|
@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2013
|
||||
|
||||
HS_MAJOR_VER=25
|
||||
HS_MINOR_VER=0
|
||||
HS_BUILD_NUMBER=38
|
||||
HS_BUILD_NUMBER=40
|
||||
|
||||
JDK_MAJOR_VER=1
|
||||
JDK_MINOR_VER=8
|
||||
|
@ -350,9 +350,9 @@ else
|
||||
ifeq ($(DEBUG_CFLAGS/$(BUILDARCH)),)
|
||||
ifeq ($(USE_CLANG), true)
|
||||
# Clang doesn't understand -gstabs
|
||||
OPT_CFLAGS += -g
|
||||
DEBUG_CFLAGS += -g
|
||||
else
|
||||
OPT_CFLAGS += -gstabs
|
||||
DEBUG_CFLAGS += -gstabs
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -365,9 +365,9 @@ else
|
||||
ifeq ($(FASTDEBUG_CFLAGS/$(BUILDARCH)),)
|
||||
ifeq ($(USE_CLANG), true)
|
||||
# Clang doesn't understand -gstabs
|
||||
OPT_CFLAGS += -g
|
||||
FASTDEBUG_CFLAGS += -g
|
||||
else
|
||||
OPT_CFLAGS += -gstabs
|
||||
FASTDEBUG_CFLAGS += -gstabs
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -107,6 +107,10 @@ CXXFLAGS/BYFILE = $(CXXFLAGS/$@)
|
||||
# File specific flags
|
||||
CXXFLAGS += $(CXXFLAGS/BYFILE)
|
||||
|
||||
# Large File Support
|
||||
ifneq ($(LP64), 1)
|
||||
CXXFLAGS/ostream.o += -D_FILE_OFFSET_BITS=64
|
||||
endif # ifneq ($(LP64), 1)
|
||||
|
||||
# CFLAGS_WARN holds compiler options to suppress/enable warnings.
|
||||
CFLAGS += $(CFLAGS_WARN/BYFILE)
|
||||
|
@ -95,6 +95,10 @@ CXXFLAGS/BYFILE = $(CXXFLAGS/$@)
|
||||
# File specific flags
|
||||
CXXFLAGS += $(CXXFLAGS/BYFILE)
|
||||
|
||||
# Large File Support
|
||||
ifneq ($(LP64), 1)
|
||||
CXXFLAGS/ostream.o += -D_FILE_OFFSET_BITS=64
|
||||
endif # ifneq ($(LP64), 1)
|
||||
|
||||
# CFLAGS_WARN holds compiler options to suppress/enable warnings.
|
||||
CFLAGS += $(CFLAGS_WARN)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -2946,6 +2946,9 @@ void LIR_Assembler::monitor_address(int monitor_no, LIR_Opr dst_opr) {
|
||||
}
|
||||
}
|
||||
|
||||
void LIR_Assembler::emit_updatecrc32(LIR_OpUpdateCRC32* op) {
|
||||
fatal("CRC32 intrinsic is not implemented on this platform");
|
||||
}
|
||||
|
||||
void LIR_Assembler::emit_lock(LIR_OpLock* op) {
|
||||
Register obj = op->obj_opr()->as_register();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -784,6 +784,10 @@ void LIRGenerator::do_ArrayCopy(Intrinsic* x) {
|
||||
set_no_result(x);
|
||||
}
|
||||
|
||||
void LIRGenerator::do_update_CRC32(Intrinsic* x) {
|
||||
fatal("CRC32 intrinsic is not implemented on this platform");
|
||||
}
|
||||
|
||||
// _i2l, _i2f, _i2d, _l2i, _l2f, _l2d, _f2i, _f2l, _f2d, _d2i, _d2l, _d2f
|
||||
// _i2b, _i2c, _i2s
|
||||
void LIRGenerator::do_Convert(Convert* x) {
|
||||
|
@ -49,8 +49,9 @@ define_pd_global(intx, FreqInlineSize, 325 );
|
||||
define_pd_global(bool, ResizeTLAB, true );
|
||||
define_pd_global(intx, ReservedCodeCacheSize, 32*M );
|
||||
define_pd_global(intx, CodeCacheExpansionSize, 32*K );
|
||||
define_pd_global(uintx,CodeCacheMinBlockLength, 1);
|
||||
define_pd_global(uintx,MetaspaceSize, 12*M );
|
||||
define_pd_global(uintx, CodeCacheMinBlockLength, 1);
|
||||
define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K);
|
||||
define_pd_global(uintx, MetaspaceSize, 12*M );
|
||||
define_pd_global(bool, NeverActAsServerClassMachine, true );
|
||||
define_pd_global(intx, NewSizeThreadIncrease, 16*K );
|
||||
define_pd_global(uint64_t,MaxRAM, 1ULL*G);
|
||||
|
@ -86,7 +86,8 @@ define_pd_global(intx, CodeCacheExpansionSize, 32*K);
|
||||
// Ergonomics related flags
|
||||
define_pd_global(uint64_t,MaxRAM, 4ULL*G);
|
||||
#endif
|
||||
define_pd_global(uintx,CodeCacheMinBlockLength, 4);
|
||||
define_pd_global(uintx, CodeCacheMinBlockLength, 4);
|
||||
define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K);
|
||||
|
||||
// Heap related flags
|
||||
define_pd_global(uintx,MetaspaceSize, ScaleForWordSize(16*M));
|
||||
|
@ -257,11 +257,6 @@ bool frame::safe_for_sender(JavaThread *thread) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Could be a zombie method
|
||||
if (sender_blob->is_zombie() || sender_blob->is_unloaded()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// It should be safe to construct the sender though it might not be valid
|
||||
|
||||
frame sender(_SENDER_SP, younger_sp, adjusted_stack);
|
||||
@ -680,7 +675,7 @@ bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
|
||||
|
||||
// validate ConstantPoolCache*
|
||||
ConstantPoolCache* cp = *interpreter_frame_cache_addr();
|
||||
if (cp == NULL || !cp->is_metadata()) return false;
|
||||
if (cp == NULL || !cp->is_metaspace_object()) return false;
|
||||
|
||||
// validate locals
|
||||
|
||||
|
@ -1161,12 +1161,6 @@ void MacroAssembler::align(int modulus) {
|
||||
while (offset() % modulus != 0) nop();
|
||||
}
|
||||
|
||||
|
||||
void MacroAssembler::safepoint() {
|
||||
relocate(breakpoint_Relocation::spec(breakpoint_Relocation::safepoint));
|
||||
}
|
||||
|
||||
|
||||
void RegistersForDebugging::print(outputStream* s) {
|
||||
FlagSetting fs(Debugging, true);
|
||||
int j;
|
||||
|
@ -193,36 +193,6 @@ address Relocation::pd_get_address_from_code() {
|
||||
return *(address*)addr();
|
||||
}
|
||||
|
||||
|
||||
int Relocation::pd_breakpoint_size() {
|
||||
// minimum breakpoint size, in short words
|
||||
return NativeIllegalInstruction::instruction_size / sizeof(short);
|
||||
}
|
||||
|
||||
void Relocation::pd_swap_in_breakpoint(address x, short* instrs, int instrlen) {
|
||||
Untested("pd_swap_in_breakpoint");
|
||||
// %%% probably do not need a general instrlen; just use the trap size
|
||||
if (instrs != NULL) {
|
||||
assert(instrlen * sizeof(short) == NativeIllegalInstruction::instruction_size, "enough instrlen in reloc. data");
|
||||
for (int i = 0; i < instrlen; i++) {
|
||||
instrs[i] = ((short*)x)[i];
|
||||
}
|
||||
}
|
||||
NativeIllegalInstruction::insert(x);
|
||||
}
|
||||
|
||||
|
||||
void Relocation::pd_swap_out_breakpoint(address x, short* instrs, int instrlen) {
|
||||
Untested("pd_swap_out_breakpoint");
|
||||
assert(instrlen * sizeof(short) == sizeof(int), "enough buf");
|
||||
union { int l; short s[1]; } u;
|
||||
for (int i = 0; i < instrlen; i++) {
|
||||
u.s[i] = instrs[i];
|
||||
}
|
||||
NativeInstruction* ni = nativeInstruction_at(x);
|
||||
ni->set_long_at(0, u.l);
|
||||
}
|
||||
|
||||
void poll_Relocation::fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest) {
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -1673,6 +1673,11 @@ void Assembler::movdqa(XMMRegister dst, XMMRegister src) {
|
||||
emit_simd_arith_nonds(0x6F, dst, src, VEX_SIMD_66);
|
||||
}
|
||||
|
||||
void Assembler::movdqa(XMMRegister dst, Address src) {
|
||||
NOT_LP64(assert(VM_Version::supports_sse2(), ""));
|
||||
emit_simd_arith_nonds(0x6F, dst, src, VEX_SIMD_66);
|
||||
}
|
||||
|
||||
void Assembler::movdqu(XMMRegister dst, Address src) {
|
||||
NOT_LP64(assert(VM_Version::supports_sse2(), ""));
|
||||
emit_simd_arith_nonds(0x6F, dst, src, VEX_SIMD_F3);
|
||||
@ -2286,6 +2291,38 @@ void Assembler::pcmpestri(XMMRegister dst, XMMRegister src, int imm8) {
|
||||
emit_int8(imm8);
|
||||
}
|
||||
|
||||
void Assembler::pextrd(Register dst, XMMRegister src, int imm8) {
|
||||
assert(VM_Version::supports_sse4_1(), "");
|
||||
int encode = simd_prefix_and_encode(as_XMMRegister(dst->encoding()), xnoreg, src, VEX_SIMD_66, VEX_OPCODE_0F_3A, false);
|
||||
emit_int8(0x16);
|
||||
emit_int8((unsigned char)(0xC0 | encode));
|
||||
emit_int8(imm8);
|
||||
}
|
||||
|
||||
void Assembler::pextrq(Register dst, XMMRegister src, int imm8) {
|
||||
assert(VM_Version::supports_sse4_1(), "");
|
||||
int encode = simd_prefix_and_encode(as_XMMRegister(dst->encoding()), xnoreg, src, VEX_SIMD_66, VEX_OPCODE_0F_3A, true);
|
||||
emit_int8(0x16);
|
||||
emit_int8((unsigned char)(0xC0 | encode));
|
||||
emit_int8(imm8);
|
||||
}
|
||||
|
||||
void Assembler::pinsrd(XMMRegister dst, Register src, int imm8) {
|
||||
assert(VM_Version::supports_sse4_1(), "");
|
||||
int encode = simd_prefix_and_encode(dst, dst, as_XMMRegister(src->encoding()), VEX_SIMD_66, VEX_OPCODE_0F_3A, false);
|
||||
emit_int8(0x22);
|
||||
emit_int8((unsigned char)(0xC0 | encode));
|
||||
emit_int8(imm8);
|
||||
}
|
||||
|
||||
void Assembler::pinsrq(XMMRegister dst, Register src, int imm8) {
|
||||
assert(VM_Version::supports_sse4_1(), "");
|
||||
int encode = simd_prefix_and_encode(dst, dst, as_XMMRegister(src->encoding()), VEX_SIMD_66, VEX_OPCODE_0F_3A, true);
|
||||
emit_int8(0x22);
|
||||
emit_int8((unsigned char)(0xC0 | encode));
|
||||
emit_int8(imm8);
|
||||
}
|
||||
|
||||
void Assembler::pmovzxbw(XMMRegister dst, Address src) {
|
||||
assert(VM_Version::supports_sse4_1(), "");
|
||||
InstructionMark im(this);
|
||||
@ -3691,6 +3728,16 @@ void Assembler::vpbroadcastd(XMMRegister dst, XMMRegister src) {
|
||||
emit_int8((unsigned char)(0xC0 | encode));
|
||||
}
|
||||
|
||||
// Carry-Less Multiplication Quadword
|
||||
void Assembler::vpclmulqdq(XMMRegister dst, XMMRegister nds, XMMRegister src, int mask) {
|
||||
assert(VM_Version::supports_avx() && VM_Version::supports_clmul(), "");
|
||||
bool vector256 = false;
|
||||
int encode = vex_prefix_and_encode(dst, nds, src, VEX_SIMD_66, vector256, VEX_OPCODE_0F_3A);
|
||||
emit_int8(0x44);
|
||||
emit_int8((unsigned char)(0xC0 | encode));
|
||||
emit_int8((unsigned char)mask);
|
||||
}
|
||||
|
||||
void Assembler::vzeroupper() {
|
||||
assert(VM_Version::supports_avx(), "");
|
||||
(void)vex_prefix_and_encode(xmm0, xmm0, xmm0, VEX_SIMD_NONE);
|
||||
|
@ -1266,6 +1266,7 @@ private:
|
||||
|
||||
// Move Aligned Double Quadword
|
||||
void movdqa(XMMRegister dst, XMMRegister src);
|
||||
void movdqa(XMMRegister dst, Address src);
|
||||
|
||||
// Move Unaligned Double Quadword
|
||||
void movdqu(Address dst, XMMRegister src);
|
||||
@ -1404,6 +1405,14 @@ private:
|
||||
void pcmpestri(XMMRegister xmm1, XMMRegister xmm2, int imm8);
|
||||
void pcmpestri(XMMRegister xmm1, Address src, int imm8);
|
||||
|
||||
// SSE 4.1 extract
|
||||
void pextrd(Register dst, XMMRegister src, int imm8);
|
||||
void pextrq(Register dst, XMMRegister src, int imm8);
|
||||
|
||||
// SSE 4.1 insert
|
||||
void pinsrd(XMMRegister dst, Register src, int imm8);
|
||||
void pinsrq(XMMRegister dst, Register src, int imm8);
|
||||
|
||||
// SSE4.1 packed move
|
||||
void pmovzxbw(XMMRegister dst, XMMRegister src);
|
||||
void pmovzxbw(XMMRegister dst, Address src);
|
||||
@ -1764,6 +1773,9 @@ private:
|
||||
// duplicate 4-bytes integer data from src into 8 locations in dest
|
||||
void vpbroadcastd(XMMRegister dst, XMMRegister src);
|
||||
|
||||
// Carry-Less Multiplication Quadword
|
||||
void vpclmulqdq(XMMRegister dst, XMMRegister nds, XMMRegister src, int mask);
|
||||
|
||||
// AVX instruction which is used to clear upper 128 bits of YMM registers and
|
||||
// to avoid transaction penalty between AVX and SSE states. There is no
|
||||
// penalty if legacy SSE instructions are encoded using VEX prefix because
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -3512,6 +3512,22 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
|
||||
__ bind(*stub->continuation());
|
||||
}
|
||||
|
||||
void LIR_Assembler::emit_updatecrc32(LIR_OpUpdateCRC32* op) {
|
||||
assert(op->crc()->is_single_cpu(), "crc must be register");
|
||||
assert(op->val()->is_single_cpu(), "byte value must be register");
|
||||
assert(op->result_opr()->is_single_cpu(), "result must be register");
|
||||
Register crc = op->crc()->as_register();
|
||||
Register val = op->val()->as_register();
|
||||
Register res = op->result_opr()->as_register();
|
||||
|
||||
assert_different_registers(val, crc, res);
|
||||
|
||||
__ lea(res, ExternalAddress(StubRoutines::crc_table_addr()));
|
||||
__ notl(crc); // ~crc
|
||||
__ update_byte_crc32(crc, val, res);
|
||||
__ notl(crc); // ~crc
|
||||
__ mov(res, crc);
|
||||
}
|
||||
|
||||
void LIR_Assembler::emit_lock(LIR_OpLock* op) {
|
||||
Register obj = op->obj_opr()->as_register(); // may not be an oop
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -932,6 +932,81 @@ void LIRGenerator::do_ArrayCopy(Intrinsic* x) {
|
||||
__ arraycopy(src.result(), src_pos.result(), dst.result(), dst_pos.result(), length.result(), tmp, expected_type, flags, info); // does add_safepoint
|
||||
}
|
||||
|
||||
void LIRGenerator::do_update_CRC32(Intrinsic* x) {
|
||||
assert(UseCRC32Intrinsics, "need AVX and LCMUL instructions support");
|
||||
// Make all state_for calls early since they can emit code
|
||||
LIR_Opr result = rlock_result(x);
|
||||
int flags = 0;
|
||||
switch (x->id()) {
|
||||
case vmIntrinsics::_updateCRC32: {
|
||||
LIRItem crc(x->argument_at(0), this);
|
||||
LIRItem val(x->argument_at(1), this);
|
||||
crc.load_item();
|
||||
val.load_item();
|
||||
__ update_crc32(crc.result(), val.result(), result);
|
||||
break;
|
||||
}
|
||||
case vmIntrinsics::_updateBytesCRC32:
|
||||
case vmIntrinsics::_updateByteBufferCRC32: {
|
||||
bool is_updateBytes = (x->id() == vmIntrinsics::_updateBytesCRC32);
|
||||
|
||||
LIRItem crc(x->argument_at(0), this);
|
||||
LIRItem buf(x->argument_at(1), this);
|
||||
LIRItem off(x->argument_at(2), this);
|
||||
LIRItem len(x->argument_at(3), this);
|
||||
buf.load_item();
|
||||
off.load_nonconstant();
|
||||
|
||||
LIR_Opr index = off.result();
|
||||
int offset = is_updateBytes ? arrayOopDesc::base_offset_in_bytes(T_BYTE) : 0;
|
||||
if(off.result()->is_constant()) {
|
||||
index = LIR_OprFact::illegalOpr;
|
||||
offset += off.result()->as_jint();
|
||||
}
|
||||
LIR_Opr base_op = buf.result();
|
||||
|
||||
#ifndef _LP64
|
||||
if (!is_updateBytes) { // long b raw address
|
||||
base_op = new_register(T_INT);
|
||||
__ convert(Bytecodes::_l2i, buf.result(), base_op);
|
||||
}
|
||||
#else
|
||||
if (index->is_valid()) {
|
||||
LIR_Opr tmp = new_register(T_LONG);
|
||||
__ convert(Bytecodes::_i2l, index, tmp);
|
||||
index = tmp;
|
||||
}
|
||||
#endif
|
||||
|
||||
LIR_Address* a = new LIR_Address(base_op,
|
||||
index,
|
||||
LIR_Address::times_1,
|
||||
offset,
|
||||
T_BYTE);
|
||||
BasicTypeList signature(3);
|
||||
signature.append(T_INT);
|
||||
signature.append(T_ADDRESS);
|
||||
signature.append(T_INT);
|
||||
CallingConvention* cc = frame_map()->c_calling_convention(&signature);
|
||||
const LIR_Opr result_reg = result_register_for(x->type());
|
||||
|
||||
LIR_Opr addr = new_pointer_register();
|
||||
__ leal(LIR_OprFact::address(a), addr);
|
||||
|
||||
crc.load_item_force(cc->at(0));
|
||||
__ move(addr, cc->at(1));
|
||||
len.load_item_force(cc->at(2));
|
||||
|
||||
__ call_runtime_leaf(StubRoutines::updateBytesCRC32(), getThreadTemp(), result_reg, cc->args());
|
||||
__ move(result_reg, result);
|
||||
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// _i2l, _i2f, _i2d, _l2i, _l2f, _l2d, _f2i, _f2l, _f2d, _d2i, _d2l, _d2f
|
||||
// _i2b, _i2c, _i2s
|
||||
|
@ -50,8 +50,9 @@ define_pd_global(intx, InitialCodeCacheSize, 160*K);
|
||||
define_pd_global(intx, ReservedCodeCacheSize, 32*M );
|
||||
define_pd_global(bool, ProfileInterpreter, false);
|
||||
define_pd_global(intx, CodeCacheExpansionSize, 32*K );
|
||||
define_pd_global(uintx,CodeCacheMinBlockLength, 1);
|
||||
define_pd_global(uintx,MetaspaceSize, 12*M );
|
||||
define_pd_global(uintx, CodeCacheMinBlockLength, 1);
|
||||
define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K);
|
||||
define_pd_global(uintx, MetaspaceSize, 12*M );
|
||||
define_pd_global(bool, NeverActAsServerClassMachine, true );
|
||||
define_pd_global(uint64_t,MaxRAM, 1ULL*G);
|
||||
define_pd_global(bool, CICompileOSR, true );
|
||||
|
@ -85,7 +85,8 @@ define_pd_global(bool, OptoScheduling, false);
|
||||
define_pd_global(bool, OptoBundling, false);
|
||||
|
||||
define_pd_global(intx, ReservedCodeCacheSize, 48*M);
|
||||
define_pd_global(uintx,CodeCacheMinBlockLength, 4);
|
||||
define_pd_global(uintx, CodeCacheMinBlockLength, 4);
|
||||
define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K);
|
||||
|
||||
// Heap related flags
|
||||
define_pd_global(uintx,MetaspaceSize, ScaleForWordSize(16*M));
|
||||
|
@ -587,7 +587,7 @@ bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
|
||||
|
||||
// validate ConstantPoolCache*
|
||||
ConstantPoolCache* cp = *interpreter_frame_cache_addr();
|
||||
if (cp == NULL || !cp->is_metadata()) return false;
|
||||
if (cp == NULL || !cp->is_metaspace_object()) return false;
|
||||
|
||||
// validate locals
|
||||
|
||||
|
@ -96,6 +96,9 @@ define_pd_global(uintx, CMSYoungGenPerWorker, 64*M); // default max size of CMS
|
||||
product(intx, UseAVX, 99, \
|
||||
"Highest supported AVX instructions set on x86/x64") \
|
||||
\
|
||||
product(bool, UseCLMUL, false, \
|
||||
"Control whether CLMUL instructions can be used on x86/x64") \
|
||||
\
|
||||
diagnostic(bool, UseIncDec, true, \
|
||||
"Use INC, DEC instructions on x86") \
|
||||
\
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -39,6 +39,8 @@
|
||||
address generate_empty_entry(void);
|
||||
address generate_accessor_entry(void);
|
||||
address generate_Reference_get_entry();
|
||||
address generate_CRC32_update_entry();
|
||||
address generate_CRC32_updateBytes_entry(AbstractInterpreter::MethodKind kind);
|
||||
void lock_method(void);
|
||||
void generate_stack_overflow_check(void);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -2794,6 +2794,15 @@ void MacroAssembler::movdqu(XMMRegister dst, AddressLiteral src) {
|
||||
}
|
||||
}
|
||||
|
||||
void MacroAssembler::movdqa(XMMRegister dst, AddressLiteral src) {
|
||||
if (reachable(src)) {
|
||||
Assembler::movdqa(dst, as_Address(src));
|
||||
} else {
|
||||
lea(rscratch1, src);
|
||||
Assembler::movdqa(dst, Address(rscratch1, 0));
|
||||
}
|
||||
}
|
||||
|
||||
void MacroAssembler::movsd(XMMRegister dst, AddressLiteral src) {
|
||||
if (reachable(src)) {
|
||||
Assembler::movsd(dst, as_Address(src));
|
||||
@ -6388,6 +6397,193 @@ void MacroAssembler::encode_iso_array(Register src, Register dst, Register len,
|
||||
bind(L_done);
|
||||
}
|
||||
|
||||
/**
|
||||
* Emits code to update CRC-32 with a byte value according to constants in table
|
||||
*
|
||||
* @param [in,out]crc Register containing the crc.
|
||||
* @param [in]val Register containing the byte to fold into the CRC.
|
||||
* @param [in]table Register containing the table of crc constants.
|
||||
*
|
||||
* uint32_t crc;
|
||||
* val = crc_table[(val ^ crc) & 0xFF];
|
||||
* crc = val ^ (crc >> 8);
|
||||
*
|
||||
*/
|
||||
void MacroAssembler::update_byte_crc32(Register crc, Register val, Register table) {
|
||||
xorl(val, crc);
|
||||
andl(val, 0xFF);
|
||||
shrl(crc, 8); // unsigned shift
|
||||
xorl(crc, Address(table, val, Address::times_4, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* Fold 128-bit data chunk
|
||||
*/
|
||||
void MacroAssembler::fold_128bit_crc32(XMMRegister xcrc, XMMRegister xK, XMMRegister xtmp, Register buf, int offset) {
|
||||
vpclmulhdq(xtmp, xK, xcrc); // [123:64]
|
||||
vpclmulldq(xcrc, xK, xcrc); // [63:0]
|
||||
vpxor(xcrc, xcrc, Address(buf, offset), false /* vector256 */);
|
||||
pxor(xcrc, xtmp);
|
||||
}
|
||||
|
||||
void MacroAssembler::fold_128bit_crc32(XMMRegister xcrc, XMMRegister xK, XMMRegister xtmp, XMMRegister xbuf) {
|
||||
vpclmulhdq(xtmp, xK, xcrc);
|
||||
vpclmulldq(xcrc, xK, xcrc);
|
||||
pxor(xcrc, xbuf);
|
||||
pxor(xcrc, xtmp);
|
||||
}
|
||||
|
||||
/**
|
||||
* 8-bit folds to compute 32-bit CRC
|
||||
*
|
||||
* uint64_t xcrc;
|
||||
* timesXtoThe32[xcrc & 0xFF] ^ (xcrc >> 8);
|
||||
*/
|
||||
void MacroAssembler::fold_8bit_crc32(XMMRegister xcrc, Register table, XMMRegister xtmp, Register tmp) {
|
||||
movdl(tmp, xcrc);
|
||||
andl(tmp, 0xFF);
|
||||
movdl(xtmp, Address(table, tmp, Address::times_4, 0));
|
||||
psrldq(xcrc, 1); // unsigned shift one byte
|
||||
pxor(xcrc, xtmp);
|
||||
}
|
||||
|
||||
/**
|
||||
* uint32_t crc;
|
||||
* timesXtoThe32[crc & 0xFF] ^ (crc >> 8);
|
||||
*/
|
||||
void MacroAssembler::fold_8bit_crc32(Register crc, Register table, Register tmp) {
|
||||
movl(tmp, crc);
|
||||
andl(tmp, 0xFF);
|
||||
shrl(crc, 8);
|
||||
xorl(crc, Address(table, tmp, Address::times_4, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param crc register containing existing CRC (32-bit)
|
||||
* @param buf register pointing to input byte buffer (byte*)
|
||||
* @param len register containing number of bytes
|
||||
* @param table register that will contain address of CRC table
|
||||
* @param tmp scratch register
|
||||
*/
|
||||
void MacroAssembler::kernel_crc32(Register crc, Register buf, Register len, Register table, Register tmp) {
|
||||
assert_different_registers(crc, buf, len, table, tmp, rax);
|
||||
|
||||
Label L_tail, L_tail_restore, L_tail_loop, L_exit, L_align_loop, L_aligned;
|
||||
Label L_fold_tail, L_fold_128b, L_fold_512b, L_fold_512b_loop, L_fold_tail_loop;
|
||||
|
||||
lea(table, ExternalAddress(StubRoutines::crc_table_addr()));
|
||||
notl(crc); // ~crc
|
||||
cmpl(len, 16);
|
||||
jcc(Assembler::less, L_tail);
|
||||
|
||||
// Align buffer to 16 bytes
|
||||
movl(tmp, buf);
|
||||
andl(tmp, 0xF);
|
||||
jccb(Assembler::zero, L_aligned);
|
||||
subl(tmp, 16);
|
||||
addl(len, tmp);
|
||||
|
||||
align(4);
|
||||
BIND(L_align_loop);
|
||||
movsbl(rax, Address(buf, 0)); // load byte with sign extension
|
||||
update_byte_crc32(crc, rax, table);
|
||||
increment(buf);
|
||||
incrementl(tmp);
|
||||
jccb(Assembler::less, L_align_loop);
|
||||
|
||||
BIND(L_aligned);
|
||||
movl(tmp, len); // save
|
||||
shrl(len, 4);
|
||||
jcc(Assembler::zero, L_tail_restore);
|
||||
|
||||
// Fold crc into first bytes of vector
|
||||
movdqa(xmm1, Address(buf, 0));
|
||||
movdl(rax, xmm1);
|
||||
xorl(crc, rax);
|
||||
pinsrd(xmm1, crc, 0);
|
||||
addptr(buf, 16);
|
||||
subl(len, 4); // len > 0
|
||||
jcc(Assembler::less, L_fold_tail);
|
||||
|
||||
movdqa(xmm2, Address(buf, 0));
|
||||
movdqa(xmm3, Address(buf, 16));
|
||||
movdqa(xmm4, Address(buf, 32));
|
||||
addptr(buf, 48);
|
||||
subl(len, 3);
|
||||
jcc(Assembler::lessEqual, L_fold_512b);
|
||||
|
||||
// Fold total 512 bits of polynomial on each iteration,
|
||||
// 128 bits per each of 4 parallel streams.
|
||||
movdqu(xmm0, ExternalAddress(StubRoutines::x86::crc_by128_masks_addr() + 32));
|
||||
|
||||
align(32);
|
||||
BIND(L_fold_512b_loop);
|
||||
fold_128bit_crc32(xmm1, xmm0, xmm5, buf, 0);
|
||||
fold_128bit_crc32(xmm2, xmm0, xmm5, buf, 16);
|
||||
fold_128bit_crc32(xmm3, xmm0, xmm5, buf, 32);
|
||||
fold_128bit_crc32(xmm4, xmm0, xmm5, buf, 48);
|
||||
addptr(buf, 64);
|
||||
subl(len, 4);
|
||||
jcc(Assembler::greater, L_fold_512b_loop);
|
||||
|
||||
// Fold 512 bits to 128 bits.
|
||||
BIND(L_fold_512b);
|
||||
movdqu(xmm0, ExternalAddress(StubRoutines::x86::crc_by128_masks_addr() + 16));
|
||||
fold_128bit_crc32(xmm1, xmm0, xmm5, xmm2);
|
||||
fold_128bit_crc32(xmm1, xmm0, xmm5, xmm3);
|
||||
fold_128bit_crc32(xmm1, xmm0, xmm5, xmm4);
|
||||
|
||||
// Fold the rest of 128 bits data chunks
|
||||
BIND(L_fold_tail);
|
||||
addl(len, 3);
|
||||
jccb(Assembler::lessEqual, L_fold_128b);
|
||||
movdqu(xmm0, ExternalAddress(StubRoutines::x86::crc_by128_masks_addr() + 16));
|
||||
|
||||
BIND(L_fold_tail_loop);
|
||||
fold_128bit_crc32(xmm1, xmm0, xmm5, buf, 0);
|
||||
addptr(buf, 16);
|
||||
decrementl(len);
|
||||
jccb(Assembler::greater, L_fold_tail_loop);
|
||||
|
||||
// Fold 128 bits in xmm1 down into 32 bits in crc register.
|
||||
BIND(L_fold_128b);
|
||||
movdqu(xmm0, ExternalAddress(StubRoutines::x86::crc_by128_masks_addr()));
|
||||
vpclmulqdq(xmm2, xmm0, xmm1, 0x1);
|
||||
vpand(xmm3, xmm0, xmm2, false /* vector256 */);
|
||||
vpclmulqdq(xmm0, xmm0, xmm3, 0x1);
|
||||
psrldq(xmm1, 8);
|
||||
psrldq(xmm2, 4);
|
||||
pxor(xmm0, xmm1);
|
||||
pxor(xmm0, xmm2);
|
||||
|
||||
// 8 8-bit folds to compute 32-bit CRC.
|
||||
for (int j = 0; j < 4; j++) {
|
||||
fold_8bit_crc32(xmm0, table, xmm1, rax);
|
||||
}
|
||||
movdl(crc, xmm0); // mov 32 bits to general register
|
||||
for (int j = 0; j < 4; j++) {
|
||||
fold_8bit_crc32(crc, table, rax);
|
||||
}
|
||||
|
||||
BIND(L_tail_restore);
|
||||
movl(len, tmp); // restore
|
||||
BIND(L_tail);
|
||||
andl(len, 0xf);
|
||||
jccb(Assembler::zero, L_exit);
|
||||
|
||||
// Fold the rest of bytes
|
||||
align(4);
|
||||
BIND(L_tail_loop);
|
||||
movsbl(rax, Address(buf, 0)); // load byte with sign extension
|
||||
update_byte_crc32(crc, rax, table);
|
||||
increment(buf);
|
||||
decrementl(len);
|
||||
jccb(Assembler::greater, L_tail_loop);
|
||||
|
||||
BIND(L_exit);
|
||||
notl(crc); // ~c
|
||||
}
|
||||
|
||||
#undef BIND
|
||||
#undef BLOCK_COMMENT
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -899,6 +899,11 @@ public:
|
||||
void movdqu(XMMRegister dst, XMMRegister src) { Assembler::movdqu(dst, src); }
|
||||
void movdqu(XMMRegister dst, AddressLiteral src);
|
||||
|
||||
// Move Aligned Double Quadword
|
||||
void movdqa(XMMRegister dst, Address src) { Assembler::movdqa(dst, src); }
|
||||
void movdqa(XMMRegister dst, XMMRegister src) { Assembler::movdqa(dst, src); }
|
||||
void movdqa(XMMRegister dst, AddressLiteral src);
|
||||
|
||||
void movsd(XMMRegister dst, XMMRegister src) { Assembler::movsd(dst, src); }
|
||||
void movsd(Address dst, XMMRegister src) { Assembler::movsd(dst, src); }
|
||||
void movsd(XMMRegister dst, Address src) { Assembler::movsd(dst, src); }
|
||||
@ -1027,6 +1032,16 @@ public:
|
||||
Assembler::vinsertf128h(dst, nds, src);
|
||||
}
|
||||
|
||||
// Carry-Less Multiplication Quadword
|
||||
void vpclmulldq(XMMRegister dst, XMMRegister nds, XMMRegister src) {
|
||||
// 0x00 - multiply lower 64 bits [0:63]
|
||||
Assembler::vpclmulqdq(dst, nds, src, 0x00);
|
||||
}
|
||||
void vpclmulhdq(XMMRegister dst, XMMRegister nds, XMMRegister src) {
|
||||
// 0x11 - multiply upper 64 bits [64:127]
|
||||
Assembler::vpclmulqdq(dst, nds, src, 0x11);
|
||||
}
|
||||
|
||||
// Data
|
||||
|
||||
void cmov32( Condition cc, Register dst, Address src);
|
||||
@ -1143,6 +1158,16 @@ public:
|
||||
XMMRegister tmp1, XMMRegister tmp2, XMMRegister tmp3,
|
||||
XMMRegister tmp4, Register tmp5, Register result);
|
||||
|
||||
// CRC32 code for java.util.zip.CRC32::updateBytes() instrinsic.
|
||||
void update_byte_crc32(Register crc, Register val, Register table);
|
||||
void kernel_crc32(Register crc, Register buf, Register len, Register table, Register tmp);
|
||||
// Fold 128-bit data chunk
|
||||
void fold_128bit_crc32(XMMRegister xcrc, XMMRegister xK, XMMRegister xtmp, Register buf, int offset);
|
||||
void fold_128bit_crc32(XMMRegister xcrc, XMMRegister xK, XMMRegister xtmp, XMMRegister xbuf);
|
||||
// Fold 8-bit data
|
||||
void fold_8bit_crc32(Register crc, Register table, Register tmp);
|
||||
void fold_8bit_crc32(XMMRegister crc, Register table, XMMRegister xtmp, Register tmp);
|
||||
|
||||
#undef VIRTUAL
|
||||
|
||||
};
|
||||
|
@ -177,30 +177,6 @@ address Relocation::pd_get_address_from_code() {
|
||||
return *pd_address_in_code();
|
||||
}
|
||||
|
||||
int Relocation::pd_breakpoint_size() {
|
||||
// minimum breakpoint size, in short words
|
||||
return NativeIllegalInstruction::instruction_size / sizeof(short);
|
||||
}
|
||||
|
||||
void Relocation::pd_swap_in_breakpoint(address x, short* instrs, int instrlen) {
|
||||
Untested("pd_swap_in_breakpoint");
|
||||
if (instrs != NULL) {
|
||||
assert(instrlen * sizeof(short) == NativeIllegalInstruction::instruction_size, "enough instrlen in reloc. data");
|
||||
for (int i = 0; i < instrlen; i++) {
|
||||
instrs[i] = ((short*)x)[i];
|
||||
}
|
||||
}
|
||||
NativeIllegalInstruction::insert(x);
|
||||
}
|
||||
|
||||
|
||||
void Relocation::pd_swap_out_breakpoint(address x, short* instrs, int instrlen) {
|
||||
Untested("pd_swap_out_breakpoint");
|
||||
assert(NativeIllegalInstruction::instruction_size == sizeof(short), "right address unit for update");
|
||||
NativeInstruction* ni = nativeInstruction_at(x);
|
||||
*(short*)ni->addr_at(0) = instrs[0];
|
||||
}
|
||||
|
||||
void poll_Relocation::fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest) {
|
||||
#ifdef _LP64
|
||||
if (!Assembler::is_polling_page_far()) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -2713,6 +2713,59 @@ class StubGenerator: public StubCodeGenerator {
|
||||
return start;
|
||||
}
|
||||
|
||||
/**
|
||||
* Arguments:
|
||||
*
|
||||
* Inputs:
|
||||
* rsp(4) - int crc
|
||||
* rsp(8) - byte* buf
|
||||
* rsp(12) - int length
|
||||
*
|
||||
* Ouput:
|
||||
* rax - int crc result
|
||||
*/
|
||||
address generate_updateBytesCRC32() {
|
||||
assert(UseCRC32Intrinsics, "need AVX and CLMUL instructions");
|
||||
|
||||
__ align(CodeEntryAlignment);
|
||||
StubCodeMark mark(this, "StubRoutines", "updateBytesCRC32");
|
||||
|
||||
address start = __ pc();
|
||||
|
||||
const Register crc = rdx; // crc
|
||||
const Register buf = rsi; // source java byte array address
|
||||
const Register len = rcx; // length
|
||||
const Register table = rdi; // crc_table address (reuse register)
|
||||
const Register tmp = rbx;
|
||||
assert_different_registers(crc, buf, len, table, tmp, rax);
|
||||
|
||||
BLOCK_COMMENT("Entry:");
|
||||
__ enter(); // required for proper stackwalking of RuntimeStub frame
|
||||
__ push(rsi);
|
||||
__ push(rdi);
|
||||
__ push(rbx);
|
||||
|
||||
Address crc_arg(rbp, 8 + 0);
|
||||
Address buf_arg(rbp, 8 + 4);
|
||||
Address len_arg(rbp, 8 + 8);
|
||||
|
||||
// Load up:
|
||||
__ movl(crc, crc_arg);
|
||||
__ movptr(buf, buf_arg);
|
||||
__ movl(len, len_arg);
|
||||
|
||||
__ kernel_crc32(crc, buf, len, table, tmp);
|
||||
|
||||
__ movl(rax, crc);
|
||||
__ pop(rbx);
|
||||
__ pop(rdi);
|
||||
__ pop(rsi);
|
||||
__ leave(); // required for proper stackwalking of RuntimeStub frame
|
||||
__ ret(0);
|
||||
|
||||
return start;
|
||||
}
|
||||
|
||||
|
||||
public:
|
||||
// Information about frame layout at time of blocking runtime call.
|
||||
@ -2887,6 +2940,12 @@ class StubGenerator: public StubCodeGenerator {
|
||||
|
||||
// Build this early so it's available for the interpreter
|
||||
StubRoutines::_throw_StackOverflowError_entry = generate_throw_exception("StackOverflowError throw_exception", CAST_FROM_FN_PTR(address, SharedRuntime::throw_StackOverflowError));
|
||||
|
||||
if (UseCRC32Intrinsics) {
|
||||
// set table address before stub generation which use it
|
||||
StubRoutines::_crc_table_adr = (address)StubRoutines::x86::_crc_table;
|
||||
StubRoutines::_updateBytesCRC32 = generate_updateBytesCRC32();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -3584,7 +3584,45 @@ class StubGenerator: public StubCodeGenerator {
|
||||
return start;
|
||||
}
|
||||
|
||||
/**
|
||||
* Arguments:
|
||||
*
|
||||
* Inputs:
|
||||
* c_rarg0 - int crc
|
||||
* c_rarg1 - byte* buf
|
||||
* c_rarg2 - int length
|
||||
*
|
||||
* Ouput:
|
||||
* rax - int crc result
|
||||
*/
|
||||
address generate_updateBytesCRC32() {
|
||||
assert(UseCRC32Intrinsics, "need AVX and CLMUL instructions");
|
||||
|
||||
__ align(CodeEntryAlignment);
|
||||
StubCodeMark mark(this, "StubRoutines", "updateBytesCRC32");
|
||||
|
||||
address start = __ pc();
|
||||
// Win64: rcx, rdx, r8, r9 (c_rarg0, c_rarg1, ...)
|
||||
// Unix: rdi, rsi, rdx, rcx, r8, r9 (c_rarg0, c_rarg1, ...)
|
||||
// rscratch1: r10
|
||||
const Register crc = c_rarg0; // crc
|
||||
const Register buf = c_rarg1; // source java byte array address
|
||||
const Register len = c_rarg2; // length
|
||||
const Register table = c_rarg3; // crc_table address (reuse register)
|
||||
const Register tmp = r11;
|
||||
assert_different_registers(crc, buf, len, table, tmp, rax);
|
||||
|
||||
BLOCK_COMMENT("Entry:");
|
||||
__ enter(); // required for proper stackwalking of RuntimeStub frame
|
||||
|
||||
__ kernel_crc32(crc, buf, len, table, tmp);
|
||||
|
||||
__ movl(rax, crc);
|
||||
__ leave(); // required for proper stackwalking of RuntimeStub frame
|
||||
__ ret(0);
|
||||
|
||||
return start;
|
||||
}
|
||||
|
||||
#undef __
|
||||
#define __ masm->
|
||||
@ -3736,6 +3774,11 @@ class StubGenerator: public StubCodeGenerator {
|
||||
CAST_FROM_FN_PTR(address,
|
||||
SharedRuntime::
|
||||
throw_StackOverflowError));
|
||||
if (UseCRC32Intrinsics) {
|
||||
// set table address before stub generation which use it
|
||||
StubRoutines::_crc_table_adr = (address)StubRoutines::x86::_crc_table;
|
||||
StubRoutines::_updateBytesCRC32 = generate_updateBytesCRC32();
|
||||
}
|
||||
}
|
||||
|
||||
void generate_all() {
|
||||
|
130
hotspot/src/cpu/x86/vm/stubRoutines_x86.cpp
Normal file
130
hotspot/src/cpu/x86/vm/stubRoutines_x86.cpp
Normal file
@ -0,0 +1,130 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "runtime/deoptimization.hpp"
|
||||
#include "runtime/frame.inline.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#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.
|
||||
|
||||
address StubRoutines::x86::_verify_mxcsr_entry = NULL;
|
||||
address StubRoutines::x86::_key_shuffle_mask_addr = NULL;
|
||||
|
||||
uint64_t StubRoutines::x86::_crc_by128_masks[] =
|
||||
{
|
||||
/* The fields in this structure are arranged so that they can be
|
||||
* picked up two at a time with 128-bit loads.
|
||||
*
|
||||
* Because of flipped bit order for this CRC polynomials
|
||||
* the constant for X**N is left-shifted by 1. This is because
|
||||
* a 64 x 64 polynomial multiply produces a 127-bit result
|
||||
* but the highest term is always aligned to bit 0 in the container.
|
||||
* Pre-shifting by one fixes this, at the cost of potentially making
|
||||
* the 32-bit constant no longer fit in a 32-bit container (thus the
|
||||
* use of uint64_t, though this is also the size used by the carry-
|
||||
* less multiply instruction.
|
||||
*
|
||||
* In addition, the flipped bit order and highest-term-at-least-bit
|
||||
* multiply changes the constants used. The 96-bit result will be
|
||||
* aligned to the high-term end of the target 128-bit container,
|
||||
* not the low-term end; that is, instead of a 512-bit or 576-bit fold,
|
||||
* instead it is a 480 (=512-32) or 544 (=512+64-32) bit fold.
|
||||
*
|
||||
* This cause additional problems in the 128-to-64-bit reduction; see the
|
||||
* code for details. By storing a mask in the otherwise unused half of
|
||||
* a 128-bit constant, bits can be cleared before multiplication without
|
||||
* storing and reloading. Note that staying on a 128-bit datapath means
|
||||
* that some data is uselessly stored and some unused data is intersected
|
||||
* with an irrelevant constant.
|
||||
*/
|
||||
|
||||
((uint64_t) 0xffffffffUL), /* low of K_M_64 */
|
||||
((uint64_t) 0xb1e6b092U << 1), /* high of K_M_64 */
|
||||
((uint64_t) 0xba8ccbe8U << 1), /* low of K_160_96 */
|
||||
((uint64_t) 0x6655004fU << 1), /* high of K_160_96 */
|
||||
((uint64_t) 0xaa2215eaU << 1), /* low of K_544_480 */
|
||||
((uint64_t) 0xe3720acbU << 1) /* high of K_544_480 */
|
||||
};
|
||||
|
||||
/**
|
||||
* crc_table[] from jdk/src/share/native/java/util/zip/zlib-1.2.5/crc32.h
|
||||
*/
|
||||
juint StubRoutines::x86::_crc_table[] =
|
||||
{
|
||||
0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL,
|
||||
0x706af48fUL, 0xe963a535UL, 0x9e6495a3UL, 0x0edb8832UL, 0x79dcb8a4UL,
|
||||
0xe0d5e91eUL, 0x97d2d988UL, 0x09b64c2bUL, 0x7eb17cbdUL, 0xe7b82d07UL,
|
||||
0x90bf1d91UL, 0x1db71064UL, 0x6ab020f2UL, 0xf3b97148UL, 0x84be41deUL,
|
||||
0x1adad47dUL, 0x6ddde4ebUL, 0xf4d4b551UL, 0x83d385c7UL, 0x136c9856UL,
|
||||
0x646ba8c0UL, 0xfd62f97aUL, 0x8a65c9ecUL, 0x14015c4fUL, 0x63066cd9UL,
|
||||
0xfa0f3d63UL, 0x8d080df5UL, 0x3b6e20c8UL, 0x4c69105eUL, 0xd56041e4UL,
|
||||
0xa2677172UL, 0x3c03e4d1UL, 0x4b04d447UL, 0xd20d85fdUL, 0xa50ab56bUL,
|
||||
0x35b5a8faUL, 0x42b2986cUL, 0xdbbbc9d6UL, 0xacbcf940UL, 0x32d86ce3UL,
|
||||
0x45df5c75UL, 0xdcd60dcfUL, 0xabd13d59UL, 0x26d930acUL, 0x51de003aUL,
|
||||
0xc8d75180UL, 0xbfd06116UL, 0x21b4f4b5UL, 0x56b3c423UL, 0xcfba9599UL,
|
||||
0xb8bda50fUL, 0x2802b89eUL, 0x5f058808UL, 0xc60cd9b2UL, 0xb10be924UL,
|
||||
0x2f6f7c87UL, 0x58684c11UL, 0xc1611dabUL, 0xb6662d3dUL, 0x76dc4190UL,
|
||||
0x01db7106UL, 0x98d220bcUL, 0xefd5102aUL, 0x71b18589UL, 0x06b6b51fUL,
|
||||
0x9fbfe4a5UL, 0xe8b8d433UL, 0x7807c9a2UL, 0x0f00f934UL, 0x9609a88eUL,
|
||||
0xe10e9818UL, 0x7f6a0dbbUL, 0x086d3d2dUL, 0x91646c97UL, 0xe6635c01UL,
|
||||
0x6b6b51f4UL, 0x1c6c6162UL, 0x856530d8UL, 0xf262004eUL, 0x6c0695edUL,
|
||||
0x1b01a57bUL, 0x8208f4c1UL, 0xf50fc457UL, 0x65b0d9c6UL, 0x12b7e950UL,
|
||||
0x8bbeb8eaUL, 0xfcb9887cUL, 0x62dd1ddfUL, 0x15da2d49UL, 0x8cd37cf3UL,
|
||||
0xfbd44c65UL, 0x4db26158UL, 0x3ab551ceUL, 0xa3bc0074UL, 0xd4bb30e2UL,
|
||||
0x4adfa541UL, 0x3dd895d7UL, 0xa4d1c46dUL, 0xd3d6f4fbUL, 0x4369e96aUL,
|
||||
0x346ed9fcUL, 0xad678846UL, 0xda60b8d0UL, 0x44042d73UL, 0x33031de5UL,
|
||||
0xaa0a4c5fUL, 0xdd0d7cc9UL, 0x5005713cUL, 0x270241aaUL, 0xbe0b1010UL,
|
||||
0xc90c2086UL, 0x5768b525UL, 0x206f85b3UL, 0xb966d409UL, 0xce61e49fUL,
|
||||
0x5edef90eUL, 0x29d9c998UL, 0xb0d09822UL, 0xc7d7a8b4UL, 0x59b33d17UL,
|
||||
0x2eb40d81UL, 0xb7bd5c3bUL, 0xc0ba6cadUL, 0xedb88320UL, 0x9abfb3b6UL,
|
||||
0x03b6e20cUL, 0x74b1d29aUL, 0xead54739UL, 0x9dd277afUL, 0x04db2615UL,
|
||||
0x73dc1683UL, 0xe3630b12UL, 0x94643b84UL, 0x0d6d6a3eUL, 0x7a6a5aa8UL,
|
||||
0xe40ecf0bUL, 0x9309ff9dUL, 0x0a00ae27UL, 0x7d079eb1UL, 0xf00f9344UL,
|
||||
0x8708a3d2UL, 0x1e01f268UL, 0x6906c2feUL, 0xf762575dUL, 0x806567cbUL,
|
||||
0x196c3671UL, 0x6e6b06e7UL, 0xfed41b76UL, 0x89d32be0UL, 0x10da7a5aUL,
|
||||
0x67dd4accUL, 0xf9b9df6fUL, 0x8ebeeff9UL, 0x17b7be43UL, 0x60b08ed5UL,
|
||||
0xd6d6a3e8UL, 0xa1d1937eUL, 0x38d8c2c4UL, 0x4fdff252UL, 0xd1bb67f1UL,
|
||||
0xa6bc5767UL, 0x3fb506ddUL, 0x48b2364bUL, 0xd80d2bdaUL, 0xaf0a1b4cUL,
|
||||
0x36034af6UL, 0x41047a60UL, 0xdf60efc3UL, 0xa867df55UL, 0x316e8eefUL,
|
||||
0x4669be79UL, 0xcb61b38cUL, 0xbc66831aUL, 0x256fd2a0UL, 0x5268e236UL,
|
||||
0xcc0c7795UL, 0xbb0b4703UL, 0x220216b9UL, 0x5505262fUL, 0xc5ba3bbeUL,
|
||||
0xb2bd0b28UL, 0x2bb45a92UL, 0x5cb36a04UL, 0xc2d7ffa7UL, 0xb5d0cf31UL,
|
||||
0x2cd99e8bUL, 0x5bdeae1dUL, 0x9b64c2b0UL, 0xec63f226UL, 0x756aa39cUL,
|
||||
0x026d930aUL, 0x9c0906a9UL, 0xeb0e363fUL, 0x72076785UL, 0x05005713UL,
|
||||
0x95bf4a82UL, 0xe2b87a14UL, 0x7bb12baeUL, 0x0cb61b38UL, 0x92d28e9bUL,
|
||||
0xe5d5be0dUL, 0x7cdcefb7UL, 0x0bdbdf21UL, 0x86d3d2d4UL, 0xf1d4e242UL,
|
||||
0x68ddb3f8UL, 0x1fda836eUL, 0x81be16cdUL, 0xf6b9265bUL, 0x6fb077e1UL,
|
||||
0x18b74777UL, 0x88085ae6UL, 0xff0f6a70UL, 0x66063bcaUL, 0x11010b5cUL,
|
||||
0x8f659effUL, 0xf862ae69UL, 0x616bffd3UL, 0x166ccf45UL, 0xa00ae278UL,
|
||||
0xd70dd2eeUL, 0x4e048354UL, 0x3903b3c2UL, 0xa7672661UL, 0xd06016f7UL,
|
||||
0x4969474dUL, 0x3e6e77dbUL, 0xaed16a4aUL, 0xd9d65adcUL, 0x40df0b66UL,
|
||||
0x37d83bf0UL, 0xa9bcae53UL, 0xdebb9ec5UL, 0x47b2cf7fUL, 0x30b5ffe9UL,
|
||||
0xbdbdf21cUL, 0xcabac28aUL, 0x53b39330UL, 0x24b4a3a6UL, 0xbad03605UL,
|
||||
0xcdd70693UL, 0x54de5729UL, 0x23d967bfUL, 0xb3667a2eUL, 0xc4614ab8UL,
|
||||
0x5d681b02UL, 0x2a6f2b94UL, 0xb40bbe37UL, 0xc30c8ea1UL, 0x5a05df1bUL,
|
||||
0x2d02ef8dUL
|
||||
};
|
45
hotspot/src/cpu/x86/vm/stubRoutines_x86.hpp
Normal file
45
hotspot/src/cpu/x86/vm/stubRoutines_x86.hpp
Normal file
@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_X86_VM_STUBROUTINES_X86_HPP
|
||||
#define CPU_X86_VM_STUBROUTINES_X86_HPP
|
||||
|
||||
// This file holds the platform specific parts of the StubRoutines
|
||||
// definition. See stubRoutines.hpp for a description on how to
|
||||
// extend it.
|
||||
|
||||
private:
|
||||
static address _verify_mxcsr_entry;
|
||||
// shuffle mask for fixing up 128-bit words consisting of big-endian 32-bit integers
|
||||
static address _key_shuffle_mask_addr;
|
||||
// masks and table for CRC32
|
||||
static uint64_t _crc_by128_masks[];
|
||||
static juint _crc_table[];
|
||||
|
||||
public:
|
||||
static address verify_mxcsr_entry() { return _verify_mxcsr_entry; }
|
||||
static address key_shuffle_mask_addr() { return _key_shuffle_mask_addr; }
|
||||
static address crc_by128_masks_addr() { return (address)_crc_by128_masks; }
|
||||
|
||||
#endif // CPU_X86_VM_STUBROUTINES_X86_32_HPP
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -31,6 +31,4 @@
|
||||
// Implementation of the platform-specific part of StubRoutines - for
|
||||
// a description of how to extend it, see the stubRoutines.hpp file.
|
||||
|
||||
address StubRoutines::x86::_verify_mxcsr_entry = NULL;
|
||||
address StubRoutines::x86::_verify_fpu_cntrl_wrd_entry = NULL;
|
||||
address StubRoutines::x86::_key_shuffle_mask_addr = NULL;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -39,15 +39,12 @@ class x86 {
|
||||
friend class VMStructs;
|
||||
|
||||
private:
|
||||
static address _verify_mxcsr_entry;
|
||||
static address _verify_fpu_cntrl_wrd_entry;
|
||||
// shuffle mask for fixing up 128-bit words consisting of big-endian 32-bit integers
|
||||
static address _key_shuffle_mask_addr;
|
||||
|
||||
public:
|
||||
static address verify_mxcsr_entry() { return _verify_mxcsr_entry; }
|
||||
static address verify_fpu_cntrl_wrd_entry() { return _verify_fpu_cntrl_wrd_entry; }
|
||||
static address key_shuffle_mask_addr() { return _key_shuffle_mask_addr; }
|
||||
|
||||
# include "stubRoutines_x86.hpp"
|
||||
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -34,8 +34,6 @@
|
||||
address StubRoutines::x86::_get_previous_fp_entry = NULL;
|
||||
address StubRoutines::x86::_get_previous_sp_entry = NULL;
|
||||
|
||||
address StubRoutines::x86::_verify_mxcsr_entry = NULL;
|
||||
|
||||
address StubRoutines::x86::_f2i_fixup = NULL;
|
||||
address StubRoutines::x86::_f2l_fixup = NULL;
|
||||
address StubRoutines::x86::_d2i_fixup = NULL;
|
||||
@ -45,4 +43,3 @@ address StubRoutines::x86::_float_sign_flip = NULL;
|
||||
address StubRoutines::x86::_double_sign_mask = NULL;
|
||||
address StubRoutines::x86::_double_sign_flip = NULL;
|
||||
address StubRoutines::x86::_mxcsr_std = NULL;
|
||||
address StubRoutines::x86::_key_shuffle_mask_addr = NULL;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -42,7 +42,6 @@ class x86 {
|
||||
private:
|
||||
static address _get_previous_fp_entry;
|
||||
static address _get_previous_sp_entry;
|
||||
static address _verify_mxcsr_entry;
|
||||
|
||||
static address _f2i_fixup;
|
||||
static address _f2l_fixup;
|
||||
@ -54,8 +53,6 @@ class x86 {
|
||||
static address _double_sign_mask;
|
||||
static address _double_sign_flip;
|
||||
static address _mxcsr_std;
|
||||
// shuffle mask for fixing up 128-bit words consisting of big-endian 32-bit integers
|
||||
static address _key_shuffle_mask_addr;
|
||||
|
||||
public:
|
||||
|
||||
@ -69,11 +66,6 @@ class x86 {
|
||||
return _get_previous_sp_entry;
|
||||
}
|
||||
|
||||
static address verify_mxcsr_entry()
|
||||
{
|
||||
return _verify_mxcsr_entry;
|
||||
}
|
||||
|
||||
static address f2i_fixup()
|
||||
{
|
||||
return _f2i_fixup;
|
||||
@ -119,7 +111,7 @@ class x86 {
|
||||
return _mxcsr_std;
|
||||
}
|
||||
|
||||
static address key_shuffle_mask_addr() { return _key_shuffle_mask_addr; }
|
||||
# include "stubRoutines_x86.hpp"
|
||||
|
||||
};
|
||||
|
||||
|
@ -868,6 +868,120 @@ address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||
return generate_accessor_entry();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method entry for static native methods:
|
||||
* int java.util.zip.CRC32.update(int crc, int b)
|
||||
*/
|
||||
address InterpreterGenerator::generate_CRC32_update_entry() {
|
||||
if (UseCRC32Intrinsics) {
|
||||
address entry = __ pc();
|
||||
|
||||
// rbx,: Method*
|
||||
// rsi: senderSP must preserved for slow path, set SP to it on fast path
|
||||
// rdx: scratch
|
||||
// rdi: scratch
|
||||
|
||||
Label slow_path;
|
||||
// If we need a safepoint check, generate full interpreter entry.
|
||||
ExternalAddress state(SafepointSynchronize::address_of_state());
|
||||
__ cmp32(ExternalAddress(SafepointSynchronize::address_of_state()),
|
||||
SafepointSynchronize::_not_synchronized);
|
||||
__ jcc(Assembler::notEqual, slow_path);
|
||||
|
||||
// We don't generate local frame and don't align stack because
|
||||
// we call stub code and there is no safepoint on this path.
|
||||
|
||||
// Load parameters
|
||||
const Register crc = rax; // crc
|
||||
const Register val = rdx; // source java byte value
|
||||
const Register tbl = rdi; // scratch
|
||||
|
||||
// Arguments are reversed on java expression stack
|
||||
__ movl(val, Address(rsp, wordSize)); // byte value
|
||||
__ movl(crc, Address(rsp, 2*wordSize)); // Initial CRC
|
||||
|
||||
__ lea(tbl, ExternalAddress(StubRoutines::crc_table_addr()));
|
||||
__ notl(crc); // ~crc
|
||||
__ update_byte_crc32(crc, val, tbl);
|
||||
__ notl(crc); // ~crc
|
||||
// result in rax
|
||||
|
||||
// _areturn
|
||||
__ pop(rdi); // get return address
|
||||
__ mov(rsp, rsi); // set sp to sender sp
|
||||
__ jmp(rdi);
|
||||
|
||||
// generate a vanilla native entry as the slow path
|
||||
__ bind(slow_path);
|
||||
|
||||
(void) generate_native_entry(false);
|
||||
|
||||
return entry;
|
||||
}
|
||||
return generate_native_entry(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method entry for static native methods:
|
||||
* int java.util.zip.CRC32.updateBytes(int crc, byte[] b, int off, int len)
|
||||
* int java.util.zip.CRC32.updateByteBuffer(int crc, long buf, int off, int len)
|
||||
*/
|
||||
address InterpreterGenerator::generate_CRC32_updateBytes_entry(AbstractInterpreter::MethodKind kind) {
|
||||
if (UseCRC32Intrinsics) {
|
||||
address entry = __ pc();
|
||||
|
||||
// rbx,: Method*
|
||||
// rsi: senderSP must preserved for slow path, set SP to it on fast path
|
||||
// rdx: scratch
|
||||
// rdi: scratch
|
||||
|
||||
Label slow_path;
|
||||
// If we need a safepoint check, generate full interpreter entry.
|
||||
ExternalAddress state(SafepointSynchronize::address_of_state());
|
||||
__ cmp32(ExternalAddress(SafepointSynchronize::address_of_state()),
|
||||
SafepointSynchronize::_not_synchronized);
|
||||
__ jcc(Assembler::notEqual, slow_path);
|
||||
|
||||
// We don't generate local frame and don't align stack because
|
||||
// we call stub code and there is no safepoint on this path.
|
||||
|
||||
// Load parameters
|
||||
const Register crc = rax; // crc
|
||||
const Register buf = rdx; // source java byte array address
|
||||
const Register len = rdi; // length
|
||||
|
||||
// Arguments are reversed on java expression stack
|
||||
__ movl(len, Address(rsp, wordSize)); // Length
|
||||
// Calculate address of start element
|
||||
if (kind == Interpreter::java_util_zip_CRC32_updateByteBuffer) {
|
||||
__ movptr(buf, Address(rsp, 3*wordSize)); // long buf
|
||||
__ addptr(buf, Address(rsp, 2*wordSize)); // + offset
|
||||
__ movl(crc, Address(rsp, 5*wordSize)); // Initial CRC
|
||||
} else {
|
||||
__ movptr(buf, Address(rsp, 3*wordSize)); // byte[] array
|
||||
__ addptr(buf, arrayOopDesc::base_offset_in_bytes(T_BYTE)); // + header size
|
||||
__ addptr(buf, Address(rsp, 2*wordSize)); // + offset
|
||||
__ movl(crc, Address(rsp, 4*wordSize)); // Initial CRC
|
||||
}
|
||||
|
||||
__ super_call_VM_leaf(CAST_FROM_FN_PTR(address, StubRoutines::updateBytesCRC32()), crc, buf, len);
|
||||
// result in rax
|
||||
|
||||
// _areturn
|
||||
__ pop(rdi); // get return address
|
||||
__ mov(rsp, rsi); // set sp to sender sp
|
||||
__ jmp(rdi);
|
||||
|
||||
// generate a vanilla native entry as the slow path
|
||||
__ bind(slow_path);
|
||||
|
||||
(void) generate_native_entry(false);
|
||||
|
||||
return entry;
|
||||
}
|
||||
return generate_native_entry(false);
|
||||
}
|
||||
|
||||
//
|
||||
// Interpreter stub for calling a native method. (asm interpreter)
|
||||
// This sets up a somewhat different looking stack for calling the native method
|
||||
@ -1501,15 +1615,16 @@ address AbstractInterpreterGenerator::generate_method_entry(AbstractInterpreter:
|
||||
// determine code generation flags
|
||||
bool synchronized = false;
|
||||
address entry_point = NULL;
|
||||
InterpreterGenerator* ig_this = (InterpreterGenerator*)this;
|
||||
|
||||
switch (kind) {
|
||||
case Interpreter::zerolocals : break;
|
||||
case Interpreter::zerolocals_synchronized: synchronized = true; break;
|
||||
case Interpreter::native : entry_point = ((InterpreterGenerator*)this)->generate_native_entry(false); break;
|
||||
case Interpreter::native_synchronized : entry_point = ((InterpreterGenerator*)this)->generate_native_entry(true); break;
|
||||
case Interpreter::empty : entry_point = ((InterpreterGenerator*)this)->generate_empty_entry(); break;
|
||||
case Interpreter::accessor : entry_point = ((InterpreterGenerator*)this)->generate_accessor_entry(); break;
|
||||
case Interpreter::abstract : entry_point = ((InterpreterGenerator*)this)->generate_abstract_entry(); break;
|
||||
case Interpreter::zerolocals : break;
|
||||
case Interpreter::zerolocals_synchronized: synchronized = true; break;
|
||||
case Interpreter::native : entry_point = ig_this->generate_native_entry(false); break;
|
||||
case Interpreter::native_synchronized : entry_point = ig_this->generate_native_entry(true); break;
|
||||
case Interpreter::empty : entry_point = ig_this->generate_empty_entry(); break;
|
||||
case Interpreter::accessor : entry_point = ig_this->generate_accessor_entry(); break;
|
||||
case Interpreter::abstract : entry_point = ig_this->generate_abstract_entry(); break;
|
||||
|
||||
case Interpreter::java_lang_math_sin : // fall thru
|
||||
case Interpreter::java_lang_math_cos : // fall thru
|
||||
@ -1519,9 +1634,15 @@ address AbstractInterpreterGenerator::generate_method_entry(AbstractInterpreter:
|
||||
case Interpreter::java_lang_math_log10 : // fall thru
|
||||
case Interpreter::java_lang_math_sqrt : // fall thru
|
||||
case Interpreter::java_lang_math_pow : // fall thru
|
||||
case Interpreter::java_lang_math_exp : entry_point = ((InterpreterGenerator*)this)->generate_math_entry(kind); break;
|
||||
case Interpreter::java_lang_math_exp : entry_point = ig_this->generate_math_entry(kind); break;
|
||||
case Interpreter::java_lang_ref_reference_get
|
||||
: entry_point = ((InterpreterGenerator*)this)->generate_Reference_get_entry(); break;
|
||||
: entry_point = ig_this->generate_Reference_get_entry(); break;
|
||||
case Interpreter::java_util_zip_CRC32_update
|
||||
: entry_point = ig_this->generate_CRC32_update_entry(); break;
|
||||
case Interpreter::java_util_zip_CRC32_updateBytes
|
||||
: // fall thru
|
||||
case Interpreter::java_util_zip_CRC32_updateByteBuffer
|
||||
: entry_point = ig_this->generate_CRC32_updateBytes_entry(kind); break;
|
||||
default:
|
||||
fatal(err_msg("unexpected method kind: %d", kind));
|
||||
break;
|
||||
@ -1529,7 +1650,7 @@ address AbstractInterpreterGenerator::generate_method_entry(AbstractInterpreter:
|
||||
|
||||
if (entry_point) return entry_point;
|
||||
|
||||
return ((InterpreterGenerator*)this)->generate_normal_entry(synchronized);
|
||||
return ig_this->generate_normal_entry(synchronized);
|
||||
|
||||
}
|
||||
|
||||
|
@ -840,6 +840,117 @@ address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||
return generate_accessor_entry();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method entry for static native methods:
|
||||
* int java.util.zip.CRC32.update(int crc, int b)
|
||||
*/
|
||||
address InterpreterGenerator::generate_CRC32_update_entry() {
|
||||
if (UseCRC32Intrinsics) {
|
||||
address entry = __ pc();
|
||||
|
||||
// rbx,: Method*
|
||||
// rsi: senderSP must preserved for slow path, set SP to it on fast path
|
||||
// rdx: scratch
|
||||
// rdi: scratch
|
||||
|
||||
Label slow_path;
|
||||
// If we need a safepoint check, generate full interpreter entry.
|
||||
ExternalAddress state(SafepointSynchronize::address_of_state());
|
||||
__ cmp32(ExternalAddress(SafepointSynchronize::address_of_state()),
|
||||
SafepointSynchronize::_not_synchronized);
|
||||
__ jcc(Assembler::notEqual, slow_path);
|
||||
|
||||
// We don't generate local frame and don't align stack because
|
||||
// we call stub code and there is no safepoint on this path.
|
||||
|
||||
// Load parameters
|
||||
const Register crc = rax; // crc
|
||||
const Register val = rdx; // source java byte value
|
||||
const Register tbl = rdi; // scratch
|
||||
|
||||
// Arguments are reversed on java expression stack
|
||||
__ movl(val, Address(rsp, wordSize)); // byte value
|
||||
__ movl(crc, Address(rsp, 2*wordSize)); // Initial CRC
|
||||
|
||||
__ lea(tbl, ExternalAddress(StubRoutines::crc_table_addr()));
|
||||
__ notl(crc); // ~crc
|
||||
__ update_byte_crc32(crc, val, tbl);
|
||||
__ notl(crc); // ~crc
|
||||
// result in rax
|
||||
|
||||
// _areturn
|
||||
__ pop(rdi); // get return address
|
||||
__ mov(rsp, rsi); // set sp to sender sp
|
||||
__ jmp(rdi);
|
||||
|
||||
// generate a vanilla native entry as the slow path
|
||||
__ bind(slow_path);
|
||||
|
||||
(void) generate_native_entry(false);
|
||||
|
||||
return entry;
|
||||
}
|
||||
return generate_native_entry(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method entry for static native methods:
|
||||
* int java.util.zip.CRC32.updateBytes(int crc, byte[] b, int off, int len)
|
||||
* int java.util.zip.CRC32.updateByteBuffer(int crc, long buf, int off, int len)
|
||||
*/
|
||||
address InterpreterGenerator::generate_CRC32_updateBytes_entry(AbstractInterpreter::MethodKind kind) {
|
||||
if (UseCRC32Intrinsics) {
|
||||
address entry = __ pc();
|
||||
|
||||
// rbx,: Method*
|
||||
// r13: senderSP must preserved for slow path, set SP to it on fast path
|
||||
|
||||
Label slow_path;
|
||||
// If we need a safepoint check, generate full interpreter entry.
|
||||
ExternalAddress state(SafepointSynchronize::address_of_state());
|
||||
__ cmp32(ExternalAddress(SafepointSynchronize::address_of_state()),
|
||||
SafepointSynchronize::_not_synchronized);
|
||||
__ jcc(Assembler::notEqual, slow_path);
|
||||
|
||||
// We don't generate local frame and don't align stack because
|
||||
// we call stub code and there is no safepoint on this path.
|
||||
|
||||
// Load parameters
|
||||
const Register crc = c_rarg0; // crc
|
||||
const Register buf = c_rarg1; // source java byte array address
|
||||
const Register len = c_rarg2; // length
|
||||
|
||||
// Arguments are reversed on java expression stack
|
||||
__ movl(len, Address(rsp, wordSize)); // Length
|
||||
// Calculate address of start element
|
||||
if (kind == Interpreter::java_util_zip_CRC32_updateByteBuffer) {
|
||||
__ movptr(buf, Address(rsp, 3*wordSize)); // long buf
|
||||
__ addptr(buf, Address(rsp, 2*wordSize)); // + offset
|
||||
__ movl(crc, Address(rsp, 5*wordSize)); // Initial CRC
|
||||
} else {
|
||||
__ movptr(buf, Address(rsp, 3*wordSize)); // byte[] array
|
||||
__ addptr(buf, arrayOopDesc::base_offset_in_bytes(T_BYTE)); // + header size
|
||||
__ addptr(buf, Address(rsp, 2*wordSize)); // + offset
|
||||
__ movl(crc, Address(rsp, 4*wordSize)); // Initial CRC
|
||||
}
|
||||
|
||||
__ super_call_VM_leaf(CAST_FROM_FN_PTR(address, StubRoutines::updateBytesCRC32()), crc, buf, len);
|
||||
// result in rax
|
||||
|
||||
// _areturn
|
||||
__ pop(rdi); // get return address
|
||||
__ mov(rsp, r13); // set sp to sender sp
|
||||
__ jmp(rdi);
|
||||
|
||||
// generate a vanilla native entry as the slow path
|
||||
__ bind(slow_path);
|
||||
|
||||
(void) generate_native_entry(false);
|
||||
|
||||
return entry;
|
||||
}
|
||||
return generate_native_entry(false);
|
||||
}
|
||||
|
||||
// Interpreter stub for calling a native method. (asm interpreter)
|
||||
// This sets up a somewhat different looking stack for calling the
|
||||
@ -1510,15 +1621,16 @@ address AbstractInterpreterGenerator::generate_method_entry(
|
||||
// determine code generation flags
|
||||
bool synchronized = false;
|
||||
address entry_point = NULL;
|
||||
InterpreterGenerator* ig_this = (InterpreterGenerator*)this;
|
||||
|
||||
switch (kind) {
|
||||
case Interpreter::zerolocals : break;
|
||||
case Interpreter::zerolocals_synchronized: synchronized = true; break;
|
||||
case Interpreter::native : entry_point = ((InterpreterGenerator*)this)->generate_native_entry(false); break;
|
||||
case Interpreter::native_synchronized : entry_point = ((InterpreterGenerator*)this)->generate_native_entry(true); break;
|
||||
case Interpreter::empty : entry_point = ((InterpreterGenerator*)this)->generate_empty_entry(); break;
|
||||
case Interpreter::accessor : entry_point = ((InterpreterGenerator*)this)->generate_accessor_entry(); break;
|
||||
case Interpreter::abstract : entry_point = ((InterpreterGenerator*)this)->generate_abstract_entry(); break;
|
||||
case Interpreter::zerolocals : break;
|
||||
case Interpreter::zerolocals_synchronized: synchronized = true; break;
|
||||
case Interpreter::native : entry_point = ig_this->generate_native_entry(false); break;
|
||||
case Interpreter::native_synchronized : entry_point = ig_this->generate_native_entry(true); break;
|
||||
case Interpreter::empty : entry_point = ig_this->generate_empty_entry(); break;
|
||||
case Interpreter::accessor : entry_point = ig_this->generate_accessor_entry(); break;
|
||||
case Interpreter::abstract : entry_point = ig_this->generate_abstract_entry(); break;
|
||||
|
||||
case Interpreter::java_lang_math_sin : // fall thru
|
||||
case Interpreter::java_lang_math_cos : // fall thru
|
||||
@ -1528,9 +1640,15 @@ address AbstractInterpreterGenerator::generate_method_entry(
|
||||
case Interpreter::java_lang_math_log10 : // fall thru
|
||||
case Interpreter::java_lang_math_sqrt : // fall thru
|
||||
case Interpreter::java_lang_math_pow : // fall thru
|
||||
case Interpreter::java_lang_math_exp : entry_point = ((InterpreterGenerator*)this)->generate_math_entry(kind); break;
|
||||
case Interpreter::java_lang_math_exp : entry_point = ig_this->generate_math_entry(kind); break;
|
||||
case Interpreter::java_lang_ref_reference_get
|
||||
: entry_point = ((InterpreterGenerator*)this)->generate_Reference_get_entry(); break;
|
||||
: entry_point = ig_this->generate_Reference_get_entry(); break;
|
||||
case Interpreter::java_util_zip_CRC32_update
|
||||
: entry_point = ig_this->generate_CRC32_update_entry(); break;
|
||||
case Interpreter::java_util_zip_CRC32_updateBytes
|
||||
: // fall thru
|
||||
case Interpreter::java_util_zip_CRC32_updateByteBuffer
|
||||
: entry_point = ig_this->generate_CRC32_updateBytes_entry(kind); break;
|
||||
default:
|
||||
fatal(err_msg("unexpected method kind: %d", kind));
|
||||
break;
|
||||
@ -1540,8 +1658,7 @@ address AbstractInterpreterGenerator::generate_method_entry(
|
||||
return entry_point;
|
||||
}
|
||||
|
||||
return ((InterpreterGenerator*) this)->
|
||||
generate_normal_entry(synchronized);
|
||||
return ig_this->generate_normal_entry(synchronized);
|
||||
}
|
||||
|
||||
// These should never be compiled since the interpreter will prefer
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -446,6 +446,7 @@ void VM_Version::get_processor_features() {
|
||||
(supports_avx() ? ", avx" : ""),
|
||||
(supports_avx2() ? ", avx2" : ""),
|
||||
(supports_aes() ? ", aes" : ""),
|
||||
(supports_clmul() ? ", clmul" : ""),
|
||||
(supports_erms() ? ", erms" : ""),
|
||||
(supports_mmx_ext() ? ", mmxext" : ""),
|
||||
(supports_3dnow_prefetch() ? ", 3dnowpref" : ""),
|
||||
@ -489,6 +490,27 @@ void VM_Version::get_processor_features() {
|
||||
FLAG_SET_DEFAULT(UseAES, false);
|
||||
}
|
||||
|
||||
// Use CLMUL instructions if available.
|
||||
if (supports_clmul()) {
|
||||
if (FLAG_IS_DEFAULT(UseCLMUL)) {
|
||||
UseCLMUL = true;
|
||||
}
|
||||
} else if (UseCLMUL) {
|
||||
if (!FLAG_IS_DEFAULT(UseCLMUL))
|
||||
warning("CLMUL instructions not available on this CPU (AVX may also be required)");
|
||||
FLAG_SET_DEFAULT(UseCLMUL, false);
|
||||
}
|
||||
|
||||
if (UseCLMUL && (UseAVX > 0) && (UseSSE > 2)) {
|
||||
if (FLAG_IS_DEFAULT(UseCRC32Intrinsics)) {
|
||||
UseCRC32Intrinsics = true;
|
||||
}
|
||||
} else if (UseCRC32Intrinsics) {
|
||||
if (!FLAG_IS_DEFAULT(UseCRC32Intrinsics))
|
||||
warning("CRC32 Intrinsics requires AVX and CLMUL instructions (not available on this CPU)");
|
||||
FLAG_SET_DEFAULT(UseCRC32Intrinsics, false);
|
||||
}
|
||||
|
||||
// The AES intrinsic stubs require AES instruction support (of course)
|
||||
// but also require sse3 mode for instructions it use.
|
||||
if (UseAES && (UseSSE > 2)) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -61,7 +61,8 @@ public:
|
||||
uint32_t value;
|
||||
struct {
|
||||
uint32_t sse3 : 1,
|
||||
: 2,
|
||||
clmul : 1,
|
||||
: 1,
|
||||
monitor : 1,
|
||||
: 1,
|
||||
vmx : 1,
|
||||
@ -249,7 +250,8 @@ protected:
|
||||
CPU_AVX = (1 << 17),
|
||||
CPU_AVX2 = (1 << 18),
|
||||
CPU_AES = (1 << 19),
|
||||
CPU_ERMS = (1 << 20) // enhanced 'rep movsb/stosb' instructions
|
||||
CPU_ERMS = (1 << 20), // enhanced 'rep movsb/stosb' instructions
|
||||
CPU_CLMUL = (1 << 21) // carryless multiply for CRC
|
||||
} cpuFeatureFlags;
|
||||
|
||||
enum {
|
||||
@ -429,6 +431,8 @@ protected:
|
||||
result |= CPU_AES;
|
||||
if (_cpuid_info.sef_cpuid7_ebx.bits.erms != 0)
|
||||
result |= CPU_ERMS;
|
||||
if (_cpuid_info.std_cpuid1_ecx.bits.clmul != 0)
|
||||
result |= CPU_CLMUL;
|
||||
|
||||
// AMD features.
|
||||
if (is_amd()) {
|
||||
@ -555,6 +559,7 @@ public:
|
||||
static bool supports_tsc() { return (_cpuFeatures & CPU_TSC) != 0; }
|
||||
static bool supports_aes() { return (_cpuFeatures & CPU_AES) != 0; }
|
||||
static bool supports_erms() { return (_cpuFeatures & CPU_ERMS) != 0; }
|
||||
static bool supports_clmul() { return (_cpuFeatures & CPU_CLMUL) != 0; }
|
||||
|
||||
// Intel features
|
||||
static bool is_intel_family_core() { return is_intel() &&
|
||||
|
@ -52,22 +52,6 @@ address* Relocation::pd_address_in_code() {
|
||||
return (address *) addr();
|
||||
}
|
||||
|
||||
int Relocation::pd_breakpoint_size() {
|
||||
ShouldNotCallThis();
|
||||
}
|
||||
|
||||
void Relocation::pd_swap_in_breakpoint(address x,
|
||||
short* instrs,
|
||||
int instrlen) {
|
||||
ShouldNotCallThis();
|
||||
}
|
||||
|
||||
void Relocation::pd_swap_out_breakpoint(address x,
|
||||
short* instrs,
|
||||
int instrlen) {
|
||||
ShouldNotCallThis();
|
||||
}
|
||||
|
||||
void poll_Relocation::fix_relocation_after_move(const CodeBuffer* src,
|
||||
CodeBuffer* dst) {
|
||||
ShouldNotCallThis();
|
||||
|
@ -58,7 +58,9 @@ define_pd_global(intx, ReservedCodeCacheSize, 32*M );
|
||||
define_pd_global(bool, ProfileInterpreter, false);
|
||||
define_pd_global(intx, CodeCacheExpansionSize, 32*K );
|
||||
define_pd_global(uintx, CodeCacheMinBlockLength, 1 );
|
||||
define_pd_global(uintx, MetaspaceSize, 12*M );
|
||||
define_pd_global(uintx, CodeCacheMinimumUseSpace, 200*K);
|
||||
|
||||
define_pd_global(uintx, MetaspaceSize, 12*M );
|
||||
define_pd_global(bool, NeverActAsServerClassMachine, true );
|
||||
define_pd_global(uint64_t, MaxRAM, 1ULL*G);
|
||||
define_pd_global(bool, CICompileOSR, true );
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -332,12 +332,15 @@ dtrace:helper:ustack:
|
||||
|
||||
this->nameSymbol = copyin_ptr(this->constantPool +
|
||||
this->nameIndex * sizeof (pointer) + SIZE_ConstantPool);
|
||||
/* The symbol is a CPSlot and has lower bit set to indicate metadata */
|
||||
this->nameSymbol &= (~1); /* remove metadata lsb */
|
||||
|
||||
this->nameSymbolLength = copyin_uint16(this->nameSymbol +
|
||||
OFFSET_Symbol_length);
|
||||
|
||||
this->signatureSymbol = copyin_ptr(this->constantPool +
|
||||
this->signatureIndex * sizeof (pointer) + SIZE_ConstantPool);
|
||||
this->signatureSymbol &= (~1); /* remove metadata lsb */
|
||||
|
||||
this->signatureSymbolLength = copyin_uint16(this->signatureSymbol +
|
||||
OFFSET_Symbol_length);
|
||||
|
@ -89,7 +89,7 @@ inline int os::readdir_buf_size(const char *path) {
|
||||
|
||||
inline struct dirent* os::readdir(DIR* dirp, dirent* dbuf) {
|
||||
assert(dirp != NULL, "just checking");
|
||||
#if defined(_LP64) || defined(_GNU_SOURCE)
|
||||
#if defined(_LP64) || defined(_GNU_SOURCE) || _FILE_OFFSET_BITS==64
|
||||
dirent* p;
|
||||
int status;
|
||||
|
||||
@ -98,9 +98,9 @@ inline struct dirent* os::readdir(DIR* dirp, dirent* dbuf) {
|
||||
return NULL;
|
||||
} else
|
||||
return p;
|
||||
#else // defined(_LP64) || defined(_GNU_SOURCE)
|
||||
#else // defined(_LP64) || defined(_GNU_SOURCE) || _FILE_OFFSET_BITS==64
|
||||
return ::readdir_r(dirp, dbuf);
|
||||
#endif // defined(_LP64) || defined(_GNU_SOURCE)
|
||||
#endif // defined(_LP64) || defined(_GNU_SOURCE) || _FILE_OFFSET_BITS==64
|
||||
}
|
||||
|
||||
inline int os::closedir(DIR *dirp) {
|
||||
|
@ -289,6 +289,16 @@ JVM_handle_linux_signal(int sig,
|
||||
}
|
||||
#endif // AMD64
|
||||
|
||||
#ifndef AMD64
|
||||
// Halt if SI_KERNEL before more crashes get misdiagnosed as Java bugs
|
||||
// This can happen in any running code (currently more frequently in
|
||||
// interpreter code but has been seen in compiled code)
|
||||
if (sig == SIGSEGV && info->si_addr == 0 && info->si_code == SI_KERNEL) {
|
||||
fatal("An irrecoverable SI_KERNEL SIGSEGV has occurred due "
|
||||
"to unstable signal handling in this distribution.");
|
||||
}
|
||||
#endif // AMD64
|
||||
|
||||
// Handle ALL stack overflow variations here
|
||||
if (sig == SIGSEGV) {
|
||||
address addr = (address) info->si_addr;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -3461,6 +3461,14 @@ bool GraphBuilder::try_inline_intrinsics(ciMethod* callee) {
|
||||
preserves_state = true;
|
||||
break;
|
||||
|
||||
case vmIntrinsics::_updateCRC32:
|
||||
case vmIntrinsics::_updateBytesCRC32:
|
||||
case vmIntrinsics::_updateByteBufferCRC32:
|
||||
if (!UseCRC32Intrinsics) return false;
|
||||
cantrap = false;
|
||||
preserves_state = true;
|
||||
break;
|
||||
|
||||
case vmIntrinsics::_loadFence :
|
||||
case vmIntrinsics::_storeFence:
|
||||
case vmIntrinsics::_fullFence :
|
||||
|
@ -430,6 +430,11 @@ LIR_OpArrayCopy::LIR_OpArrayCopy(LIR_Opr src, LIR_Opr src_pos, LIR_Opr dst, LIR_
|
||||
_stub = new ArrayCopyStub(this);
|
||||
}
|
||||
|
||||
LIR_OpUpdateCRC32::LIR_OpUpdateCRC32(LIR_Opr crc, LIR_Opr val, LIR_Opr res)
|
||||
: LIR_Op(lir_updatecrc32, res, NULL)
|
||||
, _crc(crc)
|
||||
, _val(val) {
|
||||
}
|
||||
|
||||
//-------------------verify--------------------------
|
||||
|
||||
@ -876,6 +881,20 @@ void LIR_OpVisitState::visit(LIR_Op* op) {
|
||||
}
|
||||
|
||||
|
||||
// LIR_OpUpdateCRC32
|
||||
case lir_updatecrc32: {
|
||||
assert(op->as_OpUpdateCRC32() != NULL, "must be");
|
||||
LIR_OpUpdateCRC32* opUp = (LIR_OpUpdateCRC32*)op;
|
||||
|
||||
assert(opUp->_crc->is_valid(), "used"); do_input(opUp->_crc); do_temp(opUp->_crc);
|
||||
assert(opUp->_val->is_valid(), "used"); do_input(opUp->_val); do_temp(opUp->_val);
|
||||
assert(opUp->_result->is_valid(), "used"); do_output(opUp->_result);
|
||||
assert(opUp->_info == NULL, "no info for LIR_OpUpdateCRC32");
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
// LIR_OpLock
|
||||
case lir_lock:
|
||||
case lir_unlock: {
|
||||
@ -1056,6 +1075,10 @@ void LIR_OpArrayCopy::emit_code(LIR_Assembler* masm) {
|
||||
masm->emit_code_stub(stub());
|
||||
}
|
||||
|
||||
void LIR_OpUpdateCRC32::emit_code(LIR_Assembler* masm) {
|
||||
masm->emit_updatecrc32(this);
|
||||
}
|
||||
|
||||
void LIR_Op0::emit_code(LIR_Assembler* masm) {
|
||||
masm->emit_op0(this);
|
||||
}
|
||||
@ -1763,6 +1786,8 @@ const char * LIR_Op::name() const {
|
||||
case lir_dynamic_call: s = "dynamic"; break;
|
||||
// LIR_OpArrayCopy
|
||||
case lir_arraycopy: s = "arraycopy"; break;
|
||||
// LIR_OpUpdateCRC32
|
||||
case lir_updatecrc32: s = "updatecrc32"; break;
|
||||
// LIR_OpLock
|
||||
case lir_lock: s = "lock"; break;
|
||||
case lir_unlock: s = "unlock"; break;
|
||||
@ -1815,6 +1840,13 @@ void LIR_OpArrayCopy::print_instr(outputStream* out) const {
|
||||
tmp()->print(out); out->print(" ");
|
||||
}
|
||||
|
||||
// LIR_OpUpdateCRC32
|
||||
void LIR_OpUpdateCRC32::print_instr(outputStream* out) const {
|
||||
crc()->print(out); out->print(" ");
|
||||
val()->print(out); out->print(" ");
|
||||
result_opr()->print(out); out->print(" ");
|
||||
}
|
||||
|
||||
// LIR_OpCompareAndSwap
|
||||
void LIR_OpCompareAndSwap::print_instr(outputStream* out) const {
|
||||
addr()->print(out); out->print(" ");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -877,6 +877,7 @@ class LIR_OpCall;
|
||||
class LIR_OpJavaCall;
|
||||
class LIR_OpRTCall;
|
||||
class LIR_OpArrayCopy;
|
||||
class LIR_OpUpdateCRC32;
|
||||
class LIR_OpLock;
|
||||
class LIR_OpTypeCheck;
|
||||
class LIR_OpCompareAndSwap;
|
||||
@ -982,6 +983,9 @@ enum LIR_Code {
|
||||
, begin_opArrayCopy
|
||||
, lir_arraycopy
|
||||
, end_opArrayCopy
|
||||
, begin_opUpdateCRC32
|
||||
, lir_updatecrc32
|
||||
, end_opUpdateCRC32
|
||||
, begin_opLock
|
||||
, lir_lock
|
||||
, lir_unlock
|
||||
@ -1137,6 +1141,7 @@ class LIR_Op: public CompilationResourceObj {
|
||||
virtual LIR_Op2* as_Op2() { return NULL; }
|
||||
virtual LIR_Op3* as_Op3() { return NULL; }
|
||||
virtual LIR_OpArrayCopy* as_OpArrayCopy() { return NULL; }
|
||||
virtual LIR_OpUpdateCRC32* as_OpUpdateCRC32() { return NULL; }
|
||||
virtual LIR_OpTypeCheck* as_OpTypeCheck() { return NULL; }
|
||||
virtual LIR_OpCompareAndSwap* as_OpCompareAndSwap() { return NULL; }
|
||||
virtual LIR_OpProfileCall* as_OpProfileCall() { return NULL; }
|
||||
@ -1293,6 +1298,25 @@ public:
|
||||
void print_instr(outputStream* out) const PRODUCT_RETURN;
|
||||
};
|
||||
|
||||
// LIR_OpUpdateCRC32
|
||||
class LIR_OpUpdateCRC32: public LIR_Op {
|
||||
friend class LIR_OpVisitState;
|
||||
|
||||
private:
|
||||
LIR_Opr _crc;
|
||||
LIR_Opr _val;
|
||||
|
||||
public:
|
||||
|
||||
LIR_OpUpdateCRC32(LIR_Opr crc, LIR_Opr val, LIR_Opr res);
|
||||
|
||||
LIR_Opr crc() const { return _crc; }
|
||||
LIR_Opr val() const { return _val; }
|
||||
|
||||
virtual void emit_code(LIR_Assembler* masm);
|
||||
virtual LIR_OpUpdateCRC32* as_OpUpdateCRC32() { return this; }
|
||||
void print_instr(outputStream* out) const PRODUCT_RETURN;
|
||||
};
|
||||
|
||||
// --------------------------------------------------
|
||||
// LIR_Op0
|
||||
@ -2212,6 +2236,8 @@ class LIR_List: public CompilationResourceObj {
|
||||
|
||||
void arraycopy(LIR_Opr src, LIR_Opr src_pos, LIR_Opr dst, LIR_Opr dst_pos, LIR_Opr length, LIR_Opr tmp, ciArrayKlass* expected_type, int flags, CodeEmitInfo* info) { append(new LIR_OpArrayCopy(src, src_pos, dst, dst_pos, length, tmp, expected_type, flags, info)); }
|
||||
|
||||
void update_crc32(LIR_Opr crc, LIR_Opr val, LIR_Opr res) { append(new LIR_OpUpdateCRC32(crc, val, res)); }
|
||||
|
||||
void fpop_raw() { append(new LIR_Op0(lir_fpop_raw)); }
|
||||
|
||||
void instanceof(LIR_Opr result, LIR_Opr object, ciKlass* klass, LIR_Opr tmp1, LIR_Opr tmp2, LIR_Opr tmp3, bool fast_check, CodeEmitInfo* info_for_patch, ciMethod* profiled_method, int profiled_bci);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -195,6 +195,7 @@ class LIR_Assembler: public CompilationResourceObj {
|
||||
void emit_opBranch(LIR_OpBranch* op);
|
||||
void emit_opLabel(LIR_OpLabel* op);
|
||||
void emit_arraycopy(LIR_OpArrayCopy* op);
|
||||
void emit_updatecrc32(LIR_OpUpdateCRC32* op);
|
||||
void emit_opConvert(LIR_OpConvert* op);
|
||||
void emit_alloc_obj(LIR_OpAllocObj* op);
|
||||
void emit_alloc_array(LIR_OpAllocArray* op);
|
||||
|
@ -2994,6 +2994,12 @@ void LIRGenerator::do_Intrinsic(Intrinsic* x) {
|
||||
do_Reference_get(x);
|
||||
break;
|
||||
|
||||
case vmIntrinsics::_updateCRC32:
|
||||
case vmIntrinsics::_updateBytesCRC32:
|
||||
case vmIntrinsics::_updateByteBufferCRC32:
|
||||
do_update_CRC32(x);
|
||||
break;
|
||||
|
||||
default: ShouldNotReachHere(); break;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -247,6 +247,7 @@ class LIRGenerator: public InstructionVisitor, public BlockClosure {
|
||||
void do_NIOCheckIndex(Intrinsic* x);
|
||||
void do_FPIntrinsics(Intrinsic* x);
|
||||
void do_Reference_get(Intrinsic* x);
|
||||
void do_update_CRC32(Intrinsic* x);
|
||||
|
||||
void do_UnsafePrefetch(UnsafePrefetch* x, bool is_store);
|
||||
|
||||
|
@ -299,6 +299,7 @@ const char* Runtime1::name_for_address(address entry) {
|
||||
#ifdef TRACE_HAVE_INTRINSICS
|
||||
FUNCTION_CASE(entry, TRACE_TIME_METHOD);
|
||||
#endif
|
||||
FUNCTION_CASE(entry, StubRoutines::updateBytesCRC32());
|
||||
|
||||
#undef FUNCTION_CASE
|
||||
|
||||
|
@ -265,8 +265,6 @@ ciObject* ciObjectFactory::get(oop key) {
|
||||
ciMetadata* ciObjectFactory::get_metadata(Metadata* key) {
|
||||
ASSERT_IN_VM;
|
||||
|
||||
assert(key == NULL || key->is_metadata(), "must be");
|
||||
|
||||
#ifdef ASSERT
|
||||
if (CIObjectFactoryVerify) {
|
||||
Metadata* last = NULL;
|
||||
|
@ -555,7 +555,7 @@ void Dictionary::verify() {
|
||||
loader_data->class_loader() == NULL ||
|
||||
loader_data->class_loader()->is_instance(),
|
||||
"checking type of class_loader");
|
||||
e->verify();
|
||||
e->verify(/*check_dictionary*/false);
|
||||
probe->verify_protection_domain_set();
|
||||
element_count++;
|
||||
}
|
||||
|
@ -771,6 +771,17 @@
|
||||
do_name( decrypt_name, "decrypt") \
|
||||
do_signature(byteArray_int_int_byteArray_int_signature, "([BII[BI)V") \
|
||||
\
|
||||
/* support for java.util.zip */ \
|
||||
do_class(java_util_zip_CRC32, "java/util/zip/CRC32") \
|
||||
do_intrinsic(_updateCRC32, java_util_zip_CRC32, update_name, int2_int_signature, F_SN) \
|
||||
do_name( update_name, "update") \
|
||||
do_intrinsic(_updateBytesCRC32, java_util_zip_CRC32, updateBytes_name, updateBytes_signature, F_SN) \
|
||||
do_name( updateBytes_name, "updateBytes") \
|
||||
do_signature(updateBytes_signature, "(I[BII)I") \
|
||||
do_intrinsic(_updateByteBufferCRC32, java_util_zip_CRC32, updateByteBuffer_name, updateByteBuffer_signature, F_SN) \
|
||||
do_name( updateByteBuffer_name, "updateByteBuffer") \
|
||||
do_signature(updateByteBuffer_signature, "(IJII)I") \
|
||||
\
|
||||
/* support for sun.misc.Unsafe */ \
|
||||
do_class(sun_misc_Unsafe, "sun/misc/Unsafe") \
|
||||
\
|
||||
|
@ -274,7 +274,7 @@ class DebugInfoReadStream : public CompressedReadStream {
|
||||
Method* read_method() {
|
||||
Method* o = (Method*)(code()->metadata_at(read_int()));
|
||||
assert(o == NULL ||
|
||||
o->is_metadata(), "meta data only");
|
||||
o->is_metaspace_object(), "meta data only");
|
||||
return o;
|
||||
}
|
||||
ScopeValue* read_object_value();
|
||||
|
@ -655,8 +655,8 @@ inline Metadata* Dependencies::DepStream::recorded_metadata_at(int i) {
|
||||
} else {
|
||||
o = _deps->oop_recorder()->metadata_at(i);
|
||||
}
|
||||
assert(o == NULL || o->is_metadata(),
|
||||
err_msg("Should be perm " PTR_FORMAT, o));
|
||||
assert(o == NULL || o->is_metaspace_object(),
|
||||
err_msg("Should be metadata " PTR_FORMAT, o));
|
||||
return o;
|
||||
}
|
||||
|
||||
|
@ -1081,11 +1081,6 @@ void nmethod::fix_oop_relocations(address begin, address end, bool initialize_im
|
||||
metadata_Relocation* reloc = iter.metadata_reloc();
|
||||
reloc->fix_metadata_relocation();
|
||||
}
|
||||
|
||||
// There must not be any interfering patches or breakpoints.
|
||||
assert(!(iter.type() == relocInfo::breakpoint_type
|
||||
&& iter.breakpoint_reloc()->active()),
|
||||
"no active breakpoint");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -338,31 +338,6 @@ void RelocIterator::set_limit(address limit) {
|
||||
_limit = limit;
|
||||
}
|
||||
|
||||
|
||||
void PatchingRelocIterator:: prepass() {
|
||||
// turn breakpoints off during patching
|
||||
_init_state = (*this); // save cursor
|
||||
while (next()) {
|
||||
if (type() == relocInfo::breakpoint_type) {
|
||||
breakpoint_reloc()->set_active(false);
|
||||
}
|
||||
}
|
||||
(RelocIterator&)(*this) = _init_state; // reset cursor for client
|
||||
}
|
||||
|
||||
|
||||
void PatchingRelocIterator:: postpass() {
|
||||
// turn breakpoints back on after patching
|
||||
(RelocIterator&)(*this) = _init_state; // reset cursor again
|
||||
while (next()) {
|
||||
if (type() == relocInfo::breakpoint_type) {
|
||||
breakpoint_Relocation* bpt = breakpoint_reloc();
|
||||
bpt->set_active(bpt->enabled());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// All the strange bit-encodings are in here.
|
||||
// The idea is to encode relocation data which are small integers
|
||||
// very efficiently (a single extra halfword). Larger chunks of
|
||||
@ -704,51 +679,6 @@ void section_word_Relocation::unpack_data() {
|
||||
_target = address_from_scaled_offset(offset, base);
|
||||
}
|
||||
|
||||
|
||||
void breakpoint_Relocation::pack_data_to(CodeSection* dest) {
|
||||
short* p = (short*) dest->locs_end();
|
||||
address point = dest->locs_point();
|
||||
|
||||
*p++ = _bits;
|
||||
|
||||
assert(_target != NULL, "sanity");
|
||||
|
||||
if (internal()) normalize_address(_target, dest);
|
||||
|
||||
jint target_bits =
|
||||
(jint)( internal() ? scaled_offset (_target, point)
|
||||
: runtime_address_to_index(_target) );
|
||||
if (settable()) {
|
||||
// save space for set_target later
|
||||
p = add_jint(p, target_bits);
|
||||
} else {
|
||||
p = add_var_int(p, target_bits);
|
||||
}
|
||||
|
||||
for (int i = 0; i < instrlen(); i++) {
|
||||
// put placeholder words until bytes can be saved
|
||||
p = add_short(p, (short)0x7777);
|
||||
}
|
||||
|
||||
dest->set_locs_end((relocInfo*) p);
|
||||
}
|
||||
|
||||
|
||||
void breakpoint_Relocation::unpack_data() {
|
||||
_bits = live_bits();
|
||||
|
||||
int targetlen = datalen() - 1 - instrlen();
|
||||
jint target_bits = 0;
|
||||
if (targetlen == 0) target_bits = 0;
|
||||
else if (targetlen == 1) target_bits = *(data()+1);
|
||||
else if (targetlen == 2) target_bits = relocInfo::jint_from_data(data()+1);
|
||||
else { ShouldNotReachHere(); }
|
||||
|
||||
_target = internal() ? address_from_scaled_offset(target_bits, addr())
|
||||
: index_to_runtime_address (target_bits);
|
||||
}
|
||||
|
||||
|
||||
//// miscellaneous methods
|
||||
oop* oop_Relocation::oop_addr() {
|
||||
int n = _oop_index;
|
||||
@ -933,81 +863,6 @@ address internal_word_Relocation::target() {
|
||||
return target;
|
||||
}
|
||||
|
||||
|
||||
breakpoint_Relocation::breakpoint_Relocation(int kind, address target, bool internal) {
|
||||
bool active = false;
|
||||
bool enabled = (kind == initialization);
|
||||
bool removable = (kind != safepoint);
|
||||
bool settable = (target == NULL);
|
||||
|
||||
int bits = kind;
|
||||
if (enabled) bits |= enabled_state;
|
||||
if (internal) bits |= internal_attr;
|
||||
if (removable) bits |= removable_attr;
|
||||
if (settable) bits |= settable_attr;
|
||||
|
||||
_bits = bits | high_bit;
|
||||
_target = target;
|
||||
|
||||
assert(this->kind() == kind, "kind encoded");
|
||||
assert(this->enabled() == enabled, "enabled encoded");
|
||||
assert(this->active() == active, "active encoded");
|
||||
assert(this->internal() == internal, "internal encoded");
|
||||
assert(this->removable() == removable, "removable encoded");
|
||||
assert(this->settable() == settable, "settable encoded");
|
||||
}
|
||||
|
||||
|
||||
address breakpoint_Relocation::target() const {
|
||||
return _target;
|
||||
}
|
||||
|
||||
|
||||
void breakpoint_Relocation::set_target(address x) {
|
||||
assert(settable(), "must be settable");
|
||||
jint target_bits =
|
||||
(jint)(internal() ? scaled_offset (x, addr())
|
||||
: runtime_address_to_index(x));
|
||||
short* p = &live_bits() + 1;
|
||||
p = add_jint(p, target_bits);
|
||||
assert(p == instrs(), "new target must fit");
|
||||
_target = x;
|
||||
}
|
||||
|
||||
|
||||
void breakpoint_Relocation::set_enabled(bool b) {
|
||||
if (enabled() == b) return;
|
||||
|
||||
if (b) {
|
||||
set_bits(bits() | enabled_state);
|
||||
} else {
|
||||
set_active(false); // remove the actual breakpoint insn, if any
|
||||
set_bits(bits() & ~enabled_state);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void breakpoint_Relocation::set_active(bool b) {
|
||||
assert(!b || enabled(), "cannot activate a disabled breakpoint");
|
||||
|
||||
if (active() == b) return;
|
||||
|
||||
// %%% should probably seize a lock here (might not be the right lock)
|
||||
//MutexLockerEx ml_patch(Patching_lock, true);
|
||||
//if (active() == b) return; // recheck state after locking
|
||||
|
||||
if (b) {
|
||||
set_bits(bits() | active_state);
|
||||
if (instrlen() == 0)
|
||||
fatal("breakpoints in original code must be undoable");
|
||||
pd_swap_in_breakpoint (addr(), instrs(), instrlen());
|
||||
} else {
|
||||
set_bits(bits() & ~active_state);
|
||||
pd_swap_out_breakpoint(addr(), instrs(), instrlen());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Non-product code
|
||||
|
||||
|
@ -49,9 +49,6 @@ class NativeMovConstReg;
|
||||
// RelocIterator
|
||||
// A StackObj which iterates over the relocations associated with
|
||||
// a range of code addresses. Can be used to operate a copy of code.
|
||||
// PatchingRelocIterator
|
||||
// Specialized subtype of RelocIterator which removes breakpoints
|
||||
// temporarily during iteration, then restores them.
|
||||
// BoundRelocation
|
||||
// An _internal_ type shared by packers and unpackers of relocations.
|
||||
// It pastes together a RelocationHolder with some pointers into
|
||||
@ -204,15 +201,6 @@ class NativeMovConstReg;
|
||||
// immediate field must not straddle a unit of memory coherence.
|
||||
// //%note reloc_3
|
||||
//
|
||||
// relocInfo::breakpoint_type -- a conditional breakpoint in the code
|
||||
// Value: none
|
||||
// Instruction types: any whatsoever
|
||||
// Data: [b [T]t i...]
|
||||
// The b is a bit-packed word representing the breakpoint's attributes.
|
||||
// The t is a target address which the breakpoint calls (when it is enabled).
|
||||
// The i... is a place to store one or two instruction words overwritten
|
||||
// by a trap, so that the breakpoint may be subsequently removed.
|
||||
//
|
||||
// relocInfo::static_stub_type -- an extra stub for each static_call_type
|
||||
// Value: none
|
||||
// Instruction types: a virtual call: { set_oop; jump; }
|
||||
@ -271,8 +259,8 @@ class relocInfo VALUE_OBJ_CLASS_SPEC {
|
||||
section_word_type = 9, // internal, but a cross-section reference
|
||||
poll_type = 10, // polling instruction for safepoints
|
||||
poll_return_type = 11, // polling instruction for safepoints at return
|
||||
breakpoint_type = 12, // an initialization barrier or safepoint
|
||||
metadata_type = 13, // metadata that used to be oops
|
||||
metadata_type = 12, // metadata that used to be oops
|
||||
yet_unused_type_1 = 13, // Still unused
|
||||
yet_unused_type_2 = 14, // Still unused
|
||||
data_prefix_tag = 15, // tag for a prefix (carries data arguments)
|
||||
type_mask = 15 // A mask which selects only the above values
|
||||
@ -312,7 +300,6 @@ class relocInfo VALUE_OBJ_CLASS_SPEC {
|
||||
visitor(internal_word) \
|
||||
visitor(poll) \
|
||||
visitor(poll_return) \
|
||||
visitor(breakpoint) \
|
||||
visitor(section_word) \
|
||||
|
||||
|
||||
@ -454,7 +441,7 @@ class relocInfo VALUE_OBJ_CLASS_SPEC {
|
||||
public:
|
||||
enum {
|
||||
// Conservatively large estimate of maximum length (in shorts)
|
||||
// of any relocation record (probably breakpoints are largest).
|
||||
// of any relocation record.
|
||||
// Extended format is length prefix, data words, and tag/offset suffix.
|
||||
length_limit = 1 + 1 + (3*BytesPerWord/BytesPerShort) + 1,
|
||||
have_format = format_width > 0
|
||||
@ -571,8 +558,6 @@ class RelocIterator : public StackObj {
|
||||
|
||||
void initialize(nmethod* nm, address begin, address limit);
|
||||
|
||||
friend class PatchingRelocIterator;
|
||||
// make an uninitialized one, for PatchingRelocIterator:
|
||||
RelocIterator() { initialize_misc(); }
|
||||
|
||||
public:
|
||||
@ -779,9 +764,6 @@ class Relocation VALUE_OBJ_CLASS_SPEC {
|
||||
void pd_verify_data_value (address x, intptr_t off) { pd_set_data_value(x, off, true); }
|
||||
address pd_call_destination (address orig_addr = NULL);
|
||||
void pd_set_call_destination (address x);
|
||||
void pd_swap_in_breakpoint (address x, short* instrs, int instrlen);
|
||||
void pd_swap_out_breakpoint (address x, short* instrs, int instrlen);
|
||||
static int pd_breakpoint_size ();
|
||||
|
||||
// this extracts the address of an address in the code stream instead of the reloc data
|
||||
address* pd_address_in_code ();
|
||||
@ -1302,87 +1284,6 @@ class poll_return_Relocation : public Relocation {
|
||||
void fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest);
|
||||
};
|
||||
|
||||
|
||||
class breakpoint_Relocation : public Relocation {
|
||||
relocInfo::relocType type() { return relocInfo::breakpoint_type; }
|
||||
|
||||
enum {
|
||||
// attributes which affect the interpretation of the data:
|
||||
removable_attr = 0x0010, // buffer [i...] allows for undoing the trap
|
||||
internal_attr = 0x0020, // the target is an internal addr (local stub)
|
||||
settable_attr = 0x0040, // the target is settable
|
||||
|
||||
// states which can change over time:
|
||||
enabled_state = 0x0100, // breakpoint must be active in running code
|
||||
active_state = 0x0200, // breakpoint instruction actually in code
|
||||
|
||||
kind_mask = 0x000F, // mask for extracting kind
|
||||
high_bit = 0x4000 // extra bit which is always set
|
||||
};
|
||||
|
||||
public:
|
||||
enum {
|
||||
// kinds:
|
||||
initialization = 1,
|
||||
safepoint = 2
|
||||
};
|
||||
|
||||
// If target is NULL, 32 bits are reserved for a later set_target().
|
||||
static RelocationHolder spec(int kind, address target = NULL, bool internal_target = false) {
|
||||
RelocationHolder rh = newHolder();
|
||||
new(rh) breakpoint_Relocation(kind, target, internal_target);
|
||||
return rh;
|
||||
}
|
||||
|
||||
private:
|
||||
// We require every bits value to NOT to fit into relocInfo::datalen_width,
|
||||
// because we are going to actually store state in the reloc, and so
|
||||
// cannot allow it to be compressed (and hence copied by the iterator).
|
||||
|
||||
short _bits; // bit-encoded kind, attrs, & state
|
||||
address _target;
|
||||
|
||||
breakpoint_Relocation(int kind, address target, bool internal_target);
|
||||
|
||||
friend class RelocIterator;
|
||||
breakpoint_Relocation() { }
|
||||
|
||||
short bits() const { return _bits; }
|
||||
short& live_bits() const { return data()[0]; }
|
||||
short* instrs() const { return data() + datalen() - instrlen(); }
|
||||
int instrlen() const { return removable() ? pd_breakpoint_size() : 0; }
|
||||
|
||||
void set_bits(short x) {
|
||||
assert(live_bits() == _bits, "must be the only mutator of reloc info");
|
||||
live_bits() = _bits = x;
|
||||
}
|
||||
|
||||
public:
|
||||
address target() const;
|
||||
void set_target(address x);
|
||||
|
||||
int kind() const { return bits() & kind_mask; }
|
||||
bool enabled() const { return (bits() & enabled_state) != 0; }
|
||||
bool active() const { return (bits() & active_state) != 0; }
|
||||
bool internal() const { return (bits() & internal_attr) != 0; }
|
||||
bool removable() const { return (bits() & removable_attr) != 0; }
|
||||
bool settable() const { return (bits() & settable_attr) != 0; }
|
||||
|
||||
void set_enabled(bool b); // to activate, you must also say set_active
|
||||
void set_active(bool b); // actually inserts bpt (must be enabled 1st)
|
||||
|
||||
// data is packed as 16 bits, followed by the target (1 or 2 words), followed
|
||||
// if necessary by empty storage for saving away original instruction bytes.
|
||||
void pack_data_to(CodeSection* dest);
|
||||
void unpack_data();
|
||||
|
||||
// during certain operations, breakpoints must be out of the way:
|
||||
void fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest) {
|
||||
assert(!active(), "cannot perform relocation on enabled breakpoints");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// We know all the xxx_Relocation classes, so now we can define these:
|
||||
#define EACH_CASE(name) \
|
||||
inline name##_Relocation* RelocIterator::name##_reloc() { \
|
||||
@ -1401,25 +1302,4 @@ inline RelocIterator::RelocIterator(nmethod* nm, address begin, address limit) {
|
||||
initialize(nm, begin, limit);
|
||||
}
|
||||
|
||||
// if you are going to patch code, you should use this subclass of
|
||||
// RelocIterator
|
||||
class PatchingRelocIterator : public RelocIterator {
|
||||
private:
|
||||
RelocIterator _init_state;
|
||||
|
||||
void prepass(); // deactivates all breakpoints
|
||||
void postpass(); // reactivates all enabled breakpoints
|
||||
|
||||
// do not copy these puppies; it would have unpredictable side effects
|
||||
// these are private and have no bodies defined because they should not be called
|
||||
PatchingRelocIterator(const RelocIterator&);
|
||||
void operator=(const RelocIterator&);
|
||||
|
||||
public:
|
||||
PatchingRelocIterator(nmethod* nm, address begin = NULL, address limit = NULL)
|
||||
: RelocIterator(nm, begin, limit) { prepass(); }
|
||||
|
||||
~PatchingRelocIterator() { postpass(); }
|
||||
};
|
||||
|
||||
#endif // SHARE_VM_CODE_RELOCINFO_HPP
|
||||
|
@ -152,12 +152,9 @@ uint G1CardCounts::add_card_count(jbyte* card_ptr) {
|
||||
if (card_num < _committed_max_card_num) {
|
||||
count = (uint) _card_counts[card_num];
|
||||
if (count < G1ConcRSHotCardLimit) {
|
||||
_card_counts[card_num] += 1;
|
||||
_card_counts[card_num] =
|
||||
(jubyte)(MIN2((uintx)(_card_counts[card_num] + 1), G1ConcRSHotCardLimit));
|
||||
}
|
||||
assert(_card_counts[card_num] <= G1ConcRSHotCardLimit,
|
||||
err_msg("Refinement count overflow? "
|
||||
"new count: "UINT32_FORMAT,
|
||||
(uint) _card_counts[card_num]));
|
||||
}
|
||||
}
|
||||
return count;
|
||||
|
@ -47,7 +47,7 @@ void G1SATBCardTableModRefBS::enqueue(oop pre_val) {
|
||||
JavaThread* jt = (JavaThread*)thr;
|
||||
jt->satb_mark_queue().enqueue(pre_val);
|
||||
} else {
|
||||
MutexLocker x(Shared_SATB_Q_lock);
|
||||
MutexLockerEx x(Shared_SATB_Q_lock, Mutex::_no_safepoint_check_flag);
|
||||
JavaThread::satb_mark_queue_set().shared_satb_queue()->enqueue(pre_val);
|
||||
}
|
||||
}
|
||||
|
@ -798,7 +798,7 @@ void HeapRegion::verify(VerifyOption vo,
|
||||
if (!g1->is_obj_dead_cond(obj, this, vo)) {
|
||||
if (obj->is_oop()) {
|
||||
Klass* klass = obj->klass();
|
||||
if (!klass->is_metadata()) {
|
||||
if (!klass->is_metaspace_object()) {
|
||||
gclog_or_tty->print_cr("klass "PTR_FORMAT" of object "PTR_FORMAT" "
|
||||
"not metadata", klass, obj);
|
||||
*failures = true;
|
||||
|
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