Mercurial > hg > truffle
annotate test/compiler/whitebox/CompilerWhiteBoxTest.java @ 14673:08adf1b5f2b6
Merge
author | anoll |
---|---|
date | Wed, 05 Mar 2014 01:26:52 -0800 |
parents | bbfe3ac1471d |
children | 2dfa56e10640 |
rev | line source |
---|---|
8051 | 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 | |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
24 import com.sun.management.HotSpotDiagnosticMXBean; |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
25 import com.sun.management.VMOption; |
8051 | 26 import sun.hotspot.WhiteBox; |
27 import sun.management.ManagementFactoryHelper; | |
28 | |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
29 import java.lang.reflect.Constructor; |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
30 import java.lang.reflect.Executable; |
8051 | 31 import java.lang.reflect.Method; |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
32 import java.util.Objects; |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
33 import java.util.concurrent.Callable; |
14203
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
34 import java.util.function.Function; |
8051 | 35 |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
36 /** |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
37 * Abstract class for WhiteBox testing of JIT. |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
38 * |
8051 | 39 * @author igor.ignatyev@oracle.com |
40 */ | |
41 public abstract class CompilerWhiteBoxTest { | |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
42 /** {@code CompLevel::CompLevel_none} -- Interpreter */ |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
43 protected static int COMP_LEVEL_NONE = 0; |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
44 /** {@code CompLevel::CompLevel_any}, {@code CompLevel::CompLevel_all} */ |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
45 protected static int COMP_LEVEL_ANY = -1; |
10200
d1c9384eecb4
8012322: Tiered: CompilationPolicy::can_be_compiled(CompLevel_all) mistakenly return false
iignatyev
parents:
10113
diff
changeset
|
46 /** {@code CompLevel::CompLevel_simple} -- C1 */ |
d1c9384eecb4
8012322: Tiered: CompilationPolicy::can_be_compiled(CompLevel_all) mistakenly return false
iignatyev
parents:
10113
diff
changeset
|
47 protected static int COMP_LEVEL_SIMPLE = 1; |
12073 | 48 /** {@code CompLevel::CompLevel_limited_profile} -- C1, invocation & backedge counters */ |
49 protected static int COMP_LEVEL_LIMITED_PROFILE = 2; | |
50 /** {@code CompLevel::CompLevel_full_profile} -- C1, invocation & backedge counters + mdo */ | |
51 protected static int COMP_LEVEL_FULL_PROFILE = 3; | |
10200
d1c9384eecb4
8012322: Tiered: CompilationPolicy::can_be_compiled(CompLevel_all) mistakenly return false
iignatyev
parents:
10113
diff
changeset
|
52 /** {@code CompLevel::CompLevel_full_optimization} -- C2 or Shark */ |
d1c9384eecb4
8012322: Tiered: CompilationPolicy::can_be_compiled(CompLevel_all) mistakenly return false
iignatyev
parents:
10113
diff
changeset
|
53 protected static int COMP_LEVEL_FULL_OPTIMIZATION = 4; |
14203
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
54 /** Maximal value for CompLevel */ |
12073 | 55 protected static int COMP_LEVEL_MAX = COMP_LEVEL_FULL_OPTIMIZATION; |
10200
d1c9384eecb4
8012322: Tiered: CompilationPolicy::can_be_compiled(CompLevel_all) mistakenly return false
iignatyev
parents:
10113
diff
changeset
|
56 |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
57 /** Instance of WhiteBox */ |
8051 | 58 protected static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox(); |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
59 /** Value of {@code -XX:CompileThreshold} */ |
8051 | 60 protected static final int COMPILE_THRESHOLD |
61 = Integer.parseInt(getVMOption("CompileThreshold", "10000")); | |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
62 /** Value of {@code -XX:BackgroundCompilation} */ |
8766 | 63 protected static final boolean BACKGROUND_COMPILATION |
64 = Boolean.valueOf(getVMOption("BackgroundCompilation", "true")); | |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
65 /** Value of {@code -XX:TieredCompilation} */ |
9080
b84fd7d73702
8007288: Additional WB API for compiler's testing
iignatyev
parents:
8766
diff
changeset
|
66 protected static final boolean TIERED_COMPILATION |
b84fd7d73702
8007288: Additional WB API for compiler's testing
iignatyev
parents:
8766
diff
changeset
|
67 = Boolean.valueOf(getVMOption("TieredCompilation", "false")); |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
68 /** Value of {@code -XX:TieredStopAtLevel} */ |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
69 protected static final int TIERED_STOP_AT_LEVEL |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
70 = Integer.parseInt(getVMOption("TieredStopAtLevel", "0")); |
12026
11237ee74aae
8019915: whitebox testClearMethodStateTest fails with tiered on sparc
iignatyev
parents:
10200
diff
changeset
|
71 /** Flag for verbose output, true if {@code -Dverbose} specified */ |
11237ee74aae
8019915: whitebox testClearMethodStateTest fails with tiered on sparc
iignatyev
parents:
10200
diff
changeset
|
72 protected static final boolean IS_VERBOSE |
11237ee74aae
8019915: whitebox testClearMethodStateTest fails with tiered on sparc
iignatyev
parents:
10200
diff
changeset
|
73 = System.getProperty("verbose") != null; |
12073 | 74 /** count of invocation to triger compilation */ |
75 protected static final int THRESHOLD; | |
76 /** count of invocation to triger OSR compilation */ | |
77 protected static final long BACKEDGE_THRESHOLD; | |
12328
303826f477c6
8023452: TestCase$Helper(java.lang.Object) must be osr_compiled
iignatyev
parents:
12073
diff
changeset
|
78 /** Value of {@code java.vm.info} (interpreted|mixed|comp mode) */ |
14203
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
79 protected static final String MODE = System.getProperty("java.vm.info"); |
12073 | 80 |
81 static { | |
82 if (TIERED_COMPILATION) { | |
12958
600c83f8e6a5
8023318: compiler/whitebox tests timeout with enabled TieredCompilation
iignatyev
parents:
12328
diff
changeset
|
83 BACKEDGE_THRESHOLD = THRESHOLD = 150000; |
12073 | 84 } else { |
85 THRESHOLD = COMPILE_THRESHOLD; | |
86 BACKEDGE_THRESHOLD = COMPILE_THRESHOLD * Long.parseLong(getVMOption( | |
87 "OnStackReplacePercentage")); | |
88 } | |
89 } | |
8051 | 90 |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
91 /** |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
92 * Returns value of VM option. |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
93 * |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
94 * @param name option's name |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
95 * @return value of option or {@code null}, if option doesn't exist |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
96 * @throws NullPointerException if name is null |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
97 */ |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
98 protected static String getVMOption(String name) { |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
99 Objects.requireNonNull(name); |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
100 HotSpotDiagnosticMXBean diagnostic |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
101 = ManagementFactoryHelper.getDiagnosticMXBean(); |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
102 VMOption tmp; |
8051 | 103 try { |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
104 tmp = diagnostic.getVMOption(name); |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
105 } catch (IllegalArgumentException e) { |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
106 tmp = null; |
8051 | 107 } |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
108 return (tmp == null ? null : tmp.getValue()); |
8051 | 109 } |
110 | |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
111 /** |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
112 * Returns value of VM option or default value. |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
113 * |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
114 * @param name option's name |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
115 * @param defaultValue default value |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
116 * @return value of option or {@code defaultValue}, if option doesn't exist |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
117 * @throws NullPointerException if name is null |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
118 * @see #getVMOption(String) |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
119 */ |
8766 | 120 protected static String getVMOption(String name, String defaultValue) { |
121 String result = getVMOption(name); | |
8051 | 122 return result == null ? defaultValue : result; |
123 } | |
124 | |
10200
d1c9384eecb4
8012322: Tiered: CompilationPolicy::can_be_compiled(CompLevel_all) mistakenly return false
iignatyev
parents:
10113
diff
changeset
|
125 /** copy of is_c1_compile(int) from utilities/globalDefinitions.hpp */ |
d1c9384eecb4
8012322: Tiered: CompilationPolicy::can_be_compiled(CompLevel_all) mistakenly return false
iignatyev
parents:
10113
diff
changeset
|
126 protected static boolean isC1Compile(int compLevel) { |
d1c9384eecb4
8012322: Tiered: CompilationPolicy::can_be_compiled(CompLevel_all) mistakenly return false
iignatyev
parents:
10113
diff
changeset
|
127 return (compLevel > COMP_LEVEL_NONE) |
d1c9384eecb4
8012322: Tiered: CompilationPolicy::can_be_compiled(CompLevel_all) mistakenly return false
iignatyev
parents:
10113
diff
changeset
|
128 && (compLevel < COMP_LEVEL_FULL_OPTIMIZATION); |
d1c9384eecb4
8012322: Tiered: CompilationPolicy::can_be_compiled(CompLevel_all) mistakenly return false
iignatyev
parents:
10113
diff
changeset
|
129 } |
d1c9384eecb4
8012322: Tiered: CompilationPolicy::can_be_compiled(CompLevel_all) mistakenly return false
iignatyev
parents:
10113
diff
changeset
|
130 |
d1c9384eecb4
8012322: Tiered: CompilationPolicy::can_be_compiled(CompLevel_all) mistakenly return false
iignatyev
parents:
10113
diff
changeset
|
131 /** copy of is_c2_compile(int) from utilities/globalDefinitions.hpp */ |
d1c9384eecb4
8012322: Tiered: CompilationPolicy::can_be_compiled(CompLevel_all) mistakenly return false
iignatyev
parents:
10113
diff
changeset
|
132 protected static boolean isC2Compile(int compLevel) { |
d1c9384eecb4
8012322: Tiered: CompilationPolicy::can_be_compiled(CompLevel_all) mistakenly return false
iignatyev
parents:
10113
diff
changeset
|
133 return compLevel == COMP_LEVEL_FULL_OPTIMIZATION; |
d1c9384eecb4
8012322: Tiered: CompilationPolicy::can_be_compiled(CompLevel_all) mistakenly return false
iignatyev
parents:
10113
diff
changeset
|
134 } |
d1c9384eecb4
8012322: Tiered: CompilationPolicy::can_be_compiled(CompLevel_all) mistakenly return false
iignatyev
parents:
10113
diff
changeset
|
135 |
14203
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
136 protected static void main( |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
137 Function<TestCase, CompilerWhiteBoxTest> constructor, |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
138 String[] args) { |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
139 if (args.length == 0) { |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
140 for (TestCase test : SimpleTestCase.values()) { |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
141 constructor.apply(test).runTest(); |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
142 } |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
143 } else { |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
144 for (String name : args) { |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
145 constructor.apply(SimpleTestCase.valueOf(name)).runTest(); |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
146 } |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
147 } |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
148 } |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
149 |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
150 /** tested method */ |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
151 protected final Executable method; |
12073 | 152 protected final TestCase testCase; |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
153 |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
154 /** |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
155 * Constructor. |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
156 * |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
157 * @param testCase object, that contains tested method and way to invoke it. |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
158 */ |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
159 protected CompilerWhiteBoxTest(TestCase testCase) { |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
160 Objects.requireNonNull(testCase); |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
161 System.out.println("TEST CASE:" + testCase.name()); |
14203
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
162 method = testCase.getExecutable(); |
12073 | 163 this.testCase = testCase; |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
164 } |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
165 |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
166 /** |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
167 * Template method for testing. Prints tested method's info before |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
168 * {@linkplain #test()} and after {@linkplain #test()} or on thrown |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
169 * exception. |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
170 * |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
171 * @throws RuntimeException if method {@linkplain #test()} throws any |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
172 * exception |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
173 * @see #test() |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
174 */ |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
175 protected final void runTest() { |
8051 | 176 if (ManagementFactoryHelper.getCompilationMXBean() == null) { |
177 System.err.println( | |
178 "Warning: test is not applicable in interpreted mode"); | |
179 return; | |
180 } | |
181 System.out.println("at test's start:"); | |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
182 printInfo(); |
8051 | 183 try { |
184 test(); | |
185 } catch (Exception e) { | |
186 System.out.printf("on exception '%s':", e.getMessage()); | |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
187 printInfo(); |
8766 | 188 e.printStackTrace(); |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
189 if (e instanceof RuntimeException) { |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
190 throw (RuntimeException) e; |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
191 } |
8051 | 192 throw new RuntimeException(e); |
193 } | |
194 System.out.println("at test's end:"); | |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
195 printInfo(); |
8051 | 196 } |
197 | |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
198 /** |
14661
bbfe3ac1471d
8007270: Make IsMethodCompilable test work with tiered
neliasso
parents:
14203
diff
changeset
|
199 * Checks, that {@linkplain #method} is not compiled at the given compilation |
bbfe3ac1471d
8007270: Make IsMethodCompilable test work with tiered
neliasso
parents:
14203
diff
changeset
|
200 * level or above. |
bbfe3ac1471d
8007270: Make IsMethodCompilable test work with tiered
neliasso
parents:
14203
diff
changeset
|
201 * |
bbfe3ac1471d
8007270: Make IsMethodCompilable test work with tiered
neliasso
parents:
14203
diff
changeset
|
202 * @param compLevel |
bbfe3ac1471d
8007270: Make IsMethodCompilable test work with tiered
neliasso
parents:
14203
diff
changeset
|
203 * |
bbfe3ac1471d
8007270: Make IsMethodCompilable test work with tiered
neliasso
parents:
14203
diff
changeset
|
204 * @throws RuntimeException if {@linkplain #method} is in compiler queue or |
bbfe3ac1471d
8007270: Make IsMethodCompilable test work with tiered
neliasso
parents:
14203
diff
changeset
|
205 * is compiled, or if {@linkplain #method} has zero |
bbfe3ac1471d
8007270: Make IsMethodCompilable test work with tiered
neliasso
parents:
14203
diff
changeset
|
206 * compilation level. |
bbfe3ac1471d
8007270: Make IsMethodCompilable test work with tiered
neliasso
parents:
14203
diff
changeset
|
207 */ |
bbfe3ac1471d
8007270: Make IsMethodCompilable test work with tiered
neliasso
parents:
14203
diff
changeset
|
208 |
bbfe3ac1471d
8007270: Make IsMethodCompilable test work with tiered
neliasso
parents:
14203
diff
changeset
|
209 protected final void checkNotCompiled(int compLevel) { |
bbfe3ac1471d
8007270: Make IsMethodCompilable test work with tiered
neliasso
parents:
14203
diff
changeset
|
210 if (WHITE_BOX.isMethodQueuedForCompilation(method)) { |
bbfe3ac1471d
8007270: Make IsMethodCompilable test work with tiered
neliasso
parents:
14203
diff
changeset
|
211 throw new RuntimeException(method + " must not be in queue"); |
bbfe3ac1471d
8007270: Make IsMethodCompilable test work with tiered
neliasso
parents:
14203
diff
changeset
|
212 } |
bbfe3ac1471d
8007270: Make IsMethodCompilable test work with tiered
neliasso
parents:
14203
diff
changeset
|
213 if (WHITE_BOX.getMethodCompilationLevel(method, false) >= compLevel) { |
bbfe3ac1471d
8007270: Make IsMethodCompilable test work with tiered
neliasso
parents:
14203
diff
changeset
|
214 throw new RuntimeException(method + " comp_level must be >= maxCompLevel"); |
bbfe3ac1471d
8007270: Make IsMethodCompilable test work with tiered
neliasso
parents:
14203
diff
changeset
|
215 } |
bbfe3ac1471d
8007270: Make IsMethodCompilable test work with tiered
neliasso
parents:
14203
diff
changeset
|
216 if (WHITE_BOX.getMethodCompilationLevel(method, true) >= compLevel) { |
bbfe3ac1471d
8007270: Make IsMethodCompilable test work with tiered
neliasso
parents:
14203
diff
changeset
|
217 throw new RuntimeException(method + " osr_comp_level must be >= maxCompLevel"); |
bbfe3ac1471d
8007270: Make IsMethodCompilable test work with tiered
neliasso
parents:
14203
diff
changeset
|
218 } |
bbfe3ac1471d
8007270: Make IsMethodCompilable test work with tiered
neliasso
parents:
14203
diff
changeset
|
219 } |
bbfe3ac1471d
8007270: Make IsMethodCompilable test work with tiered
neliasso
parents:
14203
diff
changeset
|
220 |
bbfe3ac1471d
8007270: Make IsMethodCompilable test work with tiered
neliasso
parents:
14203
diff
changeset
|
221 /** |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
222 * Checks, that {@linkplain #method} is not compiled. |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
223 * |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
224 * @throws RuntimeException if {@linkplain #method} is in compiler queue or |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
225 * is compiled, or if {@linkplain #method} has zero |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
226 * compilation level. |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
227 */ |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
228 protected final void checkNotCompiled() { |
9080
b84fd7d73702
8007288: Additional WB API for compiler's testing
iignatyev
parents:
8766
diff
changeset
|
229 if (WHITE_BOX.isMethodQueuedForCompilation(method)) { |
b84fd7d73702
8007288: Additional WB API for compiler's testing
iignatyev
parents:
8766
diff
changeset
|
230 throw new RuntimeException(method + " must not be in queue"); |
b84fd7d73702
8007288: Additional WB API for compiler's testing
iignatyev
parents:
8766
diff
changeset
|
231 } |
12073 | 232 if (WHITE_BOX.isMethodCompiled(method, false)) { |
8051 | 233 throw new RuntimeException(method + " must be not compiled"); |
234 } | |
12073 | 235 if (WHITE_BOX.getMethodCompilationLevel(method, false) != 0) { |
8051 | 236 throw new RuntimeException(method + " comp_level must be == 0"); |
237 } | |
12073 | 238 if (WHITE_BOX.isMethodCompiled(method, true)) { |
239 throw new RuntimeException(method + " must be not osr_compiled"); | |
240 } | |
241 if (WHITE_BOX.getMethodCompilationLevel(method, true) != 0) { | |
242 throw new RuntimeException(method + " osr_comp_level must be == 0"); | |
243 } | |
14203
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
244 } |
8051 | 245 |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
246 /** |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
247 * Checks, that {@linkplain #method} is compiled. |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
248 * |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
249 * @throws RuntimeException if {@linkplain #method} isn't in compiler queue |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
250 * and isn't compiled, or if {@linkplain #method} |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
251 * has nonzero compilation level |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
252 */ |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
253 protected final void checkCompiled() { |
8051 | 254 final long start = System.currentTimeMillis(); |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
255 waitBackgroundCompilation(); |
8051 | 256 if (WHITE_BOX.isMethodQueuedForCompilation(method)) { |
257 System.err.printf("Warning: %s is still in queue after %dms%n", | |
258 method, System.currentTimeMillis() - start); | |
259 return; | |
260 } | |
14203
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
261 if (!WHITE_BOX.isMethodCompiled(method, testCase.isOsr())) { |
12073 | 262 throw new RuntimeException(method + " must be " |
14203
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
263 + (testCase.isOsr() ? "osr_" : "") + "compiled"); |
12073 | 264 } |
14203
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
265 if (WHITE_BOX.getMethodCompilationLevel(method, testCase.isOsr()) |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
266 == 0) { |
12073 | 267 throw new RuntimeException(method |
14203
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
268 + (testCase.isOsr() ? " osr_" : " ") |
12073 | 269 + "comp_level must be != 0"); |
270 } | |
271 } | |
272 | |
273 protected final void deoptimize() { | |
14203
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
274 WHITE_BOX.deoptimizeMethod(method, testCase.isOsr()); |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
275 if (testCase.isOsr()) { |
12073 | 276 WHITE_BOX.deoptimizeMethod(method, false); |
8051 | 277 } |
12073 | 278 } |
279 | |
280 protected final int getCompLevel() { | |
14203
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
281 return WHITE_BOX.getMethodCompilationLevel(method, testCase.isOsr()); |
12073 | 282 } |
283 | |
284 protected final boolean isCompilable() { | |
285 return WHITE_BOX.isMethodCompilable(method, COMP_LEVEL_ANY, | |
14203
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
286 testCase.isOsr()); |
12073 | 287 } |
288 | |
289 protected final boolean isCompilable(int compLevel) { | |
14203
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
290 return WHITE_BOX |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
291 .isMethodCompilable(method, compLevel, testCase.isOsr()); |
12073 | 292 } |
293 | |
294 protected final void makeNotCompilable() { | |
295 WHITE_BOX.makeMethodNotCompilable(method, COMP_LEVEL_ANY, | |
14203
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
296 testCase.isOsr()); |
12073 | 297 } |
298 | |
299 protected final void makeNotCompilable(int compLevel) { | |
14203
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
300 WHITE_BOX.makeMethodNotCompilable(method, compLevel, testCase.isOsr()); |
8051 | 301 } |
302 | |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
303 /** |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
304 * Waits for completion of background compilation of {@linkplain #method}. |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
305 */ |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
306 protected final void waitBackgroundCompilation() { |
8766 | 307 if (!BACKGROUND_COMPILATION) { |
308 return; | |
309 } | |
8051 | 310 final Object obj = new Object(); |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
311 for (int i = 0; i < 10 |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
312 && WHITE_BOX.isMethodQueuedForCompilation(method); ++i) { |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
313 synchronized (obj) { |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
314 try { |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
315 obj.wait(1000); |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
316 } catch (InterruptedException e) { |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
317 Thread.currentThread().interrupt(); |
8051 | 318 } |
319 } | |
320 } | |
321 } | |
322 | |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
323 /** |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
324 * Prints information about {@linkplain #method}. |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
325 */ |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
326 protected final void printInfo() { |
8051 | 327 System.out.printf("%n%s:%n", method); |
328 System.out.printf("\tcompilable:\t%b%n", | |
12073 | 329 WHITE_BOX.isMethodCompilable(method, COMP_LEVEL_ANY, false)); |
8051 | 330 System.out.printf("\tcompiled:\t%b%n", |
12073 | 331 WHITE_BOX.isMethodCompiled(method, false)); |
8051 | 332 System.out.printf("\tcomp_level:\t%d%n", |
12073 | 333 WHITE_BOX.getMethodCompilationLevel(method, false)); |
334 System.out.printf("\tosr_compilable:\t%b%n", | |
335 WHITE_BOX.isMethodCompilable(method, COMP_LEVEL_ANY, true)); | |
336 System.out.printf("\tosr_compiled:\t%b%n", | |
337 WHITE_BOX.isMethodCompiled(method, true)); | |
338 System.out.printf("\tosr_comp_level:\t%d%n", | |
339 WHITE_BOX.getMethodCompilationLevel(method, true)); | |
14203
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
340 System.out.printf("\tin_queue:\t%b%n", |
8051 | 341 WHITE_BOX.isMethodQueuedForCompilation(method)); |
342 System.out.printf("compile_queues_size:\t%d%n%n", | |
343 WHITE_BOX.getCompileQueuesSize()); | |
344 } | |
345 | |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
346 /** |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
347 * Executes testing. |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
348 */ |
8051 | 349 protected abstract void test() throws Exception; |
350 | |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
351 /** |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
352 * Tries to trigger compilation of {@linkplain #method} by call |
14203
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
353 * {@linkplain TestCase#getCallable()} enough times. |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
354 * |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
355 * @return accumulated result |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
356 * @see #compile(int) |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
357 */ |
8051 | 358 protected final int compile() { |
14203
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
359 if (testCase.isOsr()) { |
12073 | 360 return compile(1); |
361 } else { | |
362 return compile(THRESHOLD); | |
363 } | |
9080
b84fd7d73702
8007288: Additional WB API for compiler's testing
iignatyev
parents:
8766
diff
changeset
|
364 } |
b84fd7d73702
8007288: Additional WB API for compiler's testing
iignatyev
parents:
8766
diff
changeset
|
365 |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
366 /** |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
367 * Tries to trigger compilation of {@linkplain #method} by call |
14203
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
368 * {@linkplain TestCase#getCallable()} specified times. |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
369 * |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
370 * @param count invocation count |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
371 * @return accumulated result |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
372 */ |
9080
b84fd7d73702
8007288: Additional WB API for compiler's testing
iignatyev
parents:
8766
diff
changeset
|
373 protected final int compile(int count) { |
8051 | 374 int result = 0; |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
375 Integer tmp; |
8766 | 376 for (int i = 0; i < count; ++i) { |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
377 try { |
14203
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
378 tmp = testCase.getCallable().call(); |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
379 } catch (Exception e) { |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
380 tmp = null; |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
381 } |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
382 result += tmp == null ? 0 : tmp; |
8051 | 383 } |
12026
11237ee74aae
8019915: whitebox testClearMethodStateTest fails with tiered on sparc
iignatyev
parents:
10200
diff
changeset
|
384 if (IS_VERBOSE) { |
11237ee74aae
8019915: whitebox testClearMethodStateTest fails with tiered on sparc
iignatyev
parents:
10200
diff
changeset
|
385 System.out.println("method was invoked " + count + " times"); |
11237ee74aae
8019915: whitebox testClearMethodStateTest fails with tiered on sparc
iignatyev
parents:
10200
diff
changeset
|
386 } |
8051 | 387 return result; |
388 } | |
14203
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
389 |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
390 /** |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
391 * Utility interface provides tested method and object to invoke it. |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
392 */ |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
393 public interface TestCase { |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
394 /** the name of test case */ |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
395 String name(); |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
396 |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
397 /** tested method */ |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
398 Executable getExecutable(); |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
399 |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
400 /** object to invoke {@linkplain #getExecutable()} */ |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
401 Callable<Integer> getCallable(); |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
402 |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
403 /** flag for OSR test case */ |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
404 boolean isOsr(); |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
405 } |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
406 } |
8051 | 407 |
14203
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
408 enum SimpleTestCase implements CompilerWhiteBoxTest.TestCase { |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
409 /** constructor test case */ |
12073 | 410 CONSTRUCTOR_TEST(Helper.CONSTRUCTOR, Helper.CONSTRUCTOR_CALLABLE, false), |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
411 /** method test case */ |
12073 | 412 METOD_TEST(Helper.METHOD, Helper.METHOD_CALLABLE, false), |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
413 /** static method test case */ |
12073 | 414 STATIC_TEST(Helper.STATIC, Helper.STATIC_CALLABLE, false), |
415 /** OSR constructor test case */ | |
416 OSR_CONSTRUCTOR_TEST(Helper.OSR_CONSTRUCTOR, | |
417 Helper.OSR_CONSTRUCTOR_CALLABLE, true), | |
12958
600c83f8e6a5
8023318: compiler/whitebox tests timeout with enabled TieredCompilation
iignatyev
parents:
12328
diff
changeset
|
418 /** OSR method test case */ |
12073 | 419 OSR_METOD_TEST(Helper.OSR_METHOD, Helper.OSR_METHOD_CALLABLE, true), |
420 /** OSR static method test case */ | |
421 OSR_STATIC_TEST(Helper.OSR_STATIC, Helper.OSR_STATIC_CALLABLE, true); | |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
422 |
14203
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
423 private final Executable executable; |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
424 private final Callable<Integer> callable; |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
425 private final boolean isOsr; |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
426 |
14203
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
427 private SimpleTestCase(Executable executable, Callable<Integer> callable, |
12073 | 428 boolean isOsr) { |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
429 this.executable = executable; |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
430 this.callable = callable; |
12073 | 431 this.isOsr = isOsr; |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
432 } |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
433 |
14203
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
434 @Override |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
435 public Executable getExecutable() { |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
436 return executable; |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
437 } |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
438 |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
439 @Override |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
440 public Callable<Integer> getCallable() { |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
441 return callable; |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
442 } |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
443 |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
444 @Override |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
445 public boolean isOsr() { |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
446 return isOsr; |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
447 } |
f9a4b59ae350
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
12958
diff
changeset
|
448 |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
449 private static class Helper { |
12073 | 450 |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
451 private static final Callable<Integer> CONSTRUCTOR_CALLABLE |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
452 = new Callable<Integer>() { |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
453 @Override |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
454 public Integer call() throws Exception { |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
455 return new Helper(1337).hashCode(); |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
456 } |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
457 }; |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
458 |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
459 private static final Callable<Integer> METHOD_CALLABLE |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
460 = new Callable<Integer>() { |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
461 private final Helper helper = new Helper(); |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
462 |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
463 @Override |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
464 public Integer call() throws Exception { |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
465 return helper.method(); |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
466 } |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
467 }; |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
468 |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
469 private static final Callable<Integer> STATIC_CALLABLE |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
470 = new Callable<Integer>() { |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
471 @Override |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
472 public Integer call() throws Exception { |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
473 return staticMethod(); |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
474 } |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
475 }; |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
476 |
12073 | 477 private static final Callable<Integer> OSR_CONSTRUCTOR_CALLABLE |
478 = new Callable<Integer>() { | |
479 @Override | |
480 public Integer call() throws Exception { | |
481 return new Helper(null).hashCode(); | |
482 } | |
483 }; | |
484 | |
485 private static final Callable<Integer> OSR_METHOD_CALLABLE | |
486 = new Callable<Integer>() { | |
487 private final Helper helper = new Helper(); | |
488 | |
489 @Override | |
490 public Integer call() throws Exception { | |
491 return helper.osrMethod(); | |
492 } | |
493 }; | |
494 | |
495 private static final Callable<Integer> OSR_STATIC_CALLABLE | |
496 = new Callable<Integer>() { | |
497 @Override | |
498 public Integer call() throws Exception { | |
499 return osrStaticMethod(); | |
500 } | |
501 }; | |
502 | |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
503 private static final Constructor CONSTRUCTOR; |
12073 | 504 private static final Constructor OSR_CONSTRUCTOR; |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
505 private static final Method METHOD; |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
506 private static final Method STATIC; |
12073 | 507 private static final Method OSR_METHOD; |
508 private static final Method OSR_STATIC; | |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
509 |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
510 static { |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
511 try { |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
512 CONSTRUCTOR = Helper.class.getDeclaredConstructor(int.class); |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
513 } catch (NoSuchMethodException | SecurityException e) { |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
514 throw new RuntimeException( |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
515 "exception on getting method Helper.<init>(int)", e); |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
516 } |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
517 try { |
12073 | 518 OSR_CONSTRUCTOR = Helper.class.getDeclaredConstructor( |
519 Object.class); | |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
520 } catch (NoSuchMethodException | SecurityException e) { |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
521 throw new RuntimeException( |
12073 | 522 "exception on getting method Helper.<init>(Object)", e); |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
523 } |
12073 | 524 METHOD = getMethod("method"); |
525 STATIC = getMethod("staticMethod"); | |
526 OSR_METHOD = getMethod("osrMethod"); | |
527 OSR_STATIC = getMethod("osrStaticMethod"); | |
528 } | |
529 | |
530 private static Method getMethod(String name) { | |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
531 try { |
12073 | 532 return Helper.class.getDeclaredMethod(name); |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
533 } catch (NoSuchMethodException | SecurityException e) { |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
534 throw new RuntimeException( |
12073 | 535 "exception on getting method Helper." + name, e); |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
536 } |
12073 | 537 |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
538 } |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
539 |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
540 private static int staticMethod() { |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
541 return 1138; |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
542 } |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
543 |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
544 private int method() { |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
545 return 42; |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
546 } |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
547 |
12073 | 548 private static int osrStaticMethod() { |
549 int result = 0; | |
550 for (long i = 0; i < CompilerWhiteBoxTest.BACKEDGE_THRESHOLD; ++i) { | |
551 result += staticMethod(); | |
552 } | |
553 return result; | |
554 } | |
555 | |
556 private int osrMethod() { | |
557 int result = 0; | |
558 for (long i = 0; i < CompilerWhiteBoxTest.BACKEDGE_THRESHOLD; ++i) { | |
559 result += method(); | |
560 } | |
561 return result; | |
562 } | |
563 | |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
564 private final int x; |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
565 |
12073 | 566 // for method and OSR method test case |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
567 public Helper() { |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
568 x = 0; |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
569 } |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
570 |
12073 | 571 // for OSR constructor test case |
572 private Helper(Object o) { | |
573 int result = 0; | |
574 for (long i = 0; i < CompilerWhiteBoxTest.BACKEDGE_THRESHOLD; ++i) { | |
575 result += method(); | |
576 } | |
577 x = result; | |
578 } | |
579 | |
580 // for constructor test case | |
10113
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
581 private Helper(int x) { |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
582 this.x = x; |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
583 } |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
584 |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
585 @Override |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
586 public int hashCode() { |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
587 return x; |
4b2eebe03f93
8011971: WB API doesn't accept j.l.reflect.Constructor
iignatyev
parents:
9080
diff
changeset
|
588 } |
8051 | 589 } |
590 } |