|
1 | 1 | /* |
2 | | - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 | 4 | * |
5 | 5 | * This code is free software; you can redistribute it and/or modify it |
|
25 | 25 | * @test TestLargePageUseForAuxMemory.java |
26 | 26 | * @bug 8058354 |
27 | 27 | * @key gc |
28 | | - * @library /testlibrary /testlibrary/whitebox |
29 | | - * @requires (vm.gc=="G1" | vm.gc=="null") |
| 28 | + * @library /testlibrary /testlibrary/whitebox /test/lib |
| 29 | + * @requires (vm.gc=="G1" | vm.gc=="null") & vm.debug |
30 | 30 | * @build TestLargePageUseForAuxMemory |
31 | 31 | * @run main ClassFileInstaller sun.hotspot.WhiteBox |
32 | 32 | * sun.hotspot.WhiteBox$WhiteBoxPermission |
|
35 | 35 | */ |
36 | 36 |
|
37 | 37 | import com.oracle.java.testlibrary.*; |
| 38 | +import jtreg.SkippedException; |
38 | 39 | import sun.hotspot.WhiteBox; |
39 | 40 |
|
40 | 41 | public class TestLargePageUseForAuxMemory { |
@@ -88,18 +89,12 @@ static void testVM(long heapsize, boolean cardsShouldUseLargePages, boolean bitm |
88 | 89 | } |
89 | 90 |
|
90 | 91 | public static void main(String[] args) throws Exception { |
91 | | - if (!Platform.isDebugBuild()) { |
92 | | - System.out.println("Skip tests on non-debug builds because the required option TracePageSizes is a debug-only option."); |
93 | | - return; |
94 | | - } |
95 | | - |
96 | 92 | WhiteBox wb = WhiteBox.getWhiteBox(); |
97 | 93 | smallPageSize = wb.getVMPageSize(); |
98 | 94 | largePageSize = wb.getVMLargePageSize(); |
99 | 95 |
|
100 | 96 | if (largePageSize == 0) { |
101 | | - System.out.println("Skip tests because large page support does not seem to be available on this platform."); |
102 | | - return; |
| 97 | + throw new SkippedException("Large page support does not seem to be available on this platform."); |
103 | 98 | } |
104 | 99 |
|
105 | 100 | // To get large pages for the card table etc. we need at least a 1G heap (with 4k page size). |
|
0 commit comments