I've attached the patch for JDK-8206007.
I'll need a sponsor to push the changes.
On 7/5/18, 10:48 AM, Gary Adams wrote:
A simple test run using "exclude none" shows 625K methods are being
observed.
The bulk of those methods were due to the last class accessed in the
test - VirtualMachineManager.
It's not important that this particular call is used. The test is
simply demonstrating that
filters work for other packages than java and javax.
This proposed fix uses a simpler lookup for GregorianCalendar.
Issue: https://bugs.openjdk.java.net/browse/JDK-8206007
Webrev: http://cr.openjdk.java.net/~gadams/8206007/webrev.00/
# HG changeset patch
# User gadams
# Date 1531406504 14400
# Thu Jul 12 10:41:44 2018 -0400
# Node ID 5617ef1752d113daffc0ba8c0a190e5cc7a7ba58
# Parent 5c3c53703b8b126e6bca36e37013d7bc15dfff11
8206007: nsk/jdb/exclude001 test is taking a long time on some builds
Reviewed-by: cjplummer, sspitsyn
diff --git a/test/hotspot/jtreg/ProblemList.txt
b/test/hotspot/jtreg/ProblemList.txt
--- a/test/hotspot/jtreg/ProblemList.txt
+++ b/test/hotspot/jtreg/ProblemList.txt
@@ -166,7 +166,6 @@
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
-vmTestbase/nsk/jdb/exclude/exclude001/exclude001.java 8197938 windows-all
vmTestbase/nsk/jdwp/ThreadReference/ForceEarlyReturn/forceEarlyReturn001/forceEarlyReturn001.java
7199837 generic-all
diff --git
a/test/hotspot/jtreg/vmTestbase/nsk/jdb/exclude/exclude001/exclude001.java
b/test/hotspot/jtreg/vmTestbase/nsk/jdb/exclude/exclude001/exclude001.java
--- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/exclude/exclude001/exclude001.java
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/exclude/exclude001/exclude001.java
@@ -34,13 +34,13 @@
* The debuggee program (exclude001a.java) starts three
* addional threads of MyThread class. The 'run' method of these
* threads invokes java.lang.System.currentTimeMillis() and
- * com.sun.jdi.Bootstrap.virtualMachineManager() methods.
+ * sun.util.calendar.Gregorian() methods.
* There are three test cases:
* - block all exclude filter;
* - modified exclude filter allowing tracing events for java.* methods,
* which is set with 'exclude javax.*,sun.*,com.sun.*,jdk.*' command;
- * - modified exclude filter allowing tracing events for com.sun.* methods,
- * which is set with 'exclude java.*,javax.*,sun.*,jdk.*' command.
+ * - modified exclude filter allowing tracing events for sun.* methods,
+ * which is set with 'exclude java.*,javax.*,com.sun.*,jdk.*' command.
* - non-modified, predefined exclude filter;
* - modified exclude filter allowing tracing events for java.* methods,
* which is set with 'exclude javax.*,sun.*,com.sun.*' command;
@@ -102,7 +102,7 @@
static final String DEBUGGEE_THREAD = PACKAGE_NAME + "." + MYTHREAD;
static final String JAVA_CORE_METHOD =
"java.lang.System.currentTimeMillis";
- static final String COM_SUN_METHOD =
"com.sun.jdi.Bootstrap.virtualMachineManager";
+ static final String SUN_METHOD = "sun.util.calendar.Gregorian";
protected void runCases() {
String[] reply;
@@ -152,8 +152,8 @@
case 1: // allow java.*
reply = jdb.receiveReplyFor(JdbCommand.exclude
+ "javax.*,sun.*,com.sun.*,jdk.*");
break;
- case 2: // allow com.sun.*
- reply = jdb.receiveReplyFor(JdbCommand.exclude
+ "java.*,javax.*,sun.*,jdk.");
+ case 2: // allow sun.*
+ reply = jdb.receiveReplyFor(JdbCommand.exclude
+ "java.*,javax.*,com.sun.*,jdk.");
break;
}
@@ -172,12 +172,12 @@
}
}
- count = grep.find(COM_SUN_METHOD);
+ count = grep.find(SUN_METHOD);
if (count > 0) {
if (testCase == 2) {
comTraced = true;
} else {
- log.complain("Trace message for excluded
method: " + COM_SUN_METHOD);
+ log.complain("Trace message for excluded
method: " + SUN_METHOD);
}
}
@@ -202,7 +202,7 @@
success = false;
}
if (!comTraced) {
- log.complain("There were no tracing events for " + COM_SUN_METHOD
+ "() method while turned off filter");
+ log.complain("There were no tracing events for " + SUN_METHOD +
"() method while turned off filter");
success = false;
}
if (!nskTraced) {
diff --git
a/test/hotspot/jtreg/vmTestbase/nsk/jdb/exclude/exclude001/exclude001a.java
b/test/hotspot/jtreg/vmTestbase/nsk/jdb/exclude/exclude001/exclude001a.java
--- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/exclude/exclude001/exclude001a.java
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/exclude/exclude001/exclude001a.java
@@ -29,7 +29,7 @@
import java.io.*;
-import com.sun.jdi.*;
+import java.util.*;
/* This is debuggee aplication */
@@ -89,6 +89,6 @@
long time = java.lang.System.currentTimeMillis();
- VirtualMachineManager vmm =
com.sun.jdi.Bootstrap.virtualMachineManager();
+ String caltype = GregorianCalendar.getInstance().getCalendarType();
}
}