Mercurial > hg > graal-jvmci-8
annotate c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/VMExitsNative.java @ 2061:c0b1d6a44a02
Implemented fast inline array allocation.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Sat, 22 Jan 2011 14:37:43 +0100 |
parents | 89bf01e6b049 |
children | 76607939e139 |
rev | line source |
---|---|
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
1 /* |
1437
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
2 * Copyright (c) 2010 Sun Microsystems, Inc. All rights reserved. |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
3 * |
1437
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
4 * Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
5 * that is described in this document. In particular, and without limitation, these intellectual property |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
6 * rights may include one or more of the U.S. patents listed at http://www.sun.com/patents and one or |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
7 * more additional patents or pending patent applications in the U.S. and in other countries. |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
8 * |
1437
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
9 * U.S. Government Rights - Commercial software. Government users are subject to the Sun |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
10 * Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
11 * supplements. |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
12 * |
1437
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
13 * Use is subject to license terms. Sun, Sun Microsystems, the Sun logo, Java and Solaris are trademarks or |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
14 * registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. All SPARC trademarks |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
15 * are used under license and are trademarks or registered trademarks of SPARC International, Inc. in the |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
16 * U.S. and other countries. |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
17 * |
1437
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
18 * UNIX is a registered trademark in the U.S. and other countries, exclusively licensed through X/Open |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
19 * Company, Ltd. |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
20 */ |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
21 |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
22 package com.sun.hotspot.c1x; |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
23 |
1423
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1422
diff
changeset
|
24 import java.io.*; |
1437
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
25 import java.lang.reflect.*; |
1449
8cfe3537a0d3
Pointer verification stub. Two loose oop fixes in C1X C++ part. Logging which methods have been compiled.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1445
diff
changeset
|
26 import java.util.*; |
1422
3483ec571caf
* using reflected objects instead of oops
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1421
diff
changeset
|
27 |
1437
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
28 import com.sun.c1x.*; |
1479
71cd4b9610eb
Two fixes for DaCapo / SpecJVM2008 runs.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1470
diff
changeset
|
29 import com.sun.c1x.debug.*; |
1421
6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
30 import com.sun.cri.ci.*; |
6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
31 import com.sun.cri.ri.*; |
1423
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1422
diff
changeset
|
32 import com.sun.hotspot.c1x.logging.*; |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
33 |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
34 /** |
1422
3483ec571caf
* using reflected objects instead of oops
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1421
diff
changeset
|
35 * Exits from the HotSpot VM into Java code. |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
36 * |
1422
3483ec571caf
* using reflected objects instead of oops
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1421
diff
changeset
|
37 * @author Thomas Wuerthinger, Lukas Stadler |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
38 */ |
1421
6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
39 public class VMExitsNative implements VMExits { |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
40 |
1462
1845386f5403
Full GC after bootstrap. Disable IRChecker by default. Disable compiled method logging by default.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1449
diff
changeset
|
41 public static final boolean LogCompiledMethods = false; |
1438
a7a0ef3c6858
Added timing printout on VM shutdown.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1437
diff
changeset
|
42 public static boolean compileMethods = true; |
a7a0ef3c6858
Added timing printout on VM shutdown.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1437
diff
changeset
|
43 |
1449
8cfe3537a0d3
Pointer verification stub. Two loose oop fixes in C1X C++ part. Logging which methods have been compiled.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1445
diff
changeset
|
44 /** |
8cfe3537a0d3
Pointer verification stub. Two loose oop fixes in C1X C++ part. Logging which methods have been compiled.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1445
diff
changeset
|
45 * Default option configuration for C1X. |
8cfe3537a0d3
Pointer verification stub. Two loose oop fixes in C1X C++ part. Logging which methods have been compiled.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1445
diff
changeset
|
46 */ |
8cfe3537a0d3
Pointer verification stub. Two loose oop fixes in C1X C++ part. Logging which methods have been compiled.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1445
diff
changeset
|
47 static { |
8cfe3537a0d3
Pointer verification stub. Two loose oop fixes in C1X C++ part. Logging which methods have been compiled.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1445
diff
changeset
|
48 C1XOptions.setOptimizationLevel(3); |
8cfe3537a0d3
Pointer verification stub. Two loose oop fixes in C1X C++ part. Logging which methods have been compiled.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1445
diff
changeset
|
49 C1XOptions.OptInlineExcept = false; |
8cfe3537a0d3
Pointer verification stub. Two loose oop fixes in C1X C++ part. Logging which methods have been compiled.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1445
diff
changeset
|
50 C1XOptions.OptInlineSynchronized = false; |
1465
2c754f3a2722
Inlining of static final field values. Java mirror instead of VmID. Support for PrintMetrics option.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1462
diff
changeset
|
51 C1XOptions.DetailedAsserts = false; |
1942
00bc9eaf0e24
Support for -XX:+UseFastLocking flag. Fixed monitor enter XIR template for correct debug info at the runtime call.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1941
diff
changeset
|
52 C1XOptions.CommentedAssembly = false; |
1939
b7fb5f1e0747
Two new flags: -XX:MaxCompilationID (to enable debugging binary search for problematic method) and -XX:C1XBailoutIsFatal.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1937
diff
changeset
|
53 C1XOptions.MethodEndBreakpointGuards = 2; |
1449
8cfe3537a0d3
Pointer verification stub. Two loose oop fixes in C1X C++ part. Logging which methods have been compiled.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1445
diff
changeset
|
54 } |
8cfe3537a0d3
Pointer verification stub. Two loose oop fixes in C1X C++ part. Logging which methods have been compiled.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1445
diff
changeset
|
55 |
1421
6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
56 @Override |
1437
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
57 public boolean setOption(String option) { |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
58 if (option.length() == 0) { |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
59 return false; |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
60 } |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
61 |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
62 Object value = null; |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
63 String fieldName = null; |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
64 String valueString = null; |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
65 |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
66 char first = option.charAt(0); |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
67 if (first == '+' || first == '-') { |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
68 fieldName = option.substring(1); |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
69 value = (first == '+'); |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
70 } else { |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
71 int index = option.indexOf('='); |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
72 if (index == -1) { |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
73 return false; |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
74 } |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
75 fieldName = option.substring(0, index); |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
76 valueString = option.substring(index + 1); |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
77 } |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
78 |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
79 Field f; |
1421
6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
80 try { |
1437
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
81 f = C1XOptions.class.getField(fieldName); |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
82 |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
83 if (value == null) { |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
84 if (f.getType() == Float.TYPE) { |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
85 value = Float.parseFloat(valueString); |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
86 } else if (f.getType() == Double.TYPE) { |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
87 value = Double.parseDouble(valueString); |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
88 } else if (f.getType() == Integer.TYPE) { |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
89 value = Integer.parseInt(valueString); |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
90 } else if (f.getType() == Boolean.TYPE) { |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
91 value = Boolean.parseBoolean(valueString); |
1443
1b7acf75f900
Made setting C1X options from HotSpot command line more robust.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1439
diff
changeset
|
92 } else if (f.getType() == String.class) { |
1b7acf75f900
Made setting C1X options from HotSpot command line more robust.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1439
diff
changeset
|
93 value = valueString; |
1437
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
94 } |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
95 } |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
96 if (value != null) { |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
97 f.set(null, value); |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
98 Logger.info("Set option " + fieldName + " to " + value); |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
99 } else { |
1443
1b7acf75f900
Made setting C1X options from HotSpot command line more robust.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1439
diff
changeset
|
100 Logger.info("Wrong value \"" + valueString + "\" for option " + fieldName); |
1437
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
101 return false; |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
102 } |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
103 } catch (SecurityException e) { |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
104 Logger.info("Security exception when setting option " + option); |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
105 return false; |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
106 } catch (NoSuchFieldException e) { |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
107 Logger.info("Could not find option " + fieldName); |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
108 return false; |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
109 } catch (IllegalArgumentException e) { |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
110 Logger.info("Illegal value for option " + option); |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
111 return false; |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
112 } catch (IllegalAccessException e) { |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
113 Logger.info("Illegal access exception when setting option " + option); |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
114 return false; |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
115 } |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
116 |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
117 return true; |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
118 } |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
119 |
1449
8cfe3537a0d3
Pointer verification stub. Two loose oop fixes in C1X C++ part. Logging which methods have been compiled.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1445
diff
changeset
|
120 private static Set<String> compiledMethods = new HashSet<String>(); |
8cfe3537a0d3
Pointer verification stub. Two loose oop fixes in C1X C++ part. Logging which methods have been compiled.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1445
diff
changeset
|
121 |
1437
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
122 @Override |
1445
a7b84a5e16c6
Remove caching for constant pool entries (same index can be used to retrieve e.g. type and field). Fast fail on bailout in C1X.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1444
diff
changeset
|
123 public void compileMethod(long methodVmId, String name, int entryBCI) throws Throwable { |
1438
a7a0ef3c6858
Added timing printout on VM shutdown.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1437
diff
changeset
|
124 |
a7a0ef3c6858
Added timing printout on VM shutdown.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1437
diff
changeset
|
125 if (!compileMethods) { |
a7a0ef3c6858
Added timing printout on VM shutdown.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1437
diff
changeset
|
126 return; |
a7a0ef3c6858
Added timing printout on VM shutdown.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1437
diff
changeset
|
127 } |
a7a0ef3c6858
Added timing printout on VM shutdown.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1437
diff
changeset
|
128 |
1437
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1434
diff
changeset
|
129 try { |
1421
6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
130 Compiler compiler = Compiler.getInstance(); |
1429
abc670a709dc
* -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1423
diff
changeset
|
131 HotSpotMethodResolved riMethod = new HotSpotMethodResolved(methodVmId, name); |
1439
d0c8d3a2a7e8
Modified domake script to use (and require) JRE7 environment variable for find the base of a JRE 7 installation. This script no also ensures that $JRE7/lib/amd64/jvm.cfg has the right value for '-client'.
Doug Simon <doug.simon@oracle.com>
parents:
1438
diff
changeset
|
132 CiResult result = compiler.getCompiler().compileMethod(riMethod, -1, null); |
1462
1845386f5403
Full GC after bootstrap. Disable IRChecker by default. Disable compiled method logging by default.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1449
diff
changeset
|
133 if (LogCompiledMethods) { |
1845386f5403
Full GC after bootstrap. Disable IRChecker by default. Disable compiled method logging by default.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1449
diff
changeset
|
134 String qualifiedName = CiUtil.toJavaName(riMethod.holder()) + "::" + riMethod.name(); |
1845386f5403
Full GC after bootstrap. Disable IRChecker by default. Disable compiled method logging by default.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1449
diff
changeset
|
135 compiledMethods.add(qualifiedName); |
1845386f5403
Full GC after bootstrap. Disable IRChecker by default. Disable compiled method logging by default.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1449
diff
changeset
|
136 } |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
137 |
1421
6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
138 if (result.bailout() != null) { |
1423
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1422
diff
changeset
|
139 StringWriter out = new StringWriter(); |
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1422
diff
changeset
|
140 result.bailout().printStackTrace(new PrintWriter(out)); |
1449
8cfe3537a0d3
Pointer verification stub. Two loose oop fixes in C1X C++ part. Logging which methods have been compiled.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1445
diff
changeset
|
141 Throwable cause = result.bailout().getCause(); |
1479
71cd4b9610eb
Two fixes for DaCapo / SpecJVM2008 runs.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1470
diff
changeset
|
142 TTY.println("Bailout:\n" + out.toString()); |
1449
8cfe3537a0d3
Pointer verification stub. Two loose oop fixes in C1X C++ part. Logging which methods have been compiled.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1445
diff
changeset
|
143 if (cause != null) { |
8cfe3537a0d3
Pointer verification stub. Two loose oop fixes in C1X C++ part. Logging which methods have been compiled.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1445
diff
changeset
|
144 Logger.info("Trace for cause: "); |
8cfe3537a0d3
Pointer verification stub. Two loose oop fixes in C1X C++ part. Logging which methods have been compiled.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1445
diff
changeset
|
145 for (StackTraceElement e : cause.getStackTrace()) { |
8cfe3537a0d3
Pointer verification stub. Two loose oop fixes in C1X C++ part. Logging which methods have been compiled.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1445
diff
changeset
|
146 String current = e.getClassName() + "::" + e.getMethodName(); |
8cfe3537a0d3
Pointer verification stub. Two loose oop fixes in C1X C++ part. Logging which methods have been compiled.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1445
diff
changeset
|
147 String type = ""; |
8cfe3537a0d3
Pointer verification stub. Two loose oop fixes in C1X C++ part. Logging which methods have been compiled.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1445
diff
changeset
|
148 if (compiledMethods.contains(current)) { |
8cfe3537a0d3
Pointer verification stub. Two loose oop fixes in C1X C++ part. Logging which methods have been compiled.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1445
diff
changeset
|
149 type = "compiled"; |
8cfe3537a0d3
Pointer verification stub. Two loose oop fixes in C1X C++ part. Logging which methods have been compiled.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1445
diff
changeset
|
150 } |
8cfe3537a0d3
Pointer verification stub. Two loose oop fixes in C1X C++ part. Logging which methods have been compiled.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1445
diff
changeset
|
151 Logger.info(String.format("%-10s %3d %s", type, e.getLineNumber(), current)); |
8cfe3537a0d3
Pointer verification stub. Two loose oop fixes in C1X C++ part. Logging which methods have been compiled.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1445
diff
changeset
|
152 } |
8cfe3537a0d3
Pointer verification stub. Two loose oop fixes in C1X C++ part. Logging which methods have been compiled.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1445
diff
changeset
|
153 } |
2055
99ad52189524
Refactorings to get towards less CRI overhead.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
2051
diff
changeset
|
154 System.out.println("BAILOUT:" + result.bailout().getMessage()); |
2061
c0b1d6a44a02
Implemented fast inline array allocation.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
2057
diff
changeset
|
155 String s = result.bailout().getMessage(); |
c0b1d6a44a02
Implemented fast inline array allocation.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
2057
diff
changeset
|
156 if (cause != null) { |
c0b1d6a44a02
Implemented fast inline array allocation.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
2057
diff
changeset
|
157 s = cause.getMessage(); |
c0b1d6a44a02
Implemented fast inline array allocation.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
2057
diff
changeset
|
158 } |
c0b1d6a44a02
Implemented fast inline array allocation.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
2057
diff
changeset
|
159 Compiler.getVMEntries().recordBailout(s); |
1421
6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
160 } else { |
1423
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1422
diff
changeset
|
161 HotSpotTargetMethod.installMethod(riMethod, result.targetMethod()); |
1421
6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
162 } |
6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
163 } catch (Throwable t) { |
1423
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1422
diff
changeset
|
164 StringWriter out = new StringWriter(); |
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1422
diff
changeset
|
165 t.printStackTrace(new PrintWriter(out)); |
1479
71cd4b9610eb
Two fixes for DaCapo / SpecJVM2008 runs.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1470
diff
changeset
|
166 TTY.println("Compilation interrupted:\n" + out.toString()); |
1445
a7b84a5e16c6
Remove caching for constant pool entries (same index can be used to retrieve e.g. type and field). Fast fail on bailout in C1X.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1444
diff
changeset
|
167 throw t; |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
168 } |
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
169 } |
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
170 |
1421
6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
171 @Override |
1429
abc670a709dc
* -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1423
diff
changeset
|
172 public RiMethod createRiMethodResolved(long vmId, String name) { |
abc670a709dc
* -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1423
diff
changeset
|
173 return new HotSpotMethodResolved(vmId, name); |
abc670a709dc
* -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1423
diff
changeset
|
174 } |
abc670a709dc
* -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1423
diff
changeset
|
175 |
abc670a709dc
* -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1423
diff
changeset
|
176 @Override |
abc670a709dc
* -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1423
diff
changeset
|
177 public RiMethod createRiMethodUnresolved(String name, String signature, RiType holder) { |
abc670a709dc
* -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1423
diff
changeset
|
178 return new HotSpotMethodUnresolved(name, signature, holder); |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
179 } |
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
180 |
1421
6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
181 @Override |
1422
3483ec571caf
* using reflected objects instead of oops
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1421
diff
changeset
|
182 public RiSignature createRiSignature(String signature) { |
3483ec571caf
* using reflected objects instead of oops
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1421
diff
changeset
|
183 return new HotSpotSignature(signature); |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
184 } |
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
185 |
1421
6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
186 @Override |
1422
3483ec571caf
* using reflected objects instead of oops
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1421
diff
changeset
|
187 public RiField createRiField(RiType holder, String name, RiType type, int offset) { |
1941
79d04223b8a5
Added caching for resolved types and resolved fields.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1939
diff
changeset
|
188 if (offset != -1) { |
79d04223b8a5
Added caching for resolved types and resolved fields.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1939
diff
changeset
|
189 HotSpotTypeResolved resolved = (HotSpotTypeResolved) holder; |
79d04223b8a5
Added caching for resolved types and resolved fields.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1939
diff
changeset
|
190 return resolved.createRiField(name, type, offset); |
79d04223b8a5
Added caching for resolved types and resolved fields.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1939
diff
changeset
|
191 } |
1422
3483ec571caf
* using reflected objects instead of oops
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1421
diff
changeset
|
192 return new HotSpotField(holder, name, type, offset); |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
193 } |
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
194 |
1421
6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
195 @Override |
1423
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1422
diff
changeset
|
196 public RiType createRiType(long vmId, String name) { |
1429
abc670a709dc
* -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1423
diff
changeset
|
197 throw new RuntimeException("not implemented"); |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
198 } |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
199 |
1421
6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
200 @Override |
6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
201 public RiType createRiTypePrimitive(int basicType) { |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
202 switch (basicType) { |
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
203 case 4: |
1941
79d04223b8a5
Added caching for resolved types and resolved fields.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1939
diff
changeset
|
204 return HotSpotTypePrimitive.Boolean; |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
205 case 5: |
1941
79d04223b8a5
Added caching for resolved types and resolved fields.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1939
diff
changeset
|
206 return HotSpotTypePrimitive.Char; |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
207 case 6: |
1941
79d04223b8a5
Added caching for resolved types and resolved fields.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1939
diff
changeset
|
208 return HotSpotTypePrimitive.Float; |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
209 case 7: |
1941
79d04223b8a5
Added caching for resolved types and resolved fields.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1939
diff
changeset
|
210 return HotSpotTypePrimitive.Double; |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
211 case 8: |
1941
79d04223b8a5
Added caching for resolved types and resolved fields.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1939
diff
changeset
|
212 return HotSpotTypePrimitive.Byte; |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
213 case 9: |
1941
79d04223b8a5
Added caching for resolved types and resolved fields.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1939
diff
changeset
|
214 return HotSpotTypePrimitive.Short; |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
215 case 10: |
1941
79d04223b8a5
Added caching for resolved types and resolved fields.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1939
diff
changeset
|
216 return HotSpotTypePrimitive.Int; |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
217 case 11: |
1941
79d04223b8a5
Added caching for resolved types and resolved fields.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1939
diff
changeset
|
218 return HotSpotTypePrimitive.Long; |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
219 case 14: |
1941
79d04223b8a5
Added caching for resolved types and resolved fields.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1939
diff
changeset
|
220 return HotSpotTypePrimitive.Void; |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
221 default: |
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
222 throw new IllegalArgumentException("Unknown basic type: " + basicType); |
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
223 } |
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
224 } |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
225 |
1421
6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
226 @Override |
1941
79d04223b8a5
Added caching for resolved types and resolved fields.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1939
diff
changeset
|
227 public RiType createRiTypeUnresolved(String name) { |
79d04223b8a5
Added caching for resolved types and resolved fields.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1939
diff
changeset
|
228 return new HotSpotTypeUnresolved(name); |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
229 } |
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
230 |
1421
6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
231 @Override |
1423
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1422
diff
changeset
|
232 public RiConstantPool createRiConstantPool(long vmId) { |
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1422
diff
changeset
|
233 return new HotSpotConstantPool(vmId); |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
234 } |
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
235 |
1421
6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
236 @Override |
1470
ef7761803480
Fixes to get running again after C1X changes to pointer maps and register configuration.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1468
diff
changeset
|
237 public CiConstant createCiConstant(CiKind kind, long value) { |
ef7761803480
Fixes to get running again after C1X changes to pointer maps and register configuration.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1468
diff
changeset
|
238 if (kind == CiKind.Long) { |
ef7761803480
Fixes to get running again after C1X changes to pointer maps and register configuration.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1468
diff
changeset
|
239 return CiConstant.forLong(value); |
ef7761803480
Fixes to get running again after C1X changes to pointer maps and register configuration.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1468
diff
changeset
|
240 } else if (kind == CiKind.Int) { |
ef7761803480
Fixes to get running again after C1X changes to pointer maps and register configuration.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1468
diff
changeset
|
241 return CiConstant.forInt((int) value); |
ef7761803480
Fixes to get running again after C1X changes to pointer maps and register configuration.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1468
diff
changeset
|
242 } else if (kind == CiKind.Short) { |
ef7761803480
Fixes to get running again after C1X changes to pointer maps and register configuration.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1468
diff
changeset
|
243 return CiConstant.forShort((short) value); |
ef7761803480
Fixes to get running again after C1X changes to pointer maps and register configuration.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1468
diff
changeset
|
244 } else if (kind == CiKind.Char) { |
ef7761803480
Fixes to get running again after C1X changes to pointer maps and register configuration.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1468
diff
changeset
|
245 return CiConstant.forChar((char) value); |
ef7761803480
Fixes to get running again after C1X changes to pointer maps and register configuration.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1468
diff
changeset
|
246 } else if (kind == CiKind.Byte) { |
ef7761803480
Fixes to get running again after C1X changes to pointer maps and register configuration.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1468
diff
changeset
|
247 return CiConstant.forByte((byte) value); |
ef7761803480
Fixes to get running again after C1X changes to pointer maps and register configuration.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1468
diff
changeset
|
248 } else if (kind == CiKind.Boolean) { |
ef7761803480
Fixes to get running again after C1X changes to pointer maps and register configuration.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1468
diff
changeset
|
249 return (value == 0) ? CiConstant.FALSE : CiConstant.TRUE; |
ef7761803480
Fixes to get running again after C1X changes to pointer maps and register configuration.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1468
diff
changeset
|
250 } else { |
ef7761803480
Fixes to get running again after C1X changes to pointer maps and register configuration.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1468
diff
changeset
|
251 throw new IllegalArgumentException(); |
ef7761803480
Fixes to get running again after C1X changes to pointer maps and register configuration.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1468
diff
changeset
|
252 } |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
253 } |
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
254 |
1421
6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
255 @Override |
6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
256 public CiConstant createCiConstantFloat(float value) { |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
257 return CiConstant.forFloat(value); |
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
258 } |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
259 |
1421
6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
260 @Override |
6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
261 public CiConstant createCiConstantDouble(double value) { |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
262 return CiConstant.forDouble(value); |
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
263 } |
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
264 |
1421
6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
265 @Override |
1465
2c754f3a2722
Inlining of static final field values. Java mirror instead of VmID. Support for PrintMetrics option.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1462
diff
changeset
|
266 public CiConstant createCiConstantObject(Object object) { |
2c754f3a2722
Inlining of static final field values. Java mirror instead of VmID. Support for PrintMetrics option.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1462
diff
changeset
|
267 return CiConstant.forObject(object); |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
268 } |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
269 } |