author | ctornqvi |
Thu, 03 Mar 2016 12:44:34 -0800 | |
changeset 36209 | 8db2a78cbc29 |
parent 34272 | 1b277b5ee6e3 |
child 38152 | 80e5da81fb2c |
permissions | -rw-r--r-- |
17831
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
1 |
/* |
36209
8db2a78cbc29
8151156: [TESTBUG] Integrate trivial Hotspot test changes from Jake before Jigsaw M3
ctornqvi
parents:
34272
diff
changeset
|
2 |
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. |
17831
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
4 |
* |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
8 |
* |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
13 |
* accompanied this code). |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
14 |
* |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
18 |
* |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
21 |
* questions. |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
22 |
*/ |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
23 |
|
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
24 |
import java.io.BufferedReader; |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
25 |
import java.io.InputStreamReader; |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
26 |
import java.lang.Class; |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
27 |
import java.lang.String; |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
28 |
import java.lang.System; |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
29 |
import java.lang.management.ManagementFactory; |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
30 |
import java.lang.management.RuntimeMXBean; |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
31 |
import java.util.ArrayList; |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
32 |
import java.util.List; |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
33 |
import java.util.concurrent.CyclicBarrier; |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
34 |
import java.util.regex.Matcher; |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
35 |
import java.util.regex.Pattern; |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
36 |
import java.lang.reflect.Field; |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
37 |
import java.lang.reflect.Modifier; |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
38 |
import sun.misc.Unsafe; |
34272
1b277b5ee6e3
8140687: Move @Contended to the jdk.internal.vm.annotation package
chegar
parents:
29678
diff
changeset
|
39 |
import jdk.internal.vm.annotation.Contended; |
17831
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
40 |
|
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
41 |
/* |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
42 |
* @test |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
43 |
* @bug 8015270 |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
44 |
* @summary \@Contended: fix multiple issues in the layout code |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
45 |
* |
36209
8db2a78cbc29
8151156: [TESTBUG] Integrate trivial Hotspot test changes from Jake before Jigsaw M3
ctornqvi
parents:
34272
diff
changeset
|
46 |
* @modules java.base/jdk.internal.vm.annotation |
17831
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
47 |
* @run main/othervm -XX:-RestrictContended HasNonStatic |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
48 |
*/ |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
49 |
public class HasNonStatic { |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
50 |
|
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
51 |
public static void main(String[] args) throws Exception { |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
52 |
R1 r1 = new R1(); |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
53 |
R2 r2 = new R2(); |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
54 |
R3 r3 = new R3(); |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
55 |
R4 r4 = new R4(); |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
56 |
} |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
57 |
|
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
58 |
public static class R1 { |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
59 |
@Contended |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
60 |
Object o; |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
61 |
} |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
62 |
|
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
63 |
@Contended |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
64 |
public static class R2 { |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
65 |
Object o; |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
66 |
} |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
67 |
|
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
68 |
@Contended |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
69 |
public static class R3 { |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
70 |
} |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
71 |
|
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
72 |
public static class R4 extends R3 { |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
73 |
} |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
74 |
|
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
75 |
} |
d8112d90739f
8015270: @Contended: fix multiple issues in the layout code
shade
parents:
diff
changeset
|
76 |