提交 86ea1380 编写于 作者: D dcubed

Merge

#
# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -133,8 +133,10 @@ $(GENERATEDFILES): refresh_adfiles
# Note that product files are updated via "mv", which is atomic.
TEMPDIR := $(OUTDIR)/mktmp$(shell echo $$$$)
# Debuggable by default
CFLAGS += -g
ifneq ($(DEBUG_BINARIES), true)
# Debuggable by default (unless already done by DEBUG_BINARIES)
CFLAGS += -g
endif
# Pass -D flags into ADLC.
ADLCFLAGS += $(SYSDEFS)
......
......@@ -215,47 +215,46 @@ AOUT_FLAGS += -Xlinker -export-dynamic
#------------------------------------------------------------------------
# Debug flags
# Use the stabs format for debugging information (this is the default
# on gcc-2.91). It's good enough, has all the information about line
# numbers and local variables, and libjvm_g.so is only about 16M.
# Change this back to "-g" if you want the most expressive format.
# (warning: that could easily inflate libjvm_g.so to 150M!)
# Note: The Itanium gcc compiler crashes when using -gstabs.
DEBUG_CFLAGS/ia64 = -g
DEBUG_CFLAGS/amd64 = -g
DEBUG_CFLAGS/arm = -g
DEBUG_CFLAGS/ppc = -g
DEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH))
ifeq ($(DEBUG_CFLAGS/$(BUILDARCH)),)
DEBUG_CFLAGS += -gstabs
endif
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
FASTDEBUG_CFLAGS/ia64 = -g
FASTDEBUG_CFLAGS/amd64 = -g
FASTDEBUG_CFLAGS/arm = -g
FASTDEBUG_CFLAGS/ppc = -g
FASTDEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH))
ifeq ($(FASTDEBUG_CFLAGS/$(BUILDARCH)),)
FASTDEBUG_CFLAGS += -gstabs
# DEBUG_BINARIES uses full -g debug information for all configs
ifeq ($(DEBUG_BINARIES), true)
CFLAGS += -g
else
# Use the stabs format for debugging information (this is the default
# on gcc-2.91). It's good enough, has all the information about line
# numbers and local variables, and libjvm_g.so is only about 16M.
# Change this back to "-g" if you want the most expressive format.
# (warning: that could easily inflate libjvm_g.so to 150M!)
# Note: The Itanium gcc compiler crashes when using -gstabs.
DEBUG_CFLAGS/ia64 = -g
DEBUG_CFLAGS/amd64 = -g
DEBUG_CFLAGS/arm = -g
DEBUG_CFLAGS/ppc = -g
DEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH))
ifeq ($(DEBUG_CFLAGS/$(BUILDARCH)),)
DEBUG_CFLAGS += -gstabs
endif
OPT_CFLAGS/ia64 = -g
OPT_CFLAGS/amd64 = -g
OPT_CFLAGS/arm = -g
OPT_CFLAGS/ppc = -g
OPT_CFLAGS += $(OPT_CFLAGS/$(BUILDARCH))
ifeq ($(OPT_CFLAGS/$(BUILDARCH)),)
OPT_CFLAGS += -gstabs
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
FASTDEBUG_CFLAGS/ia64 = -g
FASTDEBUG_CFLAGS/amd64 = -g
FASTDEBUG_CFLAGS/arm = -g
FASTDEBUG_CFLAGS/ppc = -g
FASTDEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH))
ifeq ($(FASTDEBUG_CFLAGS/$(BUILDARCH)),)
FASTDEBUG_CFLAGS += -gstabs
endif
OPT_CFLAGS/ia64 = -g
OPT_CFLAGS/amd64 = -g
OPT_CFLAGS/arm = -g
OPT_CFLAGS/ppc = -g
OPT_CFLAGS += $(OPT_CFLAGS/$(BUILDARCH))
ifeq ($(OPT_CFLAGS/$(BUILDARCH)),)
OPT_CFLAGS += -gstabs
endif
endif
endif
# DEBUG_BINARIES overrides everything, use full -g debug information
ifeq ($(DEBUG_BINARIES), true)
DEBUG_CFLAGS = -g
CFLAGS += $(DEBUG_CFLAGS)
endif
# If we are building HEADLESS, pass on to VM
# so it can set the java.awt.headless property
ifdef HEADLESS
......
......@@ -188,14 +188,22 @@ ifdef COOKED_BUILD_NUMBER
MAKE_ARGS += JDK_BUILD_NUMBER=$(COOKED_BUILD_NUMBER)
endif
NMAKE= MAKEFLAGS= MFLAGS= nmake /NOLOGO
NMAKE= MAKEFLAGS= MFLAGS= nmake -NOLOGO
ifndef SYSTEM_UNAME
SYSTEM_UNAME := $(shell uname)
export SYSTEM_UNAME
endif
# Check for CYGWIN
ifneq (,$(findstring CYGWIN,$(shell uname)))
ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME)))
USING_CYGWIN=true
else
USING_CYGWIN=false
endif
# Check for MinGW
ifneq (,$(findstring MINGW,$(SYSTEM_UNAME)))
USING_MINGW=true
endif
# FIXUP: The subdirectory for a debug build is NOT the same on all platforms
VM_DEBUG=debug
......@@ -208,11 +216,16 @@ ifeq ($(USING_CYGWIN), true)
ABS_BOOTDIR := $(subst /,\\,$(shell /bin/cygpath -m -a "$(BOOTDIR)"))
ABS_GAMMADIR := $(subst /,\\,$(shell /bin/cygpath -m -a "$(GAMMADIR)"))
ABS_OS_MAKEFILE := $(shell /bin/cygpath -m -a "$(HS_MAKE_DIR)/$(OSNAME)")/build.make
else
ABS_OUTPUTDIR := $(subst /,\\,$(shell $(CD) $(OUTPUTDIR);$(PWD)))
ABS_BOOTDIR := $(subst /,\\,$(shell $(CD) $(BOOTDIR);$(PWD)))
ABS_GAMMADIR := $(subst /,\\,$(shell $(CD) $(GAMMADIR);$(PWD)))
ABS_OS_MAKEFILE := $(subst /,\\,$(shell $(CD) $(HS_MAKE_DIR)/$(OSNAME);$(PWD))/build.make)
else ifeq ($(USING_MINGW), true)
ABS_OUTPUTDIR := $(shell $(CD) $(OUTPUTDIR);$(PWD))
ABS_BOOTDIR := $(shell $(CD) $(BOOTDIR);$(PWD))
ABS_GAMMADIR := $(shell $(CD) $(GAMMADIR);$(PWD))
ABS_OS_MAKEFILE := $(shell $(CD) $(HS_MAKE_DIR)/$(OSNAME);$(PWD))/build.make
else
ABS_OUTPUTDIR := $(subst /,\\,$(shell $(CD) $(OUTPUTDIR);$(PWD)))
ABS_BOOTDIR := $(subst /,\\,$(shell $(CD) $(BOOTDIR);$(PWD)))
ABS_GAMMADIR := $(subst /,\\,$(shell $(CD) $(GAMMADIR);$(PWD)))
ABS_OS_MAKEFILE := $(subst /,\\,$(shell $(CD) $(HS_MAKE_DIR)/$(OSNAME);$(PWD))/build.make)
endif
# Disable building SA on windows until we are sure
......
......@@ -23,14 +23,15 @@
#
# These are the commands used externally to compile and run.
# The \ are used here for traditional Windows apps and " quoted to get
# past the Unix-like shell:
!ifdef BootStrapDir
RUN_JAVA=$(BootStrapDir)\bin\java
RUN_JAVAP=$(BootStrapDir)\bin\javap
RUN_JAVAH=$(BootStrapDir)\bin\javah
RUN_JAR=$(BootStrapDir)\bin\jar
COMPILE_JAVAC=$(BootStrapDir)\bin\javac $(BOOTSTRAP_JAVAC_FLAGS)
COMPILE_RMIC=$(BootStrapDir)\bin\rmic
RUN_JAVA="$(BootStrapDir)\bin\java"
RUN_JAVAP="$(BootStrapDir)\bin\javap"
RUN_JAVAH="$(BootStrapDir)\bin\javah"
RUN_JAR="$(BootStrapDir)\bin\jar"
COMPILE_JAVAC="$(BootStrapDir)\bin\javac" $(BOOTSTRAP_JAVAC_FLAGS)
COMPILE_RMIC="$(BootStrapDir)\bin\rmic"
BOOT_JAVA_HOME=$(BootStrapDir)
!else
RUN_JAVA=java
......
......@@ -36,37 +36,37 @@ checkAndBuildSA::
!include $(WorkSpace)/make/windows/makefiles/rules.make
!include $(WorkSpace)/make/sa.files
GENERATED = ..\generated
GENERATED = ../generated
# tools.jar is needed by the JDI - SA binding
SA_CLASSPATH = $(BOOT_JAVA_HOME)\lib\tools.jar
SA_CLASSPATH = $(BOOT_JAVA_HOME)/lib/tools.jar
SA_CLASSDIR = $(GENERATED)\saclasses
SA_CLASSDIR = $(GENERATED)/saclasses
SA_BUILD_VERSION_PROP = sun.jvm.hotspot.runtime.VM.saBuildVersion=$(SA_BUILD_VERSION)
SA_PROPERTIES = $(SA_CLASSDIR)\sa.properties
SA_PROPERTIES = $(SA_CLASSDIR)/sa.properties
default:: $(GENERATED)\sa-jdi.jar
default:: $(GENERATED)/sa-jdi.jar
# Remove the space between $(SA_BUILD_VERSION_PROP) and > below as it adds a white space
# at the end of SA version string and causes a version mismatch with the target VM version.
$(GENERATED)\sa-jdi.jar: $(AGENT_FILES:/=\)
@if not exist $(SA_CLASSDIR) mkdir $(SA_CLASSDIR)
@echo ...Building sa-jdi.jar
$(GENERATED)/sa-jdi.jar: $(AGENT_FILES)
$(QUIETLY) mkdir -p $(SA_CLASSDIR)
@echo ...Building sa-jdi.jar into $(SA_CLASSDIR)
@echo ...$(COMPILE_JAVAC) -classpath $(SA_CLASSPATH) -d $(SA_CLASSDIR) ....
@$(COMPILE_JAVAC) -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES:/=\)
@$(COMPILE_JAVAC) -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES)
$(COMPILE_RMIC) -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
$(QUIETLY) echo $(SA_BUILD_VERSION_PROP)> $(SA_PROPERTIES)
$(QUIETLY) rm -f $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql/sa.js
$(QUIETLY) cp $(AGENT_SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql
$(QUIETLY) rm -rf $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources
$(QUIETLY) mkdir $(SA_CLASSDIR)\sun\jvm\hotspot\ui\resources
$(QUIETLY) mkdir $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources
$(QUIETLY) cp $(AGENT_SRC_DIR)/sun/jvm/hotspot/ui/resources/*.png $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources
$(QUIETLY) cp -r $(AGENT_SRC_DIR)/images/* $(SA_CLASSDIR)
$(RUN_JAR) cf $@ -C $(SA_CLASSDIR) .
$(RUN_JAR) uf $@ -C $(AGENT_SRC_DIR:/=\) META-INF\services\com.sun.jdi.connect.Connector
$(RUN_JAR) uf $@ -C $(AGENT_SRC_DIR) META-INF/services/com.sun.jdi.connect.Connector
$(RUN_JAVAH) -classpath $(SA_CLASSDIR) -jni sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal
$(RUN_JAVAH) -classpath $(SA_CLASSDIR) -jni sun.jvm.hotspot.debugger.x86.X86ThreadContext
$(RUN_JAVAH) -classpath $(SA_CLASSDIR) -jni sun.jvm.hotspot.debugger.ia64.IA64ThreadContext
......@@ -85,27 +85,27 @@ checkAndBuildSA:: $(SAWINDBG)
# will be useful to have the assertion checks in place
!if "$(BUILDARCH)" == "ia64"
SA_CFLAGS = /nologo $(MS_RUNTIME_OPTION) /W3 $(GX_OPTION) /Od /D "WIN32" /D "WIN64" /D "_WINDOWS" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
SA_CFLAGS = -nologo $(MS_RUNTIME_OPTION) -W3 $(GX_OPTION) -Od -D "WIN32" -D "WIN64" -D "_WINDOWS" -D "_DEBUG" -D "_CONSOLE" -D "_MBCS" -YX -FD -c
!elseif "$(BUILDARCH)" == "amd64"
SA_CFLAGS = /nologo $(MS_RUNTIME_OPTION) /W3 $(GX_OPTION) /Od /D "WIN32" /D "WIN64" /D "_WINDOWS" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
SA_CFLAGS = -nologo $(MS_RUNTIME_OPTION) -W3 $(GX_OPTION) -Od -D "WIN32" -D "WIN64" -D "_WINDOWS" -D "_DEBUG" -D "_CONSOLE" -D "_MBCS" -YX -FD -c
!if "$(COMPILER_NAME)" == "VS2005"
# On amd64, VS2005 compiler requires bufferoverflowU.lib on the link command line,
# otherwise we get missing __security_check_cookie externals at link time.
SA_LD_FLAGS = bufferoverflowU.lib
!endif
!else
SA_CFLAGS = /nologo $(MS_RUNTIME_OPTION) /W3 /Gm $(GX_OPTION) /Od /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
SA_CFLAGS = -nologo $(MS_RUNTIME_OPTION) -W3 -Gm $(GX_OPTION) -Od -D "WIN32" -D "_WINDOWS" -D "_DEBUG" -D "_CONSOLE" -D "_MBCS" -YX -FD -GZ -c
!if "$(ENABLE_FULL_DEBUG_SYMBOLS)" == "1"
SA_CFLAGS = $(SA_CFLAGS) /ZI
SA_CFLAGS = $(SA_CFLAGS) -ZI
!endif
!endif
!if "$(MT)" != ""
SA_LD_FLAGS = /manifest $(SA_LD_FLAGS)
SA_LD_FLAGS = -manifest $(SA_LD_FLAGS)
!endif
SASRCFILE = $(AGENT_DIR)/src/os/win32/windbg/sawindbg.cpp
SA_LFLAGS = $(SA_LD_FLAGS) /nologo /subsystem:console /machine:$(MACHINE)
SA_LFLAGS = $(SA_LD_FLAGS) -nologo -subsystem:console -machine:$(MACHINE)
!if "$(ENABLE_FULL_DEBUG_SYMBOLS)" == "1"
SA_LFLAGS = $(SA_LFLAGS) /map /debug
SA_LFLAGS = $(SA_LFLAGS) -map -debug
!endif
# Note that we do not keep sawindbj.obj around as it would then
......@@ -117,15 +117,15 @@ SA_LFLAGS = $(SA_LFLAGS) /map /debug
$(SAWINDBG): $(SASRCFILE)
set INCLUDE=$(SA_INCLUDE)$(INCLUDE)
$(CXX) @<<
/I"$(BootStrapDir)/include" /I"$(BootStrapDir)/include/win32"
/I"$(GENERATED)" $(SA_CFLAGS)
-I"$(BootStrapDir)/include" -I"$(BootStrapDir)/include/win32"
-I"$(GENERATED)" $(SA_CFLAGS)
$(SASRCFILE)
/out:$*.obj
-out:$*.obj
<<
set LIB=$(SA_LIB)$(LIB)
$(LD) /out:$@ /DLL $*.obj dbgeng.lib $(SA_LFLAGS)
$(LD) -out:$@ -DLL $*.obj dbgeng.lib $(SA_LFLAGS)
!if "$(MT)" != ""
$(MT) /manifest $(@F).manifest /outputresource:$(@F);#2
$(MT) -manifest $(@F).manifest -outputresource:$(@F);#2
!endif
!if "$(ENABLE_FULL_DEBUG_SYMBOLS)" == "1"
!if "$(ZIP_DEBUGINFO_FILES)" == "1"
......@@ -136,6 +136,6 @@ $(SAWINDBG): $(SASRCFILE)
-@rm -f $*.obj
cleanall :
rm -rf $(GENERATED:\=/)/saclasses
rm -rf $(GENERATED:\=/)/sa-jdi.jar
rm -rf $(GENERATED)/saclasses
rm -rf $(GENERATED)/sa-jdi.jar
!endif
......@@ -36,11 +36,12 @@ CXX=cl.exe
!ifdef SUBDIRS
# \ is used below because $(MAKE) is nmake here, which expects Windows paths
$(SUBDIRS): FORCE
@if not exist $@ mkdir $@
@if not exist $@\local.make echo # Empty > $@\local.make
@echo nmake $(ACTION) in $(DIR)\$@
cd $@ && $(MAKE) /NOLOGO /f $(WorkSpace)\make\windows\makefiles\$@.make $(ACTION) DIR=$(DIR)\$@ BUILD_FLAVOR=$(BUILD_FLAVOR)
@if not exist $@/local.make echo # Empty > $@/local.make
@echo nmake $(ACTION) in $(DIR)/$@
cd $@ && $(MAKE) -NOLOGO -f $(WorkSpace)\make\windows\makefiles\$@.make $(ACTION) DIR=$(DIR)\$@ BUILD_FLAVOR=$(BUILD_FLAVOR)
!endif
# Creates the needed directory
......
......@@ -344,7 +344,7 @@ void MemSnapshot::promote() {
// due to platform dependent behaviors. On some platforms, we see uncommit/release
// native thread stack, but some, we don't.
if (!cur_vm->is_uncommit_record() && !cur_vm->is_deallocation_record()) {
ShouldNotReachHere();
fatal(err_msg("Should not reach here, pointer flags = [%x]", cur_vm->flags()));
}
#endif
}
......
......@@ -63,13 +63,13 @@ class MemPointerIterator : public MemPointerArrayIteratorImpl {
MemPointer* p1 = (MemPointer*)ptr;
MemPointer* p2 = (MemPointer*)_array->at(_pos - 1);
assert(!is_dup_pointer(p1, p2),
"dup pointer");
err_msg("duplicated pointer, flag = [%x]", (unsigned int)((MemPointerRecord*)p1)->flags()));
}
if (_pos < _array->length() -1) {
MemPointer* p1 = (MemPointer*)ptr;
MemPointer* p2 = (MemPointer*)_array->at(_pos + 1);
assert(!is_dup_pointer(p1, p2),
"dup pointer");
err_msg("duplicated pointer, flag = [%x]", (unsigned int)((MemPointerRecord*)p1)->flags()));
}
return _array->insert_at(ptr, _pos);
}
......@@ -79,14 +79,14 @@ class MemPointerIterator : public MemPointerArrayIteratorImpl {
MemPointer* p1 = (MemPointer*)ptr;
MemPointer* p2 = (MemPointer*)_array->at(_pos - 1);
assert(!is_dup_pointer(p1, p2),
"dup pointer");
err_msg("duplicated pointer, flag = [%x]", (unsigned int)((MemPointerRecord*)p1)->flags()));
}
if (_pos < _array->length() - 1) {
MemPointer* p1 = (MemPointer*)ptr;
MemPointer* p2 = (MemPointer*)_array->at(_pos + 1);
assert(!is_dup_pointer(p1, p2),
"dup pointer");
err_msg("duplicated pointer, flag = [%x]", (unsigned int)((MemPointerRecord*)p1)->flags()));
}
if (_array->insert_at(ptr, _pos + 1)) {
_pos ++;
......
......@@ -99,9 +99,11 @@ void MemTrackWorker::run() {
}
if (rec != NULL) {
// merge the recorder into staging area
bool result = snapshot->merge(rec);
assert(result, "merge failed");
debug_only(_merge_count ++;)
if (!snapshot->merge(rec)) {
MemTracker::shutdown(MemTracker::NMT_out_of_memory);
} else {
NOT_PRODUCT(_merge_count ++;)
}
MemTracker::release_thread_recorder(rec);
} else {
// no more recorder to merge, promote staging area
......@@ -129,7 +131,7 @@ void MemTrackWorker::run() {
}
assert(MemTracker::shutdown_in_progress(), "just check");
// transites to final shutdown
// transits to final shutdown
MemTracker::final_shutdown();
}
......
......@@ -184,7 +184,6 @@ class MemTracker : AllStatic {
// record a 'malloc' call
static inline void record_malloc(address addr, size_t size, MEMFLAGS flags,
address pc = 0, Thread* thread = NULL) {
assert(is_on(), "check by caller");
if (NMT_CAN_TRACK(flags)) {
create_memory_record(addr, (flags|MemPointerRecord::malloc_tag()), size, pc, thread);
}
......@@ -285,7 +284,6 @@ class MemTracker : AllStatic {
// retrieve global snapshot
static MemSnapshot* get_snapshot() {
assert(is_on(), "native memory tracking is off");
if (shutdown_in_progress()) {
return NULL;
}
......
......@@ -21,7 +21,7 @@ fi
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
SunOS | Linux )
SunOS | Linux | Darwin )
NULL=/dev/null
PS=":"
FS="/"
......
......@@ -9,7 +9,7 @@
## skip on windows
OS=`uname -s`
case "$OS" in
SunOS | Linux )
SunOS | Linux | Darwin )
NULL=/dev/null
PS=":"
FS="/"
......
......@@ -49,7 +49,7 @@ fi
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
SunOS | Linux )
SunOS | Linux | Darwin )
NULL=/dev/null
PS=":"
FS="/"
......
......@@ -28,7 +28,7 @@ fi
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
SunOS | Linux )
SunOS | Linux | Darwin )
NULL=/dev/null
PS=":"
FS="/"
......
......@@ -27,17 +27,10 @@ case "$OS" in
PS=":"
FS="/"
;;
SunOS | Windows_* | *BSD)
NULL=NUL
PS=";"
FS="\\"
* )
echo "Test passed; only valid for Linux"
exit 0;
;;
* )
echo "Unrecognized system!"
exit 1;
;;
esac
# Choose arch: i386 or amd64 (test is Linux-specific)
......
......@@ -43,7 +43,7 @@ fi
OS=`uname -s`
case "$OS" in
SunOS | Linux )
SunOS | Linux | Darwin )
FS="/"
;;
Windows_* )
......
......@@ -37,7 +37,7 @@ fi
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
SunOS | Linux )
SunOS | Linux | Darwin )
FS="/"
RM=/bin/rm
CP=/bin/cp
......
......@@ -46,7 +46,7 @@ fi
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
SunOS | Linux )
SunOS | Linux | Darwin )
NULL=/dev/null
PS=":"
FS="/"
......@@ -67,13 +67,13 @@ CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH
THIS_DIR=`pwd`
${TESTJAVA}${FS}bin${FS}java -fullversion
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -fullversion
${TESTJAVA}${FS}bin${FS}javac -d . ${TESTSRC}${FS}InternTest.java
cp ${TESTSRC}${FS}badstrings.txt .
${TESTJAVA}${FS}bin${FS}java -XX:+PrintStringTableStatistics -XX:+TraceSafepointCleanupTime InternTest bad > test.out 2>&1 &
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -XX:+PrintStringTableStatistics -XX:+TraceSafepointCleanupTime InternTest bad > test.out 2>&1 &
C_PID=$!
sleep 60
......
......@@ -21,7 +21,7 @@ fi
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
SunOS | Linux )
SunOS | Linux | Darwin)
NULL=/dev/null
PS=":"
FS="/"
......@@ -52,30 +52,7 @@ ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -fullversion
${TESTJAVA}${FS}bin${FS}javac -classpath .${PS}$TESTJAVA${FS}lib${FS}tools.jar *.java
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -classpath .${PS}$TESTJAVA${FS}lib${FS}tools.jar FieldMonitor > test.out 2>&1 &
P_PID=$!
sleep 60
STATUS=0
case "$OS" in
SunOS | Linux )
ps -ef | grep $P_PID | grep -v grep > ${NULL}
if [ $? = 0 ]; then
kill -9 $P_PID
STATUS=1
fi
;;
* )
ps | grep -i "FieldMonitor" | grep -v grep > ${NULL}
if [ $? = 0 ]; then
C_PID=`ps | grep -i "FieldMonitor" | awk '{print $1}'`
kill -s 9 $C_PID
STATUS=1
fi
;;
esac
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -classpath .${PS}$TESTJAVA${FS}lib${FS}tools.jar FieldMonitor > test.out
grep "A fatal error has been detected" test.out > ${NULL}
if [ $? = 0 ]; then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册