Mercurial > hg > graal-jvmci-8
annotate graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/CompilerToVMImpl.java @ 21629:36cf15e3219e
Move HotSpotResolvedJavaMethod.getSpeculationLog to ResolvedJavaMethod
author | Gilles Duboscq <gilles.m.duboscq@oracle.com> |
---|---|
date | Mon, 01 Jun 2015 15:14:39 +0200 |
parents | d563baeca9df |
children |
rev | line source |
---|---|
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1 /* |
21552
9579a3c62a9e
use skeleton findbugs jar containing only SuppresFBWarnings to avoid external dependency for JVMCI classes (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 |
21552
9579a3c62a9e
use skeleton findbugs jar containing only SuppresFBWarnings to avoid external dependency for JVMCI classes (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21414
diff
changeset
|
24 package com.oracle.jvmci.hotspot; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
25 |
21552
9579a3c62a9e
use skeleton findbugs jar containing only SuppresFBWarnings to avoid external dependency for JVMCI classes (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21414
diff
changeset
|
26 import static com.oracle.jvmci.hotspot.InitTimer.*; |
16006
66a9286203a2
decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents:
15968
diff
changeset
|
27 |
21556
48c1ebd24120
renamed com.oracle.graal.api[meta|code] modules to com.oracle.jvmci.[meta|code] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21552
diff
changeset
|
28 import com.oracle.jvmci.code.*; |
21629
36cf15e3219e
Move HotSpotResolvedJavaMethod.getSpeculationLog to ResolvedJavaMethod
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21558
diff
changeset
|
29 import com.oracle.jvmci.meta.*; |
21556
48c1ebd24120
renamed com.oracle.graal.api[meta|code] modules to com.oracle.jvmci.[meta|code] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21552
diff
changeset
|
30 |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
31 /** |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
32 * Entries into the HotSpot VM from Java code. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
33 */ |
5529
d487ae06265d
Move graal.hotspot.server into its own project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5510
diff
changeset
|
34 public class CompilerToVMImpl implements CompilerToVM { |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
35 |
16006
66a9286203a2
decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents:
15968
diff
changeset
|
36 /** |
21558
d563baeca9df
changed uses of Graal terminology to JVMCI (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21556
diff
changeset
|
37 * Initializes the native part of the JVMCI runtime. |
16006
66a9286203a2
decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents:
15968
diff
changeset
|
38 */ |
66a9286203a2
decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents:
15968
diff
changeset
|
39 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
|
40 |
66a9286203a2
decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents:
15968
diff
changeset
|
41 static { |
66a9286203a2
decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents:
15968
diff
changeset
|
42 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
|
43 init(); |
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 } |
66a9286203a2
decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents:
15968
diff
changeset
|
46 |
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
|
47 @Override |
21414
b04f579c803f
removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21119
diff
changeset
|
48 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
|
49 |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
50 @Override |
13264
b23cbfb4366a
merged CompilerToVM.getMetaspaceConstructor into CompilerToVM.getMetaspaceMethod
twisti
parents:
13263
diff
changeset
|
51 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
|
52 |
34753b057324
added unit tests for JavaType, JavaMethod and ResolvedJavaMethod
Doug Simon <doug.simon@oracle.com>
parents:
7037
diff
changeset
|
53 @Override |
15843
747bc4099ad8
rename initializeBytecode to getBytecode and eliminate extra copy
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
15806
diff
changeset
|
54 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
|
55 |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6588
diff
changeset
|
56 @Override |
14105 | 57 public native int exceptionTableLength(long metaspaceMethod); |
58 | |
59 @Override | |
13305
a63d65b682a8
moved most HotSpotResolvedJavaMethod.getExceptionHandlers logic to Java
twisti
parents:
13295
diff
changeset
|
60 public native long exceptionTableStart(long metaspaceMethod); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
61 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
62 @Override |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6588
diff
changeset
|
63 public native boolean hasBalancedMonitors(long metaspaceMethod); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
64 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
65 @Override |
16184
8fde32ece68e
use receiver type in findUniqueConcreteMethod
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
16006
diff
changeset
|
66 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
|
67 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
68 @Override |
13478
fe03864a2c72
replaced CompilerToVM.getUniqueImplementor with getKlassImplementor and moved the logic into Java
twisti
parents:
13374
diff
changeset
|
69 public native long getKlassImplementor(long metaspaceKlass); |
7225
31c4d9f9e922
adder better CHA support
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7147
diff
changeset
|
70 |
31c4d9f9e922
adder better CHA support
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7147
diff
changeset
|
71 @Override |
13483
37ec2cabf397
moved JavaType creation in CompilerToVM.lookupType into Java
twisti
parents:
13478
diff
changeset
|
72 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
|
73 |
14529 | 74 public native Object resolveConstantInPool(long metaspaceConstantPool, int cpi); |
75 | |
76 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
|
77 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
78 @Override |
14093 | 79 public native int lookupNameAndTypeRefIndexInPool(long metaspaceConstantPool, int cpi); |
80 | |
81 @Override | |
15968
42eaa579e134
more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents:
15843
diff
changeset
|
82 public native String lookupNameRefInPool(long metaspaceConstantPool, int cpi); |
14093 | 83 |
84 @Override | |
15968
42eaa579e134
more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents:
15843
diff
changeset
|
85 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
|
86 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
87 @Override |
14093 | 88 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
|
89 |
14530
d87b84dade7d
moved CompilerToVM.loadReferencedTypeInPool logic into Java
twisti
parents:
14529
diff
changeset
|
90 public native long constantPoolKlassAt(long metaspaceConstantPool, int cpi); |
d87b84dade7d
moved CompilerToVM.loadReferencedTypeInPool logic into Java
twisti
parents:
14529
diff
changeset
|
91 |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
92 @Override |
14093 | 93 public native long lookupKlassInPool(long metaspaceConstantPool, int cpi); |
94 | |
95 @Override | |
96 public native long lookupMethodInPool(long metaspaceConstantPool, int cpi, byte opcode); | |
97 | |
98 @Override | |
99 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
|
100 |
14530
d87b84dade7d
moved CompilerToVM.loadReferencedTypeInPool logic into Java
twisti
parents:
14529
diff
changeset
|
101 public native int constantPoolRemapInstructionOperandFromCache(long metaspaceConstantPool, int cpi); |
13259
b16fb0b7479b
every HotSpotResolvedJavaMethod needs its own constant pool
twisti
parents:
13258
diff
changeset
|
102 |
b16fb0b7479b
every HotSpotResolvedJavaMethod needs its own constant pool
twisti
parents:
13258
diff
changeset
|
103 @Override |
14052
361acb279104
moved to-constant-pool-index conversion up to Java
twisti
parents:
14012
diff
changeset
|
104 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
|
105 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
106 @Override |
6363
a73fcf1639fc
HotSpotVMConfig object is now allocated in Java
Doug Simon <doug.simon@oracle.com>
parents:
5776
diff
changeset
|
107 public native void initializeConfiguration(HotSpotVMConfig config); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
108 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
109 @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
|
110 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
|
111 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
112 @Override |
14104 | 113 public native boolean hasFinalizableSubclass(long metaspaceKlass); |
9126
bc26f978b0ce
HotSpotResolvedObjectType: implement hasFinalizeSubclass() correctly
Bernhard Urban <bernhard.urban@jku.at>
parents:
9108
diff
changeset
|
114 |
14717 | 115 public native boolean methodIsIgnoredBySecurityStackWalk(long metaspaceMethod); |
4439
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4220
diff
changeset
|
116 |
f7251c729b31
profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4220
diff
changeset
|
117 @Override |
14104 | 118 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
|
119 |
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
|
120 @Override |
9649 | 121 public native long getMaxCallTargetOffset(long address); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
122 |
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
|
123 // 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
|
124 @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
|
125 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
|
126 |
016e23829147
added HotSpot implementation of disassembling APIs
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
127 @Override |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6588
diff
changeset
|
128 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
|
129 |
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
|
130 @Override |
15161
2c940b1a48d8
Convert InstalledCode from an interface into an abstract class.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
15092
diff
changeset
|
131 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
|
132 |
8bf2c37c46c4
added RiCompiledMethod.executeVarargs(Object...) to support compiling and calling arbitrary Java methods
Doug Simon <doug.simon@oracle.com>
parents:
5238
diff
changeset
|
133 @Override |
14104 | 134 public native long[] getLineNumberTable(long metaspaceMethod); |
7307
dc3e86fd3be1
Introduce cutomization capability for canonicalizer.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7225
diff
changeset
|
135 |
dc3e86fd3be1
Introduce cutomization capability for canonicalizer.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7225
diff
changeset
|
136 @Override |
14104 | 137 public native long getLocalVariableTableStart(long metaspaceMethod); |
13306
dfb780080923
moved most CompilerToVM.getLocalVariableTable to Java
twisti
parents:
13305
diff
changeset
|
138 |
dfb780080923
moved most CompilerToVM.getLocalVariableTable to Java
twisti
parents:
13305
diff
changeset
|
139 @Override |
14104 | 140 public native int getLocalVariableTableLength(long metaspaceMethod); |
7786
8bbbde9d0a52
extended ResolvedJavaMethod API by getLocalVariableTable
Matthias Grimmer <grimmer@ssw.jku.at>
parents:
7784
diff
changeset
|
141 |
8bbbde9d0a52
extended ResolvedJavaMethod API by getLocalVariableTable
Matthias Grimmer <grimmer@ssw.jku.at>
parents:
7784
diff
changeset
|
142 @Override |
7307
dc3e86fd3be1
Introduce cutomization capability for canonicalizer.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7225
diff
changeset
|
143 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
|
144 |
8a526d8b4604
Always clear 'queued for compilation' flag at the end of a compilation task
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8349
diff
changeset
|
145 @Override |
8611
6c4db417385a
added API to reset the profiling information for a method
Christian Haeubl <haeubl@ssw.jku.at>
parents:
8349
diff
changeset
|
146 public native void reprofile(long metaspaceMethod); |
8945
7ef66078d837
add basic invokedynamic support
Andreas Woess <andreas.woess@jku.at>
parents:
8614
diff
changeset
|
147 |
7ef66078d837
add basic invokedynamic support
Andreas Woess <andreas.woess@jku.at>
parents:
8614
diff
changeset
|
148 @Override |
15161
2c940b1a48d8
Convert InstalledCode from an interface into an abstract class.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
15092
diff
changeset
|
149 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
|
150 |
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
|
151 @Override |
15052
5e6f29f287d6
added InstanceKlass::_graal_node_class field to accelerate Node.getNodeClass()
Doug Simon <doug.simon@oracle.com>
parents:
14957
diff
changeset
|
152 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
|
153 |
5e6f29f287d6
added InstanceKlass::_graal_node_class field to accelerate Node.getNodeClass()
Doug Simon <doug.simon@oracle.com>
parents:
14957
diff
changeset
|
154 @Override |
10715
c3760150dc29
Add function to read compressed klass pointers of constant objects natively
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
10655
diff
changeset
|
155 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
|
156 |
c3760150dc29
Add function to read compressed klass pointers of constant objects natively
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
10655
diff
changeset
|
157 @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
|
158 public native Object readUncompressedOop(long address); |
18719
6484e5c068c7
Generalize object reading in HotSpotMemoryAccessProvider.
Roland Schatz <roland.schatz@oracle.com>
parents:
16405
diff
changeset
|
159 |
6484e5c068c7
Generalize object reading in HotSpotMemoryAccessProvider.
Roland Schatz <roland.schatz@oracle.com>
parents:
16405
diff
changeset
|
160 @Override |
12535
cee7f686c470
rename CompilerToVm.dontInline to doNotInlineOrCompile
Matthias Grimmer <grimmer@ssw.jku.at>
parents:
12533
diff
changeset
|
161 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
|
162 |
9b1cc2628961
Extend the CompilerToVM interface to explicitly avoid compilation and inlining of methods
Matthias Grimmer <grimmer@ssw.jku.at>
parents:
11852
diff
changeset
|
163 @Override |
15161
2c940b1a48d8
Convert InstalledCode from an interface into an abstract class.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
15092
diff
changeset
|
164 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
|
165 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
|
166 } |
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
|
167 |
13103
c0b0974dd509
moved notification of Graal compilation statistics from VMToCompiler to CompilerToVM
Doug Simon <doug.simon@oracle.com>
parents:
12559
diff
changeset
|
168 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
|
169 InstalledCode installedCode); |
13103
c0b0974dd509
moved notification of Graal compilation statistics from VMToCompiler to CompilerToVM
Doug Simon <doug.simon@oracle.com>
parents:
12559
diff
changeset
|
170 |
c0b0974dd509
moved notification of Graal compilation statistics from VMToCompiler to CompilerToVM
Doug Simon <doug.simon@oracle.com>
parents:
12559
diff
changeset
|
171 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
|
172 |
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
|
173 public native long[] collectCounters(); |
13630
b1838411e896
Use compile ids assigned by hotspot
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13483
diff
changeset
|
174 |
13769
af344056124f
Only use mature method datas
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13641
diff
changeset
|
175 public native boolean isMature(long method); |
af344056124f
Only use mature method datas
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13641
diff
changeset
|
176 |
14104 | 177 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
|
178 |
18929 | 179 public String getGPUs() { |
180 return ""; | |
181 } | |
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
|
182 |
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 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
|
184 |
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
|
185 public native boolean shouldInlineMethod(long metaspaceMethod); |
14107
800057208a2c
enable C1 + Graal tiered
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
14105
diff
changeset
|
186 |
800057208a2c
enable C1 + Graal tiered
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
14105
diff
changeset
|
187 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
|
188 |
15092
c73ce0dd3583
add support for skipping stack frames in StackIntrospection.getStackTrace
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15088
diff
changeset
|
189 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
|
190 |
36e1a11a72b3
new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15059
diff
changeset
|
191 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
|
192 |
15045
0286888f792b
fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
14957
diff
changeset
|
193 public native long getTimeStamp(); |
15205
affef8631cf4
Add eager resolving for indy call sites
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
15169
diff
changeset
|
194 |
15968
42eaa579e134
more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents:
15843
diff
changeset
|
195 public native String getSymbol(long metaspaceSymbol); |
42eaa579e134
more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents:
15843
diff
changeset
|
196 |
15205
affef8631cf4
Add eager resolving for indy call sites
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
15169
diff
changeset
|
197 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
|
198 |
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
|
199 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
|
200 |
fb77eab05bd3
Respect the VM's wish to record non-safepoint debug info
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
16184
diff
changeset
|
201 public native boolean shouldDebugNonSafepoints(); |
16405
9bfc4247262f
send log output to native tty
Lukas Stadler <lukas.stadler@oracle.com>
parents:
16243
diff
changeset
|
202 |
9bfc4247262f
send log output to native tty
Lukas Stadler <lukas.stadler@oracle.com>
parents:
16243
diff
changeset
|
203 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
|
204 |
294ed4ce1fa0
PrintStreamOption: also forward flushes to the VM
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
20176
diff
changeset
|
205 public native void flushDebugOutput(); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
206 } |