Merge
This commit is contained in:
commit
d2ff220cc2
File diff suppressed because it is too large
Load Diff
@ -103,11 +103,12 @@ public class ClassLoaderStats extends Tool {
|
||||
}
|
||||
|
||||
SystemDictionary dict = VM.getVM().getSystemDictionary();
|
||||
dict.classesDo(new SystemDictionary.ClassAndLoaderVisitor() {
|
||||
public void visit(Klass k, Oop loader) {
|
||||
dict.classesDo(new SystemDictionary.ClassVisitor() {
|
||||
public void visit(Klass k) {
|
||||
if (! (k instanceof InstanceKlass)) {
|
||||
return;
|
||||
}
|
||||
Oop loader = ((InstanceKlass) k).getClassLoader();
|
||||
LoaderData ld = (loader != null) ? (LoaderData)loaderMap.get(loader)
|
||||
: bootstrapLoaderData;
|
||||
if (ld != null) {
|
||||
|
@ -557,11 +557,11 @@ $(JDK_IMAGE_DIR)/jre/lib/rt.jar:
|
||||
|
||||
|
||||
# Testing the built JVM
|
||||
RUN_JVM=JAVA_HOME=$(JDK_IMPORT_PATH) $(JDK_IMPORT_PATH)/bin/java -d$(ARCH_DATA_MODEL) -Dsun.java.launcher=gamma
|
||||
RUN_JVM=JAVA_HOME=$(JDK_IMPORT_PATH) $(JDK_IMPORT_PATH)/bin/java -d$(ARCH_DATA_MODEL) -XXaltjvm=$(ALTJVM_DIR) -Dsun.java.launcher.is_altjvm=true
|
||||
generic_test:
|
||||
@$(ECHO) "Running with: $(ALTJVM_DIR)"
|
||||
@$(RUN_JVM) -XXaltjvm=$(ALTJVM_DIR) -Xinternalversion
|
||||
@$(RUN_JVM) -XXaltjvm=$(ALTJVM_DIR) -showversion -help
|
||||
@$(RUN_JVM) -Xinternalversion
|
||||
@$(RUN_JVM) -showversion -help
|
||||
|
||||
# C2 test targets
|
||||
test_product test_optimized test_fastdebug test_debug:
|
||||
|
@ -53,6 +53,7 @@ JVMOFFS.o = $(JVMOFFS).o
|
||||
GENOFFS = generate$(JVMOFFS)
|
||||
|
||||
DTRACE_SRCDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/dtrace
|
||||
DTRACE_COMMON_SRCDIR = $(GAMMADIR)/src/os/posix/dtrace
|
||||
DTRACE = dtrace
|
||||
DTRACE.o = $(DTRACE).o
|
||||
|
||||
@ -262,14 +263,14 @@ endif
|
||||
$(DtraceOutDir):
|
||||
mkdir $(DtraceOutDir)
|
||||
|
||||
$(DtraceOutDir)/hotspot.h: $(DTRACE_SRCDIR)/hotspot.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hotspot.d
|
||||
$(DtraceOutDir)/hotspot.h: $(DTRACE_COMMON_SRCDIR)/hotspot.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hotspot.d
|
||||
|
||||
$(DtraceOutDir)/hotspot_jni.h: $(DTRACE_SRCDIR)/hotspot_jni.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hotspot_jni.d
|
||||
$(DtraceOutDir)/hotspot_jni.h: $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d
|
||||
|
||||
$(DtraceOutDir)/hs_private.h: $(DTRACE_SRCDIR)/hs_private.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hs_private.d
|
||||
$(DtraceOutDir)/hs_private.h: $(DTRACE_COMMON_SRCDIR)/hs_private.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hs_private.d
|
||||
|
||||
dtrace_gen_headers: $(DtraceOutDir)/hotspot.h $(DtraceOutDir)/hotspot_jni.h $(DtraceOutDir)/hs_private.h
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -91,13 +91,13 @@ endif
|
||||
install_jsig: $(LIBJSIG)
|
||||
@echo "Copying $(LIBJSIG) to $(DEST_JSIG)"
|
||||
ifeq ($(OS_VENDOR), Darwin)
|
||||
$(QUIETLY) test -d $(LIBJSIG_DEBUGINFO) && \
|
||||
$(QUIETLY) test ! -d $(LIBJSIG_DEBUGINFO) || \
|
||||
cp -f -r $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO)
|
||||
else
|
||||
$(QUIETLY) test -f $(LIBJSIG_DEBUGINFO) && \
|
||||
$(QUIETLY) test ! -f $(LIBJSIG_DEBUGINFO) || \
|
||||
cp -f $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO)
|
||||
endif
|
||||
$(QUIETLY) test -f $(LIBJSIG_DIZ) && \
|
||||
$(QUIETLY) test ! -f $(LIBJSIG_DIZ) || \
|
||||
cp -f $(LIBJSIG_DIZ) $(DEST_JSIG_DIZ)
|
||||
$(QUIETLY) cp -f $(LIBJSIG) $(DEST_JSIG) && echo "Done"
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
#
|
||||
#
|
||||
|
||||
# Sets make macros for making optimized version of Gamma VM
|
||||
# Sets make macros for making optimized version of HotSpot VM
|
||||
# (This is the "product", not the "release" version.)
|
||||
|
||||
# Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make
|
||||
|
@ -22,7 +22,7 @@
|
||||
#
|
||||
#
|
||||
|
||||
# Sets make macros for making optimized version of Gamma VM
|
||||
# Sets make macros for making optimized version of HotSpot VM
|
||||
# (This is the "product", not the "release" version.)
|
||||
|
||||
# Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -153,13 +153,13 @@ endif
|
||||
install_saproc: $(BUILDLIBSAPROC)
|
||||
@echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"
|
||||
ifeq ($(OS_VENDOR), Darwin)
|
||||
$(QUIETLY) test -d $(LIBSAPROC_DEBUGINFO) && \
|
||||
$(QUIETLY) test ! -d $(LIBSAPROC_DEBUGINFO) || \
|
||||
cp -f -r $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO)
|
||||
else
|
||||
$(QUIETLY) test -f $(LIBSAPROC_DEBUGINFO) && \
|
||||
$(QUIETLY) test ! -f $(LIBSAPROC_DEBUGINFO) || \
|
||||
cp -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO)
|
||||
endif
|
||||
$(QUIETLY) test -f $(LIBSAPROC_DIZ) && \
|
||||
$(QUIETLY) test ! -f $(LIBSAPROC_DIZ) || \
|
||||
cp -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ)
|
||||
$(QUIETLY) cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"
|
||||
|
||||
|
@ -128,7 +128,7 @@ the_vm: vm_build_preliminaries $(adjust-mflags)
|
||||
@$(UpdatePCH)
|
||||
@$(MAKE) -f vm.make $(MFLAGS-adjusted)
|
||||
|
||||
install gamma: the_vm
|
||||
install : the_vm
|
||||
@$(MAKE) -f vm.make $@
|
||||
|
||||
# next rules support "make foo.[ois]"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -367,13 +367,13 @@ DEST_JVM_DIZ = $(DEST_SUBDIR)/$(LIBJVM_DIZ)
|
||||
install_jvm: $(LIBJVM)
|
||||
@echo "Copying $(LIBJVM) to $(DEST_JVM)"
|
||||
ifeq ($(OS_VENDOR), Darwin)
|
||||
$(QUIETLY) test -d $(LIBJVM_DEBUGINFO) && \
|
||||
$(QUIETLY) test ! -d $(LIBJVM_DEBUGINFO) || \
|
||||
cp -f -r $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO)
|
||||
else
|
||||
$(QUIETLY) test -f $(LIBJVM_DEBUGINFO) && \
|
||||
$(QUIETLY) test ! -f $(LIBJVM_DEBUGINFO) || \
|
||||
cp -f $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO)
|
||||
endif
|
||||
$(QUIETLY) test -f $(LIBJVM_DIZ) && \
|
||||
$(QUIETLY) test ! -f $(LIBJVM_DIZ) || \
|
||||
cp -f $(LIBJVM_DIZ) $(DEST_JVM_DIZ)
|
||||
$(QUIETLY) cp -f $(LIBJVM) $(DEST_JVM) && echo "Done"
|
||||
|
||||
|
@ -49,7 +49,7 @@ then
|
||||
GDB=gdb
|
||||
fi
|
||||
|
||||
# This is the name of the gdb binary to use
|
||||
# This is the name of the dbx binary to use
|
||||
if [ ! "$DBX" ]
|
||||
then
|
||||
DBX=dbx
|
||||
@ -68,9 +68,16 @@ EMACS=emacs
|
||||
# End of user changeable parameters -----------------------------------------
|
||||
#
|
||||
|
||||
OS=`uname -s`
|
||||
|
||||
# Make sure the paths are fully specified, i.e. they must begin with /.
|
||||
REL_MYDIR=`dirname $0`
|
||||
MYDIR=`cd $REL_MYDIR && pwd`
|
||||
case "$OS" in
|
||||
CYGWIN*)
|
||||
MYDIR=`cygpath -m "$MYDIR"`
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# Look whether the user wants to run inside gdb
|
||||
@ -102,8 +109,17 @@ else
|
||||
JDK=@@JDK_IMPORT_PATH@@
|
||||
fi
|
||||
|
||||
if [ "${JDK}" = "" ]; then
|
||||
echo "Failed to find JDK. Either ALT_JAVA_HOME is not set or JDK_IMPORT_PATH is empty."
|
||||
if [ "${JDK}" != "" ]; then
|
||||
case "$OS" in
|
||||
CYGWIN*)
|
||||
JDK=`cygpath -m "$JDK"`
|
||||
;;
|
||||
esac
|
||||
|
||||
else
|
||||
echo "Failed to find JDK." \
|
||||
"Either ALT_JAVA_HOME is not set or JDK_IMPORT_PATH is empty."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We will set the LD_LIBRARY_PATH as follows:
|
||||
@ -120,7 +136,6 @@ SBP=${MYDIR}:${JRE}/lib/${ARCH}
|
||||
|
||||
|
||||
# Set up a suitable LD_LIBRARY_PATH or DYLD_LIBRARY_PATH
|
||||
OS=`uname -s`
|
||||
if [ "${OS}" = "Darwin" ]
|
||||
then
|
||||
if [ -z "$DYLD_LIBRARY_PATH" ]
|
||||
@ -141,7 +156,7 @@ else
|
||||
export LD_LIBRARY_PATH
|
||||
fi
|
||||
|
||||
JPARMS="-Dsun.java.launcher=gamma -XXaltjvm=$MYDIR $@ $JAVA_ARGS";
|
||||
JPARMS="-XXaltjvm=$MYDIR -Dsun.java.launcher.is_altjvm=true $@ $JAVA_ARGS";
|
||||
|
||||
# Locate the java launcher
|
||||
LAUNCHER=$JDK/bin/java
|
||||
@ -152,6 +167,11 @@ fi
|
||||
|
||||
GDBSRCDIR=$MYDIR
|
||||
BASEDIR=`cd $MYDIR/../../.. && pwd`
|
||||
case "$OS" in
|
||||
CYGWIN*)
|
||||
BASEDIR=`cygpath -m "$BASEDIR"`
|
||||
;;
|
||||
esac
|
||||
|
||||
init_gdb() {
|
||||
# Create a gdb script in case we should run inside gdb
|
||||
|
@ -124,7 +124,7 @@ SUBMAKE_DIRS = $(addprefix $(PLATFORM_DIR)/,$(TARGETS))
|
||||
# For dependencies and recursive makes.
|
||||
BUILDTREE_MAKE = $(GAMMADIR)/make/$(OS_FAMILY)/makefiles/buildtree.make
|
||||
|
||||
BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make trace.make sa.make
|
||||
BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make trace.make sa.make dtrace.make
|
||||
|
||||
BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \
|
||||
SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) VARIANT=$(VARIANT)
|
||||
@ -361,6 +361,16 @@ sa.make: $(BUILDTREE_MAKE)
|
||||
echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \
|
||||
) > $@
|
||||
|
||||
dtrace.make: $(BUILDTREE_MAKE)
|
||||
@echo Creating $@ ...
|
||||
$(QUIETLY) ( \
|
||||
$(BUILDTREE_COMMENT); \
|
||||
echo; \
|
||||
echo include flags.make; \
|
||||
echo; \
|
||||
echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \
|
||||
) > $@
|
||||
|
||||
FORCE:
|
||||
|
||||
.PHONY: all FORCE
|
||||
|
@ -42,18 +42,39 @@ ifneq ($(ALT_SDT_H),)
|
||||
else
|
||||
SDT_H_FILE = /usr/include/sys/sdt.h
|
||||
endif
|
||||
|
||||
DTRACE_ENABLED = $(shell test -f $(SDT_H_FILE) && echo $(SDT_H_FILE))
|
||||
REASON = "$(SDT_H_FILE) not found"
|
||||
|
||||
ifneq ($(DTRACE_ENABLED),)
|
||||
CFLAGS += -DDTRACE_ENABLED
|
||||
endif
|
||||
endif # GCC version
|
||||
endif # OPENJDK
|
||||
|
||||
endif
|
||||
|
||||
DTRACE_COMMON_SRCDIR = $(GAMMADIR)/src/os/posix/dtrace
|
||||
DTRACE_PROG = dtrace
|
||||
DtraceOutDir = $(GENERATED)/dtracefiles
|
||||
|
||||
$(DtraceOutDir):
|
||||
mkdir $(DtraceOutDir)
|
||||
|
||||
$(DtraceOutDir)/hotspot.h: $(DTRACE_COMMON_SRCDIR)/hotspot.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hotspot.d
|
||||
|
||||
$(DtraceOutDir)/hotspot_jni.h: $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d
|
||||
|
||||
$(DtraceOutDir)/hs_private.h: $(DTRACE_COMMON_SRCDIR)/hs_private.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hs_private.d
|
||||
|
||||
ifneq ($(DTRACE_ENABLED),)
|
||||
CFLAGS += -DDTRACE_ENABLED
|
||||
dtrace_gen_headers: $(DtraceOutDir)/hotspot.h $(DtraceOutDir)/hotspot_jni.h $(DtraceOutDir)/hs_private.h
|
||||
else
|
||||
dtrace_gen_headers:
|
||||
$(QUIETLY) echo "**NOTICE** Dtrace support disabled: $(REASON)"
|
||||
endif
|
||||
|
||||
# Phony target used in vm.make build target to check whether enabled.
|
||||
.PHONY: dtraceCheck
|
||||
ifeq ($(DTRACE_ENABLED),)
|
||||
dtraceCheck:
|
||||
$(QUIETLY) echo "**NOTICE** Dtrace support disabled: $(REASON)"
|
||||
@ -61,5 +82,7 @@ else
|
||||
dtraceCheck:
|
||||
endif
|
||||
|
||||
.PHONY: dtrace_gen_headers dtraceCheck
|
||||
|
||||
# It doesn't support HAVE_DTRACE_H though.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -74,9 +74,9 @@ endif
|
||||
|
||||
install_jsig: $(LIBJSIG)
|
||||
@echo "Copying $(LIBJSIG) to $(DEST_JSIG)"
|
||||
$(QUIETLY) test -f $(LIBJSIG_DEBUGINFO) && \
|
||||
$(QUIETLY) test ! -f $(LIBJSIG_DEBUGINFO) || \
|
||||
cp -f $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO)
|
||||
$(QUIETLY) test -f $(LIBJSIG_DIZ) && \
|
||||
$(QUIETLY) test ! -f $(LIBJSIG_DIZ) || \
|
||||
cp -f $(LIBJSIG_DIZ) $(DEST_JSIG_DIZ)
|
||||
$(QUIETLY) cp -f $(LIBJSIG) $(DEST_JSIG) && echo "Done"
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
#
|
||||
#
|
||||
|
||||
# Sets make macros for making optimized version of Gamma VM
|
||||
# Sets make macros for making optimized version of HotSpot VM
|
||||
# (This is the "product", not the "release" version.)
|
||||
|
||||
# Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make
|
||||
|
@ -22,7 +22,7 @@
|
||||
#
|
||||
#
|
||||
|
||||
# Sets make macros for making optimized version of Gamma VM
|
||||
# Sets make macros for making optimized version of HotSpot VM
|
||||
# (This is the "product", not the "release" version.)
|
||||
|
||||
# Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -113,13 +113,13 @@ ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||
endif
|
||||
|
||||
install_saproc: $(BUILDLIBSAPROC)
|
||||
$(QUIETLY) if [ -e $(LIBSAPROC) ] ; then \
|
||||
echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"; \
|
||||
test -f $(LIBSAPROC_DEBUGINFO) && \
|
||||
$(QUIETLY) if [ -e $(LIBSAPROC) ] ; then \
|
||||
echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"; \
|
||||
test ! -f $(LIBSAPROC_DEBUGINFO) || \
|
||||
cp -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO); \
|
||||
test -f $(LIBSAPROC_DIZ) && \
|
||||
cp -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ); \
|
||||
cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"; \
|
||||
test ! -f $(LIBSAPROC_DIZ) || \
|
||||
cp -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ); \
|
||||
cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"; \
|
||||
fi
|
||||
|
||||
.PHONY: install_saproc
|
||||
|
@ -80,7 +80,7 @@ default: vm_build_preliminaries the_vm
|
||||
@echo All done.
|
||||
|
||||
# This is an explicit dependency for the sake of parallel makes.
|
||||
vm_build_preliminaries: checks $(Cached_plat) $(AD_Files_If_Required) trace_stuff jvmti_stuff sa_stuff
|
||||
vm_build_preliminaries: checks $(Cached_plat) $(AD_Files_If_Required) trace_stuff jvmti_stuff sa_stuff dtrace_stuff
|
||||
@# We need a null action here, so implicit rules don't get consulted.
|
||||
|
||||
$(Cached_plat): $(Plat_File)
|
||||
@ -102,6 +102,9 @@ trace_stuff: jvmti_stuff $(Cached_plat) $(adjust-mflags)
|
||||
sa_stuff:
|
||||
@$(MAKE) -f sa.make $(MFLAGS-adjusted)
|
||||
|
||||
dtrace_stuff: $(Cached_plat) $(adjust-mflags)
|
||||
@$(MAKE) -f dtrace.make dtrace_gen_headers $(MFLAGS-adjusted) GENERATED=$(GENERATED)
|
||||
|
||||
# and the VM: must use other makefile with dependencies included
|
||||
|
||||
# We have to go to great lengths to get control over the -jN argument
|
||||
@ -119,7 +122,7 @@ the_vm: vm_build_preliminaries $(adjust-mflags)
|
||||
@$(UpdatePCH)
|
||||
@$(MAKE) -f vm.make $(MFLAGS-adjusted)
|
||||
|
||||
install gamma: the_vm
|
||||
install: the_vm
|
||||
@$(MAKE) -f vm.make $@
|
||||
|
||||
# next rules support "make foo.[ois]"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -366,9 +366,9 @@ DEST_JVM_DIZ = $(DEST_SUBDIR)/$(LIBJVM_DIZ)
|
||||
|
||||
install_jvm: $(LIBJVM)
|
||||
@echo "Copying $(LIBJVM) to $(DEST_JVM)"
|
||||
$(QUIETLY) test -f $(LIBJVM_DEBUGINFO) && \
|
||||
$(QUIETLY) test ! -f $(LIBJVM_DEBUGINFO) || \
|
||||
cp -f $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO)
|
||||
$(QUIETLY) test -f $(LIBJVM_DIZ) && \
|
||||
$(QUIETLY) test ! -f $(LIBJVM_DIZ) || \
|
||||
cp -f $(LIBJVM_DIZ) $(DEST_JVM_DIZ)
|
||||
$(QUIETLY) cp -f $(LIBJVM) $(DEST_JVM) && echo "Done"
|
||||
|
||||
|
@ -55,6 +55,7 @@ JVMOFFS.o = $(JVMOFFS).o
|
||||
GENOFFS = generate$(JVMOFFS)
|
||||
|
||||
DTRACE_SRCDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/dtrace
|
||||
DTRACE_COMMON_SRCDIR = $(GAMMADIR)/src/os/posix/dtrace
|
||||
DTRACE = dtrace
|
||||
DTRACE.o = $(DTRACE).o
|
||||
|
||||
@ -253,8 +254,8 @@ ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||
endif
|
||||
endif
|
||||
|
||||
$(DTRACE).d: $(DTRACE_SRCDIR)/hotspot.d $(DTRACE_SRCDIR)/hotspot_jni.d \
|
||||
$(DTRACE_SRCDIR)/hs_private.d $(DTRACE_SRCDIR)/jhelper.d
|
||||
$(DTRACE).d: $(DTRACE_COMMON_SRCDIR)/hotspot.d $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d \
|
||||
$(DTRACE_COMMON_SRCDIR)/hs_private.d $(DTRACE_SRCDIR)/jhelper.d
|
||||
$(QUIETLY) cat $^ > $@
|
||||
|
||||
DTraced_Files = ciEnv.o \
|
||||
@ -332,14 +333,14 @@ $(DTRACE.o): $(DTRACE).d $(JVMOFFS).h $(JVMOFFS)Index.h $(DTraced_Files)
|
||||
$(DtraceOutDir):
|
||||
mkdir $(DtraceOutDir)
|
||||
|
||||
$(DtraceOutDir)/hotspot.h: $(DTRACE_SRCDIR)/hotspot.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hotspot.d
|
||||
$(DtraceOutDir)/hotspot.h: $(DTRACE_COMMON_SRCDIR)/hotspot.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hotspot.d
|
||||
|
||||
$(DtraceOutDir)/hotspot_jni.h: $(DTRACE_SRCDIR)/hotspot_jni.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hotspot_jni.d
|
||||
$(DtraceOutDir)/hotspot_jni.h: $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d
|
||||
|
||||
$(DtraceOutDir)/hs_private.h: $(DTRACE_SRCDIR)/hs_private.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hs_private.d
|
||||
$(DtraceOutDir)/hs_private.h: $(DTRACE_COMMON_SRCDIR)/hs_private.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hs_private.d
|
||||
|
||||
dtrace_gen_headers: $(DtraceOutDir)/hotspot.h $(DtraceOutDir)/hotspot_jni.h $(DtraceOutDir)/hs_private.h
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -79,9 +79,9 @@ endif
|
||||
|
||||
install_jsig: $(LIBJSIG)
|
||||
@echo "Copying $(LIBJSIG) to $(DEST_JSIG)"
|
||||
$(QUIETLY) test -f $(LIBJSIG_DEBUGINFO) && \
|
||||
$(QUIETLY) test ! -f $(LIBJSIG_DEBUGINFO) || \
|
||||
cp -f $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO)
|
||||
$(QUIETLY) test -f $(LIBJSIG_DIZ) && \
|
||||
$(QUIETLY) test ! -f $(LIBJSIG_DIZ) || \
|
||||
cp -f $(LIBJSIG_DIZ) $(DEST_JSIG_DIZ)
|
||||
$(QUIETLY) cp -f $(LIBJSIG) $(DEST_JSIG) && echo "Done"
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
#
|
||||
#
|
||||
|
||||
# Sets make macros for making optimized version of Gamma VM
|
||||
# Sets make macros for making optimized version of HotSpot VM
|
||||
# (This is the "product", not the "release" version.)
|
||||
|
||||
# Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make
|
||||
|
@ -22,7 +22,7 @@
|
||||
#
|
||||
#
|
||||
|
||||
# Sets make macros for making optimized version of Gamma VM
|
||||
# Sets make macros for making optimized version of HotSpot VM
|
||||
# (This is the "product", not the "release" version.)
|
||||
|
||||
# Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -147,13 +147,13 @@ ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||
endif
|
||||
|
||||
install_saproc: $(BULDLIBSAPROC)
|
||||
$(QUIETLY) if [ -f $(LIBSAPROC) ] ; then \
|
||||
echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"; \
|
||||
test -f $(LIBSAPROC_DEBUGINFO) && \
|
||||
$(QUIETLY) if [ -f $(LIBSAPROC) ] ; then \
|
||||
echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"; \
|
||||
test ! -f $(LIBSAPROC_DEBUGINFO) || \
|
||||
cp -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO); \
|
||||
test -f $(LIBSAPROC_DIZ) && \
|
||||
cp -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ); \
|
||||
cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"; \
|
||||
test ! -f $(LIBSAPROC_DIZ) || \
|
||||
cp -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ); \
|
||||
cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"; \
|
||||
fi
|
||||
|
||||
.PHONY: install_saproc
|
||||
|
@ -114,7 +114,7 @@ $(adjust-mflags): $(GAMMADIR)/make/$(Platform_os_family)/makefiles/adjust-mflags
|
||||
the_vm: vm_build_preliminaries $(adjust-mflags)
|
||||
@$(MAKE) -f vm.make $(MFLAGS-adjusted)
|
||||
|
||||
install gamma: the_vm
|
||||
install: the_vm
|
||||
@$(MAKE) -f vm.make $@
|
||||
|
||||
# next rules support "make foo.[oi]"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -333,9 +333,9 @@ DEST_JVM_DIZ = $(DEST_SUBDIR)/$(LIBJVM_DIZ)
|
||||
|
||||
install_jvm: $(LIBJVM)
|
||||
@echo "Copying $(LIBJVM) to $(DEST_JVM)"
|
||||
$(QUIETLY) test -f $(LIBJVM_DEBUGINFO) && \
|
||||
$(QUIETLY) test ! -f $(LIBJVM_DEBUGINFO) || \
|
||||
cp -f $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO)
|
||||
$(QUIETLY) test -f $(LIBJVM_DIZ) && \
|
||||
$(QUIETLY) test ! -f $(LIBJVM_DIZ) || \
|
||||
cp -f $(LIBJVM_DIZ) $(DEST_JVM_DIZ)
|
||||
$(QUIETLY) cp -f $(LIBJVM) $(DEST_JVM) && echo "Done"
|
||||
|
||||
|
@ -107,10 +107,6 @@ static inline Address at_tos_p2() {
|
||||
return Address(rsp, Interpreter::expr_offset_in_bytes(2));
|
||||
}
|
||||
|
||||
static inline Address at_tos_p3() {
|
||||
return Address(rsp, Interpreter::expr_offset_in_bytes(3));
|
||||
}
|
||||
|
||||
// Condition conversion
|
||||
static Assembler::Condition j_not(TemplateTable::Condition cc) {
|
||||
switch (cc) {
|
||||
|
@ -1,40 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 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.
|
||||
*
|
||||
*/
|
||||
|
||||
provider hs_private {
|
||||
probe hashtable__new_entry(void*, uint32_t, uintptr_t, void*);
|
||||
probe safepoint__begin();
|
||||
probe safepoint__end();
|
||||
probe cms__initmark__begin();
|
||||
probe cms__initmark__end();
|
||||
probe cms__remark__begin();
|
||||
probe cms__remark__end();
|
||||
};
|
||||
|
||||
#pragma D attributes Private/Private/Common provider hs_private provider
|
||||
#pragma D attributes Private/Private/Unknown provider hs_private module
|
||||
#pragma D attributes Private/Private/Unknown provider hs_private function
|
||||
#pragma D attributes Private/Private/Common provider hs_private name
|
||||
#pragma D attributes Private/Private/Common provider hs_private args
|
||||
|
@ -1788,12 +1788,14 @@ void os::jvm_path(char *buf, jint buflen) {
|
||||
if (rp == NULL)
|
||||
return;
|
||||
|
||||
if (Arguments::created_by_gamma_launcher()) {
|
||||
// Support for the gamma launcher. Typical value for buf is
|
||||
// "<JAVA_HOME>/jre/lib/<arch>/<vmtype>/libjvm". If "/jre/lib/" appears at
|
||||
// the right place in the string, then assume we are installed in a JDK and
|
||||
// we're done. Otherwise, check for a JAVA_HOME environment variable and
|
||||
// construct a path to the JVM being overridden.
|
||||
if (Arguments::sun_java_launcher_is_altjvm()) {
|
||||
// Support for the java launcher's '-XXaltjvm=<path>' option. Typical
|
||||
// value for buf is "<JAVA_HOME>/jre/lib/<arch>/<vmtype>/libjvm.so"
|
||||
// or "<JAVA_HOME>/jre/lib/<vmtype>/libjvm.dylib". If "/jre/lib/"
|
||||
// appears at the right place in the string, then assume we are
|
||||
// installed in a JDK and we're done. Otherwise, check for a
|
||||
// JAVA_HOME environment variable and construct a path to the JVM
|
||||
// being overridden.
|
||||
|
||||
const char *p = buf + strlen(buf) - 1;
|
||||
for (int count = 0; p > buf && count < 5; ++count) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -2371,13 +2371,14 @@ void os::jvm_path(char *buf, jint buflen) {
|
||||
if (rp == NULL)
|
||||
return;
|
||||
|
||||
if (Arguments::created_by_gamma_launcher()) {
|
||||
// Support for the gamma launcher. Typical value for buf is
|
||||
// "<JAVA_HOME>/jre/lib/<arch>/<vmtype>/libjvm.so". If "/jre/lib/" appears at
|
||||
// the right place in the string, then assume we are installed in a JDK and
|
||||
// we're done. Otherwise, check for a JAVA_HOME environment variable and fix
|
||||
// up the path so it looks like libjvm.so is installed there (append a
|
||||
// fake suffix hotspot/libjvm.so).
|
||||
if (Arguments::sun_java_launcher_is_altjvm()) {
|
||||
// Support for the java launcher's '-XXaltjvm=<path>' option. Typical
|
||||
// value for buf is "<JAVA_HOME>/jre/lib/<arch>/<vmtype>/libjvm.so".
|
||||
// If "/jre/lib/" appears at the right place in the string, then
|
||||
// assume we are installed in a JDK and we're done. Otherwise, check
|
||||
// for a JAVA_HOME environment variable and fix up the path so it
|
||||
// looks like libjvm.so is installed there (append a fake suffix
|
||||
// hotspot/libjvm.so).
|
||||
const char *p = buf + strlen(buf) - 1;
|
||||
for (int count = 0; p > buf && count < 5; ++count) {
|
||||
for (--p; p > buf && *p != '/'; --p)
|
||||
@ -2999,7 +3000,9 @@ address get_stack_commited_bottom(address bottom, size_t size) {
|
||||
|
||||
unsigned char vec[1];
|
||||
unsigned imin = 1, imax = pages + 1, imid;
|
||||
int mincore_return_value;
|
||||
int mincore_return_value = 0;
|
||||
|
||||
assert(imin <= imax, "Unexpected page size");
|
||||
|
||||
while (imin < imax) {
|
||||
imid = (imax + imin) / 2;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -891,8 +891,16 @@ static void mmap_attach_shared(const char* user, int vmid, PerfMemory::PerfMemor
|
||||
FREE_C_HEAP_ARRAY(char, filename, mtInternal);
|
||||
|
||||
// open the shared memory file for the give vmid
|
||||
fd = open_sharedmem_file(rfilename, file_flags, CHECK);
|
||||
assert(fd != OS_ERR, "unexpected value");
|
||||
fd = open_sharedmem_file(rfilename, file_flags, THREAD);
|
||||
|
||||
if (fd == OS_ERR) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (HAS_PENDING_EXCEPTION) {
|
||||
::close(fd);
|
||||
return;
|
||||
}
|
||||
|
||||
if (*sizep == 0) {
|
||||
size = sharedmem_filesize(fd, CHECK);
|
||||
|
@ -1,86 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2010, 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.
|
||||
*
|
||||
*/
|
||||
|
||||
provider hotspot {
|
||||
probe class__loaded(char*, uintptr_t, void*, uintptr_t);
|
||||
probe class__unloaded(char*, uintptr_t, void*, uintptr_t);
|
||||
probe class__initialization__required(char*, uintptr_t, void*, intptr_t);
|
||||
probe class__initialization__recursive(char*, uintptr_t, void*, intptr_t,int);
|
||||
probe class__initialization__concurrent(char*, uintptr_t, void*, intptr_t,int);
|
||||
probe class__initialization__erroneous(char*, uintptr_t, void*, intptr_t, int);
|
||||
probe class__initialization__super__failed(char*, uintptr_t, void*, intptr_t,int);
|
||||
probe class__initialization__clinit(char*, uintptr_t, void*, intptr_t,int);
|
||||
probe class__initialization__error(char*, uintptr_t, void*, intptr_t,int);
|
||||
probe class__initialization__end(char*, uintptr_t, void*, intptr_t,int);
|
||||
probe vm__init__begin();
|
||||
probe vm__init__end();
|
||||
probe vm__shutdown();
|
||||
probe vmops__request(char*, uintptr_t, int);
|
||||
probe vmops__begin(char*, uintptr_t, int);
|
||||
probe vmops__end(char*, uintptr_t, int);
|
||||
probe gc__begin(uintptr_t);
|
||||
probe gc__end();
|
||||
probe mem__pool__gc__begin(
|
||||
char*, uintptr_t, char*, uintptr_t,
|
||||
uintptr_t, uintptr_t, uintptr_t, uintptr_t);
|
||||
probe mem__pool__gc__end(
|
||||
char*, uintptr_t, char*, uintptr_t,
|
||||
uintptr_t, uintptr_t, uintptr_t, uintptr_t);
|
||||
probe thread__start(char*, uintptr_t, uintptr_t, uintptr_t, uintptr_t);
|
||||
probe thread__stop(char*, uintptr_t, uintptr_t, uintptr_t, uintptr_t);
|
||||
probe thread__sleep__begin(long long);
|
||||
probe thread__sleep__end(int);
|
||||
probe thread__yield();
|
||||
probe thread__park__begin(uintptr_t, int, long long);
|
||||
probe thread__park__end(uintptr_t);
|
||||
probe thread__unpark(uintptr_t);
|
||||
probe method__compile__begin(
|
||||
char*, uintptr_t, char*, uintptr_t, char*, uintptr_t, char*, uintptr_t);
|
||||
probe method__compile__end(
|
||||
char*, uintptr_t, char*, uintptr_t, char*, uintptr_t,
|
||||
char*, uintptr_t, uintptr_t);
|
||||
probe compiled__method__load(
|
||||
char*, uintptr_t, char*, uintptr_t, char*, uintptr_t, void*, uintptr_t);
|
||||
probe compiled__method__unload(
|
||||
char*, uintptr_t, char*, uintptr_t, char*, uintptr_t);
|
||||
probe monitor__contended__enter(uintptr_t, uintptr_t, char*, uintptr_t);
|
||||
probe monitor__contended__entered(uintptr_t, uintptr_t, char*, uintptr_t);
|
||||
probe monitor__contended__exit(uintptr_t, uintptr_t, char*, uintptr_t);
|
||||
probe monitor__wait(uintptr_t, uintptr_t, char*, uintptr_t, uintptr_t);
|
||||
probe monitor__waited(uintptr_t, uintptr_t, char*, uintptr_t);
|
||||
probe monitor__notify(uintptr_t, uintptr_t, char*, uintptr_t);
|
||||
probe monitor__notifyAll(uintptr_t, uintptr_t, char*, uintptr_t);
|
||||
|
||||
probe object__alloc(int, char*, uintptr_t, uintptr_t);
|
||||
probe method__entry(
|
||||
int, char*, int, char*, int, char*, int);
|
||||
probe method__return(
|
||||
int, char*, int, char*, int, char*, int);
|
||||
};
|
||||
|
||||
#pragma D attributes Evolving/Evolving/Common provider hotspot provider
|
||||
#pragma D attributes Private/Private/Unknown provider hotspot module
|
||||
#pragma D attributes Private/Private/Unknown provider hotspot function
|
||||
#pragma D attributes Evolving/Evolving/Common provider hotspot name
|
||||
#pragma D attributes Evolving/Evolving/Common provider hotspot args
|
@ -1,506 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 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.
|
||||
*
|
||||
*/
|
||||
|
||||
provider hotspot_jni {
|
||||
probe AllocObject__entry(void*, void*);
|
||||
probe AllocObject__return(void*);
|
||||
probe AttachCurrentThreadAsDaemon__entry(void*, void**, void*);
|
||||
probe AttachCurrentThreadAsDaemon__return(uint32_t);
|
||||
probe AttachCurrentThread__entry(void*, void**, void*);
|
||||
probe AttachCurrentThread__return(uint32_t);
|
||||
probe CallBooleanMethodA__entry(void*, void*, uintptr_t);
|
||||
probe CallBooleanMethodA__return(uintptr_t);
|
||||
probe CallBooleanMethod__entry(void*, void*, uintptr_t);
|
||||
probe CallBooleanMethod__return(uintptr_t);
|
||||
probe CallBooleanMethodV__entry(void*, void*, uintptr_t);
|
||||
probe CallBooleanMethodV__return(uintptr_t);
|
||||
probe CallByteMethodA__entry(void*, void*, uintptr_t);
|
||||
probe CallByteMethodA__return(char);
|
||||
probe CallByteMethod__entry(void*, void*, uintptr_t);
|
||||
probe CallByteMethod__return(char);
|
||||
probe CallByteMethodV__entry(void*, void*, uintptr_t);
|
||||
probe CallByteMethodV__return(char);
|
||||
probe CallCharMethodA__entry(void*, void*, uintptr_t);
|
||||
probe CallCharMethodA__return(uint16_t);
|
||||
probe CallCharMethod__entry(void*, void*, uintptr_t);
|
||||
probe CallCharMethod__return(uint16_t);
|
||||
probe CallCharMethodV__entry(void*, void*, uintptr_t);
|
||||
probe CallCharMethodV__return(uint16_t);
|
||||
probe CallDoubleMethodA__entry(void*, void*, uintptr_t);
|
||||
probe CallDoubleMethodA__return();
|
||||
probe CallDoubleMethod__entry(void*, void*, uintptr_t);
|
||||
probe CallDoubleMethod__return();
|
||||
probe CallDoubleMethodV__entry(void*, void*, uintptr_t);
|
||||
probe CallDoubleMethodV__return();
|
||||
probe CallFloatMethodA__entry(void*, void*, uintptr_t);
|
||||
probe CallFloatMethodA__return();
|
||||
probe CallFloatMethod__entry(void*, void*, uintptr_t);
|
||||
probe CallFloatMethod__return();
|
||||
probe CallFloatMethodV__entry(void*, void*, uintptr_t);
|
||||
probe CallFloatMethodV__return();
|
||||
probe CallIntMethodA__entry(void*, void*, uintptr_t);
|
||||
probe CallIntMethodA__return(uint32_t);
|
||||
probe CallIntMethod__entry(void*, void*, uintptr_t);
|
||||
probe CallIntMethod__return(uint32_t);
|
||||
probe CallIntMethodV__entry(void*, void*, uintptr_t);
|
||||
probe CallIntMethodV__return(uint32_t);
|
||||
probe CallLongMethodA__entry(void*, void*, uintptr_t);
|
||||
probe CallLongMethodA__return(uintptr_t);
|
||||
probe CallLongMethod__entry(void*, void*, uintptr_t);
|
||||
probe CallLongMethod__return(uintptr_t);
|
||||
probe CallLongMethodV__entry(void*, void*, uintptr_t);
|
||||
probe CallLongMethodV__return(uintptr_t);
|
||||
probe CallNonvirtualBooleanMethodA__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualBooleanMethodA__return(uintptr_t);
|
||||
probe CallNonvirtualBooleanMethod__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualBooleanMethod__return(uintptr_t);
|
||||
probe CallNonvirtualBooleanMethodV__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualBooleanMethodV__return(uintptr_t);
|
||||
probe CallNonvirtualByteMethodA__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualByteMethodA__return(char);
|
||||
probe CallNonvirtualByteMethod__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualByteMethod__return(char);
|
||||
probe CallNonvirtualByteMethodV__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualByteMethodV__return(char);
|
||||
probe CallNonvirtualCharMethodA__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualCharMethodA__return(uint16_t);
|
||||
probe CallNonvirtualCharMethod__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualCharMethod__return(uint16_t);
|
||||
probe CallNonvirtualCharMethodV__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualCharMethodV__return(uint16_t);
|
||||
probe CallNonvirtualDoubleMethodA__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualDoubleMethodA__return();
|
||||
probe CallNonvirtualDoubleMethod__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualDoubleMethod__return();
|
||||
probe CallNonvirtualDoubleMethodV__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualDoubleMethodV__return();
|
||||
probe CallNonvirtualFloatMethodA__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualFloatMethodA__return();
|
||||
probe CallNonvirtualFloatMethod__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualFloatMethod__return();
|
||||
probe CallNonvirtualFloatMethodV__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualFloatMethodV__return();
|
||||
probe CallNonvirtualIntMethodA__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualIntMethodA__return(uint32_t);
|
||||
probe CallNonvirtualIntMethod__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualIntMethod__return(uint32_t);
|
||||
probe CallNonvirtualIntMethodV__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualIntMethodV__return(uint32_t);
|
||||
probe CallNonvirtualLongMethodA__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualLongMethodA__return(uintptr_t);
|
||||
probe CallNonvirtualLongMethod__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualLongMethod__return(uintptr_t);
|
||||
probe CallNonvirtualLongMethodV__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualLongMethodV__return(uintptr_t);
|
||||
probe CallNonvirtualObjectMethodA__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualObjectMethodA__return(void*);
|
||||
probe CallNonvirtualObjectMethod__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualObjectMethod__return(void*);
|
||||
probe CallNonvirtualObjectMethodV__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualObjectMethodV__return(void*);
|
||||
probe CallNonvirtualShortMethodA__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualShortMethodA__return(uint16_t);
|
||||
probe CallNonvirtualShortMethod__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualShortMethod__return(uint16_t);
|
||||
probe CallNonvirtualShortMethodV__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualShortMethodV__return(uint16_t);
|
||||
probe CallNonvirtualVoidMethodA__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualVoidMethodA__return();
|
||||
probe CallNonvirtualVoidMethod__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualVoidMethod__return();
|
||||
probe CallNonvirtualVoidMethodV__entry(void*, void*, void*, uintptr_t);
|
||||
probe CallNonvirtualVoidMethodV__return();
|
||||
probe CallObjectMethodA__entry(void*, void*, uintptr_t);
|
||||
probe CallObjectMethodA__return(void*);
|
||||
probe CallObjectMethod__entry(void*, void*, uintptr_t);
|
||||
probe CallObjectMethod__return(void*);
|
||||
probe CallObjectMethodV__entry(void*, void*, uintptr_t);
|
||||
probe CallObjectMethodV__return(void*);
|
||||
probe CallShortMethodA__entry(void*, void*, uintptr_t);
|
||||
probe CallShortMethodA__return(uint16_t);
|
||||
probe CallShortMethod__entry(void*, void*, uintptr_t);
|
||||
probe CallShortMethod__return(uint16_t);
|
||||
probe CallShortMethodV__entry(void*, void*, uintptr_t);
|
||||
probe CallShortMethodV__return(uint16_t);
|
||||
probe CallStaticBooleanMethodA__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticBooleanMethodA__return(uintptr_t);
|
||||
probe CallStaticBooleanMethod__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticBooleanMethod__return(uintptr_t);
|
||||
probe CallStaticBooleanMethodV__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticBooleanMethodV__return(uintptr_t);
|
||||
probe CallStaticByteMethodA__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticByteMethodA__return(char);
|
||||
probe CallStaticByteMethod__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticByteMethod__return(char);
|
||||
probe CallStaticByteMethodV__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticByteMethodV__return(char);
|
||||
probe CallStaticCharMethodA__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticCharMethodA__return(uint16_t);
|
||||
probe CallStaticCharMethod__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticCharMethod__return(uint16_t);
|
||||
probe CallStaticCharMethodV__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticCharMethodV__return(uint16_t);
|
||||
probe CallStaticDoubleMethodA__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticDoubleMethodA__return();
|
||||
probe CallStaticDoubleMethod__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticDoubleMethod__return();
|
||||
probe CallStaticDoubleMethodV__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticDoubleMethodV__return();
|
||||
probe CallStaticFloatMethodA__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticFloatMethodA__return();
|
||||
probe CallStaticFloatMethod__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticFloatMethod__return();
|
||||
probe CallStaticFloatMethodV__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticFloatMethodV__return();
|
||||
probe CallStaticIntMethodA__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticIntMethodA__return(uint32_t);
|
||||
probe CallStaticIntMethod__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticIntMethod__return(uint32_t);
|
||||
probe CallStaticIntMethodV__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticIntMethodV__return(uint32_t);
|
||||
probe CallStaticLongMethodA__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticLongMethodA__return(uintptr_t);
|
||||
probe CallStaticLongMethod__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticLongMethod__return(uintptr_t);
|
||||
probe CallStaticLongMethodV__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticLongMethodV__return(uintptr_t);
|
||||
probe CallStaticObjectMethodA__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticObjectMethodA__return(void*);
|
||||
probe CallStaticObjectMethod__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticObjectMethod__return(void*);
|
||||
probe CallStaticObjectMethodV__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticObjectMethodV__return(void*);
|
||||
probe CallStaticShortMethodA__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticShortMethodA__return(uint16_t);
|
||||
probe CallStaticShortMethod__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticShortMethod__return(uint16_t);
|
||||
probe CallStaticShortMethodV__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticShortMethodV__return(uint16_t);
|
||||
probe CallStaticVoidMethodA__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticVoidMethodA__return();
|
||||
probe CallStaticVoidMethod__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticVoidMethod__return();
|
||||
probe CallStaticVoidMethodV__entry(void*, void*, uintptr_t);
|
||||
probe CallStaticVoidMethodV__return();
|
||||
probe CallVoidMethodA__entry(void*, void*, uintptr_t);
|
||||
probe CallVoidMethodA__return();
|
||||
probe CallVoidMethod__entry(void*, void*, uintptr_t);
|
||||
probe CallVoidMethod__return();
|
||||
probe CallVoidMethodV__entry(void*, void*, uintptr_t);
|
||||
probe CallVoidMethodV__return();
|
||||
probe CreateJavaVM__entry(void**, void**, void*);
|
||||
probe CreateJavaVM__return(uint32_t);
|
||||
probe DefineClass__entry(void*, const char*, void*, char*, uintptr_t);
|
||||
probe DefineClass__return(void*);
|
||||
probe DeleteGlobalRef__entry(void*, void*);
|
||||
probe DeleteGlobalRef__return();
|
||||
probe DeleteLocalRef__entry(void*, void*);
|
||||
probe DeleteLocalRef__return();
|
||||
probe DeleteWeakGlobalRef__entry(void*, void*);
|
||||
probe DeleteWeakGlobalRef__return();
|
||||
probe DestroyJavaVM__entry(void*);
|
||||
probe DestroyJavaVM__return(uint32_t);
|
||||
probe DetachCurrentThread__entry(void*);
|
||||
probe DetachCurrentThread__return(uint32_t);
|
||||
probe EnsureLocalCapacity__entry(void*, uint32_t);
|
||||
probe EnsureLocalCapacity__return(uint32_t);
|
||||
probe ExceptionCheck__entry(void*);
|
||||
probe ExceptionCheck__return(uintptr_t);
|
||||
probe ExceptionClear__entry(void*);
|
||||
probe ExceptionClear__return();
|
||||
probe ExceptionDescribe__entry(void*);
|
||||
probe ExceptionDescribe__return();
|
||||
probe ExceptionOccurred__entry(void*);
|
||||
probe ExceptionOccurred__return(void*);
|
||||
probe FatalError__entry(void* env, const char*);
|
||||
probe FindClass__entry(void*, const char*);
|
||||
probe FindClass__return(void*);
|
||||
probe FromReflectedField__entry(void*, void*);
|
||||
probe FromReflectedField__return(uintptr_t);
|
||||
probe FromReflectedMethod__entry(void*, void*);
|
||||
probe FromReflectedMethod__return(uintptr_t);
|
||||
probe GetArrayLength__entry(void*, void*);
|
||||
probe GetArrayLength__return(uintptr_t);
|
||||
probe GetBooleanArrayElements__entry(void*, void*, uintptr_t*);
|
||||
probe GetBooleanArrayElements__return(uintptr_t*);
|
||||
probe GetBooleanArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, uintptr_t*);
|
||||
probe GetBooleanArrayRegion__return();
|
||||
probe GetBooleanField__entry(void*, void*, uintptr_t);
|
||||
probe GetBooleanField__return(uintptr_t);
|
||||
probe GetByteArrayElements__entry(void*, void*, uintptr_t*);
|
||||
probe GetByteArrayElements__return(char*);
|
||||
probe GetByteArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, char*);
|
||||
probe GetByteArrayRegion__return();
|
||||
probe GetByteField__entry(void*, void*, uintptr_t);
|
||||
probe GetByteField__return(char);
|
||||
probe GetCharArrayElements__entry(void*, void*, uintptr_t*);
|
||||
probe GetCharArrayElements__return(uint16_t*);
|
||||
probe GetCharArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, uint16_t*);
|
||||
probe GetCharArrayRegion__return();
|
||||
probe GetCharField__entry(void*, void*, uintptr_t);
|
||||
probe GetCharField__return(uint16_t);
|
||||
probe GetCreatedJavaVMs__entry(void**, uintptr_t, uintptr_t*);
|
||||
probe GetCreatedJavaVMs__return(uintptr_t);
|
||||
probe GetDefaultJavaVMInitArgs__entry(void*);
|
||||
probe GetDefaultJavaVMInitArgs__return(uint32_t);
|
||||
probe GetDirectBufferAddress__entry(void*, void*);
|
||||
probe GetDirectBufferAddress__return(void*);
|
||||
probe GetDirectBufferCapacity__entry(void*, void*);
|
||||
probe GetDirectBufferCapacity__return(uintptr_t);
|
||||
probe GetDoubleArrayElements__entry(void*, void*, uintptr_t*);
|
||||
probe GetDoubleArrayElements__return(double*);
|
||||
probe GetDoubleArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, double*);
|
||||
probe GetDoubleArrayRegion__return();
|
||||
probe GetDoubleField__entry(void*, void*, uintptr_t);
|
||||
probe GetDoubleField__return();
|
||||
probe GetEnv__entry(void*, void*, uint32_t);
|
||||
probe GetEnv__return(uint32_t);
|
||||
probe GetFieldID__entry(void*, void*, const char*, const char*);
|
||||
probe GetFieldID__return(uintptr_t);
|
||||
probe GetFloatArrayElements__entry(void*, void*, uintptr_t*);
|
||||
probe GetFloatArrayElements__return(float*);
|
||||
probe GetFloatArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, float*);
|
||||
probe GetFloatArrayRegion__return();
|
||||
probe GetFloatField__entry(void*, void*, uintptr_t);
|
||||
probe GetFloatField__return();
|
||||
probe GetIntArrayElements__entry(void*, void*, uintptr_t*);
|
||||
probe GetIntArrayElements__return(uint32_t*);
|
||||
probe GetIntArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, uint32_t*);
|
||||
probe GetIntArrayRegion__return();
|
||||
probe GetIntField__entry(void*, void*, uintptr_t);
|
||||
probe GetIntField__return(uint32_t);
|
||||
probe GetJavaVM__entry(void*, void**);
|
||||
probe GetJavaVM__return(uint32_t);
|
||||
probe GetLongArrayElements__entry(void*, void*, uintptr_t*);
|
||||
probe GetLongArrayElements__return(uintptr_t*);
|
||||
probe GetLongArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, uintptr_t*);
|
||||
probe GetLongArrayRegion__return();
|
||||
probe GetLongField__entry(void*, void*, uintptr_t);
|
||||
probe GetLongField__return(uintptr_t);
|
||||
probe GetMethodID__entry(void*, void*, const char*, const char*);
|
||||
probe GetMethodID__return(uintptr_t);
|
||||
probe GetObjectArrayElement__entry(void*, void*, uintptr_t);
|
||||
probe GetObjectArrayElement__return(void*);
|
||||
probe GetObjectClass__entry(void*, void*);
|
||||
probe GetObjectClass__return(void*);
|
||||
probe GetObjectField__entry(void*, void*, uintptr_t);
|
||||
probe GetObjectField__return(void*);
|
||||
probe GetObjectRefType__entry(void*, void*);
|
||||
probe GetObjectRefType__return(void*);
|
||||
probe GetPrimitiveArrayCritical__entry(void*, void*, uintptr_t*);
|
||||
probe GetPrimitiveArrayCritical__return(void*);
|
||||
probe GetShortArrayElements__entry(void*, void*, uintptr_t*);
|
||||
probe GetShortArrayElements__return(uint16_t*);
|
||||
probe GetShortArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, uint16_t*);
|
||||
probe GetShortArrayRegion__return();
|
||||
probe GetShortField__entry(void*, void*, uintptr_t);
|
||||
probe GetShortField__return(uint16_t);
|
||||
probe GetStaticBooleanField__entry(void*, void*, uintptr_t);
|
||||
probe GetStaticBooleanField__return(uintptr_t);
|
||||
probe GetStaticByteField__entry(void*, void*, uintptr_t);
|
||||
probe GetStaticByteField__return(char);
|
||||
probe GetStaticCharField__entry(void*, void*, uintptr_t);
|
||||
probe GetStaticCharField__return(uint16_t);
|
||||
probe GetStaticDoubleField__entry(void*, void*, uintptr_t);
|
||||
probe GetStaticDoubleField__return();
|
||||
probe GetStaticFieldID__entry(void*, void*, const char*, const char*);
|
||||
probe GetStaticFieldID__return(uintptr_t);
|
||||
probe GetStaticFloatField__entry(void*, void*, uintptr_t);
|
||||
probe GetStaticFloatField__return();
|
||||
probe GetStaticIntField__entry(void*, void*, uintptr_t);
|
||||
probe GetStaticIntField__return(uint32_t);
|
||||
probe GetStaticLongField__entry(void*, void*, uintptr_t);
|
||||
probe GetStaticLongField__return(uintptr_t);
|
||||
probe GetStaticMethodID__entry(void*, void*, const char*, const char*);
|
||||
probe GetStaticMethodID__return(uintptr_t);
|
||||
probe GetStaticObjectField__entry(void*, void*, uintptr_t);
|
||||
probe GetStaticObjectField__return(void*);
|
||||
probe GetStaticShortField__entry(void*, void*, uintptr_t);
|
||||
probe GetStaticShortField__return(uint16_t);
|
||||
probe GetStringChars__entry(void*, void*, uintptr_t*);
|
||||
probe GetStringChars__return(const uint16_t*);
|
||||
probe GetStringCritical__entry(void*, void*, uintptr_t*);
|
||||
probe GetStringCritical__return(const uint16_t*);
|
||||
probe GetStringLength__entry(void*, void*);
|
||||
probe GetStringLength__return(uintptr_t);
|
||||
probe GetStringRegion__entry(void*, void*, uintptr_t, uintptr_t, uint16_t*);
|
||||
probe GetStringRegion__return();
|
||||
probe GetStringUTFChars__entry(void*, void*, uintptr_t*);
|
||||
probe GetStringUTFChars__return(const char*);
|
||||
probe GetStringUTFLength__entry(void*, void*);
|
||||
probe GetStringUTFLength__return(uintptr_t);
|
||||
probe GetStringUTFRegion__entry(void*, void*, uintptr_t, uintptr_t, char*);
|
||||
probe GetStringUTFRegion__return();
|
||||
probe GetSuperclass__entry(void*, void*);
|
||||
probe GetSuperclass__return(void*);
|
||||
probe GetVersion__entry(void*);
|
||||
probe GetVersion__return(uint32_t);
|
||||
probe IsAssignableFrom__entry(void*, void*, void*);
|
||||
probe IsAssignableFrom__return(uintptr_t);
|
||||
probe IsInstanceOf__entry(void*, void*, void*);
|
||||
probe IsInstanceOf__return(uintptr_t);
|
||||
probe IsSameObject__entry(void*, void*, void*);
|
||||
probe IsSameObject__return(uintptr_t);
|
||||
probe MonitorEnter__entry(void*, void*);
|
||||
probe MonitorEnter__return(uint32_t);
|
||||
probe MonitorExit__entry(void*, void*);
|
||||
probe MonitorExit__return(uint32_t);
|
||||
probe NewBooleanArray__entry(void*, uintptr_t);
|
||||
probe NewBooleanArray__return(void*);
|
||||
probe NewByteArray__entry(void*, uintptr_t);
|
||||
probe NewByteArray__return(void*);
|
||||
probe NewCharArray__entry(void*, uintptr_t);
|
||||
probe NewCharArray__return(void*);
|
||||
probe NewDirectByteBuffer__entry(void*, void*, uintptr_t);
|
||||
probe NewDirectByteBuffer__return(void*);
|
||||
probe NewDoubleArray__entry(void*, uintptr_t);
|
||||
probe NewDoubleArray__return(void*);
|
||||
probe NewFloatArray__entry(void*, uintptr_t);
|
||||
probe NewFloatArray__return(void*);
|
||||
probe NewGlobalRef__entry(void*, void*);
|
||||
probe NewGlobalRef__return(void*);
|
||||
probe NewIntArray__entry(void*, uintptr_t);
|
||||
probe NewIntArray__return(void*);
|
||||
probe NewLocalRef__entry(void*, void*);
|
||||
probe NewLocalRef__return(void*);
|
||||
probe NewLongArray__entry(void*, uintptr_t);
|
||||
probe NewLongArray__return(void*);
|
||||
probe NewObjectA__entry(void*, void*, uintptr_t);
|
||||
probe NewObjectA__return(void*);
|
||||
probe NewObjectArray__entry(void*, uintptr_t, void*, void*);
|
||||
probe NewObjectArray__return(void*);
|
||||
probe NewObject__entry(void*, void*, uintptr_t);
|
||||
probe NewObject__return(void*);
|
||||
probe NewObjectV__entry(void*, void*, uintptr_t);
|
||||
probe NewObjectV__return(void*);
|
||||
probe NewShortArray__entry(void*, uintptr_t);
|
||||
probe NewShortArray__return(void*);
|
||||
probe NewString__entry(void*, const uint16_t*, uintptr_t);
|
||||
probe NewString__return(void*);
|
||||
probe NewStringUTF__entry(void*, const char*);
|
||||
probe NewStringUTF__return(void*);
|
||||
probe NewWeakGlobalRef__entry(void*, void*);
|
||||
probe NewWeakGlobalRef__return(void*);
|
||||
probe PopLocalFrame__entry(void*, void*);
|
||||
probe PopLocalFrame__return(void*);
|
||||
probe PushLocalFrame__entry(void*, uint32_t);
|
||||
probe PushLocalFrame__return(uint32_t);
|
||||
probe RegisterNatives__entry(void*, void*, const void*, uint32_t);
|
||||
probe RegisterNatives__return(uint32_t);
|
||||
probe ReleaseBooleanArrayElements__entry(void*, void*, uintptr_t*, uint32_t);
|
||||
probe ReleaseBooleanArrayElements__return();
|
||||
probe ReleaseByteArrayElements__entry(void*, void*, char*, uint32_t);
|
||||
probe ReleaseByteArrayElements__return();
|
||||
probe ReleaseCharArrayElements__entry(void*, void*, uint16_t*, uint32_t);
|
||||
probe ReleaseCharArrayElements__return();
|
||||
probe ReleaseDoubleArrayElements__entry(void*, void*, double*, uint32_t);
|
||||
probe ReleaseDoubleArrayElements__return();
|
||||
probe ReleaseFloatArrayElements__entry(void*, void*, float*, uint32_t);
|
||||
probe ReleaseFloatArrayElements__return();
|
||||
probe ReleaseIntArrayElements__entry(void*, void*, uint32_t*, uint32_t);
|
||||
probe ReleaseIntArrayElements__return();
|
||||
probe ReleaseLongArrayElements__entry(void*, void*, uintptr_t*, uint32_t);
|
||||
probe ReleaseLongArrayElements__return();
|
||||
probe ReleasePrimitiveArrayCritical__entry(void*, void*, void*, uint32_t);
|
||||
probe ReleasePrimitiveArrayCritical__return();
|
||||
probe ReleaseShortArrayElements__entry(void*, void*, uint16_t*, uint32_t);
|
||||
probe ReleaseShortArrayElements__return();
|
||||
probe ReleaseStringChars__entry(void*, void*, const uint16_t*);
|
||||
probe ReleaseStringChars__return();
|
||||
probe ReleaseStringCritical__entry(void*, void*, const uint16_t*);
|
||||
probe ReleaseStringCritical__return();
|
||||
probe ReleaseStringUTFChars__entry(void*, void*, const char*);
|
||||
probe ReleaseStringUTFChars__return();
|
||||
probe SetBooleanArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const uintptr_t*);
|
||||
probe SetBooleanArrayRegion__return();
|
||||
probe SetBooleanField__entry(void*, void*, uintptr_t, uintptr_t);
|
||||
probe SetBooleanField__return();
|
||||
probe SetByteArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const char*);
|
||||
probe SetByteArrayRegion__return();
|
||||
probe SetByteField__entry(void*, void*, uintptr_t, char);
|
||||
probe SetByteField__return();
|
||||
probe SetCharArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const uint16_t*);
|
||||
probe SetCharArrayRegion__return();
|
||||
probe SetCharField__entry(void*, void*, uintptr_t, uint16_t);
|
||||
probe SetCharField__return();
|
||||
probe SetDoubleArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const double*);
|
||||
probe SetDoubleArrayRegion__return();
|
||||
probe SetDoubleField__entry(void*, void*, uintptr_t);
|
||||
probe SetDoubleField__return();
|
||||
probe SetFloatArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const float*);
|
||||
probe SetFloatArrayRegion__return();
|
||||
probe SetFloatField__entry(void*, void*, uintptr_t);
|
||||
probe SetFloatField__return();
|
||||
probe SetIntArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const uint32_t*);
|
||||
probe SetIntArrayRegion__return();
|
||||
probe SetIntField__entry(void*, void*, uintptr_t, uint32_t);
|
||||
probe SetIntField__return();
|
||||
probe SetLongArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const uintptr_t*);
|
||||
probe SetLongArrayRegion__return();
|
||||
probe SetLongField__entry(void*, void*, uintptr_t, uintptr_t);
|
||||
probe SetLongField__return();
|
||||
probe SetObjectArrayElement__entry(void*, void*, uintptr_t, void*);
|
||||
probe SetObjectArrayElement__return();
|
||||
probe SetObjectField__entry(void*, void*, uintptr_t, void*);
|
||||
probe SetObjectField__return();
|
||||
probe SetShortArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const uint16_t*);
|
||||
probe SetShortArrayRegion__return();
|
||||
probe SetShortField__entry(void*, void*, uintptr_t, uint16_t);
|
||||
probe SetShortField__return();
|
||||
probe SetStaticBooleanField__entry(void*, void*, uintptr_t, uintptr_t);
|
||||
probe SetStaticBooleanField__return();
|
||||
probe SetStaticByteField__entry(void*, void*, uintptr_t, char);
|
||||
probe SetStaticByteField__return();
|
||||
probe SetStaticCharField__entry(void*, void*, uintptr_t, uint16_t);
|
||||
probe SetStaticCharField__return();
|
||||
probe SetStaticDoubleField__entry(void*, void*, uintptr_t);
|
||||
probe SetStaticDoubleField__return();
|
||||
probe SetStaticFloatField__entry(void*, void*, uintptr_t);
|
||||
probe SetStaticFloatField__return();
|
||||
probe SetStaticIntField__entry(void*, void*, uintptr_t, uint32_t);
|
||||
probe SetStaticIntField__return();
|
||||
probe SetStaticLongField__entry(void*, void*, uintptr_t, uintptr_t);
|
||||
probe SetStaticLongField__return();
|
||||
probe SetStaticObjectField__entry(void*, void*, uintptr_t, void*);
|
||||
probe SetStaticObjectField__return();
|
||||
probe SetStaticShortField__entry(void*, void*, uintptr_t, uint16_t);
|
||||
probe SetStaticShortField__return();
|
||||
probe Throw__entry(void*, void*);
|
||||
probe Throw__return(intptr_t);
|
||||
probe ThrowNew__entry(void*, void*, const char*);
|
||||
probe ThrowNew__return(intptr_t);
|
||||
probe ToReflectedField__entry(void*, void*, uintptr_t, uintptr_t);
|
||||
probe ToReflectedField__return(void*);
|
||||
probe ToReflectedMethod__entry(void*, void*, uintptr_t, uintptr_t);
|
||||
probe ToReflectedMethod__return(void*);
|
||||
probe UnregisterNatives__entry(void*, void*);
|
||||
probe UnregisterNatives__return(uint32_t);
|
||||
};
|
||||
|
||||
#pragma D attributes Standard/Standard/Common provider hotspot_jni provider
|
||||
#pragma D attributes Private/Private/Unknown provider hotspot_jni module
|
||||
#pragma D attributes Private/Private/Unknown provider hotspot_jni function
|
||||
#pragma D attributes Standard/Standard/Common provider hotspot_jni name
|
||||
#pragma D attributes Evolving/Evolving/Common provider hotspot_jni args
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -2232,8 +2232,8 @@ static bool check_addr0(outputStream* st) {
|
||||
st->cr();
|
||||
status = true;
|
||||
}
|
||||
::close(fd);
|
||||
}
|
||||
::close(fd);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
@ -2257,13 +2257,18 @@ const char *ill_names[] = { "ILL0", "ILL_ILLOPC", "ILL_ILLOPN", "ILL_ILLADR",
|
||||
"ILL_ILLTRP", "ILL_PRVOPC", "ILL_PRVREG",
|
||||
"ILL_COPROC", "ILL_BADSTK" };
|
||||
|
||||
const size_t ill_names_length = (sizeof(ill_names)/sizeof(char *));
|
||||
|
||||
const char *fpe_names[] = { "FPE0", "FPE_INTDIV", "FPE_INTOVF", "FPE_FLTDIV",
|
||||
"FPE_FLTOVF", "FPE_FLTUND", "FPE_FLTRES",
|
||||
"FPE_FLTINV", "FPE_FLTSUB" };
|
||||
const size_t fpe_names_length = (sizeof(fpe_names)/sizeof(char *));
|
||||
|
||||
const char *segv_names[] = { "SEGV0", "SEGV_MAPERR", "SEGV_ACCERR" };
|
||||
const size_t segv_names_length = (sizeof(segv_names)/sizeof(char *));
|
||||
|
||||
const char *bus_names[] = { "BUS0", "BUS_ADRALN", "BUS_ADRERR", "BUS_OBJERR" };
|
||||
const size_t bus_names_length = (sizeof(bus_names)/sizeof(char *));
|
||||
|
||||
void os::print_siginfo(outputStream* st, void* siginfo) {
|
||||
st->print("siginfo:");
|
||||
@ -2282,19 +2287,23 @@ void os::print_siginfo(outputStream* st, void* siginfo) {
|
||||
assert(c > 0, "unexpected si_code");
|
||||
switch (si->si_signo) {
|
||||
case SIGILL:
|
||||
st->print(", si_code=%d (%s)", c, c > 8 ? "" : ill_names[c]);
|
||||
st->print(", si_code=%d (%s)", c,
|
||||
c >= ill_names_length ? "" : ill_names[c]);
|
||||
st->print(", si_addr=" PTR_FORMAT, si->si_addr);
|
||||
break;
|
||||
case SIGFPE:
|
||||
st->print(", si_code=%d (%s)", c, c > 9 ? "" : fpe_names[c]);
|
||||
st->print(", si_code=%d (%s)", c,
|
||||
c >= fpe_names_length ? "" : fpe_names[c]);
|
||||
st->print(", si_addr=" PTR_FORMAT, si->si_addr);
|
||||
break;
|
||||
case SIGSEGV:
|
||||
st->print(", si_code=%d (%s)", c, c > 2 ? "" : segv_names[c]);
|
||||
st->print(", si_code=%d (%s)", c,
|
||||
c >= segv_names_length ? "" : segv_names[c]);
|
||||
st->print(", si_addr=" PTR_FORMAT, si->si_addr);
|
||||
break;
|
||||
case SIGBUS:
|
||||
st->print(", si_code=%d (%s)", c, c > 3 ? "" : bus_names[c]);
|
||||
st->print(", si_code=%d (%s)", c,
|
||||
c >= bus_names_length ? "" : bus_names[c]);
|
||||
st->print(", si_addr=" PTR_FORMAT, si->si_addr);
|
||||
break;
|
||||
default:
|
||||
@ -2441,13 +2450,14 @@ void os::jvm_path(char *buf, jint buflen) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Arguments::created_by_gamma_launcher()) {
|
||||
// Support for the gamma launcher. Typical value for buf is
|
||||
// "<JAVA_HOME>/jre/lib/<arch>/<vmtype>/libjvm.so". If "/jre/lib/" appears at
|
||||
// the right place in the string, then assume we are installed in a JDK and
|
||||
// we're done. Otherwise, check for a JAVA_HOME environment variable and fix
|
||||
// up the path so it looks like libjvm.so is installed there (append a
|
||||
// fake suffix hotspot/libjvm.so).
|
||||
if (Arguments::sun_java_launcher_is_altjvm()) {
|
||||
// Support for the java launcher's '-XXaltjvm=<path>' option. Typical
|
||||
// value for buf is "<JAVA_HOME>/jre/lib/<arch>/<vmtype>/libjvm.so".
|
||||
// If "/jre/lib/" appears at the right place in the string, then
|
||||
// assume we are installed in a JDK and we're done. Otherwise, check
|
||||
// for a JAVA_HOME environment variable and fix up the path so it
|
||||
// looks like libjvm.so is installed there (append a fake suffix
|
||||
// hotspot/libjvm.so).
|
||||
const char *p = buf + strlen(buf) - 1;
|
||||
for (int count = 0; p > buf && count < 5; ++count) {
|
||||
for (--p; p > buf && *p != '/'; --p)
|
||||
@ -3011,7 +3021,7 @@ bool os::get_page_info(char *start, page_info* info) {
|
||||
char *os::scan_pages(char *start, char* end, page_info* page_expected, page_info* page_found) {
|
||||
const uint_t info_types[] = { MEMINFO_VLGRP, MEMINFO_VPAGESIZE };
|
||||
const size_t types = sizeof(info_types) / sizeof(info_types[0]);
|
||||
uint64_t addrs[MAX_MEMINFO_CNT], outdata[types * MAX_MEMINFO_CNT];
|
||||
uint64_t addrs[MAX_MEMINFO_CNT], outdata[types * MAX_MEMINFO_CNT + 1];
|
||||
uint_t validity[MAX_MEMINFO_CNT];
|
||||
|
||||
size_t page_size = MAX2((size_t)os::vm_page_size(), page_expected->size);
|
||||
@ -3050,7 +3060,7 @@ char *os::scan_pages(char *start, char* end, page_info* page_expected, page_info
|
||||
}
|
||||
}
|
||||
|
||||
if (i != addrs_count) {
|
||||
if (i < addrs_count) {
|
||||
if ((validity[i] & 2) != 0) {
|
||||
page_found->lgrp_id = outdata[types * i];
|
||||
} else {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -431,10 +431,12 @@ static char* get_user_name(int vmid, TRAPS) {
|
||||
|
||||
RESTARTABLE(::read(fd, addr, remaining), result);
|
||||
if (result == OS_ERR) {
|
||||
::close(fd);
|
||||
THROW_MSG_0(vmSymbols::java_io_IOException(), "Read error");
|
||||
} else {
|
||||
remaining-=result;
|
||||
addr+=result;
|
||||
}
|
||||
remaining-=result;
|
||||
addr+=result;
|
||||
}
|
||||
|
||||
::close(fd);
|
||||
@ -906,8 +908,16 @@ static void mmap_attach_shared(const char* user, int vmid, PerfMemory::PerfMemor
|
||||
FREE_C_HEAP_ARRAY(char, filename, mtInternal);
|
||||
|
||||
// open the shared memory file for the give vmid
|
||||
fd = open_sharedmem_file(rfilename, file_flags, CHECK);
|
||||
assert(fd != OS_ERR, "unexpected value");
|
||||
fd = open_sharedmem_file(rfilename, file_flags, THREAD);
|
||||
|
||||
if (fd == OS_ERR) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (HAS_PENDING_EXCEPTION) {
|
||||
::close(fd);
|
||||
return;
|
||||
}
|
||||
|
||||
if (*sizep == 0) {
|
||||
size = sharedmem_filesize(fd, CHECK);
|
||||
|
@ -1810,32 +1810,30 @@ void os::jvm_path(char *buf, jint buflen) {
|
||||
}
|
||||
|
||||
buf[0] = '\0';
|
||||
if (Arguments::created_by_gamma_launcher()) {
|
||||
// Support for the gamma launcher. Check for an
|
||||
// JAVA_HOME environment variable
|
||||
// and fix up the path so it looks like
|
||||
// libjvm.so is installed there (append a fake suffix
|
||||
// hotspot/libjvm.so).
|
||||
char* java_home_var = ::getenv("JAVA_HOME");
|
||||
if (java_home_var != NULL && java_home_var[0] != 0) {
|
||||
if (Arguments::sun_java_launcher_is_altjvm()) {
|
||||
// Support for the java launcher's '-XXaltjvm=<path>' option. Check
|
||||
// for a JAVA_HOME environment variable and fix up the path so it
|
||||
// looks like jvm.dll is installed there (append a fake suffix
|
||||
// hotspot/jvm.dll).
|
||||
char* java_home_var = ::getenv("JAVA_HOME");
|
||||
if (java_home_var != NULL && java_home_var[0] != 0) {
|
||||
strncpy(buf, java_home_var, buflen);
|
||||
|
||||
strncpy(buf, java_home_var, buflen);
|
||||
|
||||
// determine if this is a legacy image or modules image
|
||||
// modules image doesn't have "jre" subdirectory
|
||||
size_t len = strlen(buf);
|
||||
char* jrebin_p = buf + len;
|
||||
jio_snprintf(jrebin_p, buflen-len, "\\jre\\bin\\");
|
||||
if (0 != _access(buf, 0)) {
|
||||
jio_snprintf(jrebin_p, buflen-len, "\\bin\\");
|
||||
}
|
||||
len = strlen(buf);
|
||||
jio_snprintf(buf + len, buflen-len, "hotspot\\jvm.dll");
|
||||
}
|
||||
// determine if this is a legacy image or modules image
|
||||
// modules image doesn't have "jre" subdirectory
|
||||
size_t len = strlen(buf);
|
||||
char* jrebin_p = buf + len;
|
||||
jio_snprintf(jrebin_p, buflen-len, "\\jre\\bin\\");
|
||||
if (0 != _access(buf, 0)) {
|
||||
jio_snprintf(jrebin_p, buflen-len, "\\bin\\");
|
||||
}
|
||||
len = strlen(buf);
|
||||
jio_snprintf(buf + len, buflen-len, "hotspot\\jvm.dll");
|
||||
}
|
||||
}
|
||||
|
||||
if(buf[0] == '\0') {
|
||||
GetModuleFileName(vm_lib_handle, buf, buflen);
|
||||
if (buf[0] == '\0') {
|
||||
GetModuleFileName(vm_lib_handle, buf, buflen);
|
||||
}
|
||||
strcpy(saved_jvm_path, buf);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -475,9 +475,11 @@ JVM_handle_solaris_signal(int sig, siginfo_t* info, void* ucVoid,
|
||||
// here if the underlying file has been truncated.
|
||||
// Do not crash the VM in such a case.
|
||||
CodeBlob* cb = CodeCache::find_blob_unsafe(pc);
|
||||
nmethod* nm = cb->is_nmethod() ? (nmethod*)cb : NULL;
|
||||
if (nm != NULL && nm->has_unsafe_access()) {
|
||||
stub = StubRoutines::handler_for_unsafe_access();
|
||||
if (cb != NULL) {
|
||||
nmethod* nm = cb->is_nmethod() ? (nmethod*)cb : NULL;
|
||||
if (nm != NULL && nm->has_unsafe_access()) {
|
||||
stub = StubRoutines::handler_for_unsafe_access();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -724,6 +726,7 @@ JVM_handle_solaris_signal(int sig, siginfo_t* info, void* ucVoid,
|
||||
err.report_and_die();
|
||||
|
||||
ShouldNotReachHere();
|
||||
return false;
|
||||
}
|
||||
|
||||
void os::print_context(outputStream *st, void *context) {
|
||||
|
@ -161,7 +161,18 @@ public class WinGammaPlatformVC10 extends WinGammaPlatformVC7 {
|
||||
for (BuildConfig cfg : allConfigs) {
|
||||
startTag(cfg, "PropertyGroup");
|
||||
tagData("LocalDebuggerCommand", cfg.get("JdkTargetRoot") + "\\bin\\java.exe");
|
||||
tagData("LocalDebuggerCommandArguments", "-XXaltjvm=$(TargetDir) -Dsun.java.launcher=gamma");
|
||||
// The JVM loads some libraries using a path relative to
|
||||
// itself because it expects to be in a JRE or a JDK. The java
|
||||
// launcher's '-XXaltjvm=' option allows the JVM to be outside
|
||||
// the JRE or JDK so '-Dsun.java.launcher.is_altjvm=true'
|
||||
// forces a fake JAVA_HOME relative path to be used to
|
||||
// find the other libraries. The '-XX:+PauseAtExit' option
|
||||
// causes the VM to wait for key press before exiting; this
|
||||
// allows any stdout or stderr messages to be seen before
|
||||
// the cmdtool exits.
|
||||
tagData("LocalDebuggerCommandArguments", "-XXaltjvm=$(TargetDir) "
|
||||
+ "-Dsun.java.launcher.is_altjvm=true "
|
||||
+ "-XX:+UnlockDiagnosticVMOptions -XX:+PauseAtExit");
|
||||
tagData("LocalDebuggerEnvironment", "JAVA_HOME=" + cfg.get("JdkTargetRoot"));
|
||||
endTag();
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -39,18 +39,18 @@ intptr_t object_hash(Klass* k) {
|
||||
}
|
||||
|
||||
// Seed value used for each alternative hash calculated.
|
||||
jint AltHashing::compute_seed() {
|
||||
juint AltHashing::compute_seed() {
|
||||
jlong nanos = os::javaTimeNanos();
|
||||
jlong now = os::javaTimeMillis();
|
||||
jint SEED_MATERIAL[8] = {
|
||||
(jint) object_hash(SystemDictionary::String_klass()),
|
||||
(jint) object_hash(SystemDictionary::System_klass()),
|
||||
(jint) os::random(), // current thread isn't a java thread
|
||||
(jint) (((julong)nanos) >> 32),
|
||||
(jint) nanos,
|
||||
(jint) (((julong)now) >> 32),
|
||||
(jint) now,
|
||||
(jint) (os::javaTimeNanos() >> 2)
|
||||
int SEED_MATERIAL[8] = {
|
||||
(int) object_hash(SystemDictionary::String_klass()),
|
||||
(int) object_hash(SystemDictionary::System_klass()),
|
||||
(int) os::random(), // current thread isn't a java thread
|
||||
(int) (((julong)nanos) >> 32),
|
||||
(int) nanos,
|
||||
(int) (((julong)now) >> 32),
|
||||
(int) now,
|
||||
(int) (os::javaTimeNanos() >> 2)
|
||||
};
|
||||
|
||||
return murmur3_32(SEED_MATERIAL, 8);
|
||||
@ -58,14 +58,14 @@ jint AltHashing::compute_seed() {
|
||||
|
||||
|
||||
// Murmur3 hashing for Symbol
|
||||
jint AltHashing::murmur3_32(jint seed, const jbyte* data, int len) {
|
||||
jint h1 = seed;
|
||||
juint AltHashing::murmur3_32(juint seed, const jbyte* data, int len) {
|
||||
juint h1 = seed;
|
||||
int count = len;
|
||||
int offset = 0;
|
||||
|
||||
// body
|
||||
while (count >= 4) {
|
||||
jint k1 = (data[offset] & 0x0FF)
|
||||
juint k1 = (data[offset] & 0x0FF)
|
||||
| (data[offset + 1] & 0x0FF) << 8
|
||||
| (data[offset + 2] & 0x0FF) << 16
|
||||
| data[offset + 3] << 24;
|
||||
@ -85,7 +85,7 @@ jint AltHashing::murmur3_32(jint seed, const jbyte* data, int len) {
|
||||
// tail
|
||||
|
||||
if (count > 0) {
|
||||
jint k1 = 0;
|
||||
juint k1 = 0;
|
||||
|
||||
switch (count) {
|
||||
case 3:
|
||||
@ -109,18 +109,18 @@ jint AltHashing::murmur3_32(jint seed, const jbyte* data, int len) {
|
||||
h1 ^= len;
|
||||
|
||||
// finalization mix force all bits of a hash block to avalanche
|
||||
h1 ^= ((unsigned int)h1) >> 16;
|
||||
h1 ^= h1 >> 16;
|
||||
h1 *= 0x85ebca6b;
|
||||
h1 ^= ((unsigned int)h1) >> 13;
|
||||
h1 ^= h1 >> 13;
|
||||
h1 *= 0xc2b2ae35;
|
||||
h1 ^= ((unsigned int)h1) >> 16;
|
||||
h1 ^= h1 >> 16;
|
||||
|
||||
return h1;
|
||||
}
|
||||
|
||||
// Murmur3 hashing for Strings
|
||||
jint AltHashing::murmur3_32(jint seed, const jchar* data, int len) {
|
||||
jint h1 = seed;
|
||||
juint AltHashing::murmur3_32(juint seed, const jchar* data, int len) {
|
||||
juint h1 = seed;
|
||||
|
||||
int off = 0;
|
||||
int count = len;
|
||||
@ -129,7 +129,7 @@ jint AltHashing::murmur3_32(jint seed, const jchar* data, int len) {
|
||||
while (count >= 2) {
|
||||
jchar d1 = data[off++] & 0xFFFF;
|
||||
jchar d2 = data[off++];
|
||||
jint k1 = (d1 | d2 << 16);
|
||||
juint k1 = (d1 | d2 << 16);
|
||||
|
||||
count -= 2;
|
||||
|
||||
@ -145,7 +145,7 @@ jint AltHashing::murmur3_32(jint seed, const jchar* data, int len) {
|
||||
// tail
|
||||
|
||||
if (count > 0) {
|
||||
int k1 = data[off];
|
||||
juint k1 = (juint)data[off];
|
||||
|
||||
k1 *= 0xcc9e2d51;
|
||||
k1 = Integer_rotateLeft(k1, 15);
|
||||
@ -157,25 +157,25 @@ jint AltHashing::murmur3_32(jint seed, const jchar* data, int len) {
|
||||
h1 ^= len * 2; // (Character.SIZE / Byte.SIZE);
|
||||
|
||||
// finalization mix force all bits of a hash block to avalanche
|
||||
h1 ^= ((unsigned int)h1) >> 16;
|
||||
h1 ^= h1 >> 16;
|
||||
h1 *= 0x85ebca6b;
|
||||
h1 ^= ((unsigned int)h1) >> 13;
|
||||
h1 ^= h1 >> 13;
|
||||
h1 *= 0xc2b2ae35;
|
||||
h1 ^= ((unsigned int)h1) >> 16;
|
||||
h1 ^= h1 >> 16;
|
||||
|
||||
return h1;
|
||||
}
|
||||
|
||||
// Hash used for the seed.
|
||||
jint AltHashing::murmur3_32(jint seed, const int* data, int len) {
|
||||
jint h1 = seed;
|
||||
juint AltHashing::murmur3_32(juint seed, const int* data, int len) {
|
||||
juint h1 = seed;
|
||||
|
||||
int off = 0;
|
||||
int end = len;
|
||||
|
||||
// body
|
||||
while (off < end) {
|
||||
jint k1 = data[off++];
|
||||
juint k1 = (juint)data[off++];
|
||||
|
||||
k1 *= 0xcc9e2d51;
|
||||
k1 = Integer_rotateLeft(k1, 15);
|
||||
@ -193,26 +193,26 @@ jint AltHashing::murmur3_32(jint seed, const int* data, int len) {
|
||||
h1 ^= len * 4; // (Integer.SIZE / Byte.SIZE);
|
||||
|
||||
// finalization mix force all bits of a hash block to avalanche
|
||||
h1 ^= ((juint)h1) >> 16;
|
||||
h1 ^= h1 >> 16;
|
||||
h1 *= 0x85ebca6b;
|
||||
h1 ^= ((juint)h1) >> 13;
|
||||
h1 ^= h1 >> 13;
|
||||
h1 *= 0xc2b2ae35;
|
||||
h1 ^= ((juint)h1) >> 16;
|
||||
h1 ^= h1 >> 16;
|
||||
|
||||
return h1;
|
||||
}
|
||||
|
||||
jint AltHashing::murmur3_32(const int* data, int len) {
|
||||
juint AltHashing::murmur3_32(const int* data, int len) {
|
||||
return murmur3_32(0, data, len);
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
// Overloaded versions for internal test.
|
||||
jint AltHashing::murmur3_32(const jbyte* data, int len) {
|
||||
juint AltHashing::murmur3_32(const jbyte* data, int len) {
|
||||
return murmur3_32(0, data, len);
|
||||
}
|
||||
|
||||
jint AltHashing::murmur3_32(const jchar* data, int len) {
|
||||
juint AltHashing::murmur3_32(const jchar* data, int len) {
|
||||
return murmur3_32(0, data, len);
|
||||
}
|
||||
|
||||
@ -251,11 +251,11 @@ void AltHashing::testMurmur3_32_ByteArray() {
|
||||
|
||||
// Hash subranges {}, {0}, {0,1}, {0,1,2}, ..., {0,...,255}
|
||||
for (int i = 0; i < 256; i++) {
|
||||
jint hash = murmur3_32(256 - i, vector, i);
|
||||
juint hash = murmur3_32(256 - i, vector, i);
|
||||
hashes[i * 4] = (jbyte) hash;
|
||||
hashes[i * 4 + 1] = (jbyte) (((juint)hash) >> 8);
|
||||
hashes[i * 4 + 2] = (jbyte) (((juint)hash) >> 16);
|
||||
hashes[i * 4 + 3] = (jbyte) (((juint)hash) >> 24);
|
||||
hashes[i * 4 + 1] = (jbyte)(hash >> 8);
|
||||
hashes[i * 4 + 2] = (jbyte)(hash >> 16);
|
||||
hashes[i * 4 + 3] = (jbyte)(hash >> 24);
|
||||
}
|
||||
|
||||
// hash to get const result.
|
||||
@ -269,7 +269,7 @@ void AltHashing::testMurmur3_32_ByteArray() {
|
||||
}
|
||||
|
||||
void AltHashing::testEquivalentHashes() {
|
||||
jint jbytes, jchars, ints;
|
||||
juint jbytes, jchars, ints;
|
||||
|
||||
// printf("testEquivalentHashes\n");
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -39,24 +39,24 @@
|
||||
class AltHashing : AllStatic {
|
||||
|
||||
// utility function copied from java/lang/Integer
|
||||
static jint Integer_rotateLeft(jint i, int distance) {
|
||||
return (i << distance) | (((juint)i) >> (32-distance));
|
||||
static juint Integer_rotateLeft(juint i, int distance) {
|
||||
return (i << distance) | (i >> (32-distance));
|
||||
}
|
||||
static jint murmur3_32(const int* data, int len);
|
||||
static jint murmur3_32(jint seed, const int* data, int len);
|
||||
static juint murmur3_32(const int* data, int len);
|
||||
static juint murmur3_32(juint seed, const int* data, int len);
|
||||
|
||||
#ifndef PRODUCT
|
||||
// Hashing functions used for internal testing
|
||||
static jint murmur3_32(const jbyte* data, int len);
|
||||
static jint murmur3_32(const jchar* data, int len);
|
||||
static juint murmur3_32(const jbyte* data, int len);
|
||||
static juint murmur3_32(const jchar* data, int len);
|
||||
static void testMurmur3_32_ByteArray();
|
||||
static void testEquivalentHashes();
|
||||
#endif // PRODUCT
|
||||
|
||||
public:
|
||||
static jint compute_seed();
|
||||
static jint murmur3_32(jint seed, const jbyte* data, int len);
|
||||
static jint murmur3_32(jint seed, const jchar* data, int len);
|
||||
static juint compute_seed();
|
||||
static juint murmur3_32(juint seed, const jbyte* data, int len);
|
||||
static juint murmur3_32(juint seed, const jchar* data, int len);
|
||||
NOT_PRODUCT(static void test_alt_hash();)
|
||||
};
|
||||
#endif // SHARE_VM_CLASSFILE_ALTHASHING_HPP
|
||||
|
@ -3746,18 +3746,24 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
|
||||
Exceptions::fthrow(
|
||||
THREAD_AND_LOCATION,
|
||||
vmSymbols::java_lang_UnsupportedClassVersionError(),
|
||||
"Unsupported major.minor version %u.%u",
|
||||
"Unsupported class file version %u.%u, "
|
||||
"this version of the Java Runtime only recognizes class file versions up to %u.%u",
|
||||
major_version,
|
||||
minor_version);
|
||||
minor_version,
|
||||
JAVA_MAX_SUPPORTED_VERSION,
|
||||
JAVA_MAX_SUPPORTED_MINOR_VERSION);
|
||||
} else {
|
||||
ResourceMark rm(THREAD);
|
||||
Exceptions::fthrow(
|
||||
THREAD_AND_LOCATION,
|
||||
vmSymbols::java_lang_UnsupportedClassVersionError(),
|
||||
"%s : Unsupported major.minor version %u.%u",
|
||||
"%s has been compiled by a more recent version of the Java Runtime (class file version %u.%u), "
|
||||
"this version of the Java Runtime only recognizes class file versions up to %u.%u",
|
||||
name->as_C_string(),
|
||||
major_version,
|
||||
minor_version);
|
||||
minor_version,
|
||||
JAVA_MAX_SUPPORTED_VERSION,
|
||||
JAVA_MAX_SUPPORTED_MINOR_VERSION);
|
||||
}
|
||||
return nullHandle;
|
||||
}
|
||||
|
@ -55,6 +55,9 @@ void* VtableStub::operator new(size_t size, int code_size) throw() {
|
||||
const int chunk_factor = 32;
|
||||
if (_chunk == NULL || _chunk + real_size > _chunk_end) {
|
||||
const int bytes = chunk_factor * real_size + pd_code_alignment();
|
||||
|
||||
// There is a dependency on the name of the blob in src/share/vm/prims/jvmtiCodeBlobEvents.cpp
|
||||
// If changing the name, update the other file accordingly.
|
||||
BufferBlob* blob = BufferBlob::create("vtable chunks", bytes);
|
||||
if (blob == NULL) {
|
||||
return NULL;
|
||||
@ -62,12 +65,6 @@ void* VtableStub::operator new(size_t size, int code_size) throw() {
|
||||
_chunk = blob->content_begin();
|
||||
_chunk_end = _chunk + bytes;
|
||||
Forte::register_stub("vtable stub", _chunk, _chunk_end);
|
||||
// Notify JVMTI about this stub. The event will be recorded by the enclosing
|
||||
// JvmtiDynamicCodeEventCollector and posted when this thread has released
|
||||
// all locks.
|
||||
if (JvmtiExport::should_post_dynamic_code_generated()) {
|
||||
JvmtiExport::post_dynamic_code_generated_while_holding_locks("vtable stub", _chunk, _chunk_end);
|
||||
}
|
||||
align_chunk();
|
||||
}
|
||||
assert(_chunk + real_size <= _chunk_end, "bad allocation");
|
||||
@ -130,6 +127,13 @@ address VtableStubs::find_stub(bool is_vtable_stub, int vtable_index) {
|
||||
is_vtable_stub? "vtbl": "itbl", vtable_index, VtableStub::receiver_location());
|
||||
Disassembler::decode(s->code_begin(), s->code_end());
|
||||
}
|
||||
// Notify JVMTI about this stub. The event will be recorded by the enclosing
|
||||
// JvmtiDynamicCodeEventCollector and posted when this thread has released
|
||||
// all locks.
|
||||
if (JvmtiExport::should_post_dynamic_code_generated()) {
|
||||
JvmtiExport::post_dynamic_code_generated_while_holding_locks(is_vtable_stub? "vtable stub": "itable stub",
|
||||
s->code_begin(), s->code_end());
|
||||
}
|
||||
}
|
||||
return s->entry_point();
|
||||
}
|
||||
@ -195,6 +199,14 @@ void vtableStubs_init() {
|
||||
VtableStubs::initialize();
|
||||
}
|
||||
|
||||
void VtableStubs::vtable_stub_do(void f(VtableStub*)) {
|
||||
for (int i = 0; i < N; i++) {
|
||||
for (VtableStub* s = _table[i]; s != NULL; s = s->next()) {
|
||||
f(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------
|
||||
// Non-product code
|
||||
|
@ -131,6 +131,7 @@ class VtableStubs : AllStatic {
|
||||
static VtableStub* stub_containing(address pc); // stub containing pc or NULL
|
||||
static int number_of_vtable_stubs() { return _number_of_vtable_stubs; }
|
||||
static void initialize();
|
||||
static void vtable_stub_do(void f(VtableStub*)); // iterates over all vtable stubs
|
||||
};
|
||||
|
||||
#endif // SHARE_VM_CODE_VTABLESTUBS_HPP
|
||||
|
@ -955,7 +955,7 @@ CompilerThread* CompileBroker::make_compiler_thread(const char* name, CompileQue
|
||||
|
||||
if (compiler_thread == NULL || compiler_thread->osthread() == NULL){
|
||||
vm_exit_during_initialization("java.lang.OutOfMemoryError",
|
||||
"unable to create new native thread");
|
||||
os::native_thread_creation_failed_msg());
|
||||
}
|
||||
|
||||
java_lang_Thread::set_thread(thread_oop(), compiler_thread);
|
||||
|
@ -700,7 +700,7 @@ void CMSAdaptiveSizePolicy::ms_collection_end(GCCause::Cause gc_cause) {
|
||||
double latest_cms_sum_concurrent_phases_time_secs =
|
||||
concurrent_collection_time();
|
||||
if (PrintAdaptiveSizePolicy && Verbose) {
|
||||
gclog_or_tty->print_cr("\nCMSAdaptiveSizePolicy::ms_collecton_end "
|
||||
gclog_or_tty->print_cr("\nCMSAdaptiveSizePolicy::ms_collection_end "
|
||||
"STW_in_foreground_in_seconds %f "
|
||||
"_latest_cms_initial_mark_start_to_end_time_secs %f "
|
||||
"_latest_cms_remark_start_to_end_time_secs %f "
|
||||
|
@ -958,7 +958,7 @@ void ConcurrentMarkSweepGeneration::compute_new_size_free_list() {
|
||||
desired_free_percentage);
|
||||
gclog_or_tty->print_cr(" Maximum free fraction %f",
|
||||
maximum_free_percentage);
|
||||
gclog_or_tty->print_cr(" Capactiy "SIZE_FORMAT, capacity()/1000);
|
||||
gclog_or_tty->print_cr(" Capacity "SIZE_FORMAT, capacity()/1000);
|
||||
gclog_or_tty->print_cr(" Desired capacity "SIZE_FORMAT,
|
||||
desired_capacity/1000);
|
||||
int prev_level = level() - 1;
|
||||
@ -3313,7 +3313,7 @@ void CMSCollector::setup_cms_unloading_and_verification_state() {
|
||||
}
|
||||
|
||||
// Not unloading classes this cycle
|
||||
assert(!should_unload_classes(), "Inconsitency!");
|
||||
assert(!should_unload_classes(), "Inconsistency!");
|
||||
remove_root_scanning_option(SharedHeap::SO_SystemClasses);
|
||||
add_root_scanning_option(SharedHeap::SO_AllClasses);
|
||||
|
||||
@ -7243,7 +7243,7 @@ size_t SurvivorSpacePrecleanClosure::do_object_careful(oop p) {
|
||||
HeapWord* addr = (HeapWord*)p;
|
||||
DEBUG_ONLY(_collector->verify_work_stacks_empty();)
|
||||
assert(!_span.contains(addr), "we are scanning the survivor spaces");
|
||||
assert(p->klass_or_null() != NULL, "object should be initializd");
|
||||
assert(p->klass_or_null() != NULL, "object should be initialized");
|
||||
// an initialized object; ignore mark word in verification below
|
||||
// since we are running concurrent with mutators
|
||||
assert(p->is_oop(true), "should be an oop");
|
||||
|
@ -254,7 +254,7 @@ bool VM_GenCollectFullConcurrent::evaluate_at_safepoint() const {
|
||||
// No need to do a young gc, we'll just nudge the CMS thread
|
||||
// in the doit() method above, to be executed soon.
|
||||
assert(_gc_count_before < gch->total_collections(),
|
||||
"total_collections() should be monotnically increasing");
|
||||
"total_collections() should be monotonically increasing");
|
||||
return false; // no need for foreground young gc
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,271 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* 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 "gc_implementation/g1/bufferingOopClosure.hpp"
|
||||
#include "memory/iterator.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
|
||||
/////////////// Unit tests ///////////////
|
||||
|
||||
#ifndef PRODUCT
|
||||
|
||||
class TestBufferingOopClosure {
|
||||
|
||||
// Helper class to fake a set of oop*s and narrowOop*s.
|
||||
class FakeRoots {
|
||||
public:
|
||||
// Used for sanity checking of the values passed to the do_oops functions in the test.
|
||||
static const uintptr_t NarrowOopMarker = uintptr_t(1) << (BitsPerWord -1);
|
||||
|
||||
int _num_narrow;
|
||||
int _num_full;
|
||||
void** _narrow;
|
||||
void** _full;
|
||||
|
||||
FakeRoots(int num_narrow, int num_full) :
|
||||
_num_narrow(num_narrow),
|
||||
_num_full(num_full),
|
||||
_narrow((void**)::malloc(sizeof(void*) * num_narrow)),
|
||||
_full((void**)::malloc(sizeof(void*) * num_full)) {
|
||||
|
||||
for (int i = 0; i < num_narrow; i++) {
|
||||
_narrow[i] = (void*)(NarrowOopMarker + (uintptr_t)i);
|
||||
}
|
||||
for (int i = 0; i < num_full; i++) {
|
||||
_full[i] = (void*)(uintptr_t)i;
|
||||
}
|
||||
}
|
||||
|
||||
~FakeRoots() {
|
||||
::free(_narrow);
|
||||
::free(_full);
|
||||
}
|
||||
|
||||
void oops_do_narrow_then_full(OopClosure* cl) {
|
||||
for (int i = 0; i < _num_narrow; i++) {
|
||||
cl->do_oop((narrowOop*)_narrow[i]);
|
||||
}
|
||||
for (int i = 0; i < _num_full; i++) {
|
||||
cl->do_oop((oop*)_full[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void oops_do_full_then_narrow(OopClosure* cl) {
|
||||
for (int i = 0; i < _num_full; i++) {
|
||||
cl->do_oop((oop*)_full[i]);
|
||||
}
|
||||
for (int i = 0; i < _num_narrow; i++) {
|
||||
cl->do_oop((narrowOop*)_narrow[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void oops_do_mixed(OopClosure* cl) {
|
||||
int i;
|
||||
for (i = 0; i < _num_full && i < _num_narrow; i++) {
|
||||
cl->do_oop((oop*)_full[i]);
|
||||
cl->do_oop((narrowOop*)_narrow[i]);
|
||||
}
|
||||
for (int j = i; j < _num_full; j++) {
|
||||
cl->do_oop((oop*)_full[i]);
|
||||
}
|
||||
for (int j = i; j < _num_narrow; j++) {
|
||||
cl->do_oop((narrowOop*)_narrow[i]);
|
||||
}
|
||||
}
|
||||
|
||||
static const int MaxOrder = 2;
|
||||
|
||||
void oops_do(OopClosure* cl, int do_oop_order) {
|
||||
switch(do_oop_order) {
|
||||
case 0:
|
||||
oops_do_narrow_then_full(cl);
|
||||
break;
|
||||
case 1:
|
||||
oops_do_full_then_narrow(cl);
|
||||
break;
|
||||
case 2:
|
||||
oops_do_mixed(cl);
|
||||
break;
|
||||
default:
|
||||
oops_do_narrow_then_full(cl);
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
class CountOopClosure : public OopClosure {
|
||||
int _narrow_oop_count;
|
||||
int _full_oop_count;
|
||||
public:
|
||||
CountOopClosure() : _narrow_oop_count(0), _full_oop_count(0) {}
|
||||
void do_oop(narrowOop* p) {
|
||||
assert((uintptr_t(p) & FakeRoots::NarrowOopMarker) != 0,
|
||||
"The narrowOop was unexpectedly not marked with the NarrowOopMarker");
|
||||
_narrow_oop_count++;
|
||||
}
|
||||
|
||||
void do_oop(oop* p){
|
||||
assert((uintptr_t(p) & FakeRoots::NarrowOopMarker) == 0,
|
||||
"The oop was unexpectedly marked with the NarrowOopMarker");
|
||||
_full_oop_count++;
|
||||
}
|
||||
|
||||
int narrow_oop_count() { return _narrow_oop_count; }
|
||||
int full_oop_count() { return _full_oop_count; }
|
||||
int all_oop_count() { return _narrow_oop_count + _full_oop_count; }
|
||||
};
|
||||
|
||||
class DoNothingOopClosure : public OopClosure {
|
||||
public:
|
||||
void do_oop(narrowOop* p) {}
|
||||
void do_oop(oop* p) {}
|
||||
};
|
||||
|
||||
static void testCount(int num_narrow, int num_full, int do_oop_order) {
|
||||
FakeRoots fr(num_narrow, num_full);
|
||||
|
||||
CountOopClosure coc;
|
||||
BufferingOopClosure boc(&coc);
|
||||
|
||||
fr.oops_do(&boc, do_oop_order);
|
||||
|
||||
boc.done();
|
||||
|
||||
#define assert_testCount(got, expected) \
|
||||
assert((got) == (expected), \
|
||||
err_msg("Expected: %d, got: %d, when running testCount(%d, %d, %d)", \
|
||||
(got), (expected), num_narrow, num_full, do_oop_order))
|
||||
|
||||
assert_testCount(num_narrow, coc.narrow_oop_count());
|
||||
assert_testCount(num_full, coc.full_oop_count());
|
||||
assert_testCount(num_narrow + num_full, coc.all_oop_count());
|
||||
}
|
||||
|
||||
static void testCount() {
|
||||
int buffer_length = BufferingOopClosure::BufferLength;
|
||||
|
||||
for (int order = 0; order < FakeRoots::MaxOrder; order++) {
|
||||
testCount(0, 0, order);
|
||||
testCount(10, 0, order);
|
||||
testCount(0, 10, order);
|
||||
testCount(10, 10, order);
|
||||
testCount(buffer_length, 10, order);
|
||||
testCount(10, buffer_length, order);
|
||||
testCount(buffer_length, buffer_length, order);
|
||||
testCount(buffer_length + 1, 10, order);
|
||||
testCount(10, buffer_length + 1, order);
|
||||
testCount(buffer_length + 1, buffer_length, order);
|
||||
testCount(buffer_length, buffer_length + 1, order);
|
||||
testCount(buffer_length + 1, buffer_length + 1, order);
|
||||
}
|
||||
}
|
||||
|
||||
static void testIsBufferEmptyOrFull(int num_narrow, int num_full, bool expect_empty, bool expect_full) {
|
||||
FakeRoots fr(num_narrow, num_full);
|
||||
|
||||
DoNothingOopClosure cl;
|
||||
BufferingOopClosure boc(&cl);
|
||||
|
||||
fr.oops_do(&boc, 0);
|
||||
|
||||
#define assert_testIsBufferEmptyOrFull(got, expected) \
|
||||
assert((got) == (expected), \
|
||||
err_msg("Expected: %d, got: %d. testIsBufferEmptyOrFull(%d, %d, %s, %s)", \
|
||||
(got), (expected), num_narrow, num_full, \
|
||||
BOOL_TO_STR(expect_empty), BOOL_TO_STR(expect_full)))
|
||||
|
||||
assert_testIsBufferEmptyOrFull(expect_empty, boc.is_buffer_empty());
|
||||
assert_testIsBufferEmptyOrFull(expect_full, boc.is_buffer_full());
|
||||
}
|
||||
|
||||
static void testIsBufferEmptyOrFull() {
|
||||
int bl = BufferingOopClosure::BufferLength;
|
||||
|
||||
testIsBufferEmptyOrFull(0, 0, true, false);
|
||||
testIsBufferEmptyOrFull(1, 0, false, false);
|
||||
testIsBufferEmptyOrFull(0, 1, false, false);
|
||||
testIsBufferEmptyOrFull(1, 1, false, false);
|
||||
testIsBufferEmptyOrFull(10, 0, false, false);
|
||||
testIsBufferEmptyOrFull(0, 10, false, false);
|
||||
testIsBufferEmptyOrFull(10, 10, false, false);
|
||||
testIsBufferEmptyOrFull(0, bl, false, true);
|
||||
testIsBufferEmptyOrFull(bl, 0, false, true);
|
||||
testIsBufferEmptyOrFull(bl/2, bl/2, false, true);
|
||||
testIsBufferEmptyOrFull(bl-1, 1, false, true);
|
||||
testIsBufferEmptyOrFull(1, bl-1, false, true);
|
||||
// Processed
|
||||
testIsBufferEmptyOrFull(bl+1, 0, false, false);
|
||||
testIsBufferEmptyOrFull(bl*2, 0, false, true);
|
||||
}
|
||||
|
||||
static void testEmptyAfterDone(int num_narrow, int num_full) {
|
||||
FakeRoots fr(num_narrow, num_full);
|
||||
|
||||
DoNothingOopClosure cl;
|
||||
BufferingOopClosure boc(&cl);
|
||||
|
||||
fr.oops_do(&boc, 0);
|
||||
|
||||
// Make sure all get processed.
|
||||
boc.done();
|
||||
|
||||
assert(boc.is_buffer_empty(),
|
||||
err_msg("Should be empty after call to done(). testEmptyAfterDone(%d, %d)",
|
||||
num_narrow, num_full));
|
||||
}
|
||||
|
||||
static void testEmptyAfterDone() {
|
||||
int bl = BufferingOopClosure::BufferLength;
|
||||
|
||||
testEmptyAfterDone(0, 0);
|
||||
testEmptyAfterDone(1, 0);
|
||||
testEmptyAfterDone(0, 1);
|
||||
testEmptyAfterDone(1, 1);
|
||||
testEmptyAfterDone(10, 0);
|
||||
testEmptyAfterDone(0, 10);
|
||||
testEmptyAfterDone(10, 10);
|
||||
testEmptyAfterDone(0, bl);
|
||||
testEmptyAfterDone(bl, 0);
|
||||
testEmptyAfterDone(bl/2, bl/2);
|
||||
testEmptyAfterDone(bl-1, 1);
|
||||
testEmptyAfterDone(1, bl-1);
|
||||
// Processed
|
||||
testEmptyAfterDone(bl+1, 0);
|
||||
testEmptyAfterDone(bl*2, 0);
|
||||
}
|
||||
|
||||
public:
|
||||
static void test() {
|
||||
testCount();
|
||||
testIsBufferEmptyOrFull();
|
||||
testEmptyAfterDone();
|
||||
}
|
||||
};
|
||||
|
||||
void TestBufferingOopClosure_test() {
|
||||
TestBufferingOopClosure::test();
|
||||
}
|
||||
|
||||
#endif
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -25,10 +25,10 @@
|
||||
#ifndef SHARE_VM_GC_IMPLEMENTATION_G1_BUFFERINGOOPCLOSURE_HPP
|
||||
#define SHARE_VM_GC_IMPLEMENTATION_G1_BUFFERINGOOPCLOSURE_HPP
|
||||
|
||||
#include "memory/genOopClosures.hpp"
|
||||
#include "memory/generation.hpp"
|
||||
#include "memory/iterator.hpp"
|
||||
#include "oops/oopsHierarchy.hpp"
|
||||
#include "runtime/os.hpp"
|
||||
#include "utilities/taskqueue.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
|
||||
// A BufferingOops closure tries to separate out the cost of finding roots
|
||||
// from the cost of applying closures to them. It maintains an array of
|
||||
@ -41,60 +41,103 @@
|
||||
// The caller must be sure to call "done" to process any unprocessed
|
||||
// buffered entries.
|
||||
|
||||
class Generation;
|
||||
class HeapRegion;
|
||||
|
||||
class BufferingOopClosure: public OopClosure {
|
||||
friend class TestBufferingOopClosure;
|
||||
protected:
|
||||
enum PrivateConstants {
|
||||
BufferLength = 1024
|
||||
};
|
||||
static const size_t BufferLength = 1024;
|
||||
|
||||
StarTask _buffer[BufferLength];
|
||||
StarTask* _buffer_top;
|
||||
StarTask* _buffer_curr;
|
||||
// We need to know if the buffered addresses contain oops or narrowOops.
|
||||
// We can't tag the addresses the way StarTask does, because we need to
|
||||
// be able to handle unaligned addresses coming from oops embedded in code.
|
||||
//
|
||||
// The addresses for the full-sized oops are filled in from the bottom,
|
||||
// while the addresses for the narrowOops are filled in from the top.
|
||||
OopOrNarrowOopStar _buffer[BufferLength];
|
||||
OopOrNarrowOopStar* _oop_top;
|
||||
OopOrNarrowOopStar* _narrowOop_bottom;
|
||||
|
||||
OopClosure* _oc;
|
||||
double _closure_app_seconds;
|
||||
|
||||
void process_buffer () {
|
||||
double start = os::elapsedTime();
|
||||
for (StarTask* curr = _buffer; curr < _buffer_curr; ++curr) {
|
||||
if (curr->is_narrow()) {
|
||||
assert(UseCompressedOops, "Error");
|
||||
_oc->do_oop((narrowOop*)(*curr));
|
||||
} else {
|
||||
_oc->do_oop((oop*)(*curr));
|
||||
}
|
||||
|
||||
bool is_buffer_empty() {
|
||||
return _oop_top == _buffer && _narrowOop_bottom == (_buffer + BufferLength - 1);
|
||||
}
|
||||
|
||||
bool is_buffer_full() {
|
||||
return _narrowOop_bottom < _oop_top;
|
||||
}
|
||||
|
||||
// Process addresses containing full-sized oops.
|
||||
void process_oops() {
|
||||
for (OopOrNarrowOopStar* curr = _buffer; curr < _oop_top; ++curr) {
|
||||
_oc->do_oop((oop*)(*curr));
|
||||
}
|
||||
_buffer_curr = _buffer;
|
||||
_oop_top = _buffer;
|
||||
}
|
||||
|
||||
// Process addresses containing narrow oops.
|
||||
void process_narrowOops() {
|
||||
for (OopOrNarrowOopStar* curr = _buffer + BufferLength - 1; curr > _narrowOop_bottom; --curr) {
|
||||
_oc->do_oop((narrowOop*)(*curr));
|
||||
}
|
||||
_narrowOop_bottom = _buffer + BufferLength - 1;
|
||||
}
|
||||
|
||||
// Apply the closure to all oops and clear the buffer.
|
||||
// Accumulate the time it took.
|
||||
void process_buffer() {
|
||||
double start = os::elapsedTime();
|
||||
|
||||
process_oops();
|
||||
process_narrowOops();
|
||||
|
||||
_closure_app_seconds += (os::elapsedTime() - start);
|
||||
}
|
||||
|
||||
template <class T> inline void do_oop_work(T* p) {
|
||||
if (_buffer_curr == _buffer_top) {
|
||||
void process_buffer_if_full() {
|
||||
if (is_buffer_full()) {
|
||||
process_buffer();
|
||||
}
|
||||
StarTask new_ref(p);
|
||||
*_buffer_curr = new_ref;
|
||||
++_buffer_curr;
|
||||
}
|
||||
|
||||
void add_narrowOop(narrowOop* p) {
|
||||
assert(!is_buffer_full(), "Buffer should not be full");
|
||||
*_narrowOop_bottom = (OopOrNarrowOopStar)p;
|
||||
_narrowOop_bottom--;
|
||||
}
|
||||
|
||||
void add_oop(oop* p) {
|
||||
assert(!is_buffer_full(), "Buffer should not be full");
|
||||
*_oop_top = (OopOrNarrowOopStar)p;
|
||||
_oop_top++;
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void do_oop(narrowOop* p) { do_oop_work(p); }
|
||||
virtual void do_oop(oop* p) { do_oop_work(p); }
|
||||
virtual void do_oop(narrowOop* p) {
|
||||
process_buffer_if_full();
|
||||
add_narrowOop(p);
|
||||
}
|
||||
|
||||
void done () {
|
||||
if (_buffer_curr > _buffer) {
|
||||
virtual void do_oop(oop* p) {
|
||||
process_buffer_if_full();
|
||||
add_oop(p);
|
||||
}
|
||||
|
||||
void done() {
|
||||
if (!is_buffer_empty()) {
|
||||
process_buffer();
|
||||
}
|
||||
}
|
||||
double closure_app_seconds () {
|
||||
|
||||
double closure_app_seconds() {
|
||||
return _closure_app_seconds;
|
||||
}
|
||||
BufferingOopClosure (OopClosure *oc) :
|
||||
|
||||
BufferingOopClosure(OopClosure *oc) :
|
||||
_oc(oc),
|
||||
_buffer_curr(_buffer), _buffer_top(_buffer + BufferLength),
|
||||
_oop_top(_buffer),
|
||||
_narrowOop_bottom(_buffer + BufferLength - 1),
|
||||
_closure_app_seconds(0.0) { }
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -2266,7 +2266,7 @@ void G1CollectedHeap::ref_processing_init() {
|
||||
// (for efficiency/performance)
|
||||
false);
|
||||
// Setting next fields of discovered
|
||||
// lists requires a barrier.
|
||||
// lists does not require a barrier.
|
||||
}
|
||||
|
||||
size_t G1CollectedHeap::capacity() const {
|
||||
@ -5115,15 +5115,12 @@ g1_process_strong_roots(bool is_scavenging,
|
||||
|
||||
BufferingOopClosure buf_scan_non_heap_roots(scan_non_heap_roots);
|
||||
|
||||
assert(so & SO_AllCodeCache || scan_rs != NULL, "must scan code roots somehow");
|
||||
// Walk the code cache/strong code roots w/o buffering, because StarTask
|
||||
// cannot handle unaligned oop locations.
|
||||
CodeBlobToOopClosure eager_scan_code_roots(scan_non_heap_roots, true /* do_marking */);
|
||||
CodeBlobToOopClosure scan_code_roots(&buf_scan_non_heap_roots, true /* do_marking */);
|
||||
|
||||
process_strong_roots(false, // no scoping; this is parallel code
|
||||
so,
|
||||
&buf_scan_non_heap_roots,
|
||||
&eager_scan_code_roots,
|
||||
&scan_code_roots,
|
||||
scan_klasses
|
||||
);
|
||||
|
||||
@ -5177,9 +5174,9 @@ g1_process_strong_roots(bool is_scavenging,
|
||||
g1_policy()->phase_times()->record_strong_code_root_mark_time(worker_i, mark_strong_code_roots_ms);
|
||||
|
||||
// Now scan the complement of the collection set.
|
||||
if (scan_rs != NULL) {
|
||||
g1_rem_set()->oops_into_collection_set_do(scan_rs, &eager_scan_code_roots, worker_i);
|
||||
}
|
||||
CodeBlobToOopClosure eager_scan_code_roots(scan_non_heap_roots, true /* do_marking */);
|
||||
g1_rem_set()->oops_into_collection_set_do(scan_rs, &eager_scan_code_roots, worker_i);
|
||||
|
||||
_process_strong_tasks->all_tasks_completed();
|
||||
}
|
||||
|
||||
@ -5202,9 +5199,12 @@ private:
|
||||
bool _process_symbols;
|
||||
int _symbols_processed;
|
||||
int _symbols_removed;
|
||||
|
||||
bool _do_in_parallel;
|
||||
public:
|
||||
G1StringSymbolTableUnlinkTask(BoolObjectClosure* is_alive, bool process_strings, bool process_symbols) :
|
||||
AbstractGangTask("Par String/Symbol table unlink"), _is_alive(is_alive),
|
||||
_do_in_parallel(G1CollectedHeap::use_parallel_gc_threads()),
|
||||
_process_strings(process_strings), _strings_processed(0), _strings_removed(0),
|
||||
_process_symbols(process_symbols), _symbols_processed(0), _symbols_removed(0) {
|
||||
|
||||
@ -5219,16 +5219,16 @@ public:
|
||||
}
|
||||
|
||||
~G1StringSymbolTableUnlinkTask() {
|
||||
guarantee(!_process_strings || StringTable::parallel_claimed_index() >= _initial_string_table_size,
|
||||
guarantee(!_process_strings || !_do_in_parallel || StringTable::parallel_claimed_index() >= _initial_string_table_size,
|
||||
err_msg("claim value "INT32_FORMAT" after unlink less than initial string table size "INT32_FORMAT,
|
||||
StringTable::parallel_claimed_index(), _initial_string_table_size));
|
||||
guarantee(!_process_strings || SymbolTable::parallel_claimed_index() >= _initial_symbol_table_size,
|
||||
guarantee(!_process_symbols || !_do_in_parallel || SymbolTable::parallel_claimed_index() >= _initial_symbol_table_size,
|
||||
err_msg("claim value "INT32_FORMAT" after unlink less than initial symbol table size "INT32_FORMAT,
|
||||
SymbolTable::parallel_claimed_index(), _initial_symbol_table_size));
|
||||
}
|
||||
|
||||
void work(uint worker_id) {
|
||||
if (G1CollectedHeap::use_parallel_gc_threads()) {
|
||||
if (_do_in_parallel) {
|
||||
int strings_processed = 0;
|
||||
int strings_removed = 0;
|
||||
int symbols_processed = 0;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -86,13 +86,26 @@ public:
|
||||
|
||||
#define G1_PARTIAL_ARRAY_MASK 0x2
|
||||
|
||||
template <class T> inline bool has_partial_array_mask(T* ref) {
|
||||
inline bool has_partial_array_mask(oop* ref) {
|
||||
return ((uintptr_t)ref & G1_PARTIAL_ARRAY_MASK) == G1_PARTIAL_ARRAY_MASK;
|
||||
}
|
||||
|
||||
template <class T> inline T* set_partial_array_mask(T obj) {
|
||||
// We never encode partial array oops as narrowOop*, so return false immediately.
|
||||
// This allows the compiler to create optimized code when popping references from
|
||||
// the work queue.
|
||||
inline bool has_partial_array_mask(narrowOop* ref) {
|
||||
assert(((uintptr_t)ref & G1_PARTIAL_ARRAY_MASK) != G1_PARTIAL_ARRAY_MASK, "Partial array oop reference encoded as narrowOop*");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Only implement set_partial_array_mask() for regular oops, not for narrowOops.
|
||||
// We always encode partial arrays as regular oop, to allow the
|
||||
// specialization for has_partial_array_mask() for narrowOops above.
|
||||
// This means that unintentional use of this method with narrowOops are caught
|
||||
// by the compiler.
|
||||
inline oop* set_partial_array_mask(oop obj) {
|
||||
assert(((uintptr_t)(void *)obj & G1_PARTIAL_ARRAY_MASK) == 0, "Information loss!");
|
||||
return (T*) ((uintptr_t)(void *)obj | G1_PARTIAL_ARRAY_MASK);
|
||||
return (oop*) ((uintptr_t)(void *)obj | G1_PARTIAL_ARRAY_MASK);
|
||||
}
|
||||
|
||||
template <class T> inline oop clear_partial_array_mask(T* ref) {
|
||||
|
@ -23,7 +23,6 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "gc_implementation/g1/bufferingOopClosure.hpp"
|
||||
#include "gc_implementation/g1/concurrentG1Refine.hpp"
|
||||
#include "gc_implementation/g1/concurrentG1RefineThread.hpp"
|
||||
#include "gc_implementation/g1/g1BlockOffsetTable.inline.hpp"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -183,7 +183,7 @@
|
||||
"When true, record recent calls to rem set operations.") \
|
||||
\
|
||||
develop(intx, G1MaxVerifyFailures, -1, \
|
||||
"The maximum number of verification failrues to print. " \
|
||||
"The maximum number of verification failures to print. " \
|
||||
"-1 means print all.") \
|
||||
\
|
||||
develop(bool, G1ScrubRemSets, true, \
|
||||
|
@ -91,7 +91,7 @@ void ObjPtrQueue::filter() {
|
||||
assert(new_index > 0, "we should not have already filled up the buffer");
|
||||
new_index -= oopSize;
|
||||
assert(new_index >= i,
|
||||
"new_index should never be below i, as we alwaysr compact 'up'");
|
||||
"new_index should never be below i, as we always compact 'up'");
|
||||
oop* new_p = (oop*) &buf[byte_index_to_index((int) new_index)];
|
||||
assert(new_p >= p, "the destination location should never be below "
|
||||
"the source as we always compact 'up'");
|
||||
|
@ -250,7 +250,7 @@ process_chunk_boundaries(Space* sp,
|
||||
// right neighbor (up to the end of the first object).
|
||||
if (last_card_of_cur_chunk < last_card_of_first_obj) {
|
||||
tty->print_cr(" LNC: BEWARE!!! first obj straddles past right end of chunk:\n"
|
||||
" might be efficient to get value from right neighbour?");
|
||||
" might be efficient to get value from right neighbor?");
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
@ -168,7 +168,7 @@ int AdaptiveSizePolicy::calc_default_active_workers(uintx total_workers,
|
||||
|
||||
if (TraceDynamicGCThreads) {
|
||||
gclog_or_tty->print_cr("GCTaskManager::calc_default_active_workers() : "
|
||||
"active_workers(): %d new_acitve_workers: %d "
|
||||
"active_workers(): %d new_active_workers: %d "
|
||||
"prev_active_workers: %d\n"
|
||||
" active_workers_by_JT: %d active_workers_by_heap_size: %d",
|
||||
active_workers, new_active_workers, prev_active_workers,
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "runtime/interfaceSupport.hpp"
|
||||
#include "runtime/java.hpp"
|
||||
#include "runtime/javaCalls.hpp"
|
||||
#include "runtime/os.hpp"
|
||||
|
||||
// CopyrightVersion 1.2
|
||||
|
||||
@ -206,7 +207,7 @@ SurrogateLockerThread* SurrogateLockerThread::make(TRAPS) {
|
||||
// exceptions anyway, check and abort if this fails.
|
||||
if (res == NULL || res->osthread() == NULL) {
|
||||
vm_exit_during_initialization("java.lang.OutOfMemoryError",
|
||||
"unable to create new native thread");
|
||||
os::native_thread_creation_failed_msg());
|
||||
}
|
||||
java_lang_Thread::set_thread(thread_oop(), res);
|
||||
java_lang_Thread::set_priority(thread_oop(), NearMaxPriority);
|
||||
|
@ -559,7 +559,7 @@ void MutableNUMASpace::initialize(MemRegion mr,
|
||||
bool clear_space,
|
||||
bool mangle_space,
|
||||
bool setup_pages) {
|
||||
assert(clear_space, "Reallocation will destory data!");
|
||||
assert(clear_space, "Reallocation will destroy data!");
|
||||
assert(lgrp_spaces()->length() > 0, "There should be at least one space");
|
||||
|
||||
MemRegion old_region = region(), new_region;
|
||||
|
@ -564,16 +564,7 @@ void LinkResolver::resolve_method(methodHandle& resolved_method, KlassHandle res
|
||||
}
|
||||
}
|
||||
|
||||
// 5. check if method is concrete
|
||||
if (resolved_method->is_abstract() && !resolved_klass->is_abstract()) {
|
||||
ResourceMark rm(THREAD);
|
||||
THROW_MSG(vmSymbols::java_lang_AbstractMethodError(),
|
||||
Method::name_and_sig_as_C_string(resolved_klass(),
|
||||
method_name,
|
||||
method_signature));
|
||||
}
|
||||
|
||||
// 6. access checks, access checking may be turned off when calling from within the VM.
|
||||
// 5. access checks, access checking may be turned off when calling from within the VM.
|
||||
if (check_access) {
|
||||
assert(current_klass.not_null() , "current_klass should not be null");
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -250,8 +250,8 @@ void Rewriter::rewrite_invokedynamic(address bcp, int offset, bool reverse) {
|
||||
// We will reverse the bytecode rewriting _after_ adjusting them.
|
||||
// Adjust the cache index by offset to the invokedynamic entries in the
|
||||
// cpCache plus the delta if the invokedynamic bytecodes were adjusted.
|
||||
cache_index = cp_cache_delta() + _first_iteration_cp_cache_limit;
|
||||
int cp_index = invokedynamic_cp_cache_entry_pool_index(cache_index);
|
||||
int adjustment = cp_cache_delta() + _first_iteration_cp_cache_limit;
|
||||
int cp_index = invokedynamic_cp_cache_entry_pool_index(cache_index - adjustment);
|
||||
assert(_pool->tag_at(cp_index).is_invoke_dynamic(), "wrong index");
|
||||
// zero out 4 bytes
|
||||
Bytes::put_Java_u4(p, 0);
|
||||
@ -453,18 +453,7 @@ methodHandle Rewriter::rewrite_jsrs(methodHandle method, TRAPS) {
|
||||
return method;
|
||||
}
|
||||
|
||||
void Rewriter::rewrite(instanceKlassHandle klass, TRAPS) {
|
||||
ResourceMark rm(THREAD);
|
||||
Rewriter rw(klass, klass->constants(), klass->methods(), CHECK);
|
||||
// (That's all, folks.)
|
||||
}
|
||||
|
||||
|
||||
Rewriter::Rewriter(instanceKlassHandle klass, constantPoolHandle cpool, Array<Method*>* methods, TRAPS)
|
||||
: _klass(klass),
|
||||
_pool(cpool),
|
||||
_methods(methods)
|
||||
{
|
||||
void Rewriter::rewrite_bytecodes(TRAPS) {
|
||||
assert(_pool->cache() == NULL, "constant pool cache must not be set yet");
|
||||
|
||||
// determine index maps for Method* rewriting
|
||||
@ -508,6 +497,29 @@ Rewriter::Rewriter(instanceKlassHandle klass, constantPoolHandle cpool, Array<Me
|
||||
// May have to fix invokedynamic bytecodes if invokestatic/InterfaceMethodref
|
||||
// entries had to be added.
|
||||
patch_invokedynamic_bytecodes();
|
||||
}
|
||||
|
||||
void Rewriter::rewrite(instanceKlassHandle klass, TRAPS) {
|
||||
ResourceMark rm(THREAD);
|
||||
Rewriter rw(klass, klass->constants(), klass->methods(), CHECK);
|
||||
// (That's all, folks.)
|
||||
}
|
||||
|
||||
|
||||
Rewriter::Rewriter(instanceKlassHandle klass, constantPoolHandle cpool, Array<Method*>* methods, TRAPS)
|
||||
: _klass(klass),
|
||||
_pool(cpool),
|
||||
_methods(methods)
|
||||
{
|
||||
|
||||
// Rewrite bytecodes - exception here exits.
|
||||
rewrite_bytecodes(CHECK);
|
||||
|
||||
// Stress restoring bytecodes
|
||||
if (StressRewriter) {
|
||||
restore_bytecodes();
|
||||
rewrite_bytecodes(CHECK);
|
||||
}
|
||||
|
||||
// allocate constant pool cache, now that we've seen all the bytecodes
|
||||
make_constant_pool_cache(THREAD);
|
||||
@ -523,6 +535,7 @@ Rewriter::Rewriter(instanceKlassHandle klass, constantPoolHandle cpool, Array<Me
|
||||
// so methods with jsrs in custom class lists in aren't attempted to be
|
||||
// rewritten in the RO section of the shared archive.
|
||||
// Relocated bytecodes don't have to be restored, only the cp cache entries
|
||||
int len = _methods->length();
|
||||
for (int i = len-1; i >= 0; i--) {
|
||||
methodHandle m(THREAD, _methods->at(i));
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -199,6 +199,9 @@ class Rewriter: public StackObj {
|
||||
|
||||
void patch_invokedynamic_bytecodes();
|
||||
|
||||
// Do all the work.
|
||||
void rewrite_bytecodes(TRAPS);
|
||||
|
||||
// Revert bytecodes in case of an exception.
|
||||
void restore_bytecodes();
|
||||
|
||||
|
@ -1352,7 +1352,7 @@ void BinaryTreeDictionary<Chunk_t, FreeList_t>::print_free_lists(outputStream* s
|
||||
template <class Chunk_t, template <class> class FreeList_t>
|
||||
void BinaryTreeDictionary<Chunk_t, FreeList_t>::verify_tree() const {
|
||||
guarantee(root() == NULL || total_free_blocks() == 0 ||
|
||||
total_size() != 0, "_total_size should't be 0?");
|
||||
total_size() != 0, "_total_size shouldn't be 0?");
|
||||
guarantee(root() == NULL || root()->parent() == NULL, "_root shouldn't have parent");
|
||||
verify_tree_helper(root());
|
||||
}
|
||||
|
@ -54,8 +54,8 @@ size_t CardTableModRefBS::cards_required(size_t covered_words)
|
||||
size_t CardTableModRefBS::compute_byte_map_size()
|
||||
{
|
||||
assert(_guard_index == cards_required(_whole_heap.word_size()) - 1,
|
||||
"unitialized, check declaration order");
|
||||
assert(_page_size != 0, "unitialized, check declaration order");
|
||||
"uninitialized, check declaration order");
|
||||
assert(_page_size != 0, "uninitialized, check declaration order");
|
||||
const size_t granularity = os::vm_allocation_granularity();
|
||||
return align_size_up(_guard_index + 1, MAX2(_page_size, granularity));
|
||||
}
|
||||
|
@ -446,18 +446,20 @@ void GenCollectorPolicy::initialize_size_info() {
|
||||
_max_gen0_size = max_new_size;
|
||||
} else {
|
||||
size_t desired_new_size = 0;
|
||||
if (!FLAG_IS_DEFAULT(NewSize)) {
|
||||
// If NewSize is set ergonomically (for example by cms), it
|
||||
// would make sense to use it. If it is used, also use it
|
||||
// to set the initial size. Although there is no reason
|
||||
// the minimum size and the initial size have to be the same,
|
||||
// the current implementation gets into trouble during the calculation
|
||||
// of the tenured generation sizes if they are different.
|
||||
// Note that this makes the initial size and the minimum size
|
||||
// generally small compared to the NewRatio calculation.
|
||||
if (FLAG_IS_CMDLINE(NewSize)) {
|
||||
// If NewSize is set on the command line, we must use it as
|
||||
// the initial size and it also makes sense to use it as the
|
||||
// lower limit.
|
||||
_min_gen0_size = NewSize;
|
||||
desired_new_size = NewSize;
|
||||
max_new_size = MAX2(max_new_size, NewSize);
|
||||
} else if (FLAG_IS_ERGO(NewSize)) {
|
||||
// If NewSize is set ergonomically, we should use it as a lower
|
||||
// limit, but use NewRatio to calculate the initial size.
|
||||
_min_gen0_size = NewSize;
|
||||
desired_new_size =
|
||||
MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), NewSize);
|
||||
max_new_size = MAX2(max_new_size, NewSize);
|
||||
} else {
|
||||
// For the case where NewSize is the default, use NewRatio
|
||||
// to size the minimum and initial generation sizes.
|
||||
@ -980,3 +982,110 @@ void MarkSweepPolicy::initialize_gc_policy_counters() {
|
||||
_gc_policy_counters = new GCPolicyCounters("Copy:MSC", 2, 3);
|
||||
}
|
||||
}
|
||||
|
||||
/////////////// Unit tests ///////////////
|
||||
|
||||
#ifndef PRODUCT
|
||||
// Testing that the NewSize flag is handled correct is hard because it
|
||||
// depends on so many other configurable variables. This test only tries to
|
||||
// verify that there are some basic rules for NewSize honored by the policies.
|
||||
class TestGenCollectorPolicy {
|
||||
public:
|
||||
static void test() {
|
||||
size_t flag_value;
|
||||
|
||||
save_flags();
|
||||
|
||||
// Set some limits that makes the math simple.
|
||||
FLAG_SET_ERGO(uintx, MaxHeapSize, 180 * M);
|
||||
FLAG_SET_ERGO(uintx, InitialHeapSize, 120 * M);
|
||||
Arguments::set_min_heap_size(40 * M);
|
||||
|
||||
// If NewSize is set on the command line, it should be used
|
||||
// for both min and initial young size if less than min heap.
|
||||
flag_value = 20 * M;
|
||||
FLAG_SET_CMDLINE(uintx, NewSize, flag_value);
|
||||
verify_min(flag_value);
|
||||
verify_initial(flag_value);
|
||||
|
||||
// If NewSize is set on command line, but is larger than the min
|
||||
// heap size, it should only be used for initial young size.
|
||||
flag_value = 80 * M;
|
||||
FLAG_SET_CMDLINE(uintx, NewSize, flag_value);
|
||||
verify_initial(flag_value);
|
||||
|
||||
// If NewSize has been ergonomically set, the collector policy
|
||||
// should use it for min but calculate the initial young size
|
||||
// using NewRatio.
|
||||
flag_value = 20 * M;
|
||||
FLAG_SET_ERGO(uintx, NewSize, flag_value);
|
||||
verify_min(flag_value);
|
||||
verify_scaled_initial(InitialHeapSize);
|
||||
|
||||
restore_flags();
|
||||
|
||||
}
|
||||
|
||||
static void verify_min(size_t expected) {
|
||||
MarkSweepPolicy msp;
|
||||
msp.initialize_all();
|
||||
|
||||
assert(msp.min_gen0_size() <= expected, err_msg("%zu > %zu", msp.min_gen0_size(), expected));
|
||||
}
|
||||
|
||||
static void verify_initial(size_t expected) {
|
||||
MarkSweepPolicy msp;
|
||||
msp.initialize_all();
|
||||
|
||||
assert(msp.initial_gen0_size() == expected, err_msg("%zu != %zu", msp.initial_gen0_size(), expected));
|
||||
}
|
||||
|
||||
static void verify_scaled_initial(size_t initial_heap_size) {
|
||||
MarkSweepPolicy msp;
|
||||
msp.initialize_all();
|
||||
|
||||
size_t expected = msp.scale_by_NewRatio_aligned(initial_heap_size);
|
||||
assert(msp.initial_gen0_size() == expected, err_msg("%zu != %zu", msp.initial_gen0_size(), expected));
|
||||
assert(FLAG_IS_ERGO(NewSize) && NewSize == expected,
|
||||
err_msg("NewSize should have been set ergonomically to %zu, but was %zu", expected, NewSize));
|
||||
}
|
||||
|
||||
private:
|
||||
static size_t original_InitialHeapSize;
|
||||
static size_t original_MaxHeapSize;
|
||||
static size_t original_MaxNewSize;
|
||||
static size_t original_MinHeapDeltaBytes;
|
||||
static size_t original_NewSize;
|
||||
static size_t original_OldSize;
|
||||
|
||||
static void save_flags() {
|
||||
original_InitialHeapSize = InitialHeapSize;
|
||||
original_MaxHeapSize = MaxHeapSize;
|
||||
original_MaxNewSize = MaxNewSize;
|
||||
original_MinHeapDeltaBytes = MinHeapDeltaBytes;
|
||||
original_NewSize = NewSize;
|
||||
original_OldSize = OldSize;
|
||||
}
|
||||
|
||||
static void restore_flags() {
|
||||
InitialHeapSize = original_InitialHeapSize;
|
||||
MaxHeapSize = original_MaxHeapSize;
|
||||
MaxNewSize = original_MaxNewSize;
|
||||
MinHeapDeltaBytes = original_MinHeapDeltaBytes;
|
||||
NewSize = original_NewSize;
|
||||
OldSize = original_OldSize;
|
||||
}
|
||||
};
|
||||
|
||||
size_t TestGenCollectorPolicy::original_InitialHeapSize = 0;
|
||||
size_t TestGenCollectorPolicy::original_MaxHeapSize = 0;
|
||||
size_t TestGenCollectorPolicy::original_MaxNewSize = 0;
|
||||
size_t TestGenCollectorPolicy::original_MinHeapDeltaBytes = 0;
|
||||
size_t TestGenCollectorPolicy::original_NewSize = 0;
|
||||
size_t TestGenCollectorPolicy::original_OldSize = 0;
|
||||
|
||||
void TestNewSize_test() {
|
||||
TestGenCollectorPolicy::test();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -220,6 +220,7 @@ class ClearedAllSoftRefs : public StackObj {
|
||||
};
|
||||
|
||||
class GenCollectorPolicy : public CollectorPolicy {
|
||||
friend class TestGenCollectorPolicy;
|
||||
protected:
|
||||
size_t _min_gen0_size;
|
||||
size_t _initial_gen0_size;
|
||||
|
@ -746,7 +746,7 @@ void VirtualSpaceNode::inc_container_count() {
|
||||
assert_lock_strong(SpaceManager::expand_lock());
|
||||
_container_count++;
|
||||
assert(_container_count == container_count_slow(),
|
||||
err_msg("Inconsistency in countainer_count _container_count " SIZE_FORMAT
|
||||
err_msg("Inconsistency in container_count _container_count " SIZE_FORMAT
|
||||
" container_count_slow() " SIZE_FORMAT,
|
||||
_container_count, container_count_slow()));
|
||||
}
|
||||
@ -759,7 +759,7 @@ void VirtualSpaceNode::dec_container_count() {
|
||||
#ifdef ASSERT
|
||||
void VirtualSpaceNode::verify_container_count() {
|
||||
assert(_container_count == container_count_slow(),
|
||||
err_msg("Inconsistency in countainer_count _container_count " SIZE_FORMAT
|
||||
err_msg("Inconsistency in container_count _container_count " SIZE_FORMAT
|
||||
" container_count_slow() " SIZE_FORMAT, _container_count, container_count_slow()));
|
||||
}
|
||||
#endif
|
||||
|
@ -62,7 +62,7 @@ void ReferenceProcessor::init_statics() {
|
||||
}
|
||||
guarantee(RefDiscoveryPolicy == ReferenceBasedDiscovery ||
|
||||
RefDiscoveryPolicy == ReferentBasedDiscovery,
|
||||
"Unrecongnized RefDiscoveryPolicy");
|
||||
"Unrecognized RefDiscoveryPolicy");
|
||||
_pending_list_uses_discovered_field = JDK_Version::current().pending_list_uses_discovered_field();
|
||||
}
|
||||
|
||||
@ -95,11 +95,11 @@ ReferenceProcessor::ReferenceProcessor(MemRegion span,
|
||||
uint mt_discovery_degree,
|
||||
bool atomic_discovery,
|
||||
BoolObjectClosure* is_alive_non_header,
|
||||
bool discovered_list_needs_barrier) :
|
||||
bool discovered_list_needs_post_barrier) :
|
||||
_discovering_refs(false),
|
||||
_enqueuing_is_done(false),
|
||||
_is_alive_non_header(is_alive_non_header),
|
||||
_discovered_list_needs_barrier(discovered_list_needs_barrier),
|
||||
_discovered_list_needs_post_barrier(discovered_list_needs_post_barrier),
|
||||
_processing_is_mt(mt_processing),
|
||||
_next_id(0)
|
||||
{
|
||||
@ -490,13 +490,13 @@ void DiscoveredListIterator::remove() {
|
||||
} else {
|
||||
new_next = _next;
|
||||
}
|
||||
|
||||
if (UseCompressedOops) {
|
||||
// Remove Reference object from list.
|
||||
oopDesc::encode_store_heap_oop((narrowOop*)_prev_next, new_next);
|
||||
} else {
|
||||
// Remove Reference object from list.
|
||||
oopDesc::store_heap_oop((oop*)_prev_next, new_next);
|
||||
// Remove Reference object from discovered list. Note that G1 does not need a
|
||||
// pre-barrier here because we know the Reference has already been found/marked,
|
||||
// that's how it ended up in the discovered list in the first place.
|
||||
oop_store_raw(_prev_next, new_next);
|
||||
if (_discovered_list_needs_post_barrier && _prev_next != _refs_list.adr_head()) {
|
||||
// Needs post-barrier and this is not the list head (which is not on the heap)
|
||||
oopDesc::bs()->write_ref_field(_prev_next, new_next);
|
||||
}
|
||||
NOT_PRODUCT(_removed++);
|
||||
_refs_list.dec_length(1);
|
||||
@ -544,7 +544,7 @@ ReferenceProcessor::process_phase1(DiscoveredList& refs_list,
|
||||
OopClosure* keep_alive,
|
||||
VoidClosure* complete_gc) {
|
||||
assert(policy != NULL, "Must have a non-NULL policy");
|
||||
DiscoveredListIterator iter(refs_list, keep_alive, is_alive);
|
||||
DiscoveredListIterator iter(refs_list, keep_alive, is_alive, _discovered_list_needs_post_barrier);
|
||||
// Decide which softly reachable refs should be kept alive.
|
||||
while (iter.has_next()) {
|
||||
iter.load_ptrs(DEBUG_ONLY(!discovery_is_atomic() /* allow_null_referent */));
|
||||
@ -584,7 +584,7 @@ ReferenceProcessor::pp2_work(DiscoveredList& refs_list,
|
||||
BoolObjectClosure* is_alive,
|
||||
OopClosure* keep_alive) {
|
||||
assert(discovery_is_atomic(), "Error");
|
||||
DiscoveredListIterator iter(refs_list, keep_alive, is_alive);
|
||||
DiscoveredListIterator iter(refs_list, keep_alive, is_alive, _discovered_list_needs_post_barrier);
|
||||
while (iter.has_next()) {
|
||||
iter.load_ptrs(DEBUG_ONLY(false /* allow_null_referent */));
|
||||
DEBUG_ONLY(oop next = java_lang_ref_Reference::next(iter.obj());)
|
||||
@ -621,7 +621,7 @@ ReferenceProcessor::pp2_work_concurrent_discovery(DiscoveredList& refs_list,
|
||||
OopClosure* keep_alive,
|
||||
VoidClosure* complete_gc) {
|
||||
assert(!discovery_is_atomic(), "Error");
|
||||
DiscoveredListIterator iter(refs_list, keep_alive, is_alive);
|
||||
DiscoveredListIterator iter(refs_list, keep_alive, is_alive, _discovered_list_needs_post_barrier);
|
||||
while (iter.has_next()) {
|
||||
iter.load_ptrs(DEBUG_ONLY(true /* allow_null_referent */));
|
||||
HeapWord* next_addr = java_lang_ref_Reference::next_addr(iter.obj());
|
||||
@ -664,7 +664,7 @@ ReferenceProcessor::process_phase3(DiscoveredList& refs_list,
|
||||
OopClosure* keep_alive,
|
||||
VoidClosure* complete_gc) {
|
||||
ResourceMark rm;
|
||||
DiscoveredListIterator iter(refs_list, keep_alive, is_alive);
|
||||
DiscoveredListIterator iter(refs_list, keep_alive, is_alive, _discovered_list_needs_post_barrier);
|
||||
while (iter.has_next()) {
|
||||
iter.update_discovered();
|
||||
iter.load_ptrs(DEBUG_ONLY(false /* allow_null_referent */));
|
||||
@ -782,8 +782,8 @@ private:
|
||||
|
||||
void ReferenceProcessor::set_discovered(oop ref, oop value) {
|
||||
java_lang_ref_Reference::set_discovered_raw(ref, value);
|
||||
if (_discovered_list_needs_barrier) {
|
||||
oopDesc::bs()->write_ref_field(ref, value);
|
||||
if (_discovered_list_needs_post_barrier) {
|
||||
oopDesc::bs()->write_ref_field(java_lang_ref_Reference::discovered_addr(ref), value);
|
||||
}
|
||||
}
|
||||
|
||||
@ -980,7 +980,7 @@ void ReferenceProcessor::clean_up_discovered_references() {
|
||||
|
||||
void ReferenceProcessor::clean_up_discovered_reflist(DiscoveredList& refs_list) {
|
||||
assert(!discovery_is_atomic(), "Else why call this method?");
|
||||
DiscoveredListIterator iter(refs_list, NULL, NULL);
|
||||
DiscoveredListIterator iter(refs_list, NULL, NULL, _discovered_list_needs_post_barrier);
|
||||
while (iter.has_next()) {
|
||||
iter.load_ptrs(DEBUG_ONLY(true /* allow_null_referent */));
|
||||
oop next = java_lang_ref_Reference::next(iter.obj());
|
||||
@ -1076,7 +1076,7 @@ ReferenceProcessor::add_to_discovered_list_mt(DiscoveredList& refs_list,
|
||||
// elided this out for G1, but left in the test for some future
|
||||
// collector that might have need for a pre-barrier here, e.g.:-
|
||||
// oopDesc::bs()->write_ref_field_pre((oop* or narrowOop*)discovered_addr, next_discovered);
|
||||
assert(!_discovered_list_needs_barrier || UseG1GC,
|
||||
assert(!_discovered_list_needs_post_barrier || UseG1GC,
|
||||
"Need to check non-G1 collector: "
|
||||
"may need a pre-write-barrier for CAS from NULL below");
|
||||
oop retest = oopDesc::atomic_compare_exchange_oop(next_discovered, discovered_addr,
|
||||
@ -1087,7 +1087,7 @@ ReferenceProcessor::add_to_discovered_list_mt(DiscoveredList& refs_list,
|
||||
// is necessary.
|
||||
refs_list.set_head(obj);
|
||||
refs_list.inc_length(1);
|
||||
if (_discovered_list_needs_barrier) {
|
||||
if (_discovered_list_needs_post_barrier) {
|
||||
oopDesc::bs()->write_ref_field((void*)discovered_addr, next_discovered);
|
||||
}
|
||||
|
||||
@ -1240,7 +1240,7 @@ bool ReferenceProcessor::discover_reference(oop obj, ReferenceType rt) {
|
||||
if (_discovery_is_mt) {
|
||||
add_to_discovered_list_mt(*list, obj, discovered_addr);
|
||||
} else {
|
||||
// If "_discovered_list_needs_barrier", we do write barriers when
|
||||
// If "_discovered_list_needs_post_barrier", we do write barriers when
|
||||
// updating the discovered reference list. Otherwise, we do a raw store
|
||||
// here: the field will be visited later when processing the discovered
|
||||
// references.
|
||||
@ -1252,10 +1252,10 @@ bool ReferenceProcessor::discover_reference(oop obj, ReferenceType rt) {
|
||||
// pre-value, we can safely elide the pre-barrier here for the case of G1.
|
||||
// e.g.:- oopDesc::bs()->write_ref_field_pre((oop* or narrowOop*)discovered_addr, next_discovered);
|
||||
assert(discovered == NULL, "control point invariant");
|
||||
assert(!_discovered_list_needs_barrier || UseG1GC,
|
||||
assert(!_discovered_list_needs_post_barrier || UseG1GC,
|
||||
"For non-G1 collector, may need a pre-write-barrier for CAS from NULL below");
|
||||
oop_store_raw(discovered_addr, next_discovered);
|
||||
if (_discovered_list_needs_barrier) {
|
||||
if (_discovered_list_needs_post_barrier) {
|
||||
oopDesc::bs()->write_ref_field((void*)discovered_addr, next_discovered);
|
||||
}
|
||||
list->set_head(obj);
|
||||
@ -1351,7 +1351,7 @@ ReferenceProcessor::preclean_discovered_reflist(DiscoveredList& refs_list,
|
||||
OopClosure* keep_alive,
|
||||
VoidClosure* complete_gc,
|
||||
YieldClosure* yield) {
|
||||
DiscoveredListIterator iter(refs_list, keep_alive, is_alive);
|
||||
DiscoveredListIterator iter(refs_list, keep_alive, is_alive, _discovered_list_needs_post_barrier);
|
||||
while (iter.has_next()) {
|
||||
iter.load_ptrs(DEBUG_ONLY(true /* allow_null_referent */));
|
||||
oop obj = iter.obj();
|
||||
|
@ -99,6 +99,7 @@ private:
|
||||
oop _referent;
|
||||
OopClosure* _keep_alive;
|
||||
BoolObjectClosure* _is_alive;
|
||||
bool _discovered_list_needs_post_barrier;
|
||||
|
||||
DEBUG_ONLY(
|
||||
oop _first_seen; // cyclic linked list check
|
||||
@ -112,7 +113,8 @@ private:
|
||||
public:
|
||||
inline DiscoveredListIterator(DiscoveredList& refs_list,
|
||||
OopClosure* keep_alive,
|
||||
BoolObjectClosure* is_alive):
|
||||
BoolObjectClosure* is_alive,
|
||||
bool discovered_list_needs_post_barrier = false):
|
||||
_refs_list(refs_list),
|
||||
_prev_next(refs_list.adr_head()),
|
||||
_prev(NULL),
|
||||
@ -126,7 +128,8 @@ public:
|
||||
#endif
|
||||
_next(NULL),
|
||||
_keep_alive(keep_alive),
|
||||
_is_alive(is_alive)
|
||||
_is_alive(is_alive),
|
||||
_discovered_list_needs_post_barrier(discovered_list_needs_post_barrier)
|
||||
{ }
|
||||
|
||||
// End Of List.
|
||||
@ -228,12 +231,12 @@ class ReferenceProcessor : public CHeapObj<mtGC> {
|
||||
bool _discovery_is_mt; // true if reference discovery is MT.
|
||||
|
||||
// If true, setting "next" field of a discovered refs list requires
|
||||
// write barrier(s). (Must be true if used in a collector in which
|
||||
// write post barrier. (Must be true if used in a collector in which
|
||||
// elements of a discovered list may be moved during discovery: for
|
||||
// example, a collector like Garbage-First that moves objects during a
|
||||
// long-term concurrent marking phase that does weak reference
|
||||
// discovery.)
|
||||
bool _discovered_list_needs_barrier;
|
||||
bool _discovered_list_needs_post_barrier;
|
||||
|
||||
bool _enqueuing_is_done; // true if all weak references enqueued
|
||||
bool _processing_is_mt; // true during phases when
|
||||
@ -380,8 +383,8 @@ class ReferenceProcessor : public CHeapObj<mtGC> {
|
||||
|
||||
protected:
|
||||
// Set the 'discovered' field of the given reference to
|
||||
// the given value - emitting barriers depending upon
|
||||
// the value of _discovered_list_needs_barrier.
|
||||
// the given value - emitting post barriers depending upon
|
||||
// the value of _discovered_list_needs_post_barrier.
|
||||
void set_discovered(oop ref, oop value);
|
||||
|
||||
// "Preclean" the given discovered reference list
|
||||
@ -425,7 +428,7 @@ class ReferenceProcessor : public CHeapObj<mtGC> {
|
||||
bool mt_discovery = false, uint mt_discovery_degree = 1,
|
||||
bool atomic_discovery = true,
|
||||
BoolObjectClosure* is_alive_non_header = NULL,
|
||||
bool discovered_list_needs_barrier = false);
|
||||
bool discovered_list_needs_post_barrier = false);
|
||||
|
||||
// RefDiscoveryPolicy values
|
||||
enum DiscoveryPolicy {
|
||||
|
@ -82,6 +82,9 @@ ConstantPool::ConstantPool(Array<u1>* tags) {
|
||||
void ConstantPool::deallocate_contents(ClassLoaderData* loader_data) {
|
||||
MetadataFactory::free_metadata(loader_data, cache());
|
||||
set_cache(NULL);
|
||||
MetadataFactory::free_array<u2>(loader_data, reference_map());
|
||||
set_reference_map(NULL);
|
||||
|
||||
MetadataFactory::free_array<jushort>(loader_data, operands());
|
||||
set_operands(NULL);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -554,6 +554,7 @@ class InstanceKlass: public Klass {
|
||||
if (hk == NULL) {
|
||||
return NULL;
|
||||
} else {
|
||||
assert(*hk != NULL, "host klass should always be set if the address is not null");
|
||||
return *hk;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -40,7 +40,7 @@ class Metadata : public MetaspaceObj {
|
||||
int identity_hash() { return (int)(uintptr_t)this; }
|
||||
|
||||
// Rehashing support for tables containing pointers to this
|
||||
unsigned int new_hash(jint seed) { ShouldNotReachHere(); return 0; }
|
||||
unsigned int new_hash(juint seed) { ShouldNotReachHere(); return 0; }
|
||||
|
||||
virtual bool is_klass() const volatile { return false; }
|
||||
virtual bool is_method() const volatile { return false; }
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -102,7 +102,7 @@ intptr_t oopDesc::slow_identity_hash() {
|
||||
}
|
||||
|
||||
// When String table needs to rehash
|
||||
unsigned int oopDesc::new_hash(jint seed) {
|
||||
unsigned int oopDesc::new_hash(juint seed) {
|
||||
EXCEPTION_MARK;
|
||||
ResourceMark rm;
|
||||
int length;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -362,7 +362,7 @@ class oopDesc {
|
||||
intptr_t slow_identity_hash();
|
||||
|
||||
// Alternate hashing code if string table is rehashed
|
||||
unsigned int new_hash(jint seed);
|
||||
unsigned int new_hash(juint seed);
|
||||
|
||||
// marks are forwarded to stack when object is locked
|
||||
bool has_displaced_mark() const;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -207,7 +207,7 @@ const char* Symbol::as_klass_external_name() const {
|
||||
}
|
||||
|
||||
// Alternate hashing for unbalanced symbol tables.
|
||||
unsigned int Symbol::new_hash(jint seed) {
|
||||
unsigned int Symbol::new_hash(juint seed) {
|
||||
ResourceMark rm;
|
||||
// Use alternate hashing algorithm on this symbol.
|
||||
return AltHashing::murmur3_32(seed, (const jbyte*)as_C_string(), utf8_length());
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -154,7 +154,7 @@ class Symbol : private SymbolBase {
|
||||
int identity_hash() { return _identity_hash; }
|
||||
|
||||
// For symbol table alternate hashing
|
||||
unsigned int new_hash(jint seed);
|
||||
unsigned int new_hash(juint seed);
|
||||
|
||||
// Reference counting. See comments above this class for when to use.
|
||||
int refcount() const { return _refcount; }
|
||||
|
@ -1320,9 +1320,13 @@ static void jni_invoke_nonstatic(JNIEnv *env, JavaValue* result, jobject receive
|
||||
// interface call
|
||||
KlassHandle h_holder(THREAD, holder);
|
||||
|
||||
int itbl_index = m->itable_index();
|
||||
Klass* k = h_recv->klass();
|
||||
selected_method = InstanceKlass::cast(k)->method_at_itable(h_holder(), itbl_index, CHECK);
|
||||
if (call_type == JNI_VIRTUAL) {
|
||||
int itbl_index = m->itable_index();
|
||||
Klass* k = h_recv->klass();
|
||||
selected_method = InstanceKlass::cast(k)->method_at_itable(h_holder(), itbl_index, CHECK);
|
||||
} else {
|
||||
selected_method = m;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -4950,8 +4954,10 @@ void TestMetaspaceAux_test();
|
||||
void TestMetachunk_test();
|
||||
void TestVirtualSpaceNode_test();
|
||||
void TestOldFreeSpaceCalculation_test();
|
||||
void TestNewSize_test();
|
||||
#if INCLUDE_ALL_GCS
|
||||
void TestG1BiasedArray_test();
|
||||
void TestBufferingOopClosure_test();
|
||||
#endif
|
||||
|
||||
void execute_internal_vm_tests() {
|
||||
@ -4971,12 +4977,14 @@ void execute_internal_vm_tests() {
|
||||
run_unit_test(AltHashing::test_alt_hash());
|
||||
run_unit_test(test_loggc_filename());
|
||||
run_unit_test(TestOldFreeSpaceCalculation_test());
|
||||
run_unit_test(TestNewSize_test());
|
||||
#if INCLUDE_VM_STRUCTS
|
||||
run_unit_test(VMStructs::test());
|
||||
#endif
|
||||
#if INCLUDE_ALL_GCS
|
||||
run_unit_test(TestG1BiasedArray_test());
|
||||
run_unit_test(HeapRegionRemSet::test_prt());
|
||||
run_unit_test(TestBufferingOopClosure_test());
|
||||
#endif
|
||||
tty->print_cr("All internal VM tests passed");
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -518,6 +518,12 @@ JVM_ENTRY(void, JVM_MonitorWait(JNIEnv* env, jobject handle, jlong ms))
|
||||
JavaThreadInObjectWaitState jtiows(thread, ms != 0);
|
||||
if (JvmtiExport::should_post_monitor_wait()) {
|
||||
JvmtiExport::post_monitor_wait((JavaThread *)THREAD, (oop)obj(), ms);
|
||||
|
||||
// The current thread already owns the monitor and it has not yet
|
||||
// been added to the wait queue so the current thread cannot be
|
||||
// made the successor. This means that the JVMTI_EVENT_MONITOR_WAIT
|
||||
// event handler cannot accidentally consume an unpark() meant for
|
||||
// the ParkEvent associated with this ObjectMonitor.
|
||||
}
|
||||
ObjectSynchronizer::wait(obj, ms, CHECK);
|
||||
JVM_END
|
||||
@ -2875,10 +2881,10 @@ JVM_ENTRY(void, JVM_StartThread(JNIEnv* env, jobject jthread))
|
||||
if (JvmtiExport::should_post_resource_exhausted()) {
|
||||
JvmtiExport::post_resource_exhausted(
|
||||
JVMTI_RESOURCE_EXHAUSTED_OOM_ERROR | JVMTI_RESOURCE_EXHAUSTED_THREADS,
|
||||
"unable to create new native thread");
|
||||
os::native_thread_creation_failed_msg());
|
||||
}
|
||||
THROW_MSG(vmSymbols::java_lang_OutOfMemoryError(),
|
||||
"unable to create new native thread");
|
||||
os::native_thread_creation_failed_msg());
|
||||
}
|
||||
|
||||
Thread::start(native_thread);
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "code/codeBlob.hpp"
|
||||
#include "code/codeCache.hpp"
|
||||
#include "code/scopeDesc.hpp"
|
||||
#include "code/vtableStubs.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "prims/jvmtiCodeBlobEvents.hpp"
|
||||
@ -63,6 +64,7 @@ class CodeBlobCollector : StackObj {
|
||||
// used during a collection
|
||||
static GrowableArray<JvmtiCodeBlobDesc*>* _global_code_blobs;
|
||||
static void do_blob(CodeBlob* cb);
|
||||
static void do_vtable_stub(VtableStub* vs);
|
||||
public:
|
||||
CodeBlobCollector() {
|
||||
_code_blobs = NULL;
|
||||
@ -119,6 +121,10 @@ void CodeBlobCollector::do_blob(CodeBlob* cb) {
|
||||
if (cb->is_nmethod()) {
|
||||
return;
|
||||
}
|
||||
// exclude VtableStubs, which are processed separately
|
||||
if (cb->is_buffer_blob() && strcmp(cb->name(), "vtable chunks") == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// check if this starting address has been seen already - the
|
||||
// assumption is that stubs are inserted into the list before the
|
||||
@ -136,6 +142,13 @@ void CodeBlobCollector::do_blob(CodeBlob* cb) {
|
||||
_global_code_blobs->append(scb);
|
||||
}
|
||||
|
||||
// called for each VtableStub in VtableStubs
|
||||
|
||||
void CodeBlobCollector::do_vtable_stub(VtableStub* vs) {
|
||||
JvmtiCodeBlobDesc* scb = new JvmtiCodeBlobDesc(vs->is_vtable_stub() ? "vtable stub" : "itable stub",
|
||||
vs->code_begin(), vs->code_end());
|
||||
_global_code_blobs->append(scb);
|
||||
}
|
||||
|
||||
// collects a list of CodeBlobs in the CodeCache.
|
||||
//
|
||||
@ -166,6 +179,10 @@ void CodeBlobCollector::collect() {
|
||||
_global_code_blobs->append(new JvmtiCodeBlobDesc(desc->name(), desc->begin(), desc->end()));
|
||||
}
|
||||
|
||||
// Vtable stubs are not described with StubCodeDesc,
|
||||
// process them separately
|
||||
VtableStubs::vtable_stub_do(do_vtable_stub);
|
||||
|
||||
// next iterate over all the non-nmethod code blobs and add them to
|
||||
// the list - as noted above this will filter out duplicates and
|
||||
// enclosing blobs.
|
||||
|
@ -1360,8 +1360,10 @@ JvmtiEnv::GetFrameCount(JavaThread* java_thread, jint* count_ptr) {
|
||||
if (state == NULL) {
|
||||
return JVMTI_ERROR_THREAD_NOT_ALIVE;
|
||||
}
|
||||
uint32_t debug_bits = 0;
|
||||
if (is_thread_fully_suspended(java_thread, true, &debug_bits)) {
|
||||
|
||||
// It is only safe to perform the direct operation on the current
|
||||
// thread. All other usage needs to use a vm-safepoint-op for safety.
|
||||
if (java_thread == JavaThread::current()) {
|
||||
err = get_frame_count(state, count_ptr);
|
||||
} else {
|
||||
// get java stack frame count at safepoint.
|
||||
@ -1476,9 +1478,10 @@ JvmtiEnv::PopFrame(JavaThread* java_thread) {
|
||||
jvmtiError
|
||||
JvmtiEnv::GetFrameLocation(JavaThread* java_thread, jint depth, jmethodID* method_ptr, jlocation* location_ptr) {
|
||||
jvmtiError err = JVMTI_ERROR_NONE;
|
||||
uint32_t debug_bits = 0;
|
||||
|
||||
if (is_thread_fully_suspended(java_thread, true, &debug_bits)) {
|
||||
// It is only safe to perform the direct operation on the current
|
||||
// thread. All other usage needs to use a vm-safepoint-op for safety.
|
||||
if (java_thread == JavaThread::current()) {
|
||||
err = get_frame_location(java_thread, depth, method_ptr, location_ptr);
|
||||
} else {
|
||||
// JVMTI get java stack frame location at safepoint.
|
||||
|
@ -533,7 +533,11 @@ public:
|
||||
VMOp_Type type() const { return VMOp_GetFrameCount; }
|
||||
jvmtiError result() { return _result; }
|
||||
void doit() {
|
||||
_result = ((JvmtiEnvBase*)_env)->get_frame_count(_state, _count_ptr);
|
||||
_result = JVMTI_ERROR_THREAD_NOT_ALIVE;
|
||||
JavaThread* jt = _state->get_thread();
|
||||
if (Threads::includes(jt) && !jt->is_exiting() && jt->threadObj() != NULL) {
|
||||
_result = ((JvmtiEnvBase*)_env)->get_frame_count(_state, _count_ptr);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -559,8 +563,12 @@ public:
|
||||
VMOp_Type type() const { return VMOp_GetFrameLocation; }
|
||||
jvmtiError result() { return _result; }
|
||||
void doit() {
|
||||
_result = ((JvmtiEnvBase*)_env)->get_frame_location(_java_thread, _depth,
|
||||
_method_ptr, _location_ptr);
|
||||
_result = JVMTI_ERROR_THREAD_NOT_ALIVE;
|
||||
if (Threads::includes(_java_thread) && !_java_thread->is_exiting() &&
|
||||
_java_thread->threadObj() != NULL) {
|
||||
_result = ((JvmtiEnvBase*)_env)->get_frame_location(_java_thread, _depth,
|
||||
_method_ptr, _location_ptr);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -2790,6 +2790,7 @@ inline bool VM_HeapWalkOperation::iterate_over_type_array(oop o) {
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef ASSERT
|
||||
// verify that a static oop field is in range
|
||||
static inline bool verify_static_oop(InstanceKlass* ik,
|
||||
oop mirror, int offset) {
|
||||
@ -2804,6 +2805,7 @@ static inline bool verify_static_oop(InstanceKlass* ik,
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif // #ifdef ASSERT
|
||||
|
||||
// a class references its super class, interfaces, class loader, ...
|
||||
// and finally its static fields
|
||||
|
@ -105,7 +105,7 @@ WB_END
|
||||
WB_ENTRY(void, WB_PrintHeapSizes(JNIEnv* env, jobject o)) {
|
||||
CollectorPolicy * p = Universe::heap()->collector_policy();
|
||||
gclog_or_tty->print_cr("Minimum heap "SIZE_FORMAT" Initial heap "
|
||||
SIZE_FORMAT" Maximum heap "SIZE_FORMAT" Min alignment "SIZE_FORMAT" Max alignment "SIZE_FORMAT,
|
||||
SIZE_FORMAT" Maximum heap "SIZE_FORMAT" Space alignment "SIZE_FORMAT" Heap alignment "SIZE_FORMAT,
|
||||
p->min_heap_byte_size(), p->initial_heap_byte_size(), p->max_heap_byte_size(),
|
||||
p->space_alignment(), p->heap_alignment());
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ bool Arguments::_xdebug_mode = false;
|
||||
const char* Arguments::_java_vendor_url_bug = DEFAULT_VENDOR_URL_BUG;
|
||||
const char* Arguments::_sun_java_launcher = DEFAULT_JAVA_LAUNCHER;
|
||||
int Arguments::_sun_java_launcher_pid = -1;
|
||||
bool Arguments::_created_by_gamma_launcher = false;
|
||||
bool Arguments::_sun_java_launcher_is_altjvm = false;
|
||||
|
||||
// These parameters are reset in method parse_vm_init_args(JavaVMInitArgs*)
|
||||
bool Arguments::_AlwaysCompileLoopMethods = AlwaysCompileLoopMethods;
|
||||
@ -151,7 +151,8 @@ static void logOption(const char* opt) {
|
||||
|
||||
// Process java launcher properties.
|
||||
void Arguments::process_sun_java_launcher_properties(JavaVMInitArgs* args) {
|
||||
// See if sun.java.launcher or sun.java.launcher.pid is defined.
|
||||
// See if sun.java.launcher, sun.java.launcher.is_altjvm or
|
||||
// sun.java.launcher.pid is defined.
|
||||
// Must do this before setting up other system properties,
|
||||
// as some of them may depend on launcher type.
|
||||
for (int index = 0; index < args->nOptions; index++) {
|
||||
@ -162,6 +163,12 @@ void Arguments::process_sun_java_launcher_properties(JavaVMInitArgs* args) {
|
||||
process_java_launcher_argument(tail, option->extraInfo);
|
||||
continue;
|
||||
}
|
||||
if (match_option(option, "-Dsun.java.launcher.is_altjvm=", &tail)) {
|
||||
if (strcmp(tail, "true") == 0) {
|
||||
_sun_java_launcher_is_altjvm = true;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (match_option(option, "-Dsun.java.launcher.pid=", &tail)) {
|
||||
_sun_java_launcher_pid = atoi(tail);
|
||||
continue;
|
||||
@ -1013,9 +1020,10 @@ bool Arguments::add_property(const char* prop) {
|
||||
_java_command = value;
|
||||
|
||||
// Record value in Arguments, but let it get passed to Java.
|
||||
} else if (strcmp(key, "sun.java.launcher.pid") == 0) {
|
||||
// launcher.pid property is private and is processed
|
||||
// in process_sun_java_launcher_properties();
|
||||
} else if (strcmp(key, "sun.java.launcher.is_altjvm") == 0 ||
|
||||
strcmp(key, "sun.java.launcher.pid") == 0) {
|
||||
// sun.java.launcher.is_altjvm and sun.java.launcher.pid property are
|
||||
// private and are processed in process_sun_java_launcher_properties();
|
||||
// the sun.java.launcher property is passed on to the java application
|
||||
FreeHeap(key);
|
||||
if (eq != NULL) {
|
||||
@ -1810,9 +1818,6 @@ void Arguments::process_java_compiler_argument(char* arg) {
|
||||
|
||||
void Arguments::process_java_launcher_argument(const char* launcher, void* extra_info) {
|
||||
_sun_java_launcher = strdup(launcher);
|
||||
if (strcmp("gamma", _sun_java_launcher) == 0) {
|
||||
_created_by_gamma_launcher = true;
|
||||
}
|
||||
}
|
||||
|
||||
bool Arguments::created_by_java_launcher() {
|
||||
@ -1820,8 +1825,8 @@ bool Arguments::created_by_java_launcher() {
|
||||
return strcmp(DEFAULT_JAVA_LAUNCHER, _sun_java_launcher) != 0;
|
||||
}
|
||||
|
||||
bool Arguments::created_by_gamma_launcher() {
|
||||
return _created_by_gamma_launcher;
|
||||
bool Arguments::sun_java_launcher_is_altjvm() {
|
||||
return _sun_java_launcher_is_altjvm;
|
||||
}
|
||||
|
||||
//===========================================================================================================
|
||||
@ -3809,32 +3814,28 @@ jint Arguments::apply_ergo() {
|
||||
}
|
||||
}
|
||||
|
||||
// set PauseAtExit if the gamma launcher was used and a debugger is attached
|
||||
// but only if not already set on the commandline
|
||||
if (Arguments::created_by_gamma_launcher() && os::is_debugger_attached()) {
|
||||
bool set = false;
|
||||
CommandLineFlags::wasSetOnCmdline("PauseAtExit", &set);
|
||||
if (!set) {
|
||||
FLAG_SET_DEFAULT(PauseAtExit, true);
|
||||
}
|
||||
}
|
||||
|
||||
return JNI_OK;
|
||||
}
|
||||
|
||||
jint Arguments::adjust_after_os() {
|
||||
#if INCLUDE_ALL_GCS
|
||||
if (UseParallelGC || UseParallelOldGC) {
|
||||
if (UseNUMA) {
|
||||
if (UseNUMA) {
|
||||
if (UseParallelGC || UseParallelOldGC) {
|
||||
if (FLAG_IS_DEFAULT(MinHeapDeltaBytes)) {
|
||||
FLAG_SET_DEFAULT(MinHeapDeltaBytes, 64*M);
|
||||
FLAG_SET_DEFAULT(MinHeapDeltaBytes, 64*M);
|
||||
}
|
||||
// For those collectors or operating systems (eg, Windows) that do
|
||||
// not support full UseNUMA, we will map to UseNUMAInterleaving for now
|
||||
UseNUMAInterleaving = true;
|
||||
}
|
||||
// UseNUMAInterleaving is set to ON for all collectors and
|
||||
// platforms when UseNUMA is set to ON. NUMA-aware collectors
|
||||
// such as the parallel collector for Linux and Solaris will
|
||||
// interleave old gen and survivor spaces on top of NUMA
|
||||
// allocation policy for the eden space.
|
||||
// Non NUMA-aware collectors such as CMS, G1 and Serial-GC on
|
||||
// all platforms and ParallelGC on Windows will interleave all
|
||||
// of the heap spaces across NUMA nodes.
|
||||
if (FLAG_IS_DEFAULT(UseNUMAInterleaving)) {
|
||||
FLAG_SET_ERGO(bool, UseNUMAInterleaving, true);
|
||||
}
|
||||
}
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
return JNI_OK;
|
||||
}
|
||||
|
||||
|
@ -269,14 +269,14 @@ class Arguments : AllStatic {
|
||||
static const char* _java_vendor_url_bug;
|
||||
|
||||
// sun.java.launcher, private property to provide information about
|
||||
// java/gamma launcher
|
||||
// java launcher
|
||||
static const char* _sun_java_launcher;
|
||||
|
||||
// sun.java.launcher.pid, private property
|
||||
static int _sun_java_launcher_pid;
|
||||
|
||||
// was this VM created by the gamma launcher
|
||||
static bool _created_by_gamma_launcher;
|
||||
// was this VM created via the -XXaltjvm=<path> option
|
||||
static bool _sun_java_launcher_is_altjvm;
|
||||
|
||||
// Option flags
|
||||
static bool _has_profile;
|
||||
@ -498,8 +498,8 @@ class Arguments : AllStatic {
|
||||
static const char* sun_java_launcher() { return _sun_java_launcher; }
|
||||
// Was VM created by a Java launcher?
|
||||
static bool created_by_java_launcher();
|
||||
// Was VM created by the gamma Java launcher?
|
||||
static bool created_by_gamma_launcher();
|
||||
// -Dsun.java.launcher.is_altjvm
|
||||
static bool sun_java_launcher_is_altjvm();
|
||||
// -Dsun.java.launcher.pid
|
||||
static int sun_java_launcher_pid() { return _sun_java_launcher_pid; }
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -565,7 +565,7 @@ class CommandLineFlags {
|
||||
"Force NUMA optimizations on single-node/UMA systems") \
|
||||
\
|
||||
product(uintx, NUMAChunkResizeWeight, 20, \
|
||||
"Percentage (0-100) used to weigh the current sample when " \
|
||||
"Percentage (0-100) used to weight the current sample when " \
|
||||
"computing exponentially decaying average for " \
|
||||
"AdaptiveNUMAChunkSizing") \
|
||||
\
|
||||
@ -1260,6 +1260,9 @@ class CommandLineFlags {
|
||||
develop(bool, TraceJNICalls, false, \
|
||||
"Trace JNI calls") \
|
||||
\
|
||||
develop(bool, StressRewriter, false, \
|
||||
"Stress linktime bytecode rewriting") \
|
||||
\
|
||||
notproduct(bool, TraceJVMCalls, false, \
|
||||
"Trace JVM calls") \
|
||||
\
|
||||
@ -1502,7 +1505,7 @@ class CommandLineFlags {
|
||||
"allocation") \
|
||||
\
|
||||
product(uintx, PLABWeight, 75, \
|
||||
"Percentage (0-100) used to weigh the current sample when " \
|
||||
"Percentage (0-100) used to weight the current sample when " \
|
||||
"computing exponentially decaying average for ResizePLAB") \
|
||||
\
|
||||
product(bool, ResizePLAB, true, \
|
||||
@ -1611,11 +1614,11 @@ class CommandLineFlags {
|
||||
"is shifted to the right within the period between young GCs") \
|
||||
\
|
||||
product(uintx, CMSExpAvgFactor, 50, \
|
||||
"Percentage (0-100) used to weigh the current sample when " \
|
||||
"Percentage (0-100) used to weight the current sample when " \
|
||||
"computing exponential averages for CMS statistics") \
|
||||
\
|
||||
product(uintx, CMS_FLSWeight, 75, \
|
||||
"Percentage (0-100) used to weigh the current sample when " \
|
||||
"Percentage (0-100) used to weight the current sample when " \
|
||||
"computing exponentially decaying averages for CMS FLS " \
|
||||
"statistics") \
|
||||
\
|
||||
@ -1727,19 +1730,15 @@ class CommandLineFlags {
|
||||
"to simulate overflow; a smaller number increases frequency") \
|
||||
\
|
||||
product(uintx, CMSMaxAbortablePrecleanLoops, 0, \
|
||||
"(Temporary, subject to experimentation) " \
|
||||
"Maximum number of abortable preclean iterations, if > 0") \
|
||||
\
|
||||
product(intx, CMSMaxAbortablePrecleanTime, 5000, \
|
||||
"(Temporary, subject to experimentation) " \
|
||||
"Maximum time in abortable preclean (in milliseconds)") \
|
||||
\
|
||||
product(uintx, CMSAbortablePrecleanMinWorkPerIteration, 100, \
|
||||
"(Temporary, subject to experimentation) " \
|
||||
"Nominal minimum work per abortable preclean iteration") \
|
||||
\
|
||||
manageable(intx, CMSAbortablePrecleanWaitMillis, 100, \
|
||||
"(Temporary, subject to experimentation) " \
|
||||
"Time that we sleep between iterations when not given " \
|
||||
"enough work per iteration") \
|
||||
\
|
||||
@ -1955,13 +1954,13 @@ class CommandLineFlags {
|
||||
"(other young collectors)") \
|
||||
\
|
||||
develop(uintx, PromotionFailureALotInterval, 5, \
|
||||
"Total collections between promotion failures alot") \
|
||||
"Total collections between promotion failures a lot") \
|
||||
\
|
||||
experimental(uintx, WorkStealingSleepMillis, 1, \
|
||||
"Sleep time when sleep is used for yields") \
|
||||
\
|
||||
experimental(uintx, WorkStealingYieldsBeforeSleep, 5000, \
|
||||
"Number of yields before a sleep is done during workstealing") \
|
||||
"Number of yields before a sleep is done during work stealing") \
|
||||
\
|
||||
experimental(uintx, WorkStealingHardSpins, 4096, \
|
||||
"Number of iterations in a spin loop between checks on " \
|
||||
@ -2039,7 +2038,7 @@ class CommandLineFlags {
|
||||
"size; deprecated: to be renamed to MaxRAMFraction") \
|
||||
\
|
||||
product(uintx, MinRAMFraction, 2, \
|
||||
"Minimum fraction (1/n) of real memory used for maxmimum heap " \
|
||||
"Minimum fraction (1/n) of real memory used for maximum heap " \
|
||||
"size on systems with small physical memory size") \
|
||||
\
|
||||
product(uintx, InitialRAMFraction, 64, \
|
||||
|
@ -337,7 +337,7 @@ void JavaCalls::call_helper(JavaValue* result, methodHandle* m, JavaCallArgument
|
||||
// A klass might not be initialized since JavaCall's might be used during the executing of
|
||||
// the <clinit>. For example, a Thread.start might start executing on an object that is
|
||||
// not fully initialized! (bad Java programming style)
|
||||
assert(holder->is_linked(), "rewritting must have taken place");
|
||||
assert(holder->is_linked(), "rewriting must have taken place");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -280,16 +280,6 @@ static inline jint MarsagliaXORV (jint x) {
|
||||
return x & 0x7FFFFFFF ;
|
||||
}
|
||||
|
||||
static inline jint MarsagliaXOR (jint * const a) {
|
||||
jint x = *a ;
|
||||
if (x == 0) x = UNS(a)|1 ;
|
||||
x ^= x << 6;
|
||||
x ^= ((unsigned)x) >> 21;
|
||||
x ^= x << 7 ;
|
||||
*a = x ;
|
||||
return x & 0x7FFFFFFF ;
|
||||
}
|
||||
|
||||
static int Stall (int its) {
|
||||
static volatile jint rv = 1 ;
|
||||
volatile int OnFrame = 0 ;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -382,6 +382,12 @@ void ATTR ObjectMonitor::enter(TRAPS) {
|
||||
DTRACE_MONITOR_PROBE(contended__enter, this, object(), jt);
|
||||
if (JvmtiExport::should_post_monitor_contended_enter()) {
|
||||
JvmtiExport::post_monitor_contended_enter(jt, this);
|
||||
|
||||
// The current thread does not yet own the monitor and does not
|
||||
// yet appear on any queues that would get it made the successor.
|
||||
// This means that the JVMTI_EVENT_MONITOR_CONTENDED_ENTER event
|
||||
// handler cannot accidentally consume an unpark() meant for the
|
||||
// ParkEvent associated with this ObjectMonitor.
|
||||
}
|
||||
|
||||
OSThreadContendState osts(Self->osthread());
|
||||
@ -439,6 +445,12 @@ void ATTR ObjectMonitor::enter(TRAPS) {
|
||||
DTRACE_MONITOR_PROBE(contended__entered, this, object(), jt);
|
||||
if (JvmtiExport::should_post_monitor_contended_entered()) {
|
||||
JvmtiExport::post_monitor_contended_entered(jt, this);
|
||||
|
||||
// The current thread already owns the monitor and is not going to
|
||||
// call park() for the remainder of the monitor enter protocol. So
|
||||
// it doesn't matter if the JVMTI_EVENT_MONITOR_CONTENDED_ENTERED
|
||||
// event handler consumed an unpark() issued by the thread that
|
||||
// just exited the monitor.
|
||||
}
|
||||
|
||||
if (event.should_commit()) {
|
||||
@ -1456,6 +1468,14 @@ void ObjectMonitor::wait(jlong millis, bool interruptible, TRAPS) {
|
||||
// Note: 'false' parameter is passed here because the
|
||||
// wait was not timed out due to thread interrupt.
|
||||
JvmtiExport::post_monitor_waited(jt, this, false);
|
||||
|
||||
// In this short circuit of the monitor wait protocol, the
|
||||
// current thread never drops ownership of the monitor and
|
||||
// never gets added to the wait queue so the current thread
|
||||
// cannot be made the successor. This means that the
|
||||
// JVMTI_EVENT_MONITOR_WAITED event handler cannot accidentally
|
||||
// consume an unpark() meant for the ParkEvent associated with
|
||||
// this ObjectMonitor.
|
||||
}
|
||||
if (event.should_commit()) {
|
||||
post_monitor_wait_event(&event, 0, millis, false);
|
||||
@ -1499,21 +1519,6 @@ void ObjectMonitor::wait(jlong millis, bool interruptible, TRAPS) {
|
||||
exit (true, Self) ; // exit the monitor
|
||||
guarantee (_owner != Self, "invariant") ;
|
||||
|
||||
// As soon as the ObjectMonitor's ownership is dropped in the exit()
|
||||
// call above, another thread can enter() the ObjectMonitor, do the
|
||||
// notify(), and exit() the ObjectMonitor. If the other thread's
|
||||
// exit() call chooses this thread as the successor and the unpark()
|
||||
// call happens to occur while this thread is posting a
|
||||
// MONITOR_CONTENDED_EXIT event, then we run the risk of the event
|
||||
// handler using RawMonitors and consuming the unpark().
|
||||
//
|
||||
// To avoid the problem, we re-post the event. This does no harm
|
||||
// even if the original unpark() was not consumed because we are the
|
||||
// chosen successor for this monitor.
|
||||
if (node._notified != 0 && _succ == Self) {
|
||||
node._event->unpark();
|
||||
}
|
||||
|
||||
// The thread is on the WaitSet list - now park() it.
|
||||
// On MP systems it's conceivable that a brief spin before we park
|
||||
// could be profitable.
|
||||
@ -1595,6 +1600,25 @@ void ObjectMonitor::wait(jlong millis, bool interruptible, TRAPS) {
|
||||
// post monitor waited event. Note that this is past-tense, we are done waiting.
|
||||
if (JvmtiExport::should_post_monitor_waited()) {
|
||||
JvmtiExport::post_monitor_waited(jt, this, ret == OS_TIMEOUT);
|
||||
|
||||
if (node._notified != 0 && _succ == Self) {
|
||||
// In this part of the monitor wait-notify-reenter protocol it
|
||||
// is possible (and normal) for another thread to do a fastpath
|
||||
// monitor enter-exit while this thread is still trying to get
|
||||
// to the reenter portion of the protocol.
|
||||
//
|
||||
// The ObjectMonitor was notified and the current thread is
|
||||
// the successor which also means that an unpark() has already
|
||||
// been done. The JVMTI_EVENT_MONITOR_WAITED event handler can
|
||||
// consume the unpark() that was done when the successor was
|
||||
// set because the same ParkEvent is shared between Java
|
||||
// monitors and JVM/TI RawMonitors (for now).
|
||||
//
|
||||
// We redo the unpark() to ensure forward progress, i.e., we
|
||||
// don't want all pending threads hanging (parked) with none
|
||||
// entering the unlocked monitor.
|
||||
node._event->unpark();
|
||||
}
|
||||
}
|
||||
|
||||
if (event.should_commit()) {
|
||||
|
@ -362,7 +362,7 @@ void os::signal_init() {
|
||||
// exceptions anyway, check and abort if this fails.
|
||||
if (signal_thread == NULL || signal_thread->osthread() == NULL) {
|
||||
vm_exit_during_initialization("java.lang.OutOfMemoryError",
|
||||
"unable to create new native thread");
|
||||
os::native_thread_creation_failed_msg());
|
||||
}
|
||||
|
||||
java_lang_Thread::set_thread(thread_oop(), signal_thread);
|
||||
@ -1197,7 +1197,7 @@ char* os::format_boot_path(const char* format_string,
|
||||
char fileSep,
|
||||
char pathSep) {
|
||||
assert((fileSep == '/' && pathSep == ':') ||
|
||||
(fileSep == '\\' && pathSep == ';'), "unexpected seperator chars");
|
||||
(fileSep == '\\' && pathSep == ';'), "unexpected separator chars");
|
||||
|
||||
// Scan the format string to determine the length of the actual
|
||||
// boot classpath, and handle platform dependencies as well.
|
||||
|
@ -805,6 +805,10 @@ class os: AllStatic {
|
||||
#endif
|
||||
#ifdef TARGET_OS_ARCH_bsd_zero
|
||||
# include "os_bsd_zero.hpp"
|
||||
#endif
|
||||
|
||||
#ifndef OS_NATIVE_THREAD_CREATION_FAILED_MSG
|
||||
#define OS_NATIVE_THREAD_CREATION_FAILED_MSG "unable to create native thread: possibly out of memory or process/resource limits reached"
|
||||
#endif
|
||||
|
||||
public:
|
||||
@ -829,6 +833,9 @@ class os: AllStatic {
|
||||
// Hint to the underlying OS that a task switch would not be good.
|
||||
// Void return because it's a hint and can fail.
|
||||
static void hint_no_preempt();
|
||||
static const char* native_thread_creation_failed_msg() {
|
||||
return OS_NATIVE_THREAD_CREATION_FAILED_MSG;
|
||||
}
|
||||
|
||||
// Used at creation if requested by the diagnostic flag PauseAtStartup.
|
||||
// Causes the VM to wait until an external stimulus has been applied
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "runtime/javaCalls.hpp"
|
||||
#include "runtime/serviceThread.hpp"
|
||||
#include "runtime/mutexLocker.hpp"
|
||||
#include "runtime/os.hpp"
|
||||
#include "prims/jvmtiImpl.hpp"
|
||||
#include "services/gcNotifier.hpp"
|
||||
#include "services/diagnosticArgument.hpp"
|
||||
@ -66,7 +67,7 @@ void ServiceThread::initialize() {
|
||||
// exceptions anyway, check and abort if this fails.
|
||||
if (thread == NULL || thread->osthread() == NULL) {
|
||||
vm_exit_during_initialization("java.lang.OutOfMemoryError",
|
||||
"unable to create new native thread");
|
||||
os::native_thread_creation_failed_msg());
|
||||
}
|
||||
|
||||
java_lang_Thread::set_thread(thread_oop(), thread);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -373,23 +373,24 @@ ObjectLocker::~ObjectLocker() {
|
||||
// -----------------------------------------------------------------------------
|
||||
// Wait/Notify/NotifyAll
|
||||
// NOTE: must use heavy weight monitor to handle wait()
|
||||
void ObjectSynchronizer::wait(Handle obj, jlong millis, TRAPS) {
|
||||
int ObjectSynchronizer::wait(Handle obj, jlong millis, TRAPS) {
|
||||
if (UseBiasedLocking) {
|
||||
BiasedLocking::revoke_and_rebias(obj, false, THREAD);
|
||||
assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now");
|
||||
}
|
||||
if (millis < 0) {
|
||||
TEVENT (wait - throw IAX) ;
|
||||
THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), "timeout value is negative");
|
||||
THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(), "timeout value is negative");
|
||||
}
|
||||
ObjectMonitor* monitor = ObjectSynchronizer::inflate(THREAD, obj());
|
||||
DTRACE_MONITOR_WAIT_PROBE(monitor, obj(), THREAD, millis);
|
||||
monitor->wait(millis, true, THREAD);
|
||||
|
||||
/* This dummy call is in place to get around dtrace bug 6254741. Once
|
||||
that's fixed we can uncomment the following line and remove the call */
|
||||
// This dummy call is in place to get around dtrace bug 6254741. Once
|
||||
// that's fixed we can uncomment the following line, remove the call
|
||||
// and change this function back into a "void" func.
|
||||
// DTRACE_MONITOR_PROBE(waited, monitor, obj(), THREAD);
|
||||
dtrace_waited_probe(monitor, obj, THREAD);
|
||||
return dtrace_waited_probe(monitor, obj, THREAD);
|
||||
}
|
||||
|
||||
void ObjectSynchronizer::waitUninterruptibly (Handle obj, jlong millis, TRAPS) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -68,7 +68,7 @@ class ObjectSynchronizer : AllStatic {
|
||||
static void jni_exit (oop obj, Thread* THREAD);
|
||||
|
||||
// Handle all interpreter, compiler and jni cases
|
||||
static void wait (Handle obj, jlong millis, TRAPS);
|
||||
static int wait (Handle obj, jlong millis, TRAPS);
|
||||
static void notify (Handle obj, TRAPS);
|
||||
static void notifyall (Handle obj, TRAPS);
|
||||
|
||||
|
@ -215,9 +215,9 @@ void ReservedSpace::initialize(size_t size, size_t alignment, bool large,
|
||||
noaccess_prefix == _alignment, "noaccess prefix wrong");
|
||||
|
||||
assert(markOopDesc::encode_pointer_as_mark(_base)->decode_pointer() == _base,
|
||||
"area must be distinguisable from marks for mark-sweep");
|
||||
"area must be distinguishable from marks for mark-sweep");
|
||||
assert(markOopDesc::encode_pointer_as_mark(&_base[size])->decode_pointer() == &_base[size],
|
||||
"area must be distinguisable from marks for mark-sweep");
|
||||
"area must be distinguishable from marks for mark-sweep");
|
||||
}
|
||||
|
||||
|
||||
|
@ -532,7 +532,7 @@ void AttachListener::init() {
|
||||
// Check that thread and osthread were created
|
||||
if (listener_thread == NULL || listener_thread->osthread() == NULL) {
|
||||
vm_exit_during_initialization("java.lang.OutOfMemoryError",
|
||||
"unable to create new native thread");
|
||||
os::native_thread_creation_failed_msg());
|
||||
}
|
||||
|
||||
java_lang_Thread::set_thread(thread_oop(), listener_thread);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -58,7 +58,7 @@ class ResourceArray: public ResourceObj {
|
||||
|
||||
void initialize(size_t esize, int length) {
|
||||
assert(length >= 0, "illegal length");
|
||||
assert(_data == NULL, "must be new object");
|
||||
assert(StressRewriter || _data == NULL, "must be new object");
|
||||
_length = length;
|
||||
_data = resource_allocate_bytes(esize * length);
|
||||
DEBUG_ONLY(init_nesting();)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user