--- a/.hgtags Fri Jan 25 10:43:02 2019 -0600
+++ b/.hgtags Fri Jan 25 18:12:06 2019 +0100
@@ -536,5 +536,5 @@
f15d443f97318e9b40e6f451e327ff69ed4ec361 jdk-12+27
a47b8125b7cc9ef59619745c163975fe935b57ed jdk-13+4
659b004b6a1bd8c31e766cbdf328d8f8473fd4d7 jdk-12+28
-
e3ed960609927b5fdfd0a797159835cd83a81a31 jdk-13+5
+44f41693631f9b5ac78ff4d2bfabd6734fe46df2 jdk-12+29
--- a/src/hotspot/share/code/nmethod.cpp Fri Jan 25 10:43:02 2019 -0600
+++ b/src/hotspot/share/code/nmethod.cpp Fri Jan 25 18:12:06 2019 +0100
@@ -1100,7 +1100,11 @@
"must be at safepoint");
// Unregister must be done before the state change
- Universe::heap()->unregister_nmethod(this);
+ {
+ MutexLockerEx ml(SafepointSynchronize::is_at_safepoint() ? NULL : CodeCache_lock,
+ Mutex::_no_safepoint_check_flag);
+ Universe::heap()->unregister_nmethod(this);
+ }
// Log the unloading.
log_state_change();
--- a/src/hotspot/share/gc/z/zNMethodTable.cpp Fri Jan 25 10:43:02 2019 -0600
+++ b/src/hotspot/share/gc/z/zNMethodTable.cpp Fri Jan 25 18:12:06 2019 +0100
@@ -264,21 +264,17 @@
}
}
-bool ZNMethodTable::unregister_entry(ZNMethodTableEntry* table, size_t size, nmethod* nm) {
+void ZNMethodTable::unregister_entry(ZNMethodTableEntry* table, size_t size, nmethod* nm) {
if (size == 0) {
// Table is empty
- return false;
+ return;
}
size_t index = first_index(nm, size);
for (;;) {
const ZNMethodTableEntry table_entry = table[index];
-
- if (!table_entry.registered() && !table_entry.unregistered()) {
- // Entry not found
- return false;
- }
+ assert(table_entry.registered() || table_entry.unregistered(), "Entry not found");
if (table_entry.registered() && table_entry.method() == nm) {
// Remove entry
@@ -287,7 +283,7 @@
// Destroy GC data
ZNMethodData::destroy(gc_data(nm));
set_gc_data(nm, NULL);
- return true;
+ return;
}
index = next_index(index, size);
@@ -451,8 +447,6 @@
return;
}
- assert(CodeCache_lock->owned_by_self(), "Lock must be held");
-
while (_iter_table != NULL) {
MutexUnlockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
os::naked_short_sleep(1);
@@ -460,6 +454,7 @@
}
void ZNMethodTable::unregister_nmethod(nmethod* nm) {
+ assert(CodeCache_lock->owned_by_self(), "Lock must be held");
ResourceMark rm;
sweeper_wait_for_iteration();
@@ -467,14 +462,9 @@
log_unregister(nm);
// Remove entry
- if (unregister_entry(_table, _size, nm)) {
- // Entry was unregistered. When unregister_entry() instead returns
- // false the nmethod was not in the table (because it didn't have
- // any oops) so we do not want to decrease the number of registered
- // entries in that case.
- _nregistered--;
- _nunregistered++;
- }
+ unregister_entry(_table, _size, nm);
+ _nunregistered++;
+ _nregistered--;
}
void ZNMethodTable::disarm_nmethod(nmethod* nm) {
--- a/src/hotspot/share/gc/z/zNMethodTable.hpp Fri Jan 25 10:43:02 2019 -0600
+++ b/src/hotspot/share/gc/z/zNMethodTable.hpp Fri Jan 25 18:12:06 2019 +0100
@@ -57,7 +57,7 @@
static void sweeper_wait_for_iteration();
static bool register_entry(ZNMethodTableEntry* table, size_t size, ZNMethodTableEntry entry);
- static bool unregister_entry(ZNMethodTableEntry* table, size_t size, nmethod* nm);
+ static void unregister_entry(ZNMethodTableEntry* table, size_t size, nmethod* nm);
static void rebuild(size_t new_size);
static void rebuild_if_needed();
--- a/src/hotspot/share/opto/memnode.cpp Fri Jan 25 10:43:02 2019 -0600
+++ b/src/hotspot/share/opto/memnode.cpp Fri Jan 25 18:12:06 2019 +0100
@@ -1532,10 +1532,14 @@
Node* address = in(MemNode::Address);
bool progress = false;
+ bool addr_mark = ((phase->type(address)->isa_oopptr() || phase->type(address)->isa_narrowoop()) &&
+ phase->type(address)->is_ptr()->offset() == oopDesc::mark_offset_in_bytes());
+
// Skip up past a SafePoint control. Cannot do this for Stores because
// pointer stores & cardmarks must stay on the same side of a SafePoint.
if( ctrl != NULL && ctrl->Opcode() == Op_SafePoint &&
- phase->C->get_alias_index(phase->type(address)->is_ptr()) != Compile::AliasIdxRaw ) {
+ phase->C->get_alias_index(phase->type(address)->is_ptr()) != Compile::AliasIdxRaw &&
+ !addr_mark ) {
ctrl = ctrl->in(0);
set_req(MemNode::Control,ctrl);
progress = true;
--- a/src/hotspot/share/prims/whitebox.cpp Fri Jan 25 10:43:02 2019 -0600
+++ b/src/hotspot/share/prims/whitebox.cpp Fri Jan 25 18:12:06 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, 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
@@ -93,6 +93,9 @@
#include "services/memTracker.hpp"
#include "utilities/nativeCallStack.hpp"
#endif // INCLUDE_NMT
+#if INCLUDE_AOT
+#include "aot/aotLoader.hpp"
+#endif // INCLUDE_AOT
#ifdef LINUX
#include "osContainer_linux.hpp"
@@ -2118,6 +2121,14 @@
return (jint) SystemDictionary::pd_cache_table()->removed_entries_count();
WB_END
+WB_ENTRY(jint, WB_AotLibrariesCount(JNIEnv* env, jobject o))
+ jint result = 0;
+#if INCLUDE_AOT
+ result = (jint) AOTLoader::heaps_count();
+#endif
+ return result;
+WB_END
+
#define CC (char*)
static JNINativeMethod methods[] = {
@@ -2350,6 +2361,7 @@
{CC"disableElfSectionCache", CC"()V", (void*)&WB_DisableElfSectionCache },
{CC"resolvedMethodRemovedCount", CC"()I", (void*)&WB_ResolvedMethodRemovedCount },
{CC"protectionDomainRemovedCount", CC"()I", (void*)&WB_ProtectionDomainRemovedCount },
+ {CC"aotLibrariesCount", CC"()I", (void*)&WB_AotLibrariesCount },
};
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IntegerExactExceptionTest.java Fri Jan 25 10:43:02 2019 -0600
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IntegerExactExceptionTest.java Fri Jan 25 18:12:06 2019 +0100
@@ -98,6 +98,10 @@
}
}
+ public void testIntegerExactOverflowWithoutUse3() {
+ Math.addExact(Integer.MAX_VALUE, 1);
+ }
+
@Test
public void testIntegerExactWithoutUse1() throws InvalidInstalledCodeException {
ResolvedJavaMethod method = getResolvedJavaMethod("testIntegerExactOverflowWithoutUse1");
@@ -126,6 +130,20 @@
assertTrue(gotException);
}
+ @Test
+ public void testIntegerExactWithoutUse3() throws InvalidInstalledCodeException {
+ ResolvedJavaMethod method = getResolvedJavaMethod("testIntegerExactOverflowWithoutUse3");
+ InstalledCode code = getCode(method);
+
+ boolean gotException = false;
+ try {
+ code.executeVarargs(this);
+ } catch (ArithmeticException e) {
+ gotException = true;
+ }
+ assertTrue(gotException);
+ }
+
static long longCounter = 10;
public void testLongExactOverflowSnippet(long input) {
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StandardGraphBuilderPlugins.java Fri Jan 25 10:43:02 2019 -0600
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StandardGraphBuilderPlugins.java Fri Jan 25 18:12:06 2019 +0100
@@ -560,19 +560,14 @@
}
private static boolean createIntegerExactOperation(GraphBuilderContext b, JavaKind kind, ValueNode x, ValueNode y, IntegerExactOp op) {
- if (x.isConstant() && y.isConstant()) {
- b.addPush(kind, createIntegerExactArithmeticNode(x, y, null, op));
+ BytecodeExceptionKind exceptionKind = kind == JavaKind.Int ? BytecodeExceptionKind.INTEGER_EXACT_OVERFLOW : BytecodeExceptionKind.LONG_EXACT_OVERFLOW;
+ AbstractBeginNode exceptionEdge = b.genExplicitExceptionEdge(exceptionKind);
+ if (exceptionEdge != null) {
+ IntegerExactArithmeticSplitNode split = b.addPush(kind, createIntegerExactSplit(x, y, exceptionEdge, op));
+ split.setNext(b.add(new BeginNode()));
return true;
- } else {
- BytecodeExceptionKind exceptionKind = kind == JavaKind.Int ? BytecodeExceptionKind.INTEGER_EXACT_OVERFLOW : BytecodeExceptionKind.LONG_EXACT_OVERFLOW;
- AbstractBeginNode exceptionEdge = b.genExplicitExceptionEdge(exceptionKind);
- if (exceptionEdge != null) {
- IntegerExactArithmeticSplitNode split = b.addPush(kind, createIntegerExactSplit(x, y, exceptionEdge, op));
- split.setNext(b.add(new BeginNode()));
- return true;
- }
- return false;
}
+ return false;
}
private static void registerMathPlugins(InvocationPlugins plugins, boolean allowDeoptimization) {
--- a/test/hotspot/jtreg/ProblemList-graal.txt Fri Jan 25 10:43:02 2019 -0600
+++ b/test/hotspot/jtreg/ProblemList-graal.txt Fri Jan 25 18:12:06 2019 +0100
@@ -147,6 +147,7 @@
org.graalvm.compiler.core.test.OptionsVerifierTest 8205081
org.graalvm.compiler.hotspot.test.CompilationWrapperTest 8205081
org.graalvm.compiler.replacements.test.classfile.ClassfileBytecodeProviderTest 8205081
+org.graalvm.compiler.debug.test.DebugContextTest 8205081
org.graalvm.compiler.core.test.deopt.CompiledMethodTest 8202955
--- a/test/hotspot/jtreg/ProblemList.txt Fri Jan 25 10:43:02 2019 -0600
+++ b/test/hotspot/jtreg/ProblemList.txt Fri Jan 25 18:12:06 2019 +0100
@@ -186,7 +186,6 @@
vmTestbase/vm/mlvm/meth/stress/java/sequences/Test.java 8208255 generic-all
vmTestbase/vm/mlvm/meth/stress/jdi/breakpointInCompiledCode/Test.java 8208255 generic-all
vmTestbase/vm/mlvm/mixed/stress/java/findDeadlock/TestDescription.java 8208278 generic-all
-vmTestbase/vm/mlvm/mixed/stress/regression/b6969574/INDIFY_Test.java 8067250 generic-all
vmTestbase/vm/mlvm/indy/func/jvmti/mergeCP_indy2none_a/TestDescription.java 8013267 generic-all
vmTestbase/vm/mlvm/indy/func/jvmti/mergeCP_indy2manyDiff_b/TestDescription.java 8013267 generic-all
vmTestbase/vm/mlvm/indy/func/jvmti/mergeCP_indy2manySame_b/TestDescription.java 8013267 generic-all
--- a/test/hotspot/jtreg/TEST.ROOT Fri Jan 25 10:43:02 2019 -0600
+++ b/test/hotspot/jtreg/TEST.ROOT Fri Jan 25 18:12:06 2019 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2019, 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
@@ -59,6 +59,7 @@
vm.rtm.cpu \
vm.rtm.compiler \
vm.aot \
+ vm.aot.enabled \
vm.cds \
vm.cds.custom.loaders \
vm.cds.archived.java.heap \
--- a/test/hotspot/jtreg/compiler/ciReplay/CiReplayBase.java Fri Jan 25 10:43:02 2019 -0600
+++ b/test/hotspot/jtreg/compiler/ciReplay/CiReplayBase.java Fri Jan 25 18:12:06 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2019, 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
@@ -71,6 +71,11 @@
"-XX:+ReplayCompiles", REPLAY_FILE_OPTION};
protected final Optional<Boolean> runServer;
+ public static class EmptyMain {
+ public static void main(String[] args) {
+ }
+ }
+
static {
try {
CLIENT_VM_AVAILABLE = ProcessTools.executeTestJvm(CLIENT_VM_OPTION, VERSION_OPTION)
@@ -135,7 +140,7 @@
options.addAll(Arrays.asList(REPLAY_GENERATION_OPTIONS));
options.addAll(Arrays.asList(vmopts));
options.add(needCoreDump ? ENABLE_COREDUMP_ON_CRASH : DISABLE_COREDUMP_ON_CRASH);
- options.add(VERSION_OPTION);
+ options.add(EmptyMain.class.getName());
if (needCoreDump) {
crashOut = ProcessTools.executeProcess(getTestJavaCommandlineWithPrefix(
RUN_SHELL_NO_LIMIT, options.toArray(new String[0])));
--- a/test/hotspot/jtreg/compiler/intrinsics/bigInteger/TestMulAdd.java Fri Jan 25 10:43:02 2019 -0600
+++ b/test/hotspot/jtreg/compiler/intrinsics/bigInteger/TestMulAdd.java Fri Jan 25 18:12:06 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 8081778
* @summary Add C2 x86 intrinsic for BigInteger::mulAdd() method
+ * @comment the test disables intrinsics, so it can't be run w/ AOT'ed java.base
+ * @requires !vm.aot.enabled
*
* @run main/othervm/timeout=600 -XX:-TieredCompilation -Xbatch
* -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions -XX:-UseSquareToLenIntrinsic -XX:-UseMultiplyToLenIntrinsic
--- a/test/hotspot/jtreg/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java Fri Jan 25 10:43:02 2019 -0600
+++ b/test/hotspot/jtreg/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java Fri Jan 25 18:12:06 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2019, 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
@@ -24,9 +24,13 @@
/*
* @test
* @bug 8136421
+ *
* @requires vm.jvmci
- * & (vm.compMode != "Xcomp" | vm.opt.TieredCompilation == null | vm.opt.TieredCompilation == true)
- * @summary no "-Xcomp -XX:-TieredCompilation" combination allowed until JDK-8140018 is resolved
+ * @requires vm.opt.final.EliminateAllocations == true
+ *
+ * @comment no "-Xcomp -XX:-TieredCompilation" combination allowed until JDK-8140018 is resolved
+ * @requires vm.compMode != "Xcomp" | vm.opt.TieredCompilation == null | vm.opt.TieredCompilation == true
+ *
* @library / /test/lib
* @library ../common/patches
* @modules java.base/jdk.internal.misc
--- a/test/hotspot/jtreg/testlibrary/jittester/Makefile Fri Jan 25 10:43:02 2019 -0600
+++ b/test/hotspot/jtreg/testlibrary/jittester/Makefile Fri Jan 25 18:12:06 2019 +0100
@@ -83,9 +83,9 @@
.PHONY: cleantmp
-all: JAR
+all: $(DIST_JAR)
-JAR: INIT COMPILE manifest
+$(DIST_JAR): INIT COMPILE manifest
$(JAR) cfm $(DIST_JAR) $(MANIFEST) -C $(CLASSES_DIR) .
manifest:
@@ -107,7 +107,7 @@
INIT: $(DIST_DIR)
$(shell if [ ! -d $(CLASSES_DIR) ]; then mkdir -p $(CLASSES_DIR); fi)
-install: clean_testbase testgroup testroot copytestlibrary copyaot JAR cleantmp
+install: clean_testbase testgroup testroot copytestlibrary copyaot $(DIST_JAR) cleantmp
$(JAVA) --add-exports=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED -ea -jar $(DIST_JAR) $(APPLICATION_ARGS)
clean_testbase:
--- a/test/hotspot/jtreg/testlibrary/jittester/conf/default.properties Fri Jan 25 10:43:02 2019 -0600
+++ b/test/hotspot/jtreg/testlibrary/jittester/conf/default.properties Fri Jan 25 18:12:06 2019 +0100
@@ -1,6 +1,6 @@
seed=SEED2
number-of-tests=1000
-testbase-dir=ws/hotspot/test
+testbase-dir=testbase
fp-precision=7
min-cfg-depth=5
max-cfg-depth=5
--- a/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/AotTestGeneratorsFactory.java Fri Jan 25 10:43:02 2019 -0600
+++ b/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/AotTestGeneratorsFactory.java Fri Jan 25 18:12:06 2019 +0100
@@ -32,7 +32,7 @@
private static final String AOT_COMPILER_BUILD_ACTION
= "@build compiler.aot.AotCompiler";
private static final String AOT_COMPILER_RUN_ACTION_PREFIX
- = "@run driver compiler.aot.AotCompiler -libname aottest.so -class ";
+ = "@run driver compiler.aot.AotCompiler -extraopt -Xmixed -libname aottest.so -class ";
@Override
public List<TestsGenerator> apply(String[] input) {
--- a/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/Automatic.java Fri Jan 25 10:43:02 2019 -0600
+++ b/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/Automatic.java Fri Jan 25 18:12:06 2019 +0100
@@ -110,6 +110,7 @@
public static void main(String[] args) {
initializeTestGenerator(args);
int counter = 0;
+ System.out.printf("Generating %d tests...%n", ProductionParams.numberOfTests.value());
System.out.printf(" %13s | %8s | %8s | %8s |%n", "start time", "count", "generat",
"running");
System.out.printf(" %13s | %8s | %8s | %8s |%n", "---", "---", "---", "---");
--- a/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/ByteCodeGenerator.java Fri Jan 25 10:43:02 2019 -0600
+++ b/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/ByteCodeGenerator.java Fri Jan 25 18:12:06 2019 +0100
@@ -39,7 +39,7 @@
private static final String DEFAULT_SUFFIX = "bytecode_tests";
ByteCodeGenerator() {
- super(DEFAULT_SUFFIX);
+ super(DEFAULT_SUFFIX, s -> new String[0], "-Xcomp");
}
ByteCodeGenerator(String suffix, Function<String, String[]> preRunActions, String jtDriverOptions) {
--- a/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/JavaCodeGenerator.java Fri Jan 25 10:43:02 2019 -0600
+++ b/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/JavaCodeGenerator.java Fri Jan 25 18:12:06 2019 +0100
@@ -34,7 +34,7 @@
private static final String DEFAULT_SUFFIX = "java_tests";
JavaCodeGenerator() {
- this(DEFAULT_SUFFIX, JavaCodeGenerator::generatePrerunAction, "");
+ this(DEFAULT_SUFFIX, JavaCodeGenerator::generatePrerunAction, "-Xcomp");
}
JavaCodeGenerator(String prefix, Function<String, String[]> preRunActions, String jtDriverOptions) {
@@ -64,13 +64,16 @@
}
private void compileJavaFile(String mainClassName) {
- String classPath = getRoot().resolve(generatorDir)
- .toAbsolutePath()
- .toString();
- ProcessBuilder pb = new ProcessBuilder(JAVAC, "-cp", classPath,
+ String classPath = tmpDir.toString();
+ ProcessBuilder pb = new ProcessBuilder(JAVAC,
+ "-d", classPath,
+ "-cp", classPath,
generatorDir.resolve(mainClassName + ".java").toString());
try {
- runProcess(pb, generatorDir.resolve(mainClassName).toString());
+ int r = runProcess(pb, tmpDir.resolve(mainClassName + ".javac").toString());
+ if (r != 0) {
+ throw new Error("Can't compile sources, exit code = " + r);
+ }
} catch (IOException | InterruptedException e) {
throw new Error("Can't compile sources ", e);
}
--- a/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/TestsGenerator.java Fri Jan 25 10:43:02 2019 -0600
+++ b/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/TestsGenerator.java Fri Jan 25 18:12:06 2019 +0100
@@ -42,6 +42,7 @@
protected static final String JAVAC = Paths.get(JAVA_BIN, "javac").toString();
protected static final String JAVA = Paths.get(JAVA_BIN, "java").toString();
protected final Path generatorDir;
+ protected final Path tmpDir;
protected final Function<String, String[]> preRunActions;
protected final String jtDriverOptions;
private static final String DISABLE_WARNINGS = "-XX:-PrintWarnings";
@@ -52,15 +53,19 @@
protected TestsGenerator(String suffix, Function<String, String[]> preRunActions,
String jtDriverOptions) {
- generatorDir = getRoot().resolve(suffix);
+ generatorDir = getRoot().resolve(suffix).toAbsolutePath();
+ try {
+ tmpDir = Files.createTempDirectory(suffix).toAbsolutePath();
+ } catch (IOException e) {
+ throw new Error("Can't get a tmp dir for " + suffix, e);
+ }
this.preRunActions = preRunActions;
this.jtDriverOptions = jtDriverOptions;
}
protected void generateGoldenOut(String mainClassName) {
- String classPath = getRoot().resolve(generatorDir)
- .toAbsolutePath()
- .toString();
+ String classPath = tmpDir.toString() + File.pathSeparator
+ + generatorDir.toString();
ProcessBuilder pb = new ProcessBuilder(JAVA, "-Xint", DISABLE_WARNINGS, "-Xverify",
"-cp", classPath, mainClassName);
String goldFile = mainClassName + ".gold";
@@ -89,9 +94,10 @@
return -1;
}
- protected static void compilePrinter() {
+ protected void compilePrinter() {
Path root = getRoot();
ProcessBuilder pbPrinter = new ProcessBuilder(JAVAC,
+ "-d", tmpDir.toString(),
root.resolve("jdk")
.resolve("test")
.resolve("lib")
--- a/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/TypeList.java Fri Jan 25 10:43:02 2019 -0600
+++ b/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/TypeList.java Fri Jan 25 18:12:06 2019 +0100
@@ -23,11 +23,6 @@
package jdk.test.lib.jittester;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.function.Predicate;
-
import jdk.test.lib.jittester.types.TypeBoolean;
import jdk.test.lib.jittester.types.TypeByte;
import jdk.test.lib.jittester.types.TypeChar;
@@ -39,6 +34,11 @@
import jdk.test.lib.jittester.types.TypeShort;
import jdk.test.lib.jittester.types.TypeVoid;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.function.Predicate;
+
public class TypeList {
public static final TypeVoid VOID = new TypeVoid();
public static final TypeBoolean BOOLEAN = new TypeBoolean();
@@ -56,7 +56,7 @@
private static final List<Type> BUILTIN_TYPES = new ArrayList<>();
private static final List<Type> BUILTIN_INT_TYPES = new ArrayList<>();
private static final List<Type> BUILTIN_FP_TYPES = new ArrayList<>();
- private static final List<Type> REFERENCE_TYPES = new ArrayList<>();
+ private static final List<TypeKlass> REFERENCE_TYPES = new ArrayList<>();
static {
BUILTIN_INT_TYPES.add(BOOLEAN);
@@ -99,7 +99,7 @@
return BUILTIN_FP_TYPES;
}
- protected static Collection<Type> getReferenceTypes() {
+ protected static Collection<TypeKlass> getReferenceTypes() {
return REFERENCE_TYPES;
}
@@ -148,7 +148,7 @@
return null;
}
- public static void add(Type t) {
+ public static void add(TypeKlass t) {
REFERENCE_TYPES.add(t);
TYPES.add(t);
}
@@ -159,8 +159,12 @@
}
public static void removeAll() {
- Predicate<? super Type> isNotBasic = t -> t.getName().startsWith("Test_");
- TYPES.removeIf(isNotBasic);
- REFERENCE_TYPES.removeIf(isNotBasic);
+ Predicate<? super String> isNotBasic = s -> s.startsWith("Test_");
+ Predicate<? super Type> isNotBasicType = t -> isNotBasic.test(t.getName());
+ REFERENCE_TYPES.stream()
+ .map(TypeKlass::getChildrenNames)
+ .forEach(l -> l.removeIf(isNotBasic));
+ TYPES.removeIf(isNotBasicType);
+ REFERENCE_TYPES.removeIf(isNotBasicType);
}
}
--- a/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CastOperatorFactory.java Fri Jan 25 10:43:02 2019 -0600
+++ b/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CastOperatorFactory.java Fri Jan 25 18:12:06 2019 +0100
@@ -67,7 +67,7 @@
SymbolTable.merge();
return castOperator;
}
- throw new ProductionFailedException();
+ SymbolTable.pop();
} catch (ProductionFailedException e) {
SymbolTable.pop();
}
--- a/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/types/TypeKlass.java Fri Jan 25 10:43:02 2019 -0600
+++ b/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/types/TypeKlass.java Fri Jan 25 18:12:06 2019 +0100
@@ -25,6 +25,7 @@
import java.util.Collection;
import java.util.HashSet;
+import java.util.Objects;
import java.util.TreeSet;
import jdk.test.lib.jittester.ProductionParams;
import jdk.test.lib.jittester.Symbol;
@@ -124,26 +125,28 @@
TreeSet<TypeKlass> result = new TreeSet<>();
parentsList.stream()
.map(TypeList::find)
- .filter(parentKlass -> parentKlass != null)
- .map(parentKlass -> (TypeKlass) parentKlass)
- .forEach(parentKlass -> {
- result.add(parentKlass);
- result.addAll(parentKlass.getAllParents());
+ .filter(Objects::nonNull)
+ .map(k -> (TypeKlass) k)
+ .forEach(k -> {
+ if (result.add(k)) {
+ result.addAll(k.getAllParents());
+ }
});
return result;
}
public TreeSet<TypeKlass> getAllChildren() {
- TreeSet<TypeKlass> r = new TreeSet<>();
+ TreeSet<TypeKlass> result = new TreeSet<>();
childrenList.stream()
.map(TypeList::find)
- .filter(childKlass -> childKlass != null)
- .map(childKlass -> (TypeKlass) childKlass)
- .forEach(childKlass -> {
- r.add(childKlass);
- r.addAll(childKlass.getAllChildren());
+ .filter(Objects::nonNull)
+ .map(k -> (TypeKlass) k)
+ .forEach(k -> {
+ if (result.add(k)) {
+ result.addAll(k.getAllChildren());
+ }
});
- return r;
+ return result;
}
@Override
--- a/test/hotspot/jtreg/vmTestbase/vm/mlvm/mixed/stress/regression/b6969574/INDIFY_Test.java Fri Jan 25 10:43:02 2019 -0600
+++ b/test/hotspot/jtreg/vmTestbase/vm/mlvm/mixed/stress/regression/b6969574/INDIFY_Test.java Fri Jan 25 18:12:06 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2019, 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
@@ -27,8 +27,7 @@
* @bug 6969574
*
* @summary converted from VM Testbase vm/mlvm/mixed/stress/regression/b6969574.
- * VM Testbase keywords: [feature_mlvm, nonconcurrent, quarantine]
- * VM Testbase comments: 8079650
+ * VM Testbase keywords: [feature_mlvm, nonconcurrent]
*
* @library /vmTestbase
* /test/lib
@@ -313,10 +312,8 @@
private final static int REFLECTION_CALL = 1;
private final static int INVOKE_EXACT = 2;
private final static int INVOKE = 3;
- private final static int INVOKE_WITHARG = 4;
- private final static int INVOKE_WITHARG_TYPECONV = 5;
- private final static int INDY = 6;
- private final static int BENCHMARK_COUNT = 7;
+ private final static int INDY = 4;
+ private final static int BENCHMARK_COUNT = 5;
//
// Test body
@@ -356,18 +353,6 @@
}
});
- benchmarks[INVOKE_WITHARG] = new Benchmark("MH.invokeWithArguments(), exact types", new T() {
- public void run() throws Throwable {
- mhTestee.invokeWithArguments(testData, TESTEE_ARG2, TESTEE_ARG3);
- }
- });
-
- benchmarks[INVOKE_WITHARG_TYPECONV] = new Benchmark("MH.invokeWithArguments() + type conv.", new T() {
- public void run() throws Throwable {
- mhTestee.invokeWithArguments((Object) testData, null, (Short) Short.MAX_VALUE);
- }
- });
-
benchmarks[INDY] = new Benchmark("invokedynamic instruction", new T() {
public void run() throws Throwable {
indyWrapper(testData);
@@ -415,8 +400,6 @@
verifyTimeOrder(results[REFLECTION_CALL], results[INVOKE_EXACT]);
verifyTimeOrder(results[INVOKE_EXACT], results[DIRECT_CALL]);
verifyTimeOrder(results[INVOKE], results[DIRECT_CALL]);
- verifyTimeOrder(results[INVOKE_WITHARG], results[INVOKE_EXACT]);
- verifyTimeOrder(results[INVOKE_WITHARG_TYPECONV], results[INVOKE_EXACT]);
verifyTimeOrder(results[INVOKE_EXACT], results[INDY]);
return true;
--- a/test/jdk/ProblemList-Xcomp.txt Fri Jan 25 10:43:02 2019 -0600
+++ b/test/jdk/ProblemList-Xcomp.txt Fri Jan 25 18:12:06 2019 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2018, 2019, 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
@@ -28,3 +28,4 @@
#############################################################################
java/lang/invoke/MethodHandles/CatchExceptionTest.java 8146623 generic-all
+java/util/concurrent/CountDownLatch/Basic.java 8195057 generic-all
--- a/test/jdk/java/net/Socket/ExceptionText.java Fri Jan 25 10:43:02 2019 -0600
+++ b/test/jdk/java/net/Socket/ExceptionText.java Fri Jan 25 18:12:06 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,10 @@
* @test
* @library /test/lib
* @build jdk.test.lib.Utils
- * @bug 8204233 8207846 8208691
+ * @bug 8204233
* @summary Add configurable option for enhanced socket IOException messages
* @run main/othervm
* ExceptionText
- * @run main/othervm
- * ExceptionText
* WITHOUT_Enhanced_Text
* @run main/othervm
* -Djdk.includeInExceptions=
@@ -64,7 +62,6 @@
import java.nio.channels.AsynchronousSocketChannel;
import java.nio.channels.ClosedChannelException;
import java.nio.channels.SocketChannel;
-import java.security.Security;
import java.util.concurrent.ExecutionException;
import jdk.test.lib.Utils;
@@ -73,33 +70,20 @@
enum TestTarget {SOCKET, CHANNEL, ASYNC_CHANNEL};
public static void main(String args[]) throws Exception {
- if (args.length == 0) {
- testSecProp();
+ String passOrFail = args[0];
+ boolean expectEnhancedText;
+ if (passOrFail.equals("expectEnhancedText")) {
+ expectEnhancedText = true;
} else {
- String passOrFail = args[0];
- boolean expectEnhancedText;
- if (passOrFail.equals("expectEnhancedText")) {
- expectEnhancedText = true;
- } else {
- expectEnhancedText = false;
- }
- test(expectEnhancedText);
+ expectEnhancedText = false;
}
+ test(expectEnhancedText);
}
static final InetSocketAddress dest = Utils.refusingEndpoint();
static final String PORT = ":" + Integer.toString(dest.getPort());
static final String HOST = dest.getHostString();
- static void testSecProp() {
- String incInExc = Security.getProperty("jdk.includeInExceptions");
- if (incInExc != null) {
- throw new RuntimeException("Test failed: default value of " +
- "jdk.includeInExceptions security property is not null: " +
- incInExc);
- }
- }
-
static void test(boolean withProperty) {
// Socket
IOException e = getException(TestTarget.SOCKET);
@@ -132,10 +116,11 @@
static IOException getException(TestTarget target) {
try {
if (target == TestTarget.SOCKET) {
- Socket s = new Socket();
- s.connect(dest);
+ try (Socket s = new Socket()) {
+ s.connect(dest);
+ }
} else if (target == TestTarget.CHANNEL) {
- SocketChannel c = SocketChannel.open(dest);
+ SocketChannel.open(dest);
} else if (target == TestTarget.ASYNC_CHANNEL) {
AsynchronousSocketChannel c = AsynchronousSocketChannel.open();
try {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/jdk/security/JavaDotSecurity/TestJDKIncludeInExceptions.java Fri Jan 25 18:12:06 2019 +0100
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2018, 2019, 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.
+ */
+
+import java.security.Security;
+
+/**
+ * @test
+ * @bug 8207846 8208691
+ * @summary Test the default setting of the jdk.net.includeInExceptions
+ * security property
+ * @comment In OpenJDK, this property is empty by default and on purpose.
+ * This test assures the default is not changed.
+ * @run main TestJDKIncludeInExceptions
+ */
+public class TestJDKIncludeInExceptions {
+
+ public static void main(String args[]) throws Exception {
+ String incInExc = Security.getProperty("jdk.includeInExceptions");
+ if (incInExc != null) {
+ throw new RuntimeException("Test failed: default value of " +
+ "jdk.includeInExceptions security property is not null: " +
+ incInExc);
+ }
+ }
+}
--- a/test/jtreg-ext/requires/VMProps.java Fri Jan 25 10:43:02 2019 -0600
+++ b/test/jtreg-ext/requires/VMProps.java Fri Jan 25 18:12:06 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -86,6 +86,7 @@
map.put("vm.rtm.cpu", vmRTMCPU());
map.put("vm.rtm.compiler", vmRTMCompiler());
map.put("vm.aot", vmAOT());
+ map.put("vm.aot.enabled", vmAotEnabled());
// vm.cds is true if the VM is compiled with cds support.
map.put("vm.cds", vmCDS());
map.put("vm.cds.custom.loaders", vmCDSForCustomLoaders());
@@ -266,6 +267,7 @@
vmOptFinalFlag(map, "ClassUnloading");
vmOptFinalFlag(map, "UseCompressedOops");
vmOptFinalFlag(map, "EnableJVMCI");
+ vmOptFinalFlag(map, "EliminateAllocations");
}
/**
@@ -334,6 +336,13 @@
return "" + Files.exists(jaotc);
}
+ /*
+ * @return true if there is at least one loaded AOT'ed library.
+ */
+ protected String vmAotEnabled() {
+ return "" + (WB.aotLibrariesCount() > 0);
+ }
+
/**
* Check for CDS support.
*
--- a/test/lib/sun/hotspot/WhiteBox.java Fri Jan 25 10:43:02 2019 -0600
+++ b/test/lib/sun/hotspot/WhiteBox.java Fri Jan 25 18:12:06 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, 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
@@ -549,4 +549,7 @@
// Protection Domain Table
public native int protectionDomainRemovedCount();
+
+ // Number of loaded AOT libraries
+ public native int aotLibrariesCount();
}