annotate graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/CompilerToVM.java @ 10639:08e06d4a9e73

Removed API to access method invocation count from Graal.
author Christian Haeubl <haeubl@ssw.jku.at>
date Mon, 08 Jul 2013 12:01:51 +0200
parents 0ba44a5a8420
children c3760150dc29
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 /*
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
2 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
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
5060
4ed4295ce15f Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 5059
diff changeset
24 package com.oracle.graal.hotspot.bridge;
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
25
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
26 import java.lang.reflect.*;
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
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.*;
5507
dc71b06d09f8 Moving classes from cri.ri to api.meta.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 5503
diff changeset
29 import com.oracle.graal.api.meta.*;
5060
4ed4295ce15f Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 5059
diff changeset
30 import com.oracle.graal.hotspot.*;
5548
8872bc0eebdf Renaming hotspot.ri => hotspot.meta.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 5547
diff changeset
31 import com.oracle.graal.hotspot.meta.*;
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
32
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
33 /**
4410
646a6bfecf73 Small doc fixes.
Doug Simon <doug.simon@oracle.com>
parents: 4297
diff changeset
34 * Calls from Java into HotSpot.
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
35 */
4220
5c80ccb80036 Renaming of VMExits and VMEntries part 1.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4199
diff changeset
36 public interface CompilerToVM {
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
37
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
38 /**
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
39 * Copies the original bytecode of a given method into a given byte array.
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7307
diff changeset
40 *
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
41 * @param metaspaceMethod the metaspace Method object
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
42 * @param code the array into which to copy the original bytecode
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
43 * @return the value of {@code code}
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
44 */
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
45 byte[] initializeBytecode(long metaspaceMethod, byte[] code);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
46
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
47 String getSignature(long metaspaceMethod);
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
48
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
49 ExceptionHandler[] initializeExceptionHandlers(long metaspaceMethod, ExceptionHandler[] handlers);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
50
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
51 /**
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
52 * Determines if a given metaspace Method object has balanced monitors.
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7307
diff changeset
53 *
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
54 * @param metaspaceMethod the metaspace Method object to query
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
55 * @return true if the method has balanced monitors
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
56 */
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
57 boolean hasBalancedMonitors(long metaspaceMethod);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
58
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
59 /**
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
60 * Determines if a given metaspace Method object is compilable. A method may not be compilable
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
61 * for a number of reasons such as:
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
62 * <ul>
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
63 * <li>a CompileOracle directive may prevent compilation of methods</li>
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
64 * <li>the method may have a bytecode breakpoint set</li>
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
65 * <li>the method may have other bytecode features that require special handling by the VM</li>
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
66 * </ul>
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7307
diff changeset
67 *
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
68 * A non-compilable method should not be inlined.
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7307
diff changeset
69 *
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
70 * @param metaspaceMethod the metaspace Method object to query
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
71 * @return true if the method is compilable
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
72 */
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
73 boolean isMethodCompilable(long metaspaceMethod);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
74
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
75 /**
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
76 * Used to implement {@link ResolvedJavaType#findUniqueConcreteMethod(ResolvedJavaMethod)}.
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7307
diff changeset
77 *
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
78 * @param metaspaceMethod the metaspace Method on which to based the search
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
79 * @param resultHolder the holder of the result is put in element 0 of this array
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7307
diff changeset
80 * @return the metaspace Method result or 0 is there is no unique concrete method for
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7307
diff changeset
81 * {@code metaspaceMethod}
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
82 */
7084
9ba90252ce08 HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7044
diff changeset
83 long getUniqueConcreteMethod(long metaspaceMethod, HotSpotResolvedObjectType[] resultHolder);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
84
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
85 /**
7225
31c4d9f9e922 adder better CHA support
Christian Haeubl <haeubl@ssw.jku.at>
parents: 7147
diff changeset
86 * Used to determine if an interface has exactly one implementor.
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7307
diff changeset
87 *
7225
31c4d9f9e922 adder better CHA support
Christian Haeubl <haeubl@ssw.jku.at>
parents: 7147
diff changeset
88 * @param interfaceType interface for which the implementor should be returned
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7307
diff changeset
89 * @return the unique implementor of the interface or null if the interface has 0 or more than 1
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7307
diff changeset
90 * implementor
7225
31c4d9f9e922 adder better CHA support
Christian Haeubl <haeubl@ssw.jku.at>
parents: 7147
diff changeset
91 */
31c4d9f9e922 adder better CHA support
Christian Haeubl <haeubl@ssw.jku.at>
parents: 7147
diff changeset
92 ResolvedJavaType getUniqueImplementor(HotSpotResolvedObjectType interfaceType);
31c4d9f9e922 adder better CHA support
Christian Haeubl <haeubl@ssw.jku.at>
parents: 7147
diff changeset
93
31c4d9f9e922 adder better CHA support
Christian Haeubl <haeubl@ssw.jku.at>
parents: 7147
diff changeset
94 /**
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
95 * Initializes a {@link HotSpotResolvedJavaMethod} object from a metaspace Method object.
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7307
diff changeset
96 *
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
97 * @param metaspaceMethod the metaspace Method object
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
98 * @param method address of a metaspace Method object
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
99 */
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
100 void initializeMethod(long metaspaceMethod, HotSpotResolvedJavaMethod method);
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
101
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
102 /**
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
103 * Initializes a {@link HotSpotMethodData} object from a metaspace MethodData object.
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7307
diff changeset
104 *
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
105 * @param metaspaceMethodData the metaspace MethodData object
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
106 * @param methodData the object to initialize from the metaspace object
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
107 */
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
108 void initializeMethodData(long metaspaceMethodData, HotSpotMethodData methodData);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
109
7027
58dbea9fb973 CompilerToVM.lookupType() now fails with an exception if eagerResolve is true and resolution fails
Doug Simon <doug.simon@oracle.com>
parents: 7019
diff changeset
110 /**
58dbea9fb973 CompilerToVM.lookupType() now fails with an exception if eagerResolve is true and resolution fails
Doug Simon <doug.simon@oracle.com>
parents: 7019
diff changeset
111 * Converts a name to a Java type.
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7307
diff changeset
112 *
7027
58dbea9fb973 CompilerToVM.lookupType() now fails with an exception if eagerResolve is true and resolution fails
Doug Simon <doug.simon@oracle.com>
parents: 7019
diff changeset
113 * @param name a well formed Java type in {@linkplain JavaType#getName() internal} format
58dbea9fb973 CompilerToVM.lookupType() now fails with an exception if eagerResolve is true and resolution fails
Doug Simon <doug.simon@oracle.com>
parents: 7019
diff changeset
114 * @param accessingClass the context of resolution (may be null)
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7307
diff changeset
115 * @param eagerResolve force resolution to a {@link ResolvedJavaType}. If true, this method will
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7307
diff changeset
116 * either return a {@link ResolvedJavaType} or throw an exception
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7307
diff changeset
117 * @return a Java type for {@code name} which is guaranteed to be of type
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7307
diff changeset
118 * {@link ResolvedJavaType} if {@code eagerResolve == true}
7027
58dbea9fb973 CompilerToVM.lookupType() now fails with an exception if eagerResolve is true and resolution fails
Doug Simon <doug.simon@oracle.com>
parents: 7019
diff changeset
119 * @throws LinkageError if {@code eagerResolve == true} and the resolution failed
58dbea9fb973 CompilerToVM.lookupType() now fails with an exception if eagerResolve is true and resolution fails
Doug Simon <doug.simon@oracle.com>
parents: 7019
diff changeset
120 */
7084
9ba90252ce08 HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7044
diff changeset
121 JavaType lookupType(String name, HotSpotResolvedObjectType accessingClass, boolean eagerResolve);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
122
9108
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents: 9028
diff changeset
123 int constantPoolLength(HotSpotResolvedObjectType pool);
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents: 9028
diff changeset
124
7084
9ba90252ce08 HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7044
diff changeset
125 Object lookupConstantInPool(HotSpotResolvedObjectType pool, int cpi);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
126
7084
9ba90252ce08 HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7044
diff changeset
127 JavaMethod lookupMethodInPool(HotSpotResolvedObjectType pool, int cpi, byte opcode);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
128
7084
9ba90252ce08 HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7044
diff changeset
129 JavaType lookupTypeInPool(HotSpotResolvedObjectType pool, int cpi);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
130
7084
9ba90252ce08 HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7044
diff changeset
131 JavaField lookupFieldInPool(HotSpotResolvedObjectType pool, int cpi, byte opcode);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
132
7084
9ba90252ce08 HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7044
diff changeset
133 void lookupReferencedTypeInPool(HotSpotResolvedObjectType pool, int cpi, byte opcode);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
134
9011
23762f2438b6 support for compiling LambdaForm invocations (invokevirtual instructions that were rewritten to invokehandle instructions)
Doug Simon <doug.simon@oracle.com>
parents: 8945
diff changeset
135 Object lookupAppendixInPool(HotSpotResolvedObjectType pool, int cpi, byte opcode);
23762f2438b6 support for compiling LambdaForm invocations (invokevirtual instructions that were rewritten to invokehandle instructions)
Doug Simon <doug.simon@oracle.com>
parents: 8945
diff changeset
136
7113
38076efb9062 Do not print code installation failures from Java.
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7089
diff changeset
137 // Must be kept in sync with enum in graalEnv.hpp
38076efb9062 Do not print code installation failures from Java.
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7089
diff changeset
138 public enum CodeInstallResult {
10540
0ba44a5a8420 Add sanity check to avoid overwriting the reserved code buffer for very large methods.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 10536
diff changeset
139 OK, DEPENDENCIES_FAILED, CACHE_FULL, CODE_TOO_LARGE
7113
38076efb9062 Do not print code installation failures from Java.
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7089
diff changeset
140 }
38076efb9062 Do not print code installation failures from Java.
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7089
diff changeset
141
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
142 /**
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
143 * Installs the result of a compilation into the code cache.
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7307
diff changeset
144 *
9669
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents: 9649
diff changeset
145 * @param compiledCode the result of a compilation
9604
8fe7e6e7b443 javadoc fix
Doug Simon <doug.simon@oracle.com>
parents: 9338
diff changeset
146 * @param code the details of the installed CodeBlob are written to this object
7113
38076efb9062 Do not print code installation failures from Java.
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7089
diff changeset
147 * @return the outcome of the installation as a {@link CodeInstallResult}.
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
148 */
9669
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents: 9649
diff changeset
149 CodeInstallResult installCode(HotSpotCompiledCode compiledCode, HotSpotInstalledCode code, SpeculationLog cache);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
150
6363
a73fcf1639fc HotSpotVMConfig object is now allocated in Java
Doug Simon <doug.simon@oracle.com>
parents: 5780
diff changeset
151 void initializeConfiguration(HotSpotVMConfig config);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
152
7084
9ba90252ce08 HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7044
diff changeset
153 JavaMethod resolveMethod(HotSpotResolvedObjectType klass, String name, String signature);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
154
7084
9ba90252ce08 HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7044
diff changeset
155 boolean isTypeInitialized(HotSpotResolvedObjectType klass);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
156
7084
9ba90252ce08 HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7044
diff changeset
157 void initializeType(HotSpotResolvedObjectType klass);
6549
15e04f248d6b Add functionality to initialize a type
Christian Wimmer <christian.wimmer@oracle.com>
parents: 6521
diff changeset
158
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
159 ResolvedJavaType getResolvedType(Class<?> javaClass);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
160
7084
9ba90252ce08 HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7044
diff changeset
161 HotSpotResolvedJavaField[] getInstanceFields(HotSpotResolvedObjectType klass);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
162
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: 9669
diff changeset
163 HotSpotResolvedJavaMethod[] getMethods(HotSpotResolvedObjectType klass);
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: 9669
diff changeset
164
9126
bc26f978b0ce HotSpotResolvedObjectType: implement hasFinalizeSubclass() correctly
Bernhard Urban <bernhard.urban@jku.at>
parents: 9108
diff changeset
165 boolean hasFinalizableSubclass(HotSpotResolvedObjectType klass);
bc26f978b0ce HotSpotResolvedObjectType: implement hasFinalizeSubclass() correctly
Bernhard Urban <bernhard.urban@jku.at>
parents: 9108
diff changeset
166
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
167 /**
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
168 * Gets the compiled code size for a method.
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7307
diff changeset
169 *
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
170 * @param metaspaceMethod the metaspace Method object to query
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
171 * @return the compiled code size the method
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
172 */
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
173 int getCompiledCodeSize(long metaspaceMethod);
4528
e6e14d25e608 added two inlining policies for comparison
Christian Haeubl <christian.haeubl@oracle.com>
parents: 4461
diff changeset
174
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
175 /**
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
176 * Gets the metaspace Method object corresponding to a given reflection {@link Method} object.
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7307
diff changeset
177 *
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
178 * @param reflectionMethod
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
179 * @param resultHolder the holder of the result is put in element 0 of this array
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
180 * @return the metaspace Method result for {@code reflectionMethod}
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
181 */
7084
9ba90252ce08 HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7044
diff changeset
182 long getMetaspaceMethod(Method reflectionMethod, HotSpotResolvedObjectType[] resultHolder);
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7307
diff changeset
183
7084
9ba90252ce08 HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7044
diff changeset
184 long getMetaspaceConstructor(Constructor reflectionConstructor, HotSpotResolvedObjectType[] resultHolder);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
185
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
186 HotSpotResolvedJavaField getJavaField(Field reflectionField);
6442
45f682f7fea8 Add MetaAccessProvider.getResolvedJavaField to convert from reflection field to metadata field
Christian Wimmer <christian.wimmer@oracle.com>
parents: 6375
diff changeset
187
9649
dd62ccda1849 rename parameter
Doug Simon <doug.simon@oracle.com>
parents: 9610
diff changeset
188 long getMaxCallTargetOffset(long address);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
189
9338
0266549ff6e0 added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents: 9126
diff changeset
190 String disassembleCodeBlob(long codeBlob);
7784
016e23829147 added HotSpot implementation of disassembling APIs
Doug Simon <doug.simon@oracle.com>
parents: 7530
diff changeset
191
8349
8d6ea1915d42 merged CodeInfo into InstalledCode (GRAAL-156)
Doug Simon <doug.simon@oracle.com>
parents: 8348
diff changeset
192 /**
9338
0266549ff6e0 added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents: 9126
diff changeset
193 * Gets a copy of the machine code for a CodeBlob.
8349
8d6ea1915d42 merged CodeInfo into InstalledCode (GRAAL-156)
Doug Simon <doug.simon@oracle.com>
parents: 8348
diff changeset
194 *
9338
0266549ff6e0 added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents: 9126
diff changeset
195 * @return the machine code for {@code codeBlob} if it is valid, null otherwise
8349
8d6ea1915d42 merged CodeInfo into InstalledCode (GRAAL-156)
Doug Simon <doug.simon@oracle.com>
parents: 8348
diff changeset
196 */
9338
0266549ff6e0 added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents: 9126
diff changeset
197 byte[] getCode(long codeBlob);
8349
8d6ea1915d42 merged CodeInfo into InstalledCode (GRAAL-156)
Doug Simon <doug.simon@oracle.com>
parents: 8348
diff changeset
198
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
199 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
200
10475
3489047ffea2 Restructure the handling of HotSpotInstalledCode and their link to nmethods.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 10056
diff changeset
201 Object executeCompiledMethod(Object arg1, Object arg2, Object arg3, HotSpotInstalledCode hotspotInstalledCode) throws InvalidInstalledCodeException;
4993
897b7d18bebc added RiCompiledMethod.execute and the required VM infrastructure
Lukas Stadler <lukas.stadler@jku.at>
parents: 4635
diff changeset
202
10475
3489047ffea2 Restructure the handling of HotSpotInstalledCode and their link to nmethods.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 10056
diff changeset
203 Object executeCompiledMethodVarargs(Object[] args, HotSpotInstalledCode hotspotInstalledCode) throws InvalidInstalledCodeException;
5246
8bf2c37c46c4 added RiCompiledMethod.executeVarargs(Object...) to support compiling and calling arbitrary Java methods
Doug Simon <doug.simon@oracle.com>
parents: 5238
diff changeset
204
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
205 int getVtableEntryOffset(long metaspaceMethod);
5003
5e6f1026a63e fixes to vtable stub inlining: compute offset on demand, look out for interface methods
Lukas Stadler <lukas.stadler@jku.at>
parents: 4993
diff changeset
206
9610
ae17e540c5d2 More asserts while getting vtable offsets
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 9604
diff changeset
207 boolean hasVtableEntry(long metaspaceMethod);
ae17e540c5d2 More asserts while getting vtable offsets
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 9604
diff changeset
208
5129
51111665eda6 Support for recording a leaf graph id for each deoptimization point in the debug info.
Lukas Stadler <lukas.stadler@jku.at>
parents: 5061
diff changeset
209 long[] getDeoptedLeafGraphIds();
51111665eda6 Support for recording a leaf graph id for each deoptimization point in the debug info.
Lukas Stadler <lukas.stadler@jku.at>
parents: 5061
diff changeset
210
7307
dc3e86fd3be1 Introduce cutomization capability for canonicalizer.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 7225
diff changeset
211 long[] getLineNumberTable(HotSpotResolvedJavaMethod method);
dc3e86fd3be1 Introduce cutomization capability for canonicalizer.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 7225
diff changeset
212
7786
8bbbde9d0a52 extended ResolvedJavaMethod API by getLocalVariableTable
Matthias Grimmer <grimmer@ssw.jku.at>
parents: 7784
diff changeset
213 Local[] getLocalVariableTable(HotSpotResolvedJavaMethod method);
8bbbde9d0a52 extended ResolvedJavaMethod API by getLocalVariableTable
Matthias Grimmer <grimmer@ssw.jku.at>
parents: 7784
diff changeset
214
7307
dc3e86fd3be1 Introduce cutomization capability for canonicalizer.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 7225
diff changeset
215 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
216
10536
26c69598db3e Fix bug in canonicalization of non-compressed object pointers.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 10476
diff changeset
217 Object readUnsafeUncompressedPointer(Object o, long displacement);
26c69598db3e Fix bug in canonicalization of non-compressed object pointers.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 10476
diff changeset
218
8611
6c4db417385a added API to reset the profiling information for a method
Christian Haeubl <haeubl@ssw.jku.at>
parents: 8349
diff changeset
219 /**
6c4db417385a added API to reset the profiling information for a method
Christian Haeubl <haeubl@ssw.jku.at>
parents: 8349
diff changeset
220 * Invalidates the profiling information and restarts profiling upon the next invocation.
6c4db417385a added API to reset the profiling information for a method
Christian Haeubl <haeubl@ssw.jku.at>
parents: 8349
diff changeset
221 *
6c4db417385a added API to reset the profiling information for a method
Christian Haeubl <haeubl@ssw.jku.at>
parents: 8349
diff changeset
222 * @param metaspaceMethod the metaspace Method object
6c4db417385a added API to reset the profiling information for a method
Christian Haeubl <haeubl@ssw.jku.at>
parents: 8349
diff changeset
223 */
6c4db417385a added API to reset the profiling information for a method
Christian Haeubl <haeubl@ssw.jku.at>
parents: 8349
diff changeset
224 void reprofile(long metaspaceMethod);
8945
7ef66078d837 add basic invokedynamic support
Andreas Woess <andreas.woess@jku.at>
parents: 8614
diff changeset
225
10476
cd68d6902328 Fix invalidateInstalledCode and delete isInstalledCodeValid.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 10475
diff changeset
226 void invalidateInstalledCode(HotSpotInstalledCode hotspotInstalledCode);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
227 }