Mercurial > hg > truffle
annotate test/runtime/CompressedOops/CompressedKlassPointerAndOops.java @ 18377:ed0fce2e999a
Fold klass._java_mirror._klass into klass and improve stamps from layout_helper
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Fri, 14 Nov 2014 09:32:59 -0800 |
parents | 7944aba7ba41 |
children |
rev | line source |
---|---|
11987
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
1 /* |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
4 * |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
8 * |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
13 * accompanied this code). |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
14 * |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
18 * |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
21 * questions. |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
22 */ |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
23 |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
24 /* |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
25 * @test |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
26 * @bug 8000968 |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
27 * @key regression |
12226
7944aba7ba41
8015107: NPG: Use consistent naming for metaspace concepts
ehelin
parents:
11987
diff
changeset
|
28 * @summary NPG: UseCompressedClassPointers asserts with ObjectAlignmentInBytes=32 |
11987
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
29 * @library /testlibrary |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
30 */ |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
31 |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
32 import com.oracle.java.testlibrary.*; |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
33 |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
34 public class CompressedKlassPointerAndOops { |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
35 |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
36 public static void main(String[] args) throws Exception { |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
37 |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
38 if (!Platform.is64bit()) { |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
39 // Can't test this on 32 bit, just pass |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
40 System.out.println("Skipping test on 32bit"); |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
41 return; |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
42 } |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
43 |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
44 runWithAlignment(16); |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
45 runWithAlignment(32); |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
46 runWithAlignment(64); |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
47 runWithAlignment(128); |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
48 } |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
49 |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
50 private static void runWithAlignment(int alignment) throws Exception { |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
51 ProcessBuilder pb; |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
52 OutputAnalyzer output; |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
53 |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
54 pb = ProcessTools.createJavaProcessBuilder( |
12226
7944aba7ba41
8015107: NPG: Use consistent naming for metaspace concepts
ehelin
parents:
11987
diff
changeset
|
55 "-XX:+UseCompressedClassPointers", |
11987
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
56 "-XX:+UseCompressedOops", |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
57 "-XX:ObjectAlignmentInBytes=" + alignment, |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
58 "-version"); |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
59 |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
60 output = new OutputAnalyzer(pb.start()); |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
61 output.shouldHaveExitValue(0); |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
62 } |
81e0f17ade64
8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
ctornqvi
parents:
diff
changeset
|
63 } |