From 5b3684cf378d7ff133f46d39ecc800d93b2620ee Mon Sep 17 00:00:00 2001 From: Chris Plummer Date: Thu, 29 Oct 2015 12:02:53 -0700 Subject: [PATCH 1/4] 8140189: [TESTBUG] Get rid of "@library /../../test/lib" in jtreg tests Use new external.lib.roots property in TEST.ROOT so /../../test/lib is not needed. Reviewed-by: mseledtsov, sla, iklam --- jdk/test/TEST.ROOT | 4 ++++ .../com/sun/management/HotSpotDiagnosticMXBean/DumpHeap.java | 2 +- jdk/test/java/util/Arrays/TimSortStackSize2.java | 2 +- .../sun/jvmstat/monitor/MonitoredVm/TestPollingInterval.java | 2 +- jdk/test/sun/tools/jhsdb/BasicLauncherTest.java | 2 +- jdk/test/sun/tools/jmap/BasicJMapTest.java | 2 +- jdk/test/sun/tools/jmap/heapconfig/JMapHeapConfigTest.java | 2 +- jdk/test/sun/tools/jstack/DeadlockDetectionTest.java | 2 +- 8 files changed, 11 insertions(+), 7 deletions(-) diff --git a/jdk/test/TEST.ROOT b/jdk/test/TEST.ROOT index 987dce55075..fc7be27a0f8 100644 --- a/jdk/test/TEST.ROOT +++ b/jdk/test/TEST.ROOT @@ -28,3 +28,7 @@ requires.properties=sun.arch.data.model # Tests using jtreg 4.1 b11 features requiredVersion=4.1 b11 + +# Path to libraries in the topmost test directory. This is needed so @library +# does not need ../../ notation to reach them +external.lib.roots = ../../ diff --git a/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/DumpHeap.java b/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/DumpHeap.java index 77b6eec14e8..1a64ae0d0a5 100644 --- a/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/DumpHeap.java +++ b/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/DumpHeap.java @@ -38,7 +38,7 @@ import com.sun.management.HotSpotDiagnosticMXBean; * @bug 6455258 * @summary Sanity test for com.sun.management.HotSpotDiagnosticMXBean.dumpHeap method * @library /lib/testlibrary - * @library /../../test/lib/share/classes + * @library /test/lib/share/classes * @build jdk.testlibrary.* * @build jdk.test.lib.hprof.* * @build jdk.test.lib.hprof.module.* diff --git a/jdk/test/java/util/Arrays/TimSortStackSize2.java b/jdk/test/java/util/Arrays/TimSortStackSize2.java index 9e212fd00bd..420d6bda9b8 100644 --- a/jdk/test/java/util/Arrays/TimSortStackSize2.java +++ b/jdk/test/java/util/Arrays/TimSortStackSize2.java @@ -24,7 +24,7 @@ /* * @test * @bug 8072909 - * @library /lib/testlibrary /../../test/lib + * @library /lib/testlibrary /test/lib * @build jdk.testlibrary.* * @build TimSortStackSize2 * @run main ClassFileInstaller sun.hotspot.WhiteBox diff --git a/jdk/test/sun/jvmstat/monitor/MonitoredVm/TestPollingInterval.java b/jdk/test/sun/jvmstat/monitor/MonitoredVm/TestPollingInterval.java index abed0385ebe..826edfb4e58 100644 --- a/jdk/test/sun/jvmstat/monitor/MonitoredVm/TestPollingInterval.java +++ b/jdk/test/sun/jvmstat/monitor/MonitoredVm/TestPollingInterval.java @@ -42,7 +42,7 @@ import sun.jvmstat.monitor.VmIdentifier; * @summary setInterval() for local MonitoredHost and local MonitoredVm * @modules jdk.jvmstat/sun.jvmstat.monitor * @library /lib/testlibrary - * @library /../../test/lib/share/classes + * @library /test/lib/share/classes * @build jdk.testlibrary.* * @build jdk.test.lib.apps.* * @run main TestPollingInterval diff --git a/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java b/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java index 7111598d316..37dd7ec0131 100644 --- a/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java +++ b/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java @@ -24,7 +24,7 @@ /* * @test * @summary Basic test for jhsdb launcher - * @library /../../test/lib/share/classes + * @library /test/lib/share/classes * @library /lib/testlibrary * @build jdk.testlibrary.* * @build jdk.test.lib.apps.* diff --git a/jdk/test/sun/tools/jmap/BasicJMapTest.java b/jdk/test/sun/tools/jmap/BasicJMapTest.java index f9cb1eafa02..03efac77cf0 100644 --- a/jdk/test/sun/tools/jmap/BasicJMapTest.java +++ b/jdk/test/sun/tools/jmap/BasicJMapTest.java @@ -38,7 +38,7 @@ import jdk.testlibrary.ProcessTools; * @summary Unit test for jmap utility * @key intermittent * @library /lib/testlibrary - * @library /../../test/lib/share/classes + * @library /test/lib/share/classes * @modules java.management * @build jdk.testlibrary.* * @build jdk.test.lib.hprof.* diff --git a/jdk/test/sun/tools/jmap/heapconfig/JMapHeapConfigTest.java b/jdk/test/sun/tools/jmap/heapconfig/JMapHeapConfigTest.java index 69fbf206f62..5a84b6261d6 100644 --- a/jdk/test/sun/tools/jmap/heapconfig/JMapHeapConfigTest.java +++ b/jdk/test/sun/tools/jmap/heapconfig/JMapHeapConfigTest.java @@ -36,7 +36,7 @@ import jdk.testlibrary.Platform; * @test * @bug 8042397 * @summary Unit test for jmap utility test heap configuration reader - * @library /../../test/lib/share/classes + * @library /test/lib/share/classes * @library /lib/testlibrary * @modules java.management * @build jdk.testlibrary.* diff --git a/jdk/test/sun/tools/jstack/DeadlockDetectionTest.java b/jdk/test/sun/tools/jstack/DeadlockDetectionTest.java index 31cdf311830..4ff2508673b 100644 --- a/jdk/test/sun/tools/jstack/DeadlockDetectionTest.java +++ b/jdk/test/sun/tools/jstack/DeadlockDetectionTest.java @@ -37,7 +37,7 @@ import jdk.testlibrary.ProcessTools; /* * @test * @summary Test deadlock detection - * @library /../../test/lib/share/classes + * @library /test/lib/share/classes * @library /lib/testlibrary * @modules java.management * @build jdk.testlibrary.* From 52458bf82ef76c103c8bc57648150fdaa2442666 Mon Sep 17 00:00:00 2001 From: Cheleswer Sahu Date: Thu, 29 Oct 2015 05:24:30 -0700 Subject: [PATCH 2/4] 8129348: Debugger hangs in trace mode with TRACE_SENDS Reviewed-by: sspitsyn --- .../classes/com/sun/tools/jdi/InvokableTypeImpl.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/InvokableTypeImpl.java b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/InvokableTypeImpl.java index 61a23301861..3672435273a 100644 --- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/InvokableTypeImpl.java +++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/InvokableTypeImpl.java @@ -236,6 +236,15 @@ abstract class InvokableTypeImpl extends ReferenceTypeImpl { final MethodImpl method, final ValueImpl[] args, final int options) { + /* + * Cache the values of args when TRACE_SENDS is enabled, for later printing. + * If not cached, printing causes a remote call while synchronized, and deadlock. + */ + if ((vm.traceFlags & VirtualMachineImpl.TRACE_SENDS) != 0) { + for (ValueImpl arg: args) { + arg.toString(); + } + } CommandSender sender = getInvokeMethodSender(thread, method, args, options); PacketStream stream; if ((options & ClassType.INVOKE_SINGLE_THREADED) != 0) { From 165c64ef5f0753d544de09064c49fec9354809c9 Mon Sep 17 00:00:00 2001 From: Andreas Eriksson Date: Fri, 30 Oct 2015 13:13:13 +0100 Subject: [PATCH 3/4] 8074696: Remote debugging session hangs for several minutes when calling findBootType Reviewed-by: sspitsyn, jbachorik --- .../classes/com/sun/tools/jdi/VirtualMachineImpl.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java index adc9adf3ca5..0529ee41c10 100644 --- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java +++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2015, 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 @@ -1041,12 +1041,11 @@ class VirtualMachineImpl extends MirrorImpl } Type findBootType(String signature) throws ClassNotLoadedException { - List types = allClasses(); + List types = retrieveClassesBySignature(signature); Iterator iter = types.iterator(); while (iter.hasNext()) { ReferenceType type = iter.next(); - if ((type.classLoader() == null) && - (type.signature().equals(signature))) { + if (type.classLoader() == null) { return type; } } From e6db7fad830f263b519652a01168eab9553b1107 Mon Sep 17 00:00:00 2001 From: Chris Plummer Date: Wed, 4 Nov 2015 23:46:50 -0800 Subject: [PATCH 4/4] 8141489: [TESTBUG] requiredVersion in TEST.ROOT needs to updated to 4.1 b12 Updated requiredVersion to 4.1 b12 Reviewed-by: dholmes, sla, darcy --- jdk/test/TEST.ROOT | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jdk/test/TEST.ROOT b/jdk/test/TEST.ROOT index fc7be27a0f8..4aed60a6d99 100644 --- a/jdk/test/TEST.ROOT +++ b/jdk/test/TEST.ROOT @@ -26,8 +26,8 @@ groups=TEST.groups [closed/TEST.groups] # Allow querying of sun.arch.data.model in @requires clauses requires.properties=sun.arch.data.model -# Tests using jtreg 4.1 b11 features -requiredVersion=4.1 b11 +# Tests using jtreg 4.1 b12 features +requiredVersion=4.1 b12 # Path to libraries in the topmost test directory. This is needed so @library # does not need ../../ notation to reach them