20 * or visit www.oracle.com if you need additional information or have any |
20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. |
21 * questions. |
22 * |
22 * |
23 */ |
23 */ |
24 |
24 |
25 import java.lang.management.MemoryPoolMXBean; |
25 /* |
26 import java.util.EnumSet; |
26 * @test AllocationCodeBlobTest |
27 import java.util.ArrayList; |
27 * @summary testing of WB::allocate/freeCodeBlob() |
|
28 * @bug 8059624 8064669 |
|
29 * @library /testlibrary /test/lib / |
|
30 * @modules java.base/jdk.internal.misc |
|
31 * java.management |
|
32 * @build compiler.whitebox.AllocationCodeBlobTest |
|
33 * @run driver ClassFileInstaller sun.hotspot.WhiteBox |
|
34 * sun.hotspot.WhiteBox$WhiteBoxPermission |
|
35 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions |
|
36 * -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,null::* |
|
37 * -XX:-SegmentedCodeCache |
|
38 * compiler.whitebox.AllocationCodeBlobTest |
|
39 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions |
|
40 * -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,null::* |
|
41 * -XX:+SegmentedCodeCache |
|
42 * compiler.whitebox.AllocationCodeBlobTest |
|
43 */ |
28 |
44 |
|
45 package compiler.whitebox; |
|
46 |
|
47 import jdk.test.lib.Asserts; |
|
48 import jdk.test.lib.InfiniteLoop; |
29 import sun.hotspot.WhiteBox; |
49 import sun.hotspot.WhiteBox; |
30 import sun.hotspot.code.BlobType; |
50 import sun.hotspot.code.BlobType; |
31 import jdk.test.lib.Asserts; |
|
32 import jdk.test.lib.InfiniteLoop; |
|
33 |
51 |
34 /* |
52 import java.lang.management.MemoryPoolMXBean; |
35 * @test AllocationCodeBlobTest |
53 import java.util.ArrayList; |
36 * @bug 8059624 8064669 |
54 import java.util.EnumSet; |
37 * @library /testlibrary /test/lib |
55 |
38 * @modules java.base/jdk.internal.misc |
|
39 * @modules java.management |
|
40 * @build AllocationCodeBlobTest |
|
41 * @run main ClassFileInstaller sun.hotspot.WhiteBox |
|
42 * sun.hotspot.WhiteBox$WhiteBoxPermission |
|
43 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions |
|
44 * -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,null::* |
|
45 * -XX:-SegmentedCodeCache AllocationCodeBlobTest |
|
46 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions |
|
47 * -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,null::* |
|
48 * -XX:+SegmentedCodeCache AllocationCodeBlobTest |
|
49 * @summary testing of WB::allocate/freeCodeBlob() |
|
50 */ |
|
51 public class AllocationCodeBlobTest { |
56 public class AllocationCodeBlobTest { |
52 private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox(); |
57 private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox(); |
53 private static final long CODE_CACHE_SIZE |
58 private static final long CODE_CACHE_SIZE |
54 = WHITE_BOX.getUintxVMFlag("ReservedCodeCacheSize"); |
59 = WHITE_BOX.getUintxVMFlag("ReservedCodeCacheSize"); |
55 private static final int SIZE = 1; |
60 private static final int SIZE = 1; |