annotate graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/CompilerToVMImpl.java @ 21548:f4b3a6dadb44

moved Receiver inner class from MethodIdMap to InvocationPlugin (JBS:GRAAL-53)
author Doug Simon <doug.simon@oracle.com>
date Tue, 26 May 2015 11:19:50 +0200
parents 07b088d61d5d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
1 /*
21527
07b088d61d5d added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21414
diff changeset
2 * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
4 *
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
8 *
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
13 * accompanied this code).
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
14 *
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
18 *
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
21 * questions.
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
22 */
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
23
21527
07b088d61d5d added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21414
diff changeset
24 package com.oracle.graal.hotspot.jvmci;
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
25
21527
07b088d61d5d added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21414
diff changeset
26 import static com.oracle.graal.hotspot.jvmci.InitTimer.*;
16006
66a9286203a2 decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents: 15968
diff changeset
27
8217
dce9cefed571 Draft speculation log.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 8215
diff changeset
28 import com.oracle.graal.api.code.*;
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
29
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
30 /**
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
31 * Entries into the HotSpot VM from Java code.
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
32 */
5529
d487ae06265d Move graal.hotspot.server into its own project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 5510
diff changeset
33 public class CompilerToVMImpl implements CompilerToVM {
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
34
16006
66a9286203a2 decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents: 15968
diff changeset
35 /**
66a9286203a2 decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents: 15968
diff changeset
36 * Initializes the native part of the Graal runtime.
66a9286203a2 decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents: 15968
diff changeset
37 */
66a9286203a2 decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents: 15968
diff changeset
38 private static native void init();
66a9286203a2 decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents: 15968
diff changeset
39
66a9286203a2 decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents: 15968
diff changeset
40 static {
66a9286203a2 decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents: 15968
diff changeset
41 try (InitTimer t = timer("CompilerToVMImpl.init")) {
66a9286203a2 decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents: 15968
diff changeset
42 init();
66a9286203a2 decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents: 15968
diff changeset
43 }
66a9286203a2 decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents: 15968
diff changeset
44 }
66a9286203a2 decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents: 15968
diff changeset
45
7089
af30115c9d0e added metering of code installation failure rate to detect excessive failure caused by overly optimistic assumptions
Doug Simon <doug.simon@oracle.com>
parents: 7084
diff changeset
46 @Override
21414
b04f579c803f removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21119
diff changeset
47 public native int installCode(HotSpotCompiledCode compiledCode, InstalledCode code, SpeculationLog speculationLog);
7089
af30115c9d0e added metering of code installation failure rate to detect excessive failure caused by overly optimistic assumptions
Doug Simon <doug.simon@oracle.com>
parents: 7084
diff changeset
48
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
49 @Override
13264
b23cbfb4366a merged CompilerToVM.getMetaspaceConstructor into CompilerToVM.getMetaspaceMethod
twisti
parents: 13263
diff changeset
50 public native long getMetaspaceMethod(Class<?> holder, int slot);
7044
34753b057324 added unit tests for JavaType, JavaMethod and ResolvedJavaMethod
Doug Simon <doug.simon@oracle.com>
parents: 7037
diff changeset
51
34753b057324 added unit tests for JavaType, JavaMethod and ResolvedJavaMethod
Doug Simon <doug.simon@oracle.com>
parents: 7037
diff changeset
52 @Override
15843
747bc4099ad8 rename initializeBytecode to getBytecode and eliminate extra copy
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 15806
diff changeset
53 public native byte[] getBytecode(long metaspaceMethod);
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
54
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
55 @Override
14105
f62c770c22be make HotSpotResolvedJavaMethod leaner
twisti
parents: 14104
diff changeset
56 public native int exceptionTableLength(long metaspaceMethod);
f62c770c22be make HotSpotResolvedJavaMethod leaner
twisti
parents: 14104
diff changeset
57
f62c770c22be make HotSpotResolvedJavaMethod leaner
twisti
parents: 14104
diff changeset
58 @Override
13305
a63d65b682a8 moved most HotSpotResolvedJavaMethod.getExceptionHandlers logic to Java
twisti
parents: 13295
diff changeset
59 public native long exceptionTableStart(long metaspaceMethod);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
60
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
61 @Override
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
62 public native boolean hasBalancedMonitors(long metaspaceMethod);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
63
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
64 @Override
16184
8fde32ece68e use receiver type in findUniqueConcreteMethod
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 16006
diff changeset
65 public native long findUniqueConcreteMethod(long actualHolderMetaspaceKlass, long metaspaceMethod);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
66
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
67 @Override
13478
fe03864a2c72 replaced CompilerToVM.getUniqueImplementor with getKlassImplementor and moved the logic into Java
twisti
parents: 13374
diff changeset
68 public native long getKlassImplementor(long metaspaceKlass);
7225
31c4d9f9e922 adder better CHA support
Christian Haeubl <haeubl@ssw.jku.at>
parents: 7147
diff changeset
69
31c4d9f9e922 adder better CHA support
Christian Haeubl <haeubl@ssw.jku.at>
parents: 7147
diff changeset
70 @Override
13483
37ec2cabf397 moved JavaType creation in CompilerToVM.lookupType into Java
twisti
parents: 13478
diff changeset
71 public native long lookupType(String name, Class<?> accessingClass, boolean eagerResolve);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
72
14529
82c3b54d1f08 added HotSpotConstantPool.JVM_CONSTANT enum
twisti
parents: 14172
diff changeset
73 public native Object resolveConstantInPool(long metaspaceConstantPool, int cpi);
82c3b54d1f08 added HotSpotConstantPool.JVM_CONSTANT enum
twisti
parents: 14172
diff changeset
74
82c3b54d1f08 added HotSpotConstantPool.JVM_CONSTANT enum
twisti
parents: 14172
diff changeset
75 public native Object resolvePossiblyCachedConstantInPool(long metaspaceConstantPool, int cpi);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
76
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
77 @Override
14093
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
78 public native int lookupNameAndTypeRefIndexInPool(long metaspaceConstantPool, int cpi);
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
79
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
80 @Override
15968
42eaa579e134 more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents: 15843
diff changeset
81 public native String lookupNameRefInPool(long metaspaceConstantPool, int cpi);
14093
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
82
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
83 @Override
15968
42eaa579e134 more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents: 15843
diff changeset
84 public native String lookupSignatureRefInPool(long metaspaceConstantPool, int cpi);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
85
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
86 @Override
14093
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
87 public native int lookupKlassRefIndexInPool(long metaspaceConstantPool, int cpi);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
88
14530
d87b84dade7d moved CompilerToVM.loadReferencedTypeInPool logic into Java
twisti
parents: 14529
diff changeset
89 public native long constantPoolKlassAt(long metaspaceConstantPool, int cpi);
d87b84dade7d moved CompilerToVM.loadReferencedTypeInPool logic into Java
twisti
parents: 14529
diff changeset
90
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
91 @Override
14093
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
92 public native long lookupKlassInPool(long metaspaceConstantPool, int cpi);
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
93
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
94 @Override
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
95 public native long lookupMethodInPool(long metaspaceConstantPool, int cpi, byte opcode);
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
96
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
97 @Override
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
98 public native long resolveField(long metaspaceConstantPool, int cpi, byte opcode, long[] info);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
99
14530
d87b84dade7d moved CompilerToVM.loadReferencedTypeInPool logic into Java
twisti
parents: 14529
diff changeset
100 public native int constantPoolRemapInstructionOperandFromCache(long metaspaceConstantPool, int cpi);
13259
b16fb0b7479b every HotSpotResolvedJavaMethod needs its own constant pool
twisti
parents: 13258
diff changeset
101
b16fb0b7479b every HotSpotResolvedJavaMethod needs its own constant pool
twisti
parents: 13258
diff changeset
102 @Override
14052
361acb279104 moved to-constant-pool-index conversion up to Java
twisti
parents: 14012
diff changeset
103 public native Object lookupAppendixInPool(long metaspaceConstantPool, int cpi);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
104
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
105 @Override
6363
a73fcf1639fc HotSpotVMConfig object is now allocated in Java
Doug Simon <doug.simon@oracle.com>
parents: 5776
diff changeset
106 public native void initializeConfiguration(HotSpotVMConfig config);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
107
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
108 @Override
15722
c583759bbcfd ResolvedJavaType.resolveMethod now takes a callerType that is used to check access rules. Make it work for default methods.
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 15205
diff changeset
109 public native long resolveMethod(long metaspaceKlassExactReceiver, long metaspaceMethod, long metaspaceKlassCaller);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
110
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
111 @Override
14104
a38a54030ea2 pass metaspace pointers instead of object to VM
twisti
parents: 14093
diff changeset
112 public native boolean hasFinalizableSubclass(long metaspaceKlass);
9126
bc26f978b0ce HotSpotResolvedObjectType: implement hasFinalizeSubclass() correctly
Bernhard Urban <bernhard.urban@jku.at>
parents: 9108
diff changeset
113
14717
aa1a43bfdf4e make HotSpotResolvedJavaMethod leaner
twisti
parents: 14545
diff changeset
114 public native boolean methodIsIgnoredBySecurityStackWalk(long metaspaceMethod);
4439
f7251c729b31 profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents: 4220
diff changeset
115
f7251c729b31 profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents: 4220
diff changeset
116 @Override
14104
a38a54030ea2 pass metaspace pointers instead of object to VM
twisti
parents: 14093
diff changeset
117 public native long getClassInitializer(long metaspaceKlass);
9985
e6bd1004082a added HotSpotResolvedObjectType.getMethods() to get all methods of a class including those (such as <clinit>) not normally exposed by Java reflection
Doug Simon <doug.simon@oracle.com>
parents: 9807
diff changeset
118
e6bd1004082a added HotSpotResolvedObjectType.getMethods() to get all methods of a class including those (such as <clinit>) not normally exposed by Java reflection
Doug Simon <doug.simon@oracle.com>
parents: 9807
diff changeset
119 @Override
9649
dd62ccda1849 rename parameter
Doug Simon <doug.simon@oracle.com>
parents: 9610
diff changeset
120 public native long getMaxCallTargetOffset(long address);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
121
9807
d552919fbb05 Graal's code annotations are installed into codeBlobs and are thus included in disassembler output (in a non-PRODUCT build)
Doug Simon <doug.simon@oracle.com>
parents: 9669
diff changeset
122 // The HotSpot disassembler seems not to be thread safe so it's better to synchronize its usage
4297
874fcc2ddd9d Use HotSpot disassmblers for native code and bytecode
Christian Wimmer <christian.wimmer@oracle.com>
parents: 4220
diff changeset
123 @Override
9807
d552919fbb05 Graal's code annotations are installed into codeBlobs and are thus included in disassembler output (in a non-PRODUCT build)
Doug Simon <doug.simon@oracle.com>
parents: 9669
diff changeset
124 public synchronized native String disassembleCodeBlob(long codeBlob);
7784
016e23829147 added HotSpot implementation of disassembling APIs
Doug Simon <doug.simon@oracle.com>
parents: 7307
diff changeset
125
016e23829147 added HotSpot implementation of disassembling APIs
Doug Simon <doug.simon@oracle.com>
parents: 7307
diff changeset
126 @Override
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
127 public native StackTraceElement getStackTraceElement(long metaspaceMethod, int bci);
5238
cce31bc56c00 made HotSpotResolvedMethodImpl.toStackTraceElement() call into native code to get an object containing source file info
Doug Simon <doug.simon@oracle.com>
parents: 5129
diff changeset
128
cce31bc56c00 made HotSpotResolvedMethodImpl.toStackTraceElement() call into native code to get an object containing source file info
Doug Simon <doug.simon@oracle.com>
parents: 5129
diff changeset
129 @Override
15161
2c940b1a48d8 Convert InstalledCode from an interface into an abstract class.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 15092
diff changeset
130 public native Object executeCompiledMethodVarargs(Object[] args, InstalledCode hotspotInstalledCode);
5246
8bf2c37c46c4 added RiCompiledMethod.executeVarargs(Object...) to support compiling and calling arbitrary Java methods
Doug Simon <doug.simon@oracle.com>
parents: 5238
diff changeset
131
8bf2c37c46c4 added RiCompiledMethod.executeVarargs(Object...) to support compiling and calling arbitrary Java methods
Doug Simon <doug.simon@oracle.com>
parents: 5238
diff changeset
132 @Override
14104
a38a54030ea2 pass metaspace pointers instead of object to VM
twisti
parents: 14093
diff changeset
133 public native long[] getLineNumberTable(long metaspaceMethod);
7307
dc3e86fd3be1 Introduce cutomization capability for canonicalizer.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 7225
diff changeset
134
dc3e86fd3be1 Introduce cutomization capability for canonicalizer.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 7225
diff changeset
135 @Override
14104
a38a54030ea2 pass metaspace pointers instead of object to VM
twisti
parents: 14093
diff changeset
136 public native long getLocalVariableTableStart(long metaspaceMethod);
13306
dfb780080923 moved most CompilerToVM.getLocalVariableTable to Java
twisti
parents: 13305
diff changeset
137
dfb780080923 moved most CompilerToVM.getLocalVariableTable to Java
twisti
parents: 13305
diff changeset
138 @Override
14104
a38a54030ea2 pass metaspace pointers instead of object to VM
twisti
parents: 14093
diff changeset
139 public native int getLocalVariableTableLength(long metaspaceMethod);
7786
8bbbde9d0a52 extended ResolvedJavaMethod API by getLocalVariableTable
Matthias Grimmer <grimmer@ssw.jku.at>
parents: 7784
diff changeset
140
8bbbde9d0a52 extended ResolvedJavaMethod API by getLocalVariableTable
Matthias Grimmer <grimmer@ssw.jku.at>
parents: 7784
diff changeset
141 @Override
7307
dc3e86fd3be1 Introduce cutomization capability for canonicalizer.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 7225
diff changeset
142 public native String getFileName(HotSpotResolvedJavaType method);
8527
8a526d8b4604 Always clear 'queued for compilation' flag at the end of a compilation task
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 8349
diff changeset
143
8a526d8b4604 Always clear 'queued for compilation' flag at the end of a compilation task
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 8349
diff changeset
144 @Override
8611
6c4db417385a added API to reset the profiling information for a method
Christian Haeubl <haeubl@ssw.jku.at>
parents: 8349
diff changeset
145 public native void reprofile(long metaspaceMethod);
8945
7ef66078d837 add basic invokedynamic support
Andreas Woess <andreas.woess@jku.at>
parents: 8614
diff changeset
146
7ef66078d837 add basic invokedynamic support
Andreas Woess <andreas.woess@jku.at>
parents: 8614
diff changeset
147 @Override
15161
2c940b1a48d8 Convert InstalledCode from an interface into an abstract class.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 15092
diff changeset
148 public native void invalidateInstalledCode(InstalledCode hotspotInstalledCode);
9025
ff5a32117e02 Implement fast invocation of installed code (direct tail call to the target machine code address).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 9024
diff changeset
149
ff5a32117e02 Implement fast invocation of installed code (direct tail call to the target machine code address).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 9024
diff changeset
150 @Override
15052
5e6f29f287d6 added InstanceKlass::_graal_node_class field to accelerate Node.getNodeClass()
Doug Simon <doug.simon@oracle.com>
parents: 14957
diff changeset
151 public native Class<?> getJavaMirror(long metaspaceKlass);
5e6f29f287d6 added InstanceKlass::_graal_node_class field to accelerate Node.getNodeClass()
Doug Simon <doug.simon@oracle.com>
parents: 14957
diff changeset
152
5e6f29f287d6 added InstanceKlass::_graal_node_class field to accelerate Node.getNodeClass()
Doug Simon <doug.simon@oracle.com>
parents: 14957
diff changeset
153 @Override
10715
c3760150dc29 Add function to read compressed klass pointers of constant objects natively
Christos Kotselidis <christos.kotselidis@oracle.com>
parents: 10655
diff changeset
154 public native long readUnsafeKlassPointer(Object o);
c3760150dc29 Add function to read compressed klass pointers of constant objects natively
Christos Kotselidis <christos.kotselidis@oracle.com>
parents: 10655
diff changeset
155
c3760150dc29 Add function to read compressed klass pointers of constant objects natively
Christos Kotselidis <christos.kotselidis@oracle.com>
parents: 10655
diff changeset
156 @Override
20176
03b4fa99eff8 rename CompilerToVM.readUnsafeOop to readUncompressedOop and only use it for reading oops in VM data structures since Unsafe.getObject() can be used for other cases
Doug Simon <doug.simon@oracle.com>
parents: 18929
diff changeset
157 public native Object readUncompressedOop(long address);
18719
6484e5c068c7 Generalize object reading in HotSpotMemoryAccessProvider.
Roland Schatz <roland.schatz@oracle.com>
parents: 16405
diff changeset
158
6484e5c068c7 Generalize object reading in HotSpotMemoryAccessProvider.
Roland Schatz <roland.schatz@oracle.com>
parents: 16405
diff changeset
159 @Override
12535
cee7f686c470 rename CompilerToVm.dontInline to doNotInlineOrCompile
Matthias Grimmer <grimmer@ssw.jku.at>
parents: 12533
diff changeset
160 public native void doNotInlineOrCompile(long metaspaceMethod);
12532
9b1cc2628961 Extend the CompilerToVM interface to explicitly avoid compilation and inlining of methods
Matthias Grimmer <grimmer@ssw.jku.at>
parents: 11852
diff changeset
161
9b1cc2628961 Extend the CompilerToVM interface to explicitly avoid compilation and inlining of methods
Matthias Grimmer <grimmer@ssw.jku.at>
parents: 11852
diff changeset
162 @Override
15161
2c940b1a48d8 Convert InstalledCode from an interface into an abstract class.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 15092
diff changeset
163 public Object executeCompiledMethod(Object arg1, Object arg2, Object arg3, InstalledCode hotspotInstalledCode) throws InvalidInstalledCodeException {
14957
4062efea018b Remove compiled method call intrinsic.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 14717
diff changeset
164 return executeCompiledMethodVarargs(new Object[]{arg1, arg2, arg3}, hotspotInstalledCode);
9025
ff5a32117e02 Implement fast invocation of installed code (direct tail call to the target machine code address).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 9024
diff changeset
165 }
ff5a32117e02 Implement fast invocation of installed code (direct tail call to the target machine code address).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 9024
diff changeset
166
13103
c0b0974dd509 moved notification of Graal compilation statistics from VMToCompiler to CompilerToVM
Doug Simon <doug.simon@oracle.com>
parents: 12559
diff changeset
167 public synchronized native void notifyCompilationStatistics(int id, HotSpotResolvedJavaMethod method, boolean osr, int processedBytecodes, long time, long timeUnitsPerSecond,
15161
2c940b1a48d8 Convert InstalledCode from an interface into an abstract class.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 15092
diff changeset
168 InstalledCode installedCode);
13103
c0b0974dd509 moved notification of Graal compilation statistics from VMToCompiler to CompilerToVM
Doug Simon <doug.simon@oracle.com>
parents: 12559
diff changeset
169
c0b0974dd509 moved notification of Graal compilation statistics from VMToCompiler to CompilerToVM
Doug Simon <doug.simon@oracle.com>
parents: 12559
diff changeset
170 public native void resetCompilationStatistics();
c0b0974dd509 moved notification of Graal compilation statistics from VMToCompiler to CompilerToVM
Doug Simon <doug.simon@oracle.com>
parents: 12559
diff changeset
171
11852
d7964e96b0b0 move benchmark counters into separate class and make them correct for multithreaded applications
Lukas Stadler <lukas.stadler@jku.at>
parents: 11520
diff changeset
172 public native long[] collectCounters();
13630
b1838411e896 Use compile ids assigned by hotspot
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 13483
diff changeset
173
13769
af344056124f Only use mature method datas
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 13641
diff changeset
174 public native boolean isMature(long method);
af344056124f Only use mature method datas
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 13641
diff changeset
175
14104
a38a54030ea2 pass metaspace pointers instead of object to VM
twisti
parents: 14093
diff changeset
176 public native int allocateCompileId(long metaspaceMethod, int entryBCI);
13819
49db2c1e3bee added support for co-existing GPU backends (JBS:GRAAL-1)
Doug Simon <doug.simon@oracle.com>
parents: 13769
diff changeset
177
18929
8f2fb6bec986 removed GPU code
Doug Simon <doug.simon@oracle.com>
parents: 18719
diff changeset
178 public String getGPUs() {
8f2fb6bec986 removed GPU code
Doug Simon <doug.simon@oracle.com>
parents: 18719
diff changeset
179 return "";
8f2fb6bec986 removed GPU code
Doug Simon <doug.simon@oracle.com>
parents: 18719
diff changeset
180 }
13953
d587baa55dd7 Add shouldBeInlined method to ResolvedJavaMethod, implement it for HotSpot and use it in the inlining phase
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 13819
diff changeset
181
d587baa55dd7 Add shouldBeInlined method to ResolvedJavaMethod, implement it for HotSpot and use it in the inlining phase
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 13819
diff changeset
182 public native boolean canInlineMethod(long metaspaceMethod);
d587baa55dd7 Add shouldBeInlined method to ResolvedJavaMethod, implement it for HotSpot and use it in the inlining phase
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 13819
diff changeset
183
d587baa55dd7 Add shouldBeInlined method to ResolvedJavaMethod, implement it for HotSpot and use it in the inlining phase
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 13819
diff changeset
184 public native boolean shouldInlineMethod(long metaspaceMethod);
14107
800057208a2c enable C1 + Graal tiered
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14105
diff changeset
185
800057208a2c enable C1 + Graal tiered
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14105
diff changeset
186 public native boolean hasCompiledCodeForOSR(long metaspaceMethod, int entryBCI, int level);
800057208a2c enable C1 + Graal tiered
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14105
diff changeset
187
15092
c73ce0dd3583 add support for skipping stack frames in StackIntrospection.getStackTrace
Lukas Stadler <lukas.stadler@oracle.com>
parents: 15088
diff changeset
188 public native HotSpotStackFrameReference getNextStackFrame(HotSpotStackFrameReference frame, long[] methods, int initialSkip);
15063
36e1a11a72b3 new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents: 15059
diff changeset
189
36e1a11a72b3 new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents: 15059
diff changeset
190 public native void materializeVirtualObjects(HotSpotStackFrameReference stackFrame, boolean invalidate);
36e1a11a72b3 new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents: 15059
diff changeset
191
15045
0286888f792b fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14957
diff changeset
192 public native long getTimeStamp();
15205
affef8631cf4 Add eager resolving for indy call sites
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 15169
diff changeset
193
15968
42eaa579e134 more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents: 15843
diff changeset
194 public native String getSymbol(long metaspaceSymbol);
42eaa579e134 more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents: 15843
diff changeset
195
15205
affef8631cf4 Add eager resolving for indy call sites
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 15169
diff changeset
196 public native void resolveInvokeDynamic(long metaspaceConstantPool, int index);
15725
ef6b8d1898e6 Add resolved receiver type to ResolvedJavaMethod.isInVirtualMethodTable in order to be able to do vtable-calls for miranda and default methods
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 15722
diff changeset
197
ef6b8d1898e6 Add resolved receiver type to ResolvedJavaMethod.isInVirtualMethodTable in order to be able to do vtable-calls for miranda and default methods
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 15722
diff changeset
198 public native int getVtableIndexForInterface(long metaspaceKlass, long metaspaceMethod);
16243
fb77eab05bd3 Respect the VM's wish to record non-safepoint debug info
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 16184
diff changeset
199
fb77eab05bd3 Respect the VM's wish to record non-safepoint debug info
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 16184
diff changeset
200 public native boolean shouldDebugNonSafepoints();
16405
9bfc4247262f send log output to native tty
Lukas Stadler <lukas.stadler@oracle.com>
parents: 16243
diff changeset
201
9bfc4247262f send log output to native tty
Lukas Stadler <lukas.stadler@oracle.com>
parents: 16243
diff changeset
202 public native void writeDebugOutput(byte[] bytes, int offset, int length);
21119
294ed4ce1fa0 PrintStreamOption: also forward flushes to the VM
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents: 20176
diff changeset
203
294ed4ce1fa0 PrintStreamOption: also forward flushes to the VM
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents: 20176
diff changeset
204 public native void flushDebugOutput();
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
205 }