This commit is contained in:
Alejandro Murillo 2016-04-11 14:21:24 -07:00
commit 4e7243481c
5 changed files with 69 additions and 60 deletions

View File

@ -1,5 +1,5 @@
# #
# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -311,13 +311,13 @@ my.build.flavors.hotspot= \
# Platforms built for hotspot push jobs # Platforms built for hotspot push jobs
my.build.targets.hotspot= \ my.build.targets.hotspot= \
solaris_sparcv9_5.11-{product|fastdebug}, \ solaris_sparcv9_5.11-{product|fastdebug}, \
solaris_x64_5.11-{product|fastdebug}, \ solaris_x64_5.11-{product|fastdebug}, \
linux_i586_3.8-{product|fastdebug}, \ linux_i586_3.8-{product|fastdebug}, \
linux_x64_3.8-{product|fastdebug}, \ linux_x64_3.8-{product|fastdebug}, \
macosx_x64_10.9-{product|fastdebug}, \ macosx_x64_10.9-{product|fastdebug}, \
windows_i586_6.3-{product|fastdebug}, \ windows_i586_6.3-{product|fastdebug}, \
windows_x64_6.3-{product|fastdebug}, \ windows_x64_6.3-{product|fastdebug}, \
solaris_x64_5.11-{fastdebugOpen}, \ solaris_x64_5.11-{fastdebugOpen}, \
linux_x64_3.8-{productOpen}, \ linux_x64_3.8-{productOpen}, \
${my.additional.build.targets.hotspot} ${my.additional.build.targets.hotspot}
@ -346,18 +346,15 @@ my.test.targets.hotspot.solaris.x64= \
solaris_x64_5.11-{product|fastdebug}-c2-GCBasher_G1 solaris_x64_5.11-{product|fastdebug}-c2-GCBasher_G1
my.test.targets.hotspot.linux.i586= \ my.test.targets.hotspot.linux.i586= \
linux_i586_3.8-{product|fastdebug}-{c1|c2}-jvm98, \ linux_i586_3.8-{product|fastdebug}-c2-jvm98, \
linux_i586_3.8-{product|fastdebug}-c2-jvm98_nontiered, \ linux_i586_3.8-{product|fastdebug}-c2-jvm98_nontiered, \
linux_i586_3.8-{product|fastdebug}-{c1|c2}-scimark, \ linux_i586_3.8-{product|fastdebug}-c2-scimark, \
linux_i586_3.8-product-c1-runThese8_Xcomp_lang, \
linux_i586_3.8-product-c1-runThese8_Xcomp_vm, \
linux_i586_3.8-fastdebug-c1-runThese8_Xshare, \
linux_i586_3.8-fastdebug-c2-runThese8_Xcomp_lang, \ linux_i586_3.8-fastdebug-c2-runThese8_Xcomp_lang, \
linux_i586_3.8-fastdebug-c2-runThese8_Xcomp_vm, \ linux_i586_3.8-fastdebug-c2-runThese8_Xcomp_vm, \
linux_i586_3.8-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \ linux_i586_3.8-{product|fastdebug}-c2-GCBasher_SerialGC, \
linux_i586_3.8-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \ linux_i586_3.8-{product|fastdebug}-c2-GCBasher_ParallelGC, \
linux_i586_3.8-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \ linux_i586_3.8-{product|fastdebug}-c2-GCBasher_CMS, \
linux_i586_3.8-{product|fastdebug}-{c1|c2}-GCBasher_G1 linux_i586_3.8-{product|fastdebug}-c2-GCBasher_G1
my.test.targets.hotspot.linux.x64= \ my.test.targets.hotspot.linux.x64= \
linux_x64_3.8-{product|fastdebug}-c2-jvm98, \ linux_x64_3.8-{product|fastdebug}-c2-jvm98, \
@ -378,17 +375,16 @@ my.test.targets.hotspot.macosx.x64= \
macosx_x64_10.9-{product|fastdebug}-c2-GCBasher_G1 macosx_x64_10.9-{product|fastdebug}-c2-GCBasher_G1
my.test.targets.hotspot.windows.i586= \ my.test.targets.hotspot.windows.i586= \
windows_i586_6.3-{product|fastdebug}-{c1|c2}-jvm98, \ windows_i586_6.3-{product|fastdebug}-c2-jvm98, \
windows_i586_6.3-{product|fastdebug}-c2-jvm98_nontiered, \ windows_i586_6.3-{product|fastdebug}-c2-jvm98_nontiered, \
windows_i586_6.3-{product|fastdebug}-{c1|c2}-scimark, \ windows_i586_6.3-{product|fastdebug}-c2-scimark, \
windows_i586_6.3-product-{c1|c2}-runThese8, \ windows_i586_6.3-product-c2-runThese8, \
windows_i586_6.3-product-{c1|c2}-runThese8_Xcomp_lang, \ windows_i586_6.3-product-c2-runThese8_Xcomp_lang, \
windows_i586_6.3-product-{c1|c2}-runThese8_Xcomp_vm, \ windows_i586_6.3-product-c2-runThese8_Xcomp_vm, \
windows_i586_6.3-fastdebug-c1-runThese8_Xshare, \ windows_i586_6.3-{product|fastdebug}-c2-GCBasher_SerialGC, \
windows_i586_6.3-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \ windows_i586_6.3-{product|fastdebug}-c2-GCBasher_ParallelGC, \
windows_i586_6.3-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \ windows_i586_6.3-{product|fastdebug}-c2-GCBasher_CMS, \
windows_i586_6.3-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \ windows_i586_6.3-{product|fastdebug}-c2-GCBasher_G1
windows_i586_6.3-{product|fastdebug}-{c1|c2}-GCBasher_G1
my.test.targets.hotspot.windows.x64= \ my.test.targets.hotspot.windows.x64= \
windows_x64_6.3-{product|fastdebug}-c2-jvm98, \ windows_x64_6.3-{product|fastdebug}-c2-jvm98, \
@ -443,22 +439,21 @@ my.make.rule.test.targets.hotspot.reg.group= \
linux_x64_3.8-fastdebug-c2-GROUP, \ linux_x64_3.8-fastdebug-c2-GROUP, \
macosx_x64_10.9-fastdebug-c2-GROUP, \ macosx_x64_10.9-fastdebug-c2-GROUP, \
windows_i586_6.3-fastdebug-c2-GROUP, \ windows_i586_6.3-fastdebug-c2-GROUP, \
windows_x64_6.3-fastdebug-c2-GROUP, \ windows_x64_6.3-fastdebug-c2-GROUP
linux_i586_3.8-fastdebug-c1-GROUP, \
windows_i586_6.3-fastdebug-c1-GROUP
# Hotspot jtreg tests # Hotspot jtreg tests
my.make.rule.test.targets.hotspot.reg= \ my.make.rule.test.targets.hotspot.reg= \
${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_compiler_1}, \ ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_compiler_1}, \
${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_compiler_2}, \ ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_compiler_2}, \
${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_compiler_3}, \ ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_compiler_3}, \
${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_compiler_closed}, \ ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_compiler_closed}, \
${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_gc}, \ ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_gc_1}, \
${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_gc_closed}, \ ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_gc_2}, \
${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_gc_gcold}, \ ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_gc_closed}, \
${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_runtime}, \ ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_gc_gcold}, \
${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_serviceability}, \ ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_runtime}, \
${my.make.rule.test.targets.hotspot.reg.group:GROUP=jdk_svc_sanity}, \ ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_serviceability}, \
${my.make.rule.test.targets.hotspot.reg.group:GROUP=jdk_svc_sanity}, \
${my.additional.make.rule.test.targets.hotspot.reg} ${my.additional.make.rule.test.targets.hotspot.reg}
# Other Makefile based Hotspot tests # Other Makefile based Hotspot tests

