Mercurial > hg > truffle
comparison test/runtime/contended/HasNonStatic.java @ 10447:638387729ddf
Merge.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Thu, 20 Jun 2013 19:10:40 +0200 |
parents | 3970971c91e0 |
children |
comparison
equal
deleted
inserted
replaced
10446:746fa60be266 | 10447:638387729ddf |
---|---|
1 /* | |
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. | |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | |
20 * or visit www.oracle.com if you need additional information or have any | |
21 * questions. | |
22 */ | |
23 | |
24 import java.io.BufferedReader; | |
25 import java.io.InputStreamReader; | |
26 import java.lang.Class; | |
27 import java.lang.String; | |
28 import java.lang.System; | |
29 import java.lang.management.ManagementFactory; | |
30 import java.lang.management.RuntimeMXBean; | |
31 import java.util.ArrayList; | |
32 import java.util.List; | |
33 import java.util.concurrent.CyclicBarrier; | |
34 import java.util.regex.Matcher; | |
35 import java.util.regex.Pattern; | |
36 import java.lang.reflect.Field; | |
37 import java.lang.reflect.Modifier; | |
38 import sun.misc.Unsafe; | |
39 import sun.misc.Contended; | |
40 | |
41 /* | |
42 * @test | |
43 * @bug 8015270 | |
44 * @summary \@Contended: fix multiple issues in the layout code | |
45 * | |
46 * @run main/othervm -XX:-RestrictContended HasNonStatic | |
47 */ | |
48 public class HasNonStatic { | |
49 | |
50 public static void main(String[] args) throws Exception { | |
51 R1 r1 = new R1(); | |
52 R2 r2 = new R2(); | |
53 R3 r3 = new R3(); | |
54 R4 r4 = new R4(); | |
55 } | |
56 | |
57 public static class R1 { | |
58 @Contended | |
59 Object o; | |
60 } | |
61 | |
62 @Contended | |
63 public static class R2 { | |
64 Object o; | |
65 } | |
66 | |
67 @Contended | |
68 public static class R3 { | |
69 } | |
70 | |
71 public static class R4 extends R3 { | |
72 } | |
73 | |
74 } | |
75 |