Skip to content
This repository was archived by the owner on Aug 27, 2022. It is now read-only.
/ lanai Public archive

Commit a899004

Browse files
committedMay 5, 2020
8244384: @requires-related clean up in gc/metaspace/ tests
Reviewed-by: kbarrett, stefank
1 parent c976be6 commit a899004

File tree

2 files changed

+11
-19
lines changed

2 files changed

+11
-19
lines changed
 

‎test/hotspot/jtreg/gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java

-6
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
*/
3737

3838
import jdk.test.lib.JDKToolLauncher;
39-
import jdk.test.lib.Platform;
4039
import jdk.test.lib.process.OutputAnalyzer;
4140
import jdk.test.lib.process.ProcessTools;
4241
import jdk.test.lib.SA.SATestUtils;
@@ -50,11 +49,6 @@ public class CompressedClassSpaceSizeInJmapHeap {
5049
public static void main(String[] args) throws Exception {
5150
SATestUtils.skipIfCannotAttach(); // throws SkippedException if attach not expected to work.
5251

53-
if (!Platform.is64bit()) {
54-
// Compressed Class Space is only available on 64-bit JVMs
55-
return;
56-
}
57-
5852
String pid = Long.toString(ProcessTools.getProcessId());
5953

6054
JDKToolLauncher jmap = JDKToolLauncher.create("jhsdb")

‎test/hotspot/jtreg/gc/metaspace/TestCapacityUntilGCWrapAround.java

+11-13
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
* @library /test/lib
3131
* @modules java.base/jdk.internal.misc
3232
* java.management
33+
* @requires vm.bits == 32
3334
* @build sun.hotspot.WhiteBox
3435
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
3536
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI gc.metaspace.TestCapacityUntilGCWrapAround
@@ -38,25 +39,22 @@
3839
import sun.hotspot.WhiteBox;
3940

4041
import jdk.test.lib.Asserts;
41-
import jdk.test.lib.Platform;
4242

4343
public class TestCapacityUntilGCWrapAround {
4444
private static long MB = 1024 * 1024;
4545
private static long GB = 1024 * MB;
4646
private static long MAX_UINT = 4 * GB - 1; // On 32-bit platforms
4747

4848
public static void main(String[] args) {
49-
if (Platform.is32bit()) {
50-
WhiteBox wb = WhiteBox.getWhiteBox();
51-
52-
long before = wb.metaspaceCapacityUntilGC();
53-
// Now force possible overflow of capacity_until_GC.
54-
long after = wb.incMetaspaceCapacityUntilGC(MAX_UINT);
55-
56-
Asserts.assertGTE(after, before,
57-
"Increasing with MAX_UINT should not cause wrap around: " + after + " < " + before);
58-
Asserts.assertLTE(after, MAX_UINT,
59-
"Increasing with MAX_UINT should not cause value larger than MAX_UINT:" + after);
60-
}
49+
WhiteBox wb = WhiteBox.getWhiteBox();
50+
51+
long before = wb.metaspaceCapacityUntilGC();
52+
// Now force possible overflow of capacity_until_GC.
53+
long after = wb.incMetaspaceCapacityUntilGC(MAX_UINT);
54+
55+
Asserts.assertGTE(after, before,
56+
"Increasing with MAX_UINT should not cause wrap around: " + after + " < " + before);
57+
Asserts.assertLTE(after, MAX_UINT,
58+
"Increasing with MAX_UINT should not cause value larger than MAX_UINT:" + after);
6159
}
6260
}

0 commit comments

Comments
 (0)