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 jdk.test.lib.Utils;
25 import java.lang.reflect.Executable;
26 import java.util.ArrayList;
27 import java.util.Arrays;
28 import java.util.Collections;
29 import java.util.List;
30 import sun.hotspot.WhiteBox;
31
32 public class SegmentedCodeCacheDtraceTestWorker {
33
34 private static final String METHOD1_NAME = "foo";
35 private static final String METHOD2_NAME = "bar";
36 private static final String METHOD3_NAME = "baz";
37 public static final List<Executable> TESTED_METHODS_LIST;
38 private final WhiteBox wb;
39 private final int compLevels[];
40
41 static {
42 List<Executable> methods = new ArrayList<>();
43 try {
44 // method order is important. Need to place methods in call order,
45 // to be able to verify results later
46 methods.add(SegmentedCodeCacheDtraceTestWorker.class.getMethod(METHOD1_NAME));
47 methods.add(SegmentedCodeCacheDtraceTestWorker.class.getMethod(METHOD2_NAME));
48 methods.add(SegmentedCodeCacheDtraceTestWorker.class.getMethod(METHOD3_NAME));
49 } catch (NoSuchMethodException e) {
50 throw new Error("TESTBUG: no expected method found", e);
|
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 package compiler.codecache.dtrace;
25
26 import jdk.test.lib.Utils;
27 import sun.hotspot.WhiteBox;
28
29 import java.lang.reflect.Executable;
30 import java.util.ArrayList;
31 import java.util.Arrays;
32 import java.util.Collections;
33 import java.util.List;
34
35 public class SegmentedCodeCacheDtraceTestWorker {
36
37 private static final String METHOD1_NAME = "foo";
38 private static final String METHOD2_NAME = "bar";
39 private static final String METHOD3_NAME = "baz";
40 public static final List<Executable> TESTED_METHODS_LIST;
41 private final WhiteBox wb;
42 private final int compLevels[];
43
44 static {
45 List<Executable> methods = new ArrayList<>();
46 try {
47 // method order is important. Need to place methods in call order,
48 // to be able to verify results later
49 methods.add(SegmentedCodeCacheDtraceTestWorker.class.getMethod(METHOD1_NAME));
50 methods.add(SegmentedCodeCacheDtraceTestWorker.class.getMethod(METHOD2_NAME));
51 methods.add(SegmentedCodeCacheDtraceTestWorker.class.getMethod(METHOD3_NAME));
52 } catch (NoSuchMethodException e) {
53 throw new Error("TESTBUG: no expected method found", e);
|