author | lana |
Thu, 29 Oct 2015 08:42:35 -0700 | |
changeset 33382 | e3fb1c8b2f41 |
parent 30604 | b8d532cb6420 |
child 33730 | 30e064828045 |
permissions | -rw-r--r-- |
25908
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
1 |
/* |
29678
dd2f3932c21e
8075586: Add @modules as needed to the open hotspot tests
ykantser
parents:
28190
diff
changeset
|
2 |
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. |
25908
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
4 |
* |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
8 |
* |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
13 |
* accompanied this code). |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
14 |
* |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
18 |
* |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
21 |
* questions. |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
22 |
*/ |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
23 |
|
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
24 |
/* |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
25 |
* @test |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
26 |
* @key gc |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
27 |
* @bug 8049831 |
28190
5a6b07edeb21
8066433: Move Whitebox test library to top level repository
thartmann
parents:
26702
diff
changeset
|
28 |
* @library /testlibrary /../../test/lib |
29678
dd2f3932c21e
8075586: Add @modules as needed to the open hotspot tests
ykantser
parents:
28190
diff
changeset
|
29 |
* @modules java.base/sun.misc |
dd2f3932c21e
8075586: Add @modules as needed to the open hotspot tests
ykantser
parents:
28190
diff
changeset
|
30 |
* java.management |
26702
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
31 |
* @build TestCMSClassUnloadingEnabledHWM |
25908
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
32 |
* @run main ClassFileInstaller sun.hotspot.WhiteBox |
25958
8dc85547d6d6
8011397: JTREG needs to copy additional WhiteBox class file to JTwork/scratch/sun/hotspot
mgerdin
parents:
25908
diff
changeset
|
33 |
* sun.hotspot.WhiteBox$WhiteBoxPermission |
25908
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
34 |
* @run driver TestCMSClassUnloadingEnabledHWM |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
35 |
* @summary Test that -XX:-CMSClassUnloadingEnabled will trigger a Full GC when more than MetaspaceSize metadata is allocated. |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
36 |
*/ |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
37 |
|
30604
b8d532cb6420
8067013: Rename the com.oracle.java.testlibary package
ykantser
parents:
29678
diff
changeset
|
38 |
import jdk.test.lib.OutputAnalyzer; |
b8d532cb6420
8067013: Rename the com.oracle.java.testlibary package
ykantser
parents:
29678
diff
changeset
|
39 |
import jdk.test.lib.ProcessTools; |
26702
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
40 |
import java.lang.management.GarbageCollectorMXBean; |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
41 |
import java.lang.management.ManagementFactory; |
25908
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
42 |
import java.util.ArrayList; |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
43 |
import java.util.Arrays; |
26702
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
44 |
import sun.hotspot.WhiteBox; |
25908
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
45 |
|
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
46 |
public class TestCMSClassUnloadingEnabledHWM { |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
47 |
private static long MetaspaceSize = 32 * 1024 * 1024; |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
48 |
private static long YoungGenSize = 32 * 1024 * 1024; |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
49 |
|
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
50 |
private static OutputAnalyzer run(boolean enableUnloading) throws Exception { |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
51 |
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
52 |
"-Xbootclasspath/a:.", |
26152
2e5e15618d8e
8055275: Several gc/class_unloading/ tests fail due to missed +UnlockDiagnosticVMOptions flag
stefank
parents:
25958
diff
changeset
|
53 |
"-XX:+UnlockDiagnosticVMOptions", |
25908
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
54 |
"-XX:+WhiteBoxAPI", |
26702
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
55 |
"-Xmx128m", |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
56 |
"-XX:CMSMaxAbortablePrecleanTime=1", |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
57 |
"-XX:CMSWaitDuration=50", |
25908
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
58 |
"-XX:MetaspaceSize=" + MetaspaceSize, |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
59 |
"-Xmn" + YoungGenSize, |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
60 |
"-XX:+UseConcMarkSweepGC", |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
61 |
"-XX:" + (enableUnloading ? "+" : "-") + "CMSClassUnloadingEnabled", |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
62 |
"-XX:+PrintHeapAtGC", |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
63 |
"-XX:+PrintGCDetails", |
26702
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
64 |
"-XX:+PrintGCTimeStamps", |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
65 |
TestCMSClassUnloadingEnabledHWM.AllocateBeyondMetaspaceSize.class.getName(), |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
66 |
"" + MetaspaceSize); |
25908
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
67 |
return new OutputAnalyzer(pb.start()); |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
68 |
} |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
69 |
|
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
70 |
public static OutputAnalyzer runWithCMSClassUnloading() throws Exception { |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
71 |
return run(true); |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
72 |
} |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
73 |
|
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
74 |
public static OutputAnalyzer runWithoutCMSClassUnloading() throws Exception { |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
75 |
return run(false); |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
76 |
} |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
77 |
|
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
78 |
public static void testWithoutCMSClassUnloading() throws Exception { |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
79 |
// -XX:-CMSClassUnloadingEnabled is used, so we expect a full GC instead of a concurrent cycle. |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
80 |
OutputAnalyzer out = runWithoutCMSClassUnloading(); |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
81 |
|
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
82 |
out.shouldMatch(".*Full GC.*"); |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
83 |
out.shouldNotMatch(".*CMS Initial Mark.*"); |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
84 |
} |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
85 |
|
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
86 |
public static void testWithCMSClassUnloading() throws Exception { |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
87 |
// -XX:+CMSClassUnloadingEnabled is used, so we expect a concurrent cycle instead of a full GC. |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
88 |
OutputAnalyzer out = runWithCMSClassUnloading(); |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
89 |
|
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
90 |
out.shouldMatch(".*CMS Initial Mark.*"); |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
91 |
out.shouldNotMatch(".*Full GC.*"); |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
92 |
} |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
93 |
|
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
94 |
public static void main(String args[]) throws Exception { |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
95 |
testWithCMSClassUnloading(); |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
96 |
testWithoutCMSClassUnloading(); |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
97 |
} |
26702
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
98 |
|
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
99 |
public static class AllocateBeyondMetaspaceSize { |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
100 |
public static void main(String [] args) throws Exception { |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
101 |
if (args.length != 1) { |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
102 |
throw new IllegalArgumentException("Usage: <MetaspaceSize>"); |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
103 |
} |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
104 |
|
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
105 |
WhiteBox wb = WhiteBox.getWhiteBox(); |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
106 |
|
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
107 |
// Allocate past the MetaspaceSize limit. |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
108 |
long metaspaceSize = Long.parseLong(args[0]); |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
109 |
long allocationBeyondMetaspaceSize = metaspaceSize * 2; |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
110 |
long metaspace = wb.allocateMetaspace(null, allocationBeyondMetaspaceSize); |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
111 |
|
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
112 |
// Wait for at least one GC to occur. The caller will parse the log files produced. |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
113 |
GarbageCollectorMXBean cmsGCBean = getCMSGCBean(); |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
114 |
while (cmsGCBean.getCollectionCount() == 0) { |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
115 |
Thread.sleep(100); |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
116 |
} |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
117 |
|
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
118 |
wb.freeMetaspace(null, metaspace, metaspace); |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
119 |
} |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
120 |
|
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
121 |
private static GarbageCollectorMXBean getCMSGCBean() { |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
122 |
for (GarbageCollectorMXBean gcBean : ManagementFactory.getGarbageCollectorMXBeans()) { |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
123 |
if (gcBean.getObjectName().toString().equals("java.lang:type=GarbageCollector,name=ConcurrentMarkSweep")) { |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
124 |
return gcBean; |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
125 |
} |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
126 |
} |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
127 |
return null; |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
128 |
} |
20051b40655a
8058475: TestCMSClassUnloadingEnabledHWM.java fails with '.*CMS Initial Mark.*' missing from stdout/stderr
stefank
parents:
26152
diff
changeset
|
129 |
} |
25908
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
130 |
} |
8adb2fb6fc3c
8048269: Add flag to turn off class unloading after G1 concurrent mark
stefank
parents:
diff
changeset
|
131 |