View File

@ -29,7 +29,7 @@ BUILD_DIR := $(shell pwd)/build
CLASSES_DIR := ${BUILD_DIR}/classes CLASSES_DIR := ${BUILD_DIR}/classes
IMAGE_DIR := ${BUILD_DIR}/image IMAGE_DIR := ${BUILD_DIR}/image
RUN_DIR := $(shell pwd)/run RUN_DIR := $(shell pwd)/run
CLASSPATH := ${JTREG_HOME}/lib/jtreg.jar:${JAVA_HOME}/lib/tools.jar
SRC_DIR := src/share/classes/ SRC_DIR := src/share/classes/
SOURCES := ${SRC_DIR}/jdk/test/failurehandler/*.java \ SOURCES := ${SRC_DIR}/jdk/test/failurehandler/*.java \
${SRC_DIR}/jdk/test/failurehandler/action/*.java \ ${SRC_DIR}/jdk/test/failurehandler/action/*.java \
@ -47,9 +47,12 @@ OS_NAME := $(shell uname -o 2>&1)
ifeq ("${OS_NAME}", "Cygwin") ifeq ("${OS_NAME}", "Cygwin")
BUILD_DIR := $(shell cygpath -m "${BUILD_DIR}") BUILD_DIR := $(shell cygpath -m "${BUILD_DIR}")
CLASSES_DIR := $(shell cygpath -m "${CLASSES_DIR}") CLASSES_DIR := $(shell cygpath -m "${CLASSES_DIR}")
IMAGE_DIR := $(shell cygpath -m "${IMAGE_DIR}") RUN_DIR := $(shell cygpath -m "${RUN_DIR}") IMAGE_DIR := $(shell cygpath -m "${IMAGE_DIR}")
RUN_DIR := $(shell cygpath -m "${RUN_DIR}")
SRC_DIR := $(shell cygpath -m "${SRC_DIR}") SRC_DIR := $(shell cygpath -m "${SRC_DIR}")
JAVA_HOME := $(shell cygpath -m "${JAVA_HOME}")
JTREG_HOME := $(shell cygpath -m "${JTREG_HOME}") JTREG_HOME := $(shell cygpath -m "${JTREG_HOME}")
CLASSPATH := $(shell cygpath -pm "${CLASSPATH}")
CC := "cl.exe" CC := "cl.exe"
endif endif
@ -57,33 +60,33 @@ all: clean test
native: require_env native: require_env
ifeq ("${OS_NAME}", "Cygwin") ifeq ("${OS_NAME}", "Cygwin")
"${CC}" src/windows/native/jdk/test/failurehandler/jtreg/*.c \ "${CC}" src/windows/native/jdk/test/failurehandler/jtreg/*.c \
-I"$(shell cygpath -w ${JAVA_HOME}/include)" \ -I"$(shell cygpath -w "${JAVA_HOME}/include")" \
-I"$(shell cygpath -w ${JAVA_HOME}/include/win32)" \ -I"$(shell cygpath -w "${JAVA_HOME}/include/win32")" \
/link /MACHINE:X64 /DLL /OUT:timeoutHandler.dll /link /DLL /OUT:timeoutHandler.dll
endif endif
check_defined = $(foreach 1,$1,$(__check_defined)) check_defined = $(foreach 1,$1,$(__check_defined))
__check_defined = $(if $(value $1),, $(error $1 is not set)) __check_defined = $(if $(value $1),, $(error $1 is not set))
classes: require_env classes: require_env
mkdir -p ${IMAGE_DIR}/bin ${IMAGE_DIR}/lib ${CLASSES_DIR} mkdir -p ${IMAGE_DIR}/bin ${IMAGE_DIR}/lib ${CLASSES_DIR}
"${JAVA_HOME}"/bin/javac -target ${JAVA_RELEASE} -source ${JAVA_RELEASE} \ "${JAVA_HOME}"/bin/javac -target ${JAVA_RELEASE} -source ${JAVA_RELEASE} \
-sourcepath $(shell pwd) \ -sourcepath "$(shell pwd)" \
-classpath ${JTREG_HOME}/lib/jtreg.jar:${JAVA_HOME}/lib/tools.jar \ -cp "${CLASSPATH}" \
-d ${CLASSES_DIR} \ -d ${CLASSES_DIR} \
${SOURCES} ${SOURCES}
"${JAVA_HOME}"/bin/jar cf ${TARGET_JAR} -C ${CLASSES_DIR} . "${JAVA_HOME}"/bin/jar cf "${TARGET_JAR}" -C "${CLASSES_DIR}" .
"${JAVA_HOME}"/bin/jar uf ${TARGET_JAR} -C ${CONF_DIR} . "${JAVA_HOME}"/bin/jar uf "${TARGET_JAR}" -C "${CONF_DIR}" .
# #
# Use JTREG_TEST_OPTS for test VM options # Use JTREG_TEST_OPTS for test VM options
# Use JTREG_TESTS for jtreg tests parameter # Use JTREG_TESTS for jtreg tests parameter
# #
test: require_env build test: require_env build
rm -rf ${RUN_DIR} rm -rf "${RUN_DIR}"
mkdir -p ${RUN_DIR} mkdir -p "${RUN_DIR}"
"${JTREG_HOME}"/bin/jtreg \ "${JTREG_HOME}"/bin/jtreg \
-jdk:"${JAVA_HOME}" \ -jdk:"${JAVA_HOME}" \
${JTREG_TEST_OPTS} \ ${JTREG_TEST_OPTS} \
-timeout:0.1 -va -retain:all \ -timeout:0.1 -va -retain:all \
@ -93,7 +96,8 @@ test: require_env build
-th:jdk.test.failurehandler.jtreg.GatherProcessInfoTimeoutHandler \ -th:jdk.test.failurehandler.jtreg.GatherProcessInfoTimeoutHandler \
-od:"${TARGET_JAR}" \ -od:"${TARGET_JAR}" \
-o:jdk.test.failurehandler.jtreg.GatherDiagnosticInfoObserver \ -o:jdk.test.failurehandler.jtreg.GatherDiagnosticInfoObserver \
-w:${RUN_DIR}/JTwork -r:${RUN_DIR}/JTreport \ -w:"${RUN_DIR}/JTwork" \
-r:"${RUN_DIR}/JTreport" \
$(if ${JTREG_TESTS}, ${JTREG_TESTS}, test) \ $(if ${JTREG_TESTS}, ${JTREG_TESTS}, test) \
&& false || true && false || true
@ -101,11 +105,11 @@ debug: JTREG_TEST_OPTS += "-J-agentlib:jdwp=transport=dt_socket,server=y,suspend
debug: test debug: test
require_env: require_env:
$(call check_defined, JAVA_HOME) $(call check_defined, JAVA_HOME)
$(call check_defined, JTREG_HOME) $(call check_defined, JTREG_HOME)
clean: clean:
rm -rf "${BUILD_DIR}" "${RUN_DIR}" rm -rf "${BUILD_DIR}" "${RUN_DIR}"
build: classes native build: classes native

View File

@ -39,12 +39,16 @@ import java.nio.file.Path;
* process and its children. * process and its children.
*/ */
public class GatherProcessInfoTimeoutHandler extends TimeoutHandler { public class GatherProcessInfoTimeoutHandler extends TimeoutHandler {
private static final boolean HAS_NATIVE_LIBRARY;
static { static {
boolean value = true;
try { try {
System.loadLibrary("timeoutHandler"); System.loadLibrary("timeoutHandler");
} catch (UnsatisfiedLinkError ignore) { } catch (UnsatisfiedLinkError ignore) {
// not all os need timeoutHandler native-library // not all os need timeoutHandler native-library
value = false;
} }
HAS_NATIVE_LIBRARY = value;
} }
private static final String LOG_FILENAME = "processes.log"; private static final String LOG_FILENAME = "processes.log";
private static final String OUTPUT_FILENAME = "processes.html"; private static final String OUTPUT_FILENAME = "processes.html";
@ -105,7 +109,7 @@ public class GatherProcessInfoTimeoutHandler extends TimeoutHandler {
if (result == 0L) { if (result == 0L) {
/* jtreg didn't find pid, most probably we are on JDK < 9 /* jtreg didn't find pid, most probably we are on JDK < 9
there is no Process::getPid */ there is no Process::getPid */
if ("windows".equals(OS.current().family)) { if (HAS_NATIVE_LIBRARY && "windows".equals(OS.current().family)) {
try { try {
Field field = process.getClass().getDeclaredField("handle"); Field field = process.getClass().getDeclaredField("handle");
boolean old = field.isAccessible(); boolean old = field.isAccessible();

View File

@ -28,7 +28,7 @@ import java.lang.management.ManagementFactory;
/* /*
* @test * @test
* @summary Suicide test * @summary Suicide test
* @run main/othervm Crash * @run main/othervm Suicide
*/ */
public class Suicide { public class Suicide {
public static void main(String[] args) { public static void main(String[] args) {

View File

@ -344,7 +344,13 @@ public class WhiteBox {
} }
public native Object[] getCodeBlob(long addr); public native Object[] getCodeBlob(long addr);
public native void clearInlineCaches(); private native void clearInlineCaches0(boolean preserve_static_stubs);
public void clearInlineCaches() {
clearInlineCaches0(false);
}
public void clearInlineCaches(boolean preserve_static_stubs) {
clearInlineCaches0(preserve_static_stubs);
}
// Intered strings // Intered strings
public native boolean isInStringTable(String str); public native boolean isInStringTable(String str);