This commit is contained in:
Robert Ottenhag 2011-02-07 08:40:30 -08:00
commit 9cfcb9eda1
137 changed files with 1654 additions and 419 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2011 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
@ -29,13 +29,13 @@ import java.io.*;
import sun.jvm.hotspot.debugger.*;
import sun.jvm.hotspot.types.*;
public class LowMemoryDetectorThread extends JavaThread {
public LowMemoryDetectorThread(Address addr) {
public class ServiceThread extends JavaThread {
public ServiceThread(Address addr) {
super(addr);
}
public boolean isJavaThread() { return false; }
public boolean isHiddenFromExternalView() { return true; }
public boolean isLowMemoryDetectorThread() { return true; }
public boolean isServiceThread() { return true; }
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2011, 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
@ -111,7 +111,7 @@ public class Thread extends VMObject {
public boolean isJvmtiAgentThread() { return false; }
public boolean isWatcherThread() { return false; }
public boolean isConcurrentMarkSweepThread() { return false; }
public boolean isLowMemoryDetectorThread() { return false; }
public boolean isServiceThread() { return false; }
/** Memory operations */
public void oopsDo(AddressVisitor oopVisitor) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2011, 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
@ -107,14 +107,14 @@ public class Threads {
// for now, use JavaThread itself. fix it later with appropriate class if needed
virtualConstructor.addMapping("SurrogateLockerThread", JavaThread.class);
virtualConstructor.addMapping("JvmtiAgentThread", JvmtiAgentThread.class);
virtualConstructor.addMapping("LowMemoryDetectorThread", LowMemoryDetectorThread.class);
virtualConstructor.addMapping("ServiceThread", ServiceThread.class);
}
public Threads() {
}
/** NOTE: this returns objects of type JavaThread, CompilerThread,
JvmtiAgentThread, and LowMemoryDetectorThread.
JvmtiAgentThread, and ServiceThread.
The latter four are subclasses of the former. Most operations
(fetching the top frame, etc.) are only allowed to be performed on
a "pure" JavaThread. For this reason, {@link
@ -143,7 +143,7 @@ public class Threads {
return thread;
} catch (Exception e) {
throw new RuntimeException("Unable to deduce type of thread from address " + threadAddr +
" (expected type JavaThread, CompilerThread, LowMemoryDetectorThread, JvmtiAgentThread, or SurrogateLockerThread)", e);
" (expected type JavaThread, CompilerThread, ServiceThread, JvmtiAgentThread, or SurrogateLockerThread)", e);
}
}

View File

@ -73,6 +73,7 @@ else
include defs.make
endif
include $(GAMMADIR)/make/closed.make
ifneq ($(ALT_OUTPUTDIR),)
ALT_OUT=ALT_OUTPUTDIR=$(ALT_OUTPUTDIR)
@ -361,7 +362,7 @@ $(EXPORT_INCLUDE_DIR)/%: $(HS_SRC_DIR)/share/vm/code/%
$(EXPORT_INCLUDE_DIR)/%: $(HS_SRC_DIR)/share/vm/prims/%
$(install-file)
$(EXPORT_INCLUDE_DIR)/$(JDK_INCLUDE_SUBDIR)/jni_md.h: $(HS_SRC_DIR)/cpu/$(HS_ARCH)/vm/jni_$(HS_ARCH).h
$(EXPORT_INCLUDE_DIR)/$(JDK_INCLUDE_SUBDIR)/jni_md.h: $(HS_JNI_ARCH_SRC)
$(install-file)
$(EXPORT_INCLUDE_DIR)/%: $(HS_SRC_DIR)/share/vm/services/%

59
hotspot/make/closed.make Normal file
View File

@ -0,0 +1,59 @@
#
# Copyright (c) 2011, 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.
#
#
# Support for setting HS_CLOSED_PATH, required GAMMADIR and SRCARCH
CLOSED_DIR_EXISTS := $(shell \
if [ -d $(GAMMADIR)/src/closed ] ; then \
echo true; \
else \
echo false; \
fi)
CLOSED_SRCARCH_DIR_EXISTS := $(shell \
if [ -d $(GAMMADIR)/src/closed/cpu/$(SRCARCH)/vm ] ; then \
echo true; \
else \
echo false; \
fi)
ifeq ($(CLOSED_SRCARCH_DIR_EXISTS), true)
HS_CLOSED_PATH=closed/
endif
# Support for setting HS_JNI_ARCH_SRC, requires HS_SRC_DIR and HS_ARCH
CLOSED_HS_ARCH_DIR_EXISTS := $(shell \
if [ -d $(HS_SRC_DIR)/closed/cpu/$(HS_ARCH)/vm ] ; then \
echo true; \
else \
echo false; \
fi)
ifeq ($(CLOSED_HS_ARCH_DIR_EXISTS), true)
HS_JNI_ARCH_SRC=$(HS_SRC_DIR)/closed/cpu/$(HS_ARCH)/vm/jni_$(HS_ARCH).h
else
HS_JNI_ARCH_SRC=$(HS_SRC_DIR)/cpu/$(HS_ARCH)/vm/jni_$(HS_ARCH).h
endif

View File

@ -44,6 +44,11 @@ jprt.tools.default.release=${jprt.submit.release}
jprt.sync.push=false
# Note: we want both embedded releases and regular releases to build and test
# all platforms so that regressions are not introduced (eg. change to
# common code by SE breaks PPC/ARM; change to common code by SE-E breaks
# sparc etc.
# Define the Solaris platforms we want for the various releases
jprt.my.solaris.sparc.jdk7=solaris_sparc_5.10
@ -55,6 +60,8 @@ jprt.my.solaris.sparc.jdk6u10=solaris_sparc_5.8
jprt.my.solaris.sparc.jdk6u14=solaris_sparc_5.8
jprt.my.solaris.sparc.jdk6u18=solaris_sparc_5.8
jprt.my.solaris.sparc.jdk6u20=solaris_sparc_5.8
jprt.my.solaris.sparc.ejdk7=${jprt.my.solaris.sparc.jdk7}
jprt.my.solaris.sparc.ejdk6=${jprt.my.solaris.sparc.jdk6}
jprt.my.solaris.sparc=${jprt.my.solaris.sparc.${jprt.tools.default.release}}
jprt.my.solaris.sparcv9.jdk7=solaris_sparcv9_5.10
@ -66,6 +73,8 @@ jprt.my.solaris.sparcv9.jdk6u10=solaris_sparcv9_5.8
jprt.my.solaris.sparcv9.jdk6u14=solaris_sparcv9_5.8
jprt.my.solaris.sparcv9.jdk6u18=solaris_sparcv9_5.8
jprt.my.solaris.sparcv9.jdk6u20=solaris_sparcv9_5.8
jprt.my.solaris.sparcv9.ejdk7=${jprt.my.solaris.sparcv9.jdk7}
jprt.my.solaris.sparcv9.ejdk6=${jprt.my.solaris.sparcv9.jdk6}
jprt.my.solaris.sparcv9=${jprt.my.solaris.sparcv9.${jprt.tools.default.release}}
jprt.my.solaris.i586.jdk7=solaris_i586_5.10
@ -77,6 +86,8 @@ jprt.my.solaris.i586.jdk6u10=solaris_i586_5.8
jprt.my.solaris.i586.jdk6u14=solaris_i586_5.8
jprt.my.solaris.i586.jdk6u18=solaris_i586_5.8
jprt.my.solaris.i586.jdk6u20=solaris_i586_5.8
jprt.my.solaris.i586.ejdk7=${jprt.my.solaris.i586.jdk7}
jprt.my.solaris.i586.ejdk6=${jprt.my.solaris.i586.jdk6}
jprt.my.solaris.i586=${jprt.my.solaris.i586.${jprt.tools.default.release}}
jprt.my.solaris.x64.jdk7=solaris_x64_5.10
@ -88,6 +99,8 @@ jprt.my.solaris.x64.jdk6u10=solaris_x64_5.10
jprt.my.solaris.x64.jdk6u14=solaris_x64_5.10
jprt.my.solaris.x64.jdk6u18=solaris_x64_5.10
jprt.my.solaris.x64.jdk6u20=solaris_x64_5.10
jprt.my.solaris.x64.ejdk7=${jprt.my.solaris.x64.jdk7}
jprt.my.solaris.x64.ejdk6=${jprt.my.solaris.x64.jdk6}
jprt.my.solaris.x64=${jprt.my.solaris.x64.${jprt.tools.default.release}}
jprt.my.linux.i586.jdk7=linux_i586_2.6
@ -99,6 +112,8 @@ jprt.my.linux.i586.jdk6u10=linux_i586_2.4
jprt.my.linux.i586.jdk6u14=linux_i586_2.4
jprt.my.linux.i586.jdk6u18=linux_i586_2.4
jprt.my.linux.i586.jdk6u20=linux_i586_2.4
jprt.my.linux.i586.ejdk7=linux_i586_2.6
jprt.my.linux.i586.ejdk6=linux_i586_2.6
jprt.my.linux.i586=${jprt.my.linux.i586.${jprt.tools.default.release}}
jprt.my.linux.x64.jdk7=linux_x64_2.6
@ -110,8 +125,45 @@ jprt.my.linux.x64.jdk6u10=linux_x64_2.4
jprt.my.linux.x64.jdk6u14=linux_x64_2.4
jprt.my.linux.x64.jdk6u18=linux_x64_2.4
jprt.my.linux.x64.jdk6u20=linux_x64_2.4
jprt.my.linux.x64.ejdk7=${jprt.my.linux.x64.jdk7}
jprt.my.linux.x64.ejdk6=${jprt.my.linux.x64.jdk6}
jprt.my.linux.x64=${jprt.my.linux.x64.${jprt.tools.default.release}}
jprt.my.linux.ppc.jdk7=linux_ppc_2.6
jprt.my.linux.ppc.jdk7b107=linux_ppc_2.6
jprt.my.linux.ppc.jdk7temp=linux_ppc_2.6
jprt.my.linux.ppc.ejdk6=linux_ppc_2.6
jprt.my.linux.ppc.ejdk7=linux_ppc_2.6
jprt.my.linux.ppc=${jprt.my.linux.ppc.${jprt.tools.default.release}}
jprt.my.linux.ppcv2.jdk7=linux_ppcv2_2.6
jprt.my.linux.ppcv2.jdk7b107=linux_ppcv2_2.6
jprt.my.linux.ppcv2.jdk7temp=linux_ppcv2_2.6
jprt.my.linux.ppcv2.ejdk6=linux_ppcv2_2.6
jprt.my.linux.ppcv2.ejdk7=linux_ppcv2_2.6
jprt.my.linux.ppcv2=${jprt.my.linux.ppcv2.${jprt.tools.default.release}}
jprt.my.linux.ppcsflt.jdk7=linux_ppcsflt_2.6
jprt.my.linux.ppcsflt.jdk7b107=linux_ppcsflt_2.6
jprt.my.linux.ppcsflt.jdk7temp=linux_ppcsflt_2.6
jprt.my.linux.ppcsflt.ejdk6=linux_ppcsflt_2.6
jprt.my.linux.ppcsflt.ejdk7=linux_ppcsflt_2.6
jprt.my.linux.ppcsflt=${jprt.my.linux.ppcsflt.${jprt.tools.default.release}}
jprt.my.linux.armvfp.jdk7=linux_armvfp_2.6
jprt.my.linux.armvfp.jdk7b107=linux_armvfp_2.6
jprt.my.linux.armvfp.jdk7temp=linux_armvfp_2.6
jprt.my.linux.armvfp.ejdk6=linux_armvfp_2.6
jprt.my.linux.armvfp.ejdk7=linux_armvfp_2.6
jprt.my.linux.armvfp=${jprt.my.linux.armvfp.${jprt.tools.default.release}}
jprt.my.linux.armsflt.jdk7=linux_armsflt_2.6
jprt.my.linux.armsflt.jdk7b107=linux_armsflt_2.6
jprt.my.linux.armsflt.jdk7temp=linux_armsflt_2.6
jprt.my.linux.armsflt.ejdk6=linux_armsflt_2.6
jprt.my.linux.armsflt.ejdk7=linux_armsflt_2.6
jprt.my.linux.armsflt=${jprt.my.linux.armsflt.${jprt.tools.default.release}}
jprt.my.windows.i586.jdk7=windows_i586_5.1
jprt.my.windows.i586.jdk7b107=windows_i586_5.0
jprt.my.windows.i586.jdk7temp=windows_i586_5.0
@ -121,6 +173,8 @@ jprt.my.windows.i586.jdk6u10=windows_i586_5.0
jprt.my.windows.i586.jdk6u14=windows_i586_5.0
jprt.my.windows.i586.jdk6u18=windows_i586_5.0
jprt.my.windows.i586.jdk6u20=windows_i586_5.0
jprt.my.windows.i586.ejdk7=${jprt.my.windows.i586.jdk7}
jprt.my.windows.i586.ejdk6=${jprt.my.windows.i586.jdk6}
jprt.my.windows.i586=${jprt.my.windows.i586.${jprt.tools.default.release}}
jprt.my.windows.x64.jdk7=windows_x64_5.2
@ -132,11 +186,13 @@ jprt.my.windows.x64.jdk6u10=windows_x64_5.2
jprt.my.windows.x64.jdk6u14=windows_x64_5.2
jprt.my.windows.x64.jdk6u18=windows_x64_5.2
jprt.my.windows.x64.jdk6u20=windows_x64_5.2
jprt.my.windows.x64.ejdk7=${jprt.my.windows.x64.jdk7}
jprt.my.windows.x64.ejdk6=${jprt.my.windows.x64.jdk6}
jprt.my.windows.x64=${jprt.my.windows.x64.${jprt.tools.default.release}}
# Standard list of jprt build targets for this source tree
jprt.build.targets= \
jprt.build.targets.standard= \
${jprt.my.solaris.sparc}-{product|fastdebug|debug}, \
${jprt.my.solaris.sparcv9}-{product|fastdebug|debug}, \
${jprt.my.solaris.i586}-{product|fastdebug|debug}, \
@ -146,6 +202,30 @@ jprt.build.targets= \
${jprt.my.windows.i586}-{product|fastdebug|debug}, \
${jprt.my.windows.x64}-{product|fastdebug|debug}
jprt.build.targets.embedded= \
${jprt.my.linux.i586}-{product|fastdebug|debug}, \
${jprt.my.linux.ppc}-{product|fastdebug}, \
${jprt.my.linux.ppcv2}-{product|fastdebug}, \
${jprt.my.linux.ppcsflt}-{product|fastdebug}, \
${jprt.my.linux.armvfp}-{product|fastdebug}, \
${jprt.my.linux.armsflt}-{product|fastdebug}
jprt.build.targets.all=${jprt.build.targets.standard}, \
${jprt.build.targets.embedded}
jprt.build.targets.jdk7=${jprt.build.targets.all}
jprt.build.targets.jdk7temp=${jprt.build.targets.all}
jprt.build.targets.jdk7b107=${jprt.build.targets.all}
jprt.build.targets.jdk6=${jprt.build.targets.standard}
jprt.build.targets.jdk6perf=${jprt.build.targets.standard}
jprt.build.targets.jdk6u10=${jprt.build.targets.standard}
jprt.build.targets.jdk6u14=${jprt.build.targets.standard}
jprt.build.targets.jdk6u18=${jprt.build.targets.standard}
jprt.build.targets.jdk6u20=${jprt.build.targets.standard}
jprt.build.targets.ejdk6=${jprt.build.targets.all}
jprt.build.targets.ejdk7=${jprt.build.targets.all}
jprt.build.targets=${jprt.build.targets.${jprt.tools.default.release}}
# Subset lists of test targets for this source tree
jprt.my.solaris.sparc.test.targets= \
@ -372,9 +452,14 @@ jprt.my.windows.x64.test.targets = \
${jprt.my.windows.x64}-product-c2-jbb_G1, \
${jprt.my.windows.x64}-product-c2-jbb_ParOldGC
# The complete list of test targets for jprt
# Testing for actual embedded builds is different to standard
jprt.my.linux.i586.test.targets.embedded = \
linux_i586_2.6-product-c1-scimark
jprt.test.targets = \
# The complete list of test targets for jprt
# Note: no PPC or ARM tests at this stage
jprt.test.targets.standard = \
${jprt.my.solaris.sparc.test.targets}, \
${jprt.my.solaris.sparcv9.test.targets}, \
${jprt.my.solaris.i586.test.targets}, \
@ -384,15 +469,41 @@ jprt.test.targets = \
${jprt.my.windows.i586.test.targets}, \
${jprt.my.windows.x64.test.targets}
jprt.test.targets.embedded= \
${jprt.my.linux.i586.test.targets.embedded}, \
${jprt.my.solaris.sparc.test.targets}, \
${jprt.my.solaris.sparcv9.test.targets}, \
${jprt.my.solaris.i586.test.targets}, \
${jprt.my.solaris.x64.test.targets}, \
${jprt.my.linux.x64.test.targets}, \
${jprt.my.windows.i586.test.targets}, \
${jprt.my.windows.x64.test.targets}
jprt.test.targets.jdk7=${jprt.test.targets.standard}
jprt.test.targets.jdk7temp=${jprt.test.targets.standard}
jprt.test.targets.jdk7b105=${jprt.test.targets.standard}
jprt.test.targets.jdk6=${jprt.test.targets.standard}
jprt.test.targets.jdk6perf=${jprt.test.targets.standard}
jprt.test.targets.jdk6u10=${jprt.test.targets.standard}
jprt.test.targets.jdk6u14=${jprt.test.targets.standard}
jprt.test.targets.jdk6u18=${jprt.test.targets.standard}
jprt.test.targets.jdk6u20=${jprt.test.targets.standard}
jprt.test.targets.ejdk6=${jprt.test.targets.embedded}
jprt.test.targets.ejdk7=${jprt.test.targets.embedded}
jprt.test.targets=${jprt.test.targets.${jprt.tools.default.release}}
# The default test/Makefile targets that should be run
#jprt.make.rule.test.targets=*-product-*-packtest
jprt.make.rule.test.targets = \
jprt.make.rule.test.targets.standard.client = \
${jprt.my.solaris.sparc}-*-c1-clienttest, \
${jprt.my.solaris.i586}-*-c1-clienttest, \
${jprt.my.linux.i586}-*-c1-clienttest, \
${jprt.my.windows.i586}-*-c1-clienttest, \
${jprt.my.windows.i586}-*-c1-clienttest
jprt.make.rule.test.targets.standard.server = \
${jprt.my.solaris.sparc}-*-c2-servertest, \
${jprt.my.solaris.sparcv9}-*-c2-servertest, \
${jprt.my.solaris.i586}-*-c2-servertest, \
@ -402,3 +513,23 @@ jprt.make.rule.test.targets = \
${jprt.my.windows.i586}-*-c2-servertest, \
${jprt.my.windows.x64}-*-c2-servertest
jprt.make.rule.test.targets.standard = \
${jprt.make.rule.test.targets.standard.client}, \
${jprt.make.rule.test.targets.standard.server}
jprt.make.rule.test.targets.embedded = \
${jprt.make.rule.test.targets.standard.client}
jprt.make.rule.test.targets.jdk7=${jprt.make.rule.test.targets.standard}
jprt.make.rule.test.targets.jdk7temp=${jprt.make.rule.test.targets.standard}
jprt.make.rule.test.targets.jdk7b107=${jprt.make.rule.test.targets.standard}
jprt.make.rule.test.targets.jdk6=${jprt.make.rule.test.targets.standard}
jprt.make.rule.test.targets.jdk6perf=${jprt.make.rule.test.targets.standard}
jprt.make.rule.test.targets.jdk6u10=${jprt.make.rule.test.targets.standard}
jprt.make.rule.test.targets.jdk6u14=${jprt.make.rule.test.targets.standard}
jprt.make.rule.test.targets.jdk6u18=${jprt.make.rule.test.targets.standard}
jprt.make.rule.test.targets.jdk6u20=${jprt.make.rule.test.targets.standard}
jprt.make.rule.test.targets.ejdk6=${jprt.make.rule.test.targets.embedded}
jprt.make.rule.test.targets.ejdk7=${jprt.make.rule.test.targets.embedded}
jprt.make.rule.test.targets=${jprt.make.rule.test.targets.${jprt.tools.default.release}}

View File

@ -208,7 +208,7 @@ TARGETS_ZERO = $(addsuffix zero,$(TARGETS))
TARGETS_SHARK = $(addsuffix shark,$(TARGETS))
BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make
BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) ARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH)
BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH)
BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION) JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
BUILDTREE = $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_VARS)

View File

@ -39,8 +39,8 @@ OS = $(Platform_os_family)
SOURCE.AD = $(OUTDIR)/$(OS)_$(Platform_arch_model).ad
SOURCES.AD = $(GAMMADIR)/src/cpu/$(ARCH)/vm/$(Platform_arch_model).ad \
$(GAMMADIR)/src/os_cpu/$(OS)_$(ARCH)/vm/$(OS)_$(Platform_arch_model).ad
SOURCES.AD = $(GAMMADIR)/src/$(HS_CLOSED_PATH)cpu/$(ARCH)/vm/$(Platform_arch_model).ad \
$(GAMMADIR)/src/$(HS_CLOSED_PATH)os_cpu/$(OS)_$(ARCH)/vm/$(OS)_$(Platform_arch_model).ad
EXEC = $(OUTDIR)/adlc

View File

@ -0,0 +1,10 @@
#
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
# ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
#
Obj_Files += linux_arm.o
LIBS += $(EXT_LIBS_PATH)/sflt_glibc.a
CFLAGS += -DVM_LITTLE_ENDIAN

View File

@ -24,7 +24,7 @@
# Usage:
#
# $(MAKE) -f buildtree.make ARCH=arch BUILDARCH=buildarch LIBARCH=libarch
# $(MAKE) -f buildtree.make SRCARCH=srcarch BUILDARCH=buildarch LIBARCH=libarch
# GAMMADIR=dir OS_FAMILY=os VARIANT=variant
#
# The macros ARCH, GAMMADIR, OS_FAMILY and VARIANT must be defined in the
@ -56,6 +56,8 @@
# having to read the dependency files for the vm.
include $(GAMMADIR)/make/scm.make
include $(GAMMADIR)/make/closed.make
# 'gmake MAKE_VERBOSE=y' or 'gmake QUIETLY=' gives all the gory details.
QUIETLY$(MAKE_VERBOSE) = @
@ -127,7 +129,7 @@ BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make jvmti.ma
env.sh env.csh jdkpath.sh .dbxrc test_gamma
BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \
ARCH=$(ARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) VARIANT=$(VARIANT)
SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) VARIANT=$(VARIANT)
# Define variables to be set in flags.make.
# Default values are set in make/defs.make.
@ -146,12 +148,6 @@ endif
# Define HOTSPOT_VM_DISTRO based on settings in make/openjdk_distro
# or make/hotspot_distro.
ifndef HOTSPOT_VM_DISTRO
CLOSED_DIR_EXISTS := $(shell \
if [ -d $(GAMMADIR)/src/closed ] ; then \
echo true; \
else \
echo false; \
fi)
ifeq ($(CLOSED_DIR_EXISTS), true)
include $(GAMMADIR)/make/hotspot_distro
else
@ -187,7 +183,7 @@ flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
echo; \
echo "GAMMADIR = $(GAMMADIR)"; \
echo "SYSDEFS = \$$(Platform_sysdefs)"; \
echo "SRCARCH = $(ARCH)"; \
echo "SRCARCH = $(SRCARCH)"; \
echo "BUILDARCH = $(BUILDARCH)"; \
echo "LIBARCH = $(LIBARCH)"; \
echo "TARGET = $(TARGET)"; \
@ -208,16 +204,16 @@ flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
echo; \
echo "Src_Dirs_V = \\"; \
sed 's/$$/ \\/;s|$(GAMMADIR)|$$(GAMMADIR)|' ../shared_dirs.lst; \
echo "\$$(GAMMADIR)/src/cpu/$(ARCH)/vm \\"; \
echo "\$$(GAMMADIR)/src/$(HS_CLOSED_PATH)cpu/$(SRCARCH)/vm \\"; \
echo "\$$(GAMMADIR)/src/os/$(OS_FAMILY)/vm \\"; \
echo "\$$(GAMMADIR)/src/os_cpu/$(OS_FAMILY)_$(ARCH)/vm"; \
echo "\$$(GAMMADIR)/src/$(HS_CLOSED_PATH)os_cpu/$(OS_FAMILY)_$(SRCARCH)/vm"; \
echo; \
echo "Src_Dirs_I = \\"; \
echo "\$$(GAMMADIR)/src/share/vm \\"; \
echo "\$$(GAMMADIR)/src/share/vm/prims \\"; \
echo "\$$(GAMMADIR)/src/cpu/$(ARCH)/vm \\"; \
echo "\$$(GAMMADIR)/src/$(HS_CLOSED_PATH)cpu/$(SRCARCH)/vm \\"; \
echo "\$$(GAMMADIR)/src/os/$(OS_FAMILY)/vm \\"; \
echo "\$$(GAMMADIR)/src/os_cpu/$(OS_FAMILY)_$(ARCH)/vm"; \
echo "\$$(GAMMADIR)/src/$(HS_CLOSED_PATH)os_cpu/$(OS_FAMILY)_$(SRCARCH)/vm"; \
[ -n "$(CFLAGS_BROWSE)" ] && \
echo && echo "CFLAGS_BROWSE = $(CFLAGS_BROWSE)"; \
[ -n "$(HOTSPOT_EXTRA_SYSDEFS)" ] && \

View File

@ -75,6 +75,11 @@ CFLAGS += -fno-rtti
CFLAGS += -fno-exceptions
CFLAGS += -D_REENTRANT
CFLAGS += -fcheck-new
# version 4 and above support fvisibility=hidden (matches jni_x86.h file)
# except 4.1.2 gives pointless warnings that can't be disabled (afaik)
ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
CFLAGS += -fvisibility=hidden
endif
ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
ARCHFLAG/i486 = -m32 -march=i586

View File

@ -262,14 +262,6 @@ SUNWprivate_1.1 {
JVM_SetField;
JVM_SetPrimitiveField;
# Needed for dropping VM into JDK 1.3.x, 1.4
_JVM_native_threads;
jdk_sem_init;
jdk_sem_post;
jdk_sem_wait;
jdk_pthread_sigmask;
jdk_waitpid;
# debug JVM
JVM_AccessVMBooleanFlag;
JVM_AccessVMIntFlag;

View File

@ -262,14 +262,6 @@ SUNWprivate_1.1 {
JVM_SetField;
JVM_SetPrimitiveField;
# Needed for dropping VM into JDK 1.3.x, 1.4
_JVM_native_threads;
jdk_sem_init;
jdk_sem_post;
jdk_sem_wait;
jdk_pthread_sigmask;
jdk_waitpid;
# miscellaneous functions
jio_fprintf;
jio_printf;

View File

@ -0,0 +1,11 @@
#
# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
# ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
#
# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
# Must also specify if CPU is big endian
CFLAGS += -DVM_BIG_ENDIAN

View File

@ -146,6 +146,8 @@ ifndef LP64
include $(GAMMADIR)/make/pic.make
endif
include $(GAMMADIR)/make/closed.make
# The non-PIC object files are only generated for 32 bit platforms.
ifdef LP64
%.o: %.cpp

View File

@ -39,6 +39,8 @@
# Instead, use "gmake" (or "gnumake") from the command line. --Rose
#MAKE = gmake
include $(GAMMADIR)/make/closed.make
TOPDIR = $(shell echo `pwd`)
GENERATED = $(TOPDIR)/../generated
VM = $(GAMMADIR)/src/share/vm
@ -57,7 +59,7 @@ Cached_plat = $(GENERATED)/platform.current
AD_Dir = $(GENERATED)/adfiles
ADLC = $(AD_Dir)/adlc
AD_Spec = $(GAMMADIR)/src/cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad
AD_Spec = $(GAMMADIR)/src/$(HS_CLOSED_PATH)cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad
AD_Src = $(GAMMADIR)/src/share/vm/adlc
AD_Names = ad_$(Platform_arch_model).hpp ad_$(Platform_arch_model).cpp
AD_Files = $(AD_Names:%=$(AD_Dir)/%)

View File

@ -121,8 +121,8 @@ LIBJVM_G = lib$(JVM)$(G_SUFFIX).so
CORE_PATHS := $(shell find $(GAMMADIR)/src/share/vm/* -type d \! \( -name adlc -o -name c1 -o -name gc_implementation -o -name opto -o -name shark -o -name libadt \))
CORE_PATHS += $(GAMMADIR)/src/os/$(Platform_os_family)/vm
CORE_PATHS += $(GAMMADIR)/src/cpu/$(Platform_arch)/vm
CORE_PATHS += $(GAMMADIR)/src/os_cpu/$(Platform_os_arch)/vm
CORE_PATHS += $(GAMMADIR)/src/$(HS_CLOSED_PATH)cpu/$(Platform_arch)/vm
CORE_PATHS += $(GAMMADIR)/src/$(HS_CLOSED_PATH)os_cpu/$(Platform_os_arch)/vm
CORE_PATHS += $(GENERATED)/jvmtifiles
COMPILER1_PATHS := $(GAMMADIR)/src/share/vm/c1

View File

@ -0,0 +1,17 @@
os_family = linux
arch = arm
arch_model = arm
os_arch = linux_arm
os_arch_model = linux_arm
lib_arch = arm
compiler = gcc
gnu_dis_arch = arm
sysdefs = -DLINUX -D_GNU_SOURCE -DARM

View File

@ -0,0 +1,17 @@
os_family = linux
arch = ppc
arch_model = ppc
os_arch = linux_ppc
os_arch_model = linux_ppc
lib_arch = ppc
compiler = gcc
gnu_dis_arch = ppc
sysdefs = -DLINUX -D_GNU_SOURCE -DPPC

View File

@ -23,8 +23,13 @@
* questions.
*/
#define JNIEXPORT
#define JNIIMPORT
#if defined(__GNUC__) && (__GNUC__ >= 4)
#define JNIEXPORT __attribute__((visibility("default")))
#define JNIIMPORT __attribute__((visibility("default")))
#else
#define JNIEXPORT
#define JNIIMPORT
#endif
#define JNICALL
typedef int jint;

View File

@ -27,10 +27,16 @@
#define _JAVASOFT_JNI_MD_H_
#if defined(SOLARIS) || defined(LINUX)
#if defined(__GNUC__) && (__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2)
#define JNIEXPORT __attribute__((visibility("default")))
#define JNIIMPORT __attribute__((visibility("default")))
#else
#define JNIEXPORT
#define JNIIMPORT
#define JNICALL
#endif
#define JNICALL
typedef int jint;
#ifdef _LP64

View File

@ -24,8 +24,14 @@
* questions.
*/
#define JNIEXPORT
#define JNIIMPORT
#if defined(__GNUC__) && (__GNUC__ >= 4)
#define JNIEXPORT __attribute__((visibility("default")))
#define JNIIMPORT __attribute__((visibility("default")))
#else
#define JNIEXPORT
#define JNIIMPORT
#endif
#define JNICALL
typedef int jint;

View File

@ -29,11 +29,6 @@
#include <signal.h>
/*
* FIXME: This is temporary hack to keep Linux Runtime.exec()
* code happy. See $JDK/src/linux/native/java/lang/UnixProcess_md.c
*/
int _JVM_native_threads = 1;
// sun.misc.Signal ///////////////////////////////////////////////////////////
// Signal code is mostly copied from classic vm, signals_md.c 1.4 98/08/23

View File

@ -39,6 +39,12 @@
#ifdef TARGET_ARCH_zero
# include "assembler_zero.inline.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "assembler_arm.inline.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "assembler_ppc.inline.hpp"
#endif
void OSThread::pd_initialize() {

View File

@ -76,6 +76,14 @@
# include "assembler_zero.inline.hpp"
# include "nativeInst_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "assembler_arm.inline.hpp"
# include "nativeInst_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "assembler_ppc.inline.hpp"
# include "nativeInst_ppc.hpp"
#endif
#ifdef COMPILER1
#include "c1/c1_Runtime1.hpp"
#endif
@ -2509,8 +2517,10 @@ char *os::scan_pages(char *start, char* end, page_info* page_expected, page_info
return end;
}
extern "C" void numa_warn(int number, char *where, ...) { }
extern "C" void numa_error(char *where) { }
// Something to do with the numa-aware allocator needs these symbols
extern "C" JNIEXPORT void numa_warn(int number, char *where, ...) { }
extern "C" JNIEXPORT void numa_error(char *where) { }
extern "C" JNIEXPORT int fork1() { return fork(); }
// If we are running with libnuma version > 2, then we should
@ -3483,7 +3493,7 @@ bool os::is_interrupted(Thread* thread, bool clear_interrupted) {
// Note that the VM will print warnings if it detects conflicting signal
// handlers, unless invoked with the option "-XX:+AllowUserSignalHandlers".
//
extern "C" int
extern "C" JNIEXPORT int
JVM_handle_linux_signal(int signo, siginfo_t* siginfo,
void* ucontext, int abort_if_unrecognized);
@ -4678,44 +4688,6 @@ void os::pause() {
}
}
extern "C" {
/**
* NOTE: the following code is to keep the green threads code
* in the libjava.so happy. Once the green threads is removed,
* these code will no longer be needed.
*/
int
jdk_waitpid(pid_t pid, int* status, int options) {
return waitpid(pid, status, options);
}
int
fork1() {
return fork();
}
int
jdk_sem_init(sem_t *sem, int pshared, unsigned int value) {
return sem_init(sem, pshared, value);
}
int
jdk_sem_post(sem_t *sem) {
return sem_post(sem);
}
int
jdk_sem_wait(sem_t *sem) {
return sem_wait(sem);
}
int
jdk_pthread_sigmask(int how , const sigset_t* newmask, sigset_t* oldmask) {
return pthread_sigmask(how , newmask, oldmask);
}
}
// Refer to the comments in os_solaris.cpp park-unpark.
//

View File

@ -39,6 +39,14 @@
# include "atomic_linux_zero.inline.hpp"
# include "orderAccess_linux_zero.inline.hpp"
#endif
#ifdef TARGET_OS_ARCH_linux_arm
# include "atomic_linux_arm.inline.hpp"
# include "orderAccess_linux_arm.inline.hpp"
#endif
#ifdef TARGET_OS_ARCH_linux_ppc
# include "atomic_linux_ppc.inline.hpp"
# include "orderAccess_linux_ppc.inline.hpp"
#endif
// System includes

View File

@ -44,6 +44,16 @@
# include "orderAccess_linux_zero.inline.hpp"
# include "prefetch_linux_zero.inline.hpp"
#endif
#ifdef TARGET_OS_ARCH_linux_arm
# include "atomic_linux_arm.inline.hpp"
# include "orderAccess_linux_arm.inline.hpp"
# include "prefetch_linux_arm.inline.hpp"
#endif
#ifdef TARGET_OS_ARCH_linux_ppc
# include "atomic_linux_ppc.inline.hpp"
# include "orderAccess_linux_ppc.inline.hpp"
# include "prefetch_linux_ppc.inline.hpp"
#endif
// Contains inlined functions for class Thread and ThreadLocalStorage

View File

@ -4221,7 +4221,9 @@ void os::os_exception_wrapper(java_call_t f, JavaValue* value, methodHandle* met
// Note that the VM will print warnings if it detects conflicting signal
// handlers, unless invoked with the option "-XX:+AllowUserSignalHandlers".
//
extern "C" int JVM_handle_solaris_signal(int signo, siginfo_t* siginfo, void* ucontext, int abort_if_unrecognized);
extern "C" JNIEXPORT int
JVM_handle_solaris_signal(int signo, siginfo_t* siginfo, void* ucontext,
int abort_if_unrecognized);
void signalHandler(int sig, siginfo_t* info, void* ucVoid) {

View File

@ -542,7 +542,7 @@ inline static bool checkICMiss(sigcontext* uc, address* pc, address* stub) {
return false;
}
extern "C" int
extern "C" JNIEXPORT int
JVM_handle_linux_signal(int sig,
siginfo_t* info,
void* ucVoid,

View File

@ -216,7 +216,7 @@ extern "C" void FetchNPFI () ;
extern "C" void FetchNResume () ;
#endif // AMD64
extern "C" int
extern "C" JNIEXPORT int
JVM_handle_linux_signal(int sig,
siginfo_t* info,
void* ucVoid,

View File

@ -116,7 +116,7 @@ frame os::fetch_frame_from_context(void* ucVoid) {
ShouldNotCallThis();
}
extern "C" int
extern "C" JNIEXPORT int
JVM_handle_linux_signal(int sig,
siginfo_t* info,
void* ucVoid,

View File

@ -317,9 +317,9 @@ extern "C" void Fetch32Resume () ;
extern "C" void FetchNPFI () ;
extern "C" void FetchNResume () ;
extern "C" int JVM_handle_solaris_signal(int signo, siginfo_t* siginfo, void* ucontext, int abort_if_unrecognized);
int JVM_handle_solaris_signal(int sig, siginfo_t* info, void* ucVoid, int abort_if_unrecognized) {
extern "C" JNIEXPORT int
JVM_handle_solaris_signal(int sig, siginfo_t* info, void* ucVoid,
int abort_if_unrecognized) {
ucontext_t* uc = (ucontext_t*) ucVoid;
Thread* t = ThreadLocalStorage::get_thread_slow();

View File

@ -365,8 +365,6 @@ bool os::is_allocatable(size_t bytes) {
}
extern "C" int JVM_handle_solaris_signal(int signo, siginfo_t* siginfo, void* ucontext, int abort_if_unrecognized);
extern "C" void Fetch32PFI () ;
extern "C" void Fetch32Resume () ;
#ifdef AMD64
@ -374,7 +372,9 @@ extern "C" void FetchNPFI () ;
extern "C" void FetchNResume () ;
#endif // AMD64
int JVM_handle_solaris_signal(int sig, siginfo_t* info, void* ucVoid, int abort_if_unrecognized) {
extern "C" JNIEXPORT int
JVM_handle_solaris_signal(int sig, siginfo_t* info, void* ucVoid,
int abort_if_unrecognized) {
ucontext_t* uc = (ucontext_t*) ucVoid;
#ifndef AMD64

View File

@ -37,6 +37,12 @@
#ifdef TARGET_ARCH_zero
# include "assembler_zero.inline.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "assembler_arm.inline.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "assembler_ppc.inline.hpp"
#endif
// Implementation of AbstractAssembler

View File

@ -43,6 +43,14 @@
# include "register_zero.hpp"
# include "vm_version_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "register_arm.hpp"
# include "vm_version_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "register_ppc.hpp"
# include "vm_version_ppc.hpp"
#endif
// This file contains platform-independent assembler declarations.
@ -395,6 +403,12 @@ class AbstractAssembler : public ResourceObj {
#ifdef TARGET_ARCH_zero
# include "assembler_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "assembler_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "assembler_ppc.hpp"
#endif
#endif // SHARE_VM_ASM_ASSEMBLER_HPP

View File

@ -566,6 +566,12 @@ class CodeBuffer: public StackObj {
#ifdef TARGET_ARCH_zero
# include "codeBuffer_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "codeBuffer_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "codeBuffer_ppc.hpp"
#endif
};

View File

@ -35,6 +35,12 @@
#ifdef TARGET_ARCH_zero
# include "register_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "register_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "register_ppc.hpp"
#endif
// set frame size and return address offset to these values in blobs
// (if the compiled frame uses ebp as link pointer on IA; otherwise,
@ -50,6 +56,12 @@ enum {
#ifdef TARGET_ARCH_sparc
# include "c1_Defs_sparc.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "c1_Defs_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "c1_Defs_ppc.hpp"
#endif
// native word offsets from memory address

View File

@ -38,6 +38,12 @@ class FpuStackSim;
#ifdef TARGET_ARCH_sparc
# include "c1_FpuStackSim_sparc.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "c1_FpuStackSim_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "c1_FpuStackSim_ppc.hpp"
#endif
#endif // SHARE_VM_C1_C1_FPUSTACKSIM_HPP

View File

@ -35,6 +35,12 @@
#ifdef TARGET_ARCH_zero
# include "vmreg_zero.inline.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "vmreg_arm.inline.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "vmreg_ppc.inline.hpp"
#endif

View File

@ -87,6 +87,12 @@ class FrameMap : public CompilationResourceObj {
#endif
#ifdef TARGET_ARCH_sparc
# include "c1_FrameMap_sparc.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "c1_FrameMap_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "c1_FrameMap_ppc.hpp"
#endif

View File

@ -316,6 +316,8 @@ class Instruction: public CompilationResourceObj {
return res;
}
static const int no_bci = -99;
enum InstructionFlag {
NeedsNullCheckFlag = 0,
CanTrapFlag,

View File

@ -42,6 +42,14 @@
# include "nativeInst_zero.hpp"
# include "vmreg_zero.inline.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "nativeInst_arm.hpp"
# include "vmreg_arm.inline.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "nativeInst_ppc.hpp"
# include "vmreg_ppc.inline.hpp"
#endif
void LIR_Assembler::patching_epilog(PatchingStub* patch, LIR_PatchCode patch_code, Register obj, CodeEmitInfo* info) {

View File

@ -252,6 +252,12 @@ class LIR_Assembler: public CompilationResourceObj {
#ifdef TARGET_ARCH_sparc
# include "c1_LIRAssembler_sparc.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "c1_LIRAssembler_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "c1_LIRAssembler_ppc.hpp"
#endif
};

View File

@ -41,6 +41,12 @@
#ifdef TARGET_ARCH_zero
# include "vmreg_zero.inline.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "vmreg_arm.inline.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "vmreg_ppc.inline.hpp"
#endif
#ifndef PRODUCT

View File

@ -972,6 +972,12 @@ class LinearScanTimers : public StackObj {
#ifdef TARGET_ARCH_sparc
# include "c1_LinearScan_sparc.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "c1_LinearScan_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "c1_LinearScan_ppc.hpp"
#endif
#endif // SHARE_VM_C1_C1_LINEARSCAN_HPP

View File

@ -35,6 +35,12 @@
#ifdef TARGET_ARCH_zero
# include "assembler_zero.inline.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "assembler_arm.inline.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "assembler_ppc.inline.hpp"
#endif
class CodeEmitInfo;
@ -61,6 +67,12 @@ class C1_MacroAssembler: public MacroAssembler {
#ifdef TARGET_ARCH_sparc
# include "c1_MacroAssembler_sparc.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "c1_MacroAssembler_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "c1_MacroAssembler_ppc.hpp"
#endif
};

View File

@ -32,6 +32,12 @@
#ifdef TARGET_ARCH_sparc
# include "c1_globals_sparc.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "c1_globals_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "c1_globals_ppc.hpp"
#endif
#ifdef TARGET_OS_FAMILY_linux
# include "c1_globals_linux.hpp"
#endif

View File

@ -35,6 +35,12 @@
#ifdef TARGET_ARCH_zero
# include "bytes_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "bytes_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "bytes_ppc.hpp"
#endif
// Input stream for reading .class file
//

View File

@ -39,6 +39,12 @@
#ifdef TARGET_ARCH_zero
# include "bytes_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "bytes_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "bytes_ppc.hpp"
#endif
class StackMapReader;

View File

@ -51,6 +51,12 @@
#ifdef TARGET_ARCH_zero
# include "bytes_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "bytes_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "bytes_ppc.hpp"
#endif
#define NOFAILOVER_MAJOR_VERSION 51

View File

@ -48,6 +48,12 @@
#ifdef TARGET_ARCH_zero
# include "nativeInst_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "nativeInst_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "nativeInst_ppc.hpp"
#endif
#ifdef COMPILER1
#include "c1/c1_Runtime1.hpp"
#endif

View File

@ -38,6 +38,12 @@
#ifdef TARGET_ARCH_zero
# include "nativeInst_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "nativeInst_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "nativeInst_ppc.hpp"
#endif
//-----------------------------------------------------------------------------
// The CompiledIC represents a compiled inline cache.

View File

@ -46,6 +46,12 @@
#ifdef TARGET_ARCH_zero
# include "assembler_zero.inline.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "assembler_arm.inline.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "assembler_ppc.inline.hpp"
#endif
DEF_STUB_INTERFACE(ICStub);

View File

@ -34,6 +34,7 @@
#include "interpreter/bytecode.hpp"
#include "oops/methodDataOop.hpp"
#include "prims/jvmtiRedefineClassesTrace.hpp"
#include "prims/jvmtiImpl.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/sweeper.hpp"
#include "utilities/dtrace.hpp"
@ -1533,7 +1534,10 @@ void nmethod::post_compiled_method_load_event() {
}
if (JvmtiExport::should_post_compiled_method_load()) {
JvmtiExport::post_compiled_method_load(this);
// Let the Service thread (which is a real Java thread) post the event
MutexLockerEx ml(Service_lock, Mutex::_no_safepoint_check_flag);
JvmtiDeferredEventQueue::enqueue(
JvmtiDeferredEvent::compiled_method_load_event(this));
}
}
@ -1566,8 +1570,17 @@ void nmethod::post_compiled_method_unload() {
// ref will have been cleared.
if (_jmethod_id != NULL && JvmtiExport::should_post_compiled_method_unload()) {
assert(!unload_reported(), "already unloaded");
HandleMark hm;
JvmtiExport::post_compiled_method_unload(_jmethod_id, insts_begin());
JvmtiDeferredEvent event =
JvmtiDeferredEvent::compiled_method_unload_event(
_jmethod_id, insts_begin());
if (SafepointSynchronize::is_at_safepoint()) {
// Don't want to take the queueing lock. Add it as pending and
// it will get enqueued later.
JvmtiDeferredEventQueue::add_pending_event(event);
} else {
MutexLockerEx ml(Service_lock, Mutex::_no_safepoint_check_flag);
JvmtiDeferredEventQueue::enqueue(event);
}
}
// The JVMTI CompiledMethodUnload event can be enabled or disabled at

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2011, 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
@ -696,10 +696,11 @@ public:
class nmethodLocker : public StackObj {
nmethod* _nm;
public:
static void lock_nmethod(nmethod* nm); // note: nm can be NULL
static void unlock_nmethod(nmethod* nm); // (ditto)
public:
nmethodLocker(address pc); // derive nm from pc
nmethodLocker(nmethod *nm) { _nm = nm; lock_nmethod(_nm); }
nmethodLocker() { _nm = NULL; }

View File

@ -41,6 +41,14 @@
# include "assembler_zero.inline.hpp"
# include "nativeInst_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "assembler_arm.inline.hpp"
# include "nativeInst_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "assembler_ppc.inline.hpp"
# include "nativeInst_ppc.hpp"
#endif
const RelocationHolder RelocationHolder::none; // its type is relocInfo::none

View File

@ -429,6 +429,12 @@ class relocInfo VALUE_OBJ_CLASS_SPEC {
#endif
#ifdef TARGET_ARCH_zero
# include "relocInfo_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "relocInfo_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "relocInfo_ppc.hpp"
#endif

View File

@ -36,6 +36,12 @@
#ifdef TARGET_ARCH_zero
# include "register_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "register_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "register_ppc.hpp"
#endif
#ifdef COMPILER2
#include "opto/adlcVMDeps.hpp"
#include "utilities/ostream.hpp"
@ -51,6 +57,12 @@
#ifdef TARGET_ARCH_MODEL_zero
# include "adfiles/adGlobals_zero.hpp"
#endif
#ifdef TARGET_ARCH_MODEL_arm
# include "adfiles/adGlobals_arm.hpp"
#endif
#ifdef TARGET_ARCH_MODEL_ppc
# include "adfiles/adGlobals_ppc.hpp"
#endif
#endif
//------------------------------VMReg------------------------------------------
@ -164,6 +176,12 @@ public:
#ifdef TARGET_ARCH_zero
# include "vmreg_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "vmreg_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "vmreg_ppc.hpp"
#endif
};

View File

@ -41,6 +41,12 @@
#ifdef TARGET_ARCH_zero
# include "depChecker_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "depChecker_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "depChecker_ppc.hpp"
#endif
#ifdef SHARK
#include "shark/sharkEntry.hpp"
#endif

View File

@ -69,6 +69,12 @@ class Disassembler {
#endif
#ifdef TARGET_ARCH_zero
# include "disassembler_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "disassembler_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "disassembler_ppc.hpp"
#endif

View File

@ -41,6 +41,12 @@
#ifdef TARGET_ARCH_MODEL_zero
# include "interp_masm_zero.hpp"
#endif
#ifdef TARGET_ARCH_MODEL_arm
# include "interp_masm_arm.hpp"
#endif
#ifdef TARGET_ARCH_MODEL_ppc
# include "interp_masm_ppc.hpp"
#endif
#ifdef TARGET_OS_FAMILY_linux
# include "thread_linux.inline.hpp"
#endif

View File

@ -37,6 +37,12 @@
#ifdef TARGET_ARCH_zero
# include "bytes_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "bytes_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "bytes_ppc.hpp"
#endif
class ciBytecodeStream;

View File

@ -59,6 +59,12 @@
#ifdef TARGET_OS_ARCH_windows_x86
# include "orderAccess_windows_x86.inline.hpp"
#endif
#ifdef TARGET_OS_ARCH_linux_arm
# include "orderAccess_linux_arm.inline.hpp"
#endif
#ifdef TARGET_OS_ARCH_linux_ppc
# include "orderAccess_linux_ppc.inline.hpp"
#endif
// no precompiled headers

View File

@ -41,6 +41,12 @@
#ifdef TARGET_ARCH_zero
# include "bytes_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "bytes_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "bytes_ppc.hpp"
#endif
#ifdef CC_INTERP
@ -587,6 +593,12 @@ void print();
#ifdef TARGET_ARCH_zero
# include "bytecodeInterpreter_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "bytecodeInterpreter_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "bytecodeInterpreter_ppc.hpp"
#endif
}; // BytecodeInterpreter

View File

@ -52,6 +52,12 @@
#ifdef TARGET_ARCH_zero
# include "bytecodeInterpreter_zero.inline.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "bytecodeInterpreter_arm.inline.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "bytecodeInterpreter_ppc.inline.hpp"
#endif
#endif // CC_INTERP

View File

@ -37,6 +37,12 @@
#ifdef TARGET_ARCH_zero
# include "bytes_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "bytes_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "bytes_ppc.hpp"
#endif
// A BytecodeStream is used for fast iteration over the bytecodes
// of a methodOop.

View File

@ -35,6 +35,12 @@
#ifdef TARGET_ARCH_zero
# include "bytes_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "bytes_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "bytes_ppc.hpp"
#endif
#if defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER < 1600))

View File

@ -293,6 +293,12 @@ class Bytecodes: AllStatic {
#endif
#ifdef TARGET_ARCH_zero
# include "bytecodes_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "bytecodes_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "bytecodes_ppc.hpp"
#endif

View File

@ -90,6 +90,12 @@ class CppInterpreter: public AbstractInterpreter {
#ifdef TARGET_ARCH_zero
# include "cppInterpreter_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "cppInterpreter_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "cppInterpreter_ppc.hpp"
#endif
};

View File

@ -53,6 +53,12 @@ class CppInterpreterGenerator: public AbstractInterpreterGenerator {
#ifdef TARGET_ARCH_zero
# include "cppInterpreterGenerator_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "cppInterpreterGenerator_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "cppInterpreterGenerator_ppc.hpp"
#endif
};

View File

@ -152,6 +152,12 @@ class Interpreter: public CC_INTERP_ONLY(CppInterpreter) NOT_CC_INTERP(TemplateI
#ifdef TARGET_ARCH_zero
# include "interpreter_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "interpreter_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "interpreter_ppc.hpp"
#endif
};

View File

@ -50,6 +50,12 @@ InterpreterGenerator(StubQueue* _code);
#ifdef TARGET_ARCH_zero
# include "interpreterGenerator_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "interpreterGenerator_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "interpreterGenerator_ppc.hpp"
#endif
};

View File

@ -65,6 +65,12 @@
#ifdef TARGET_ARCH_zero
# include "vm_version_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "vm_version_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "vm_version_ppc.hpp"
#endif
#ifdef COMPILER2
#include "opto/runtime.hpp"
#endif
@ -1178,9 +1184,7 @@ void SignatureHandlerLibrary::add(methodHandle method) {
handler_index = _fingerprints->length() - 1;
}
}
} else {
CHECK_UNHANDLED_OOPS_ONLY(Thread::current()->clear_unhandled_oops());
}
// Set handler under SignatureHandlerLibrary_lock
if (handler_index < 0) {
// use generic signature handler
method->set_signature_handler(Interpreter::slow_signature_handler());
@ -1188,21 +1192,29 @@ void SignatureHandlerLibrary::add(methodHandle method) {
// set handler
method->set_signature_handler(_handlers->at(handler_index));
}
} else {
CHECK_UNHANDLED_OOPS_ONLY(Thread::current()->clear_unhandled_oops());
// use generic signature handler
method->set_signature_handler(Interpreter::slow_signature_handler());
}
}
#ifdef ASSERT
int handler_index, fingerprint_index;
int handler_index = -1;
int fingerprint_index = -2;
{
// '_handlers' and '_fingerprints' are 'GrowableArray's and are NOT synchronized
// in any way if accessed from multiple threads. To avoid races with another
// thread which may change the arrays in the above, mutex protected block, we
// have to protect this read access here with the same mutex as well!
MutexLocker mu(SignatureHandlerLibrary_lock);
if (_handlers != NULL) {
handler_index = _handlers->find(method->signature_handler());
fingerprint_index = _fingerprints->find(Fingerprinter(method).fingerprint());
}
}
assert(method->signature_handler() == Interpreter::slow_signature_handler() ||
handler_index == fingerprint_index, "sanity check");
#endif
#endif // ASSERT
}

View File

@ -156,6 +156,12 @@ class InterpreterRuntime: AllStatic {
#endif
#ifdef TARGET_ARCH_zero
# include "interpreterRT_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "interpreterRT_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "interpreterRT_ppc.hpp"
#endif

View File

@ -192,6 +192,12 @@ class TemplateInterpreter: public AbstractInterpreter {
#ifdef TARGET_ARCH_zero
# include "templateInterpreter_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "templateInterpreter_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "templateInterpreter_ppc.hpp"
#endif
};

View File

@ -96,6 +96,12 @@ class TemplateInterpreterGenerator: public AbstractInterpreterGenerator {
#ifdef TARGET_ARCH_zero
# include "templateInterpreterGenerator_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "templateInterpreterGenerator_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "templateInterpreterGenerator_ppc.hpp"
#endif
};

View File

@ -40,6 +40,12 @@
#ifdef TARGET_ARCH_MODEL_zero
# include "interp_masm_zero.hpp"
#endif
#ifdef TARGET_ARCH_MODEL_arm
# include "interp_masm_arm.hpp"
#endif
#ifdef TARGET_ARCH_MODEL_ppc
# include "interp_masm_ppc.hpp"
#endif
#ifndef CC_INTERP
// All the necessary definitions used for (bytecode) template generation. Instead of
@ -364,6 +370,12 @@ class TemplateTable: AllStatic {
#ifdef TARGET_ARCH_MODEL_zero
# include "templateTable_zero.hpp"
#endif
#ifdef TARGET_ARCH_MODEL_arm
# include "templateTable_arm.hpp"
#endif
#ifdef TARGET_ARCH_MODEL_ppc
# include "templateTable_ppc.hpp"
#endif
};
#endif /* !CC_INTERP */

View File

@ -39,6 +39,12 @@
#ifdef TARGET_ARCH_zero
# include "bytes_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "bytes_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "bytes_ppc.hpp"
#endif
// A constantPool is an array containing class constants as described in the
// class file.

View File

@ -52,6 +52,12 @@
#ifdef TARGET_ARCH_zero
# include "bytes_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "bytes_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "bytes_ppc.hpp"
#endif
// Implementation of all inlined member functions defined in oop.hpp
// We need a separate file to avoid circular references

View File

@ -45,6 +45,12 @@
#ifdef TARGET_OS_ARCH_windows_x86
# include "orderAccess_windows_x86.inline.hpp"
#endif
#ifdef TARGET_OS_ARCH_linux_arm
# include "orderAccess_linux_arm.inline.hpp"
#endif
#ifdef TARGET_OS_ARCH_linux_ppc
# include "orderAccess_linux_ppc.inline.hpp"
#endif
// A typeArrayOop is an array containing basic types (non oop elements).
// It is used for arrays of {characters, singles, doubles, bytes, shorts, integers, longs}

View File

@ -41,6 +41,12 @@
#ifdef TARGET_ARCH_zero
# include "vmreg_zero.inline.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "vmreg_arm.inline.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "vmreg_ppc.inline.hpp"
#endif
// The functions in this file builds OopMaps after all scheduling is done.
//

View File

@ -32,6 +32,9 @@
#ifdef TARGET_ARCH_sparc
# include "c2_globals_sparc.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "c2_globals_arm.hpp"
#endif
#ifdef TARGET_OS_FAMILY_linux
# include "c2_globals_linux.hpp"
#endif

View File

@ -37,6 +37,12 @@
#ifdef TARGET_ARCH_MODEL_zero
# include "adfiles/ad_zero.hpp"
#endif
#ifdef TARGET_ARCH_MODEL_arm
# include "adfiles/ad_arm.hpp"
#endif
#ifdef TARGET_ARCH_MODEL_ppc
# include "adfiles/ad_ppc.hpp"
#endif
volatile int C2Compiler::_runtimes = uninitialized;

View File

@ -74,6 +74,12 @@
#ifdef TARGET_ARCH_MODEL_zero
# include "adfiles/ad_zero.hpp"
#endif
#ifdef TARGET_ARCH_MODEL_arm
# include "adfiles/ad_arm.hpp"
#endif
#ifdef TARGET_ARCH_MODEL_ppc
# include "adfiles/ad_ppc.hpp"
#endif
// -------------------- Compile::mach_constant_base_node -----------------------

View File

@ -47,6 +47,12 @@
#ifdef TARGET_ARCH_MODEL_zero
# include "adfiles/ad_zero.hpp"
#endif
#ifdef TARGET_ARCH_MODEL_arm
# include "adfiles/ad_arm.hpp"
#endif
#ifdef TARGET_ARCH_MODEL_ppc
# include "adfiles/ad_ppc.hpp"
#endif
// Portions of code courtesy of Clifford Click

View File

@ -40,6 +40,12 @@
#ifdef TARGET_ARCH_MODEL_zero
# include "adfiles/ad_zero.hpp"
#endif
#ifdef TARGET_ARCH_MODEL_arm
# include "adfiles/ad_arm.hpp"
#endif
#ifdef TARGET_ARCH_MODEL_ppc
# include "adfiles/ad_ppc.hpp"
#endif
//------------------------------BoxLockNode------------------------------------
class BoxLockNode : public Node {

View File

@ -39,6 +39,12 @@
#ifdef TARGET_ARCH_MODEL_zero
# include "adfiles/ad_zero.hpp"
#endif
#ifdef TARGET_ARCH_MODEL_arm
# include "adfiles/ad_arm.hpp"
#endif
#ifdef TARGET_ARCH_MODEL_ppc
# include "adfiles/ad_ppc.hpp"
#endif
class Arena;
class Bundle;

View File

@ -37,6 +37,12 @@
#ifdef TARGET_ARCH_MODEL_zero
# include "adfiles/ad_zero.hpp"
#endif
#ifdef TARGET_ARCH_MODEL_arm
# include "adfiles/ad_arm.hpp"
#endif
#ifdef TARGET_ARCH_MODEL_ppc
# include "adfiles/ad_ppc.hpp"
#endif
#define RM_SIZE _RM_SIZE /* a constant private to the class RegMask */

View File

@ -40,6 +40,12 @@
#ifdef TARGET_ARCH_MODEL_zero
# include "adfiles/adGlobals_zero.hpp"
#endif
#ifdef TARGET_ARCH_MODEL_arm
# include "adfiles/adGlobals_arm.hpp"
#endif
#ifdef TARGET_ARCH_MODEL_ppc
# include "adfiles/adGlobals_ppc.hpp"
#endif
// Some fun naming (textual) substitutions:
//

View File

@ -80,6 +80,12 @@
#ifdef TARGET_ARCH_MODEL_zero
# include "adfiles/ad_zero.hpp"
#endif
#ifdef TARGET_ARCH_MODEL_arm
# include "adfiles/ad_arm.hpp"
#endif
#ifdef TARGET_ARCH_MODEL_ppc
# include "adfiles/ad_ppc.hpp"
#endif
// For debugging purposes:

View File

@ -520,6 +520,7 @@ static void forte_fill_call_trace_given_top(JavaThread* thd,
// method_id - jmethodID of the method being executed
extern "C" {
JNIEXPORT
void AsyncGetCallTrace(ASGCT_CallTrace *trace, jint depth, void* ucontext) {
// This is if'd out because we no longer use thread suspension.

View File

@ -45,6 +45,12 @@
#ifdef TARGET_ARCH_zero
# include "jniTypes_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "jniTypes_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "jniTypes_ppc.hpp"
#endif
// Heap objects are allowed to be directly referenced only in VM code,

View File

@ -33,6 +33,12 @@
#ifdef TARGET_ARCH_zero
# include "jni_zero.h"
#endif
#ifdef TARGET_ARCH_arm
# include "jni_arm.h"
#endif
#ifdef TARGET_ARCH_ppc
# include "jni_ppc.h"
#endif
/*

View File

@ -2585,7 +2585,7 @@ int jio_vfprintf(FILE* f, const char *fmt, va_list args) {
}
int jio_printf(const char *fmt, ...) {
JNIEXPORT int jio_printf(const char *fmt, ...) {
int len;
va_list args;
va_start(args, fmt);

View File

@ -1417,16 +1417,16 @@ JVM_GetHostName(char* name, int namelen);
* BE CAREFUL! The following functions do not implement the
* full feature set of standard C printf formats.
*/
int
JNIEXPORT int
jio_vsnprintf(char *str, size_t count, const char *fmt, va_list args);
int
JNIEXPORT int
jio_snprintf(char *str, size_t count, const char *fmt, ...);
int
JNIEXPORT int
jio_fprintf(FILE *, const char *fmt, ...);
int
JNIEXPORT int
jio_vfprintf(FILE *, const char *fmt, va_list args);

View File

@ -36,6 +36,12 @@
#ifdef TARGET_ARCH_zero
# include "bytes_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "bytes_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "bytes_ppc.hpp"
#endif
// FIXME: add Deprecated, LVT, LVTT attributes
// FIXME: fix Synthetic attribute
// FIXME: per Serguei, add error return handling for constantPoolOopDesc::copy_cpool_bytes()

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2011, 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
@ -750,15 +750,12 @@ public:
// pending CompiledMethodUnload support
//
bool JvmtiExport::_have_pending_compiled_method_unload_events;
GrowableArray<jmethodID>* JvmtiExport::_pending_compiled_method_unload_method_ids;
GrowableArray<const void *>* JvmtiExport::_pending_compiled_method_unload_code_begins;
JavaThread* JvmtiExport::_current_poster;
void JvmtiExport::post_compiled_method_unload_internal(JavaThread* self, jmethodID method, const void *code_begin) {
void JvmtiExport::post_compiled_method_unload(
jmethodID method, const void *code_begin) {
JavaThread* thread = JavaThread::current();
EVT_TRIG_TRACE(JVMTI_EVENT_COMPILED_METHOD_UNLOAD,
("JVMTI [%s] method compile unload event triggered",
JvmtiTrace::safe_get_thread_name(self)));
JvmtiTrace::safe_get_thread_name(thread)));
// post the event for each environment that has this event enabled.
JvmtiEnvIterator it;
@ -767,12 +764,12 @@ void JvmtiExport::post_compiled_method_unload_internal(JavaThread* self, jmethod
EVT_TRACE(JVMTI_EVENT_COMPILED_METHOD_UNLOAD,
("JVMTI [%s] class compile method unload event sent jmethodID " PTR_FORMAT,
JvmtiTrace::safe_get_thread_name(self), method));
JvmtiTrace::safe_get_thread_name(thread), method));
ResourceMark rm(self);
ResourceMark rm(thread);
JvmtiEventMark jem(self);
JvmtiJavaThreadEventTransition jet(self);
JvmtiEventMark jem(thread);
JvmtiJavaThreadEventTransition jet(thread);
jvmtiEventCompiledMethodUnload callback = env->callbacks()->CompiledMethodUnload;
if (callback != NULL) {
(*callback)(env->jvmti_external(), method, code_begin);
@ -781,90 +778,6 @@ void JvmtiExport::post_compiled_method_unload_internal(JavaThread* self, jmethod
}
}
// post any pending CompiledMethodUnload events
void JvmtiExport::post_pending_compiled_method_unload_events() {
JavaThread* self = JavaThread::current();
assert(!self->owns_locks(), "can't hold locks");
// Indicates if this is the first activiation of this function.
// In theory the profiler's callback could call back into VM and provoke
// another CompiledMethodLoad event to be posted from this thread. As the
// stack rewinds we need to ensure that the original activation does the
// completion and notifies any waiters.
bool first_activation = false;
// the jmethodID (may not be valid) to be used for a single event
jmethodID method;
const void *code_begin;
// grab the monitor and check if another thread is already posting
// events. If there is another thread posting events then we wait
// until it completes. (In theory we could check the pending events to
// see if any of the addresses overlap with the event that we want to
// post but as it will happen so rarely we just block any thread waiting
// to post a CompiledMethodLoad or DynamicCodeGenerated event until all
// pending CompiledMethodUnload events have been posted).
//
// If another thread isn't posting we examine the list of pending jmethodIDs.
// If the list is empty then we are done. If it's not empty then this thread
// (self) becomes the pending event poster and we remove the top (last)
// event from the list. Note that this means we remove the newest event first
// but as they are all CompiledMethodUnload events the order doesn't matter.
// Once we have removed a jmethodID then we exit the monitor. Any other thread
// wanting to post a CompiledMethodLoad or DynamicCodeGenerated event will
// be forced to wait on the monitor.
{
MutexLocker mu(JvmtiPendingEvent_lock);
if (_current_poster != self) {
while (_current_poster != NULL) {
JvmtiPendingEvent_lock->wait();
}
}
if ((_pending_compiled_method_unload_method_ids == NULL) ||
(_pending_compiled_method_unload_method_ids->length() == 0)) {
return;
}
if (_current_poster == NULL) {
_current_poster = self;
first_activation = true;
} else {
// re-entrant
guarantee(_current_poster == self, "checking");
}
method = _pending_compiled_method_unload_method_ids->pop();
code_begin = _pending_compiled_method_unload_code_begins->pop();
}
// This thread is the pending event poster so it first posts the CompiledMethodUnload
// event for the jmethodID that has been removed from the list. Once posted it
// re-grabs the monitor and checks the list again. If the list is empty then and this
// is the first activation of the function then we reset the _have_pending_events
// flag, cleanup _current_poster to indicate that no thread is now servicing the
// pending events list, and finally notify any thread that might be waiting.
for (;;) {
post_compiled_method_unload_internal(self, method, code_begin);
// event posted, now re-grab monitor and get the next event
// If there's no next event then we are done. If this is the first
// activiation of this function by this thread notify any waiters
// so that they can post.
{
MutexLocker ml(JvmtiPendingEvent_lock);
if (_pending_compiled_method_unload_method_ids->length() == 0) {
if (first_activation) {
_have_pending_compiled_method_unload_events = false;
_current_poster = NULL;
JvmtiPendingEvent_lock->notify_all();
}
return;
}
method = _pending_compiled_method_unload_method_ids->pop();
code_begin = _pending_compiled_method_unload_code_begins->pop();
}
}
}
///////////////////////////////////////////////////////////////
//
// JvmtiExport
@ -1830,16 +1743,7 @@ jvmtiCompiledMethodLoadInlineRecord* create_inline_record(nmethod* nm) {
}
void JvmtiExport::post_compiled_method_load(nmethod *nm) {
// If there are pending CompiledMethodUnload events then these are
// posted before this CompiledMethodLoad event. We "lock" the nmethod and
// maintain a handle to the methodOop to ensure that the nmethod isn't
// flushed or unloaded while posting the events.
JavaThread* thread = JavaThread::current();
if (have_pending_compiled_method_unload_events()) {
methodHandle mh(thread, nm->method());
nmethodLocker nml(nm);
post_pending_compiled_method_unload_events();
}
EVT_TRIG_TRACE(JVMTI_EVENT_COMPILED_METHOD_LOAD,
("JVMTI [%s] method compile load event triggered",
@ -1854,8 +1758,8 @@ void JvmtiExport::post_compiled_method_load(nmethod *nm) {
JvmtiTrace::safe_get_thread_name(thread),
(nm->method() == NULL) ? "NULL" : nm->method()->klass_name()->as_C_string(),
(nm->method() == NULL) ? "NULL" : nm->method()->name()->as_C_string()));
ResourceMark rm(thread);
HandleMark hm(thread);
// Add inlining information
jvmtiCompiledMethodLoadInlineRecord* inlinerecord = create_inline_record(nm);
@ -1899,28 +1803,6 @@ void JvmtiExport::post_compiled_method_load(JvmtiEnv* env, const jmethodID metho
}
}
// used at a safepoint to post a CompiledMethodUnload event
void JvmtiExport::post_compiled_method_unload(jmethodID mid, const void *code_begin) {
if (SafepointSynchronize::is_at_safepoint()) {
// Class unloading can cause nmethod unloading which is reported
// by the VMThread. These must be batched to be processed later.
if (_pending_compiled_method_unload_method_ids == NULL) {
// create list lazily
_pending_compiled_method_unload_method_ids = new (ResourceObj::C_HEAP) GrowableArray<jmethodID>(10,true);
_pending_compiled_method_unload_code_begins = new (ResourceObj::C_HEAP) GrowableArray<const void *>(10,true);
}
_pending_compiled_method_unload_method_ids->append(mid);
_pending_compiled_method_unload_code_begins->append(code_begin);
_have_pending_compiled_method_unload_events = true;
} else {
// Unloading caused by the sweeper can be reported synchronously.
if (have_pending_compiled_method_unload_events()) {
post_pending_compiled_method_unload_events();
}
post_compiled_method_unload_internal(JavaThread::current(), mid, code_begin);
}
}
void JvmtiExport::post_dynamic_code_generated_internal(const char *name, const void *code_begin, const void *code_end) {
JavaThread* thread = JavaThread::current();
EVT_TRIG_TRACE(JVMTI_EVENT_DYNAMIC_CODE_GENERATED,
@ -1953,9 +1835,9 @@ void JvmtiExport::post_dynamic_code_generated(const char *name, const void *code
return;
}
if (have_pending_compiled_method_unload_events()) {
post_pending_compiled_method_unload_events();
}
// Blocks until everything now in the queue has been posted
JvmtiDeferredEventQueue::flush_queue(Thread::current());
post_dynamic_code_generated_internal(name, code_begin, code_end);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2011, 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
@ -141,25 +141,6 @@ class JvmtiExport : public AllStatic {
private:
// CompiledMethodUnload events are reported from the VM thread so they
// are collected in lists (of jmethodID/addresses) and the events are posted later
// from threads posting CompieldMethodLoad or DynamicCodeGenerated events.
static bool _have_pending_compiled_method_unload_events;
static GrowableArray<jmethodID>* _pending_compiled_method_unload_method_ids;
static GrowableArray<const void *>* _pending_compiled_method_unload_code_begins;
static JavaThread* _current_poster;
// tests if there are CompiledMethodUnload events pending
inline static bool have_pending_compiled_method_unload_events() {
return _have_pending_compiled_method_unload_events;
}
// posts any pending CompiledMethodUnload events.
static void post_pending_compiled_method_unload_events();
// Perform the actual notification to interested JvmtiEnvs.
static void post_compiled_method_unload_internal(JavaThread* self, jmethodID mid, const void* code_begin);
// posts a DynamicCodeGenerated event (internal/private implementation).
// The public post_dynamic_code_generated* functions make use of the
// internal implementation.
@ -256,7 +237,7 @@ class JvmtiExport : public AllStatic {
// single stepping management methods
static void at_single_stepping_point(JavaThread *thread, methodOop method, address location) KERNEL_RETURN;
static void expose_single_stepping(JavaThread *thread) KERNEL_RETURN;
static bool hide_single_stepping(JavaThread *thread) KERNEL_RETURN_(return false;);
static bool hide_single_stepping(JavaThread *thread) KERNEL_RETURN_(false);
// Methods that notify the debugger that something interesting has happened in the VM.
static void post_vm_start ();
@ -271,20 +252,20 @@ class JvmtiExport : public AllStatic {
static oop jni_GetField_probe (JavaThread *thread, jobject jobj,
oop obj, klassOop klass, jfieldID fieldID, bool is_static)
KERNEL_RETURN_(return NULL;);
KERNEL_RETURN_(NULL);
static oop jni_GetField_probe_nh (JavaThread *thread, jobject jobj,
oop obj, klassOop klass, jfieldID fieldID, bool is_static)
KERNEL_RETURN_(return NULL;);
KERNEL_RETURN_(NULL);
static void post_field_access_by_jni (JavaThread *thread, oop obj,
klassOop klass, jfieldID fieldID, bool is_static) KERNEL_RETURN;
static void post_field_access (JavaThread *thread, methodOop method,
address location, KlassHandle field_klass, Handle object, jfieldID field) KERNEL_RETURN;
static oop jni_SetField_probe (JavaThread *thread, jobject jobj,
oop obj, klassOop klass, jfieldID fieldID, bool is_static, char sig_type,
jvalue *value) KERNEL_RETURN_(return NULL;);
jvalue *value) KERNEL_RETURN_(NULL);
static oop jni_SetField_probe_nh (JavaThread *thread, jobject jobj,
oop obj, klassOop klass, jfieldID fieldID, bool is_static, char sig_type,
jvalue *value) KERNEL_RETURN_(return NULL;);
jvalue *value) KERNEL_RETURN_(NULL);
static void post_field_modification_by_jni(JavaThread *thread, oop obj,
klassOop klass, jfieldID fieldID, bool is_static, char sig_type,
jvalue *value);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2011, 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
@ -32,11 +32,13 @@
#include "prims/jvmtiEventController.inline.hpp"
#include "prims/jvmtiImpl.hpp"
#include "prims/jvmtiRedefineClasses.hpp"
#include "runtime/atomic.hpp"
#include "runtime/deoptimization.hpp"
#include "runtime/handles.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/interfaceSupport.hpp"
#include "runtime/javaCalls.hpp"
#include "runtime/serviceThread.hpp"
#include "runtime/signature.hpp"
#include "runtime/vframe.hpp"
#include "runtime/vframe_hp.hpp"
@ -910,3 +912,207 @@ void JvmtiSuspendControl::print() {
tty->print_cr("]");
#endif
}
#ifndef KERNEL
JvmtiDeferredEvent JvmtiDeferredEvent::compiled_method_load_event(
nmethod* nm) {
JvmtiDeferredEvent event = JvmtiDeferredEvent(TYPE_COMPILED_METHOD_LOAD);
event.set_compiled_method_load(nm);
nmethodLocker::lock_nmethod(nm); // will be unlocked when posted
return event;
}
JvmtiDeferredEvent JvmtiDeferredEvent::compiled_method_unload_event(
jmethodID id, const void* code) {
JvmtiDeferredEvent event = JvmtiDeferredEvent(TYPE_COMPILED_METHOD_UNLOAD);
event.set_compiled_method_unload(id, code);
return event;
}
void JvmtiDeferredEvent::post() {
switch(_type) {
case TYPE_COMPILED_METHOD_LOAD:
JvmtiExport::post_compiled_method_load(compiled_method_load());
nmethodLocker::unlock_nmethod(compiled_method_load());
break;
case TYPE_COMPILED_METHOD_UNLOAD:
JvmtiExport::post_compiled_method_unload(
compiled_method_unload_method_id(),
compiled_method_unload_code_begin());
break;
case TYPE_FLUSH:
JvmtiDeferredEventQueue::flush_complete(flush_state_addr());
break;
default:
ShouldNotReachHere();
}
}
JvmtiDeferredEventQueue::QueueNode* JvmtiDeferredEventQueue::_queue_tail = NULL;
JvmtiDeferredEventQueue::QueueNode* JvmtiDeferredEventQueue::_queue_head = NULL;
volatile JvmtiDeferredEventQueue::QueueNode*
JvmtiDeferredEventQueue::_pending_list = NULL;
bool JvmtiDeferredEventQueue::has_events() {
assert(Service_lock->owned_by_self(), "Must own Service_lock");
return _queue_head != NULL || _pending_list != NULL;
}
void JvmtiDeferredEventQueue::enqueue(const JvmtiDeferredEvent& event) {
assert(Service_lock->owned_by_self(), "Must own Service_lock");
process_pending_events();
// Events get added to the end of the queue (and are pulled off the front).
QueueNode* node = new QueueNode(event);
if (_queue_tail == NULL) {
_queue_tail = _queue_head = node;
} else {
assert(_queue_tail->next() == NULL, "Must be the last element in the list");
_queue_tail->set_next(node);
_queue_tail = node;
}
Service_lock->notify_all();
assert((_queue_head == NULL) == (_queue_tail == NULL),
"Inconsistent queue markers");
}
JvmtiDeferredEvent JvmtiDeferredEventQueue::dequeue() {
assert(Service_lock->owned_by_self(), "Must own Service_lock");
process_pending_events();
assert(_queue_head != NULL, "Nothing to dequeue");
if (_queue_head == NULL) {
// Just in case this happens in product; it shouldn't but let's not crash
return JvmtiDeferredEvent();
}
QueueNode* node = _queue_head;
_queue_head = _queue_head->next();
if (_queue_head == NULL) {
_queue_tail = NULL;
}
assert((_queue_head == NULL) == (_queue_tail == NULL),
"Inconsistent queue markers");
JvmtiDeferredEvent event = node->event();
delete node;
return event;
}
void JvmtiDeferredEventQueue::add_pending_event(
const JvmtiDeferredEvent& event) {
QueueNode* node = new QueueNode(event);
bool success = false;
QueueNode* prev_value = (QueueNode*)_pending_list;
do {
node->set_next(prev_value);
prev_value = (QueueNode*)Atomic::cmpxchg_ptr(
(void*)node, (volatile void*)&_pending_list, (void*)node->next());
} while (prev_value != node->next());
}
// This method transfers any events that were added by someone NOT holding
// the lock into the mainline queue.
void JvmtiDeferredEventQueue::process_pending_events() {
assert(Service_lock->owned_by_self(), "Must own Service_lock");
if (_pending_list != NULL) {
QueueNode* head =
(QueueNode*)Atomic::xchg_ptr(NULL, (volatile void*)&_pending_list);
assert((_queue_head == NULL) == (_queue_tail == NULL),
"Inconsistent queue markers");
if (head != NULL) {
// Since we've treated the pending list as a stack (with newer
// events at the beginning), we need to join the bottom of the stack
// with the 'tail' of the queue in order to get the events in the
// right order. We do this by reversing the pending list and appending
// it to the queue.
QueueNode* new_tail = head;
QueueNode* new_head = NULL;
// This reverses the list
QueueNode* prev = new_tail;
QueueNode* node = new_tail->next();
new_tail->set_next(NULL);
while (node != NULL) {
QueueNode* next = node->next();
node->set_next(prev);
prev = node;
node = next;
}
new_head = prev;
// Now append the new list to the queue
if (_queue_tail != NULL) {
_queue_tail->set_next(new_head);
} else { // _queue_head == NULL
_queue_head = new_head;
}
_queue_tail = new_tail;
}
}
}
enum {
// Random - used for debugging
FLUSHING = 0x50403020,
FLUSHED = 0x09080706
};
void JvmtiDeferredEventQueue::flush_queue(Thread* thread) {
volatile int flush_state = FLUSHING;
JvmtiDeferredEvent flush(JvmtiDeferredEvent::TYPE_FLUSH);
flush.set_flush_state_addr((int*)&flush_state);
if (ServiceThread::is_service_thread(thread)) {
// If we are the service thread we have to post all preceding events
// Use the flush event as a token to indicate when we can stop
JvmtiDeferredEvent event;
{
MutexLockerEx ml(Service_lock, Mutex::_no_safepoint_check_flag);
enqueue(flush);
event = dequeue();
}
while (!event.is_flush_event() ||
event.flush_state_addr() != &flush_state) {
event.post();
{
MutexLockerEx ml(Service_lock, Mutex::_no_safepoint_check_flag);
event = dequeue();
}
}
} else {
// Wake up the service thread so it will process events. When it gets
// to the flush event it will set 'flush_complete' and notify us.
MutexLockerEx ml(Service_lock, Mutex::_no_safepoint_check_flag);
enqueue(flush);
while (flush_state != FLUSHED) {
assert(flush_state == FLUSHING || flush_state == FLUSHED,
"only valid values for this");
Service_lock->wait(Mutex::_no_safepoint_check_flag);
}
}
}
void JvmtiDeferredEventQueue::flush_complete(int* state_addr) {
assert(state_addr != NULL && *state_addr == FLUSHING, "must be");
MutexLockerEx ml(Service_lock, Mutex::_no_safepoint_check_flag);
*state_addr = FLUSHED;
Service_lock->notify_all();
}
#endif // ndef KERNEL

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2011, 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
@ -433,6 +433,149 @@ public:
#endif // !JVMTI_KERNEL
/**
* When a thread (such as the compiler thread or VM thread) cannot post a
* JVMTI event itself because the event needs to be posted from a Java
* thread, then it can defer the event to the Service thread for posting.
* The information needed to post the event is encapsulated into this class
* and then enqueued onto the JvmtiDeferredEventQueue, where the Service
* thread will pick it up and post it.
*
* This is currently only used for posting compiled-method-load and unload
* events, which we don't want posted from the compiler thread.
*/
class JvmtiDeferredEvent VALUE_OBJ_CLASS_SPEC {
friend class JvmtiDeferredEventQueue;
private:
typedef enum {
TYPE_NONE,
TYPE_COMPILED_METHOD_LOAD,
TYPE_COMPILED_METHOD_UNLOAD,
TYPE_FLUSH // pseudo-event used to implement flush_queue()
} Type;
Type _type;
union {
nmethod* compiled_method_load;
struct {
jmethodID method_id;
const void* code_begin;
} compiled_method_unload;
int* flush_state_addr;
} _event_data;
JvmtiDeferredEvent(Type t) : _type(t) {}
void set_compiled_method_load(nmethod* nm) {
assert(_type == TYPE_COMPILED_METHOD_LOAD, "must be");
_event_data.compiled_method_load = nm;
}
nmethod* compiled_method_load() const {
assert(_type == TYPE_COMPILED_METHOD_LOAD, "must be");
return _event_data.compiled_method_load;
}
void set_compiled_method_unload(jmethodID id, const void* code) {
assert(_type == TYPE_COMPILED_METHOD_UNLOAD, "must be");
_event_data.compiled_method_unload.method_id = id;
_event_data.compiled_method_unload.code_begin = code;
}
jmethodID compiled_method_unload_method_id() const {
assert(_type == TYPE_COMPILED_METHOD_UNLOAD, "must be");
return _event_data.compiled_method_unload.method_id;
}
const void* compiled_method_unload_code_begin() const {
assert(_type == TYPE_COMPILED_METHOD_UNLOAD, "must be");
return _event_data.compiled_method_unload.code_begin;
}
bool is_flush_event() const { return _type == TYPE_FLUSH; }
int* flush_state_addr() const {
assert(is_flush_event(), "must be");
return _event_data.flush_state_addr;
}
void set_flush_state_addr(int* flag) {
assert(is_flush_event(), "must be");
_event_data.flush_state_addr = flag;
}
public:
JvmtiDeferredEvent() : _type(TYPE_NONE) {}
// Factory methods
static JvmtiDeferredEvent compiled_method_load_event(nmethod* nm)
KERNEL_RETURN_(JvmtiDeferredEvent());
static JvmtiDeferredEvent compiled_method_unload_event(
jmethodID id, const void* code) KERNEL_RETURN_(JvmtiDeferredEvent());
// Actually posts the event.
void post() KERNEL_RETURN;
};
/**
* Events enqueued on this queue wake up the Service thread which dequeues
* and posts the events. The Service_lock is required to be held
* when operating on the queue (except for the "pending" events).
*/
class JvmtiDeferredEventQueue : AllStatic {
friend class JvmtiDeferredEvent;
private:
class QueueNode : public CHeapObj {
private:
JvmtiDeferredEvent _event;
QueueNode* _next;
public:
QueueNode(const JvmtiDeferredEvent& event)
: _event(event), _next(NULL) {}
const JvmtiDeferredEvent& event() const { return _event; }
QueueNode* next() const { return _next; }
void set_next(QueueNode* next) { _next = next; }
};
static QueueNode* _queue_head; // Hold Service_lock to access
static QueueNode* _queue_tail; // Hold Service_lock to access
static volatile QueueNode* _pending_list; // Uses CAS for read/update
// Transfers events from the _pending_list to the _queue.
static void process_pending_events() KERNEL_RETURN;
static void flush_complete(int* flush_state) KERNEL_RETURN;
public:
// Must be holding Service_lock when calling these
static bool has_events() KERNEL_RETURN_(false);
static void enqueue(const JvmtiDeferredEvent& event) KERNEL_RETURN;
static JvmtiDeferredEvent dequeue() KERNEL_RETURN_(JvmtiDeferredEvent());
// This call blocks until all events enqueued prior to this call
// have been posted. The Service_lock is acquired and waited upon.
//
// Implemented by creating a "flush" event and placing it in the queue.
// When the flush event is "posted" it will call flush_complete(), which
// will release the caller.
//
// Can be called by any thread (maybe even the service thread itself).
// Not necessary for the caller to be a JavaThread.
static void flush_queue(Thread* current) KERNEL_RETURN;
// Used to enqueue events without using a lock, for times (such as during
// safepoint) when we can't or don't want to lock the Service_lock.
//
// Events will be held off to the side until there's a call to
// dequeue(), enqueue(), or process_pending_events() (all of which require
// the holding of the Service_lock), and will be enqueued at that time.
static void add_pending_event(const JvmtiDeferredEvent&) KERNEL_RETURN;
};
// Utility macro that checks for NULL pointers:
#define NULL_CHECK(X, Y) if ((X) == NULL) { return (Y); }

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