annotate graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/CompilerToVM.java @ 21538:c1e2fdb5fea3

removed more dependencies from JVMCI classes to non-JVMCI classes (JBS:GRAAL-53)
author Doug Simon <doug.simon@oracle.com>
date Mon, 25 May 2015 17:20:39 +0200
parents 1da7aef31a08
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 /*
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
21526
1da7aef31a08 created com.oracle.graal.hotspot.jvmci package and moved classes destined for future JVMCI module into it (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
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: 19766
diff changeset
26 import sun.misc.*;
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: 19766
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.*;
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: 19766
diff changeset
30 import com.oracle.graal.hotspotvmconfig.*;
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 /**
4410
646a6bfecf73 Small doc fixes.
Doug Simon <doug.simon@oracle.com>
parents: 4297
diff changeset
33 * Calls from Java into HotSpot.
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
34 */
4220
5c80ccb80036 Renaming of VMExits and VMEntries part 1.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4199
diff changeset
35 public interface CompilerToVM {
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
36
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
37 /**
15806
240cc9a901fb don't use JNI natives to interact with VM metadata
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 15725
diff changeset
38 * Copies the original bytecode of a given method into a new byte array and returns it.
15045
0286888f792b fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14908
diff changeset
39 *
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
40 * @param metaspaceMethod the metaspace Method object
15806
240cc9a901fb don't use JNI natives to interact with VM metadata
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 15725
diff changeset
41 * @return a new byte array containing the original bytecode
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
42 */
15843
747bc4099ad8 rename initializeBytecode to getBytecode and eliminate extra copy
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 15806
diff changeset
43 byte[] getBytecode(long metaspaceMethod);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
44
14105
f62c770c22be make HotSpotResolvedJavaMethod leaner
twisti
parents: 14104
diff changeset
45 int exceptionTableLength(long metaspaceMethod);
f62c770c22be make HotSpotResolvedJavaMethod leaner
twisti
parents: 14104
diff changeset
46
13305
a63d65b682a8 moved most HotSpotResolvedJavaMethod.getExceptionHandlers logic to Java
twisti
parents: 13295
diff changeset
47 long exceptionTableStart(long metaspaceMethod);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
48
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
49 /**
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
50 * Determines if a given metaspace Method object has balanced monitors.
15045
0286888f792b fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14908
diff changeset
51 *
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
52 * @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
53 * @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
54 */
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
55 boolean hasBalancedMonitors(long metaspaceMethod);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
56
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
57 /**
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
58 * Determines if a given metaspace Method can be inlined. A method may not be inlinable for a
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
59 * number of reasons such as:
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
60 * <ul>
14520
f84115370178 Javadoc fixes
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14172
diff changeset
61 * <li>a CompileOracle directive may prevent inlining or compilation of methods</li>
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
62 * <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
63 * <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
64 * </ul>
15045
0286888f792b fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14908
diff changeset
65 *
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
66 * @param metaspaceMethod the metaspace Method object to query
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
67 * @return true if the method can be inlined
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
68 */
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
69 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
70
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
71 /**
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
72 * Determines if a given metaspace Method should be inlined at any cost. This could be because:
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
73 * <ul>
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
74 * <li>a CompileOracle directive may forces inlining of this methods</li>
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
75 * <li>an annotation forces inlining of this method</li>
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
76 * </ul>
15045
0286888f792b fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14908
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 object to query
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
79 * @return true if the method should be inlined
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
80 */
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
81 boolean shouldInlineMethod(long metaspaceMethod);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
82
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
83 /**
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
84 * Used to implement {@link ResolvedJavaType#findUniqueConcreteMethod(ResolvedJavaMethod)}.
15045
0286888f792b fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14908
diff changeset
85 *
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
86 * @param metaspaceMethod the metaspace Method on which to based the search
18789
3ed3f2b4d777 comment fixes
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 18719
diff changeset
87 * @param actualHolderMetaspaceKlass the best known type of receiver
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7307
diff changeset
88 * @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
89 * {@code metaspaceMethod}
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
90 */
16184
8fde32ece68e use receiver type in findUniqueConcreteMethod
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 16006
diff changeset
91 long findUniqueConcreteMethod(long actualHolderMetaspaceKlass, long metaspaceMethod);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
92
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
93 /**
18195
62d3440228b8 Improve javadoc for ResolvedJavaType.getSingleImplementor() and CompilerToVM.getKlassImplementor().
Josef Eisl <josef.eisl@jku.at>
parents: 16492
diff changeset
94 * Returns the implementor for the given interface class, if there is a single implementor.
15045
0286888f792b fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14908
diff changeset
95 *
13478
fe03864a2c72 replaced CompilerToVM.getUniqueImplementor with getKlassImplementor and moved the logic into Java
twisti
parents: 13374
diff changeset
96 * @param metaspaceKlass the metaspace klass to get the implementor for
18195
62d3440228b8 Improve javadoc for ResolvedJavaType.getSingleImplementor() and CompilerToVM.getKlassImplementor().
Josef Eisl <josef.eisl@jku.at>
parents: 16492
diff changeset
97 * @return the implementor as metaspace klass pointer if there is a single implementor, null if
62d3440228b8 Improve javadoc for ResolvedJavaType.getSingleImplementor() and CompilerToVM.getKlassImplementor().
Josef Eisl <josef.eisl@jku.at>
parents: 16492
diff changeset
98 * there is no implementor, or the input metaspace klass pointer ({@code metaspaceKlass}
62d3440228b8 Improve javadoc for ResolvedJavaType.getSingleImplementor() and CompilerToVM.getKlassImplementor().
Josef Eisl <josef.eisl@jku.at>
parents: 16492
diff changeset
99 * ) itself if there is more than one implementor.
7225
31c4d9f9e922 adder better CHA support
Christian Haeubl <haeubl@ssw.jku.at>
parents: 7147
diff changeset
100 */
13478
fe03864a2c72 replaced CompilerToVM.getUniqueImplementor with getKlassImplementor and moved the logic into Java
twisti
parents: 13374
diff changeset
101 long getKlassImplementor(long metaspaceKlass);
7225
31c4d9f9e922 adder better CHA support
Christian Haeubl <haeubl@ssw.jku.at>
parents: 7147
diff changeset
102
31c4d9f9e922 adder better CHA support
Christian Haeubl <haeubl@ssw.jku.at>
parents: 7147
diff changeset
103 /**
14717
aa1a43bfdf4e make HotSpotResolvedJavaMethod leaner
twisti
parents: 14545
diff changeset
104 * Determines if a given metaspace method is ignored by security stack walks.
15045
0286888f792b fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14908
diff changeset
105 *
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
106 * @param metaspaceMethod the metaspace Method object
14717
aa1a43bfdf4e make HotSpotResolvedJavaMethod leaner
twisti
parents: 14545
diff changeset
107 * @return true if the method is ignored
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
108 */
14717
aa1a43bfdf4e make HotSpotResolvedJavaMethod leaner
twisti
parents: 14545
diff changeset
109 boolean methodIsIgnoredBySecurityStackWalk(long metaspaceMethod);
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
110
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
111 /**
13483
37ec2cabf397 moved JavaType creation in CompilerToVM.lookupType into Java
twisti
parents: 13478
diff changeset
112 * Converts a name to a metaspace klass.
15045
0286888f792b fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14908
diff changeset
113 *
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
114 * @param name a well formed Java type in {@linkplain JavaType#getName() internal} format
16492
8853b9304083 made type resolution require an accessing class context
Doug Simon <doug.simon@oracle.com>
parents: 16405
diff changeset
115 * @param accessingClass the context of resolution (must not be null)
14117
2b2f0022900f removed unnecessary lookupKlassByName method
Doug Simon <doug.simon@oracle.com>
parents: 14107
diff changeset
116 * @param resolve force resolution to a {@link ResolvedJavaType}. If true, this method will
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7307
diff changeset
117 * either return a {@link ResolvedJavaType} or throw an exception
13483
37ec2cabf397 moved JavaType creation in CompilerToVM.lookupType into Java
twisti
parents: 13478
diff changeset
118 * @return a metaspace klass for {@code name}
14117
2b2f0022900f removed unnecessary lookupKlassByName method
Doug Simon <doug.simon@oracle.com>
parents: 14107
diff changeset
119 * @throws LinkageError if {@code resolve == true} and the resolution failed
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
120 */
14117
2b2f0022900f removed unnecessary lookupKlassByName method
Doug Simon <doug.simon@oracle.com>
parents: 14107
diff changeset
121 long lookupType(String name, Class<?> accessingClass, boolean resolve);
14093
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
122
14529
82c3b54d1f08 added HotSpotConstantPool.JVM_CONSTANT enum
twisti
parents: 14520
diff changeset
123 Object resolveConstantInPool(long metaspaceConstantPool, int cpi);
82c3b54d1f08 added HotSpotConstantPool.JVM_CONSTANT enum
twisti
parents: 14520
diff changeset
124
82c3b54d1f08 added HotSpotConstantPool.JVM_CONSTANT enum
twisti
parents: 14520
diff changeset
125 Object resolvePossiblyCachedConstantInPool(long metaspaceConstantPool, int cpi);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
126
14093
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
127 int lookupNameAndTypeRefIndexInPool(long metaspaceConstantPool, int cpi);
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
128
15968
42eaa579e134 more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents: 15843
diff changeset
129 String lookupNameRefInPool(long metaspaceConstantPool, int cpi);
14093
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
130
15968
42eaa579e134 more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents: 15843
diff changeset
131 String lookupSignatureRefInPool(long metaspaceConstantPool, int cpi);
14093
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
132
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
133 int lookupKlassRefIndexInPool(long metaspaceConstantPool, int cpi);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
134
14530
d87b84dade7d moved CompilerToVM.loadReferencedTypeInPool logic into Java
twisti
parents: 14529
diff changeset
135 long constantPoolKlassAt(long metaspaceConstantPool, int cpi);
d87b84dade7d moved CompilerToVM.loadReferencedTypeInPool logic into Java
twisti
parents: 14529
diff changeset
136
14069
2f37b0e442fe removed remaining VMToCompiler calls for allocating Graal API objects
Doug Simon <doug.simon@oracle.com>
parents: 14052
diff changeset
137 /**
2f37b0e442fe removed remaining VMToCompiler calls for allocating Graal API objects
Doug Simon <doug.simon@oracle.com>
parents: 14052
diff changeset
138 * Looks up a class entry in a constant pool.
15045
0286888f792b fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14908
diff changeset
139 *
14093
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
140 * @param metaspaceConstantPool metaspace constant pool pointer
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
141 * @param cpi constant pool index
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
142 * @return a metaspace Klass for a resolved method entry, a metaspace Symbol otherwise (with
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
143 * tagging)
14069
2f37b0e442fe removed remaining VMToCompiler calls for allocating Graal API objects
Doug Simon <doug.simon@oracle.com>
parents: 14052
diff changeset
144 */
14093
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
145 long lookupKlassInPool(long metaspaceConstantPool, int cpi);
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
146
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
147 /**
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
148 * Looks up a method entry in a constant pool.
15045
0286888f792b fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14908
diff changeset
149 *
14093
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
150 * @param metaspaceConstantPool metaspace constant pool pointer
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
151 * @param cpi constant pool index
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
152 * @return a metaspace Method for a resolved method entry, 0 otherwise
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
153 */
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
154 long lookupMethodInPool(long metaspaceConstantPool, int cpi, byte opcode);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
155
14069
2f37b0e442fe removed remaining VMToCompiler calls for allocating Graal API objects
Doug Simon <doug.simon@oracle.com>
parents: 14052
diff changeset
156 /**
2f37b0e442fe removed remaining VMToCompiler calls for allocating Graal API objects
Doug Simon <doug.simon@oracle.com>
parents: 14052
diff changeset
157 * Looks up a field entry in a constant pool and attempts to resolve it. The values returned in
2f37b0e442fe removed remaining VMToCompiler calls for allocating Graal API objects
Doug Simon <doug.simon@oracle.com>
parents: 14052
diff changeset
158 * {@code info} are:
15045
0286888f792b fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14908
diff changeset
159 *
14069
2f37b0e442fe removed remaining VMToCompiler calls for allocating Graal API objects
Doug Simon <doug.simon@oracle.com>
parents: 14052
diff changeset
160 * <pre>
14093
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
161 * [(int) flags, // only valid if field is resolved
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
162 * (int) offset] // only valid if field is resolved
14069
2f37b0e442fe removed remaining VMToCompiler calls for allocating Graal API objects
Doug Simon <doug.simon@oracle.com>
parents: 14052
diff changeset
163 * </pre>
15045
0286888f792b fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14908
diff changeset
164 *
14093
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
165 * @param metaspaceConstantPool metaspace constant pool pointer
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
166 * @param cpi constant pool index
14069
2f37b0e442fe removed remaining VMToCompiler calls for allocating Graal API objects
Doug Simon <doug.simon@oracle.com>
parents: 14052
diff changeset
167 * @param info an array in which the details of the field are returned
2f37b0e442fe removed remaining VMToCompiler calls for allocating Graal API objects
Doug Simon <doug.simon@oracle.com>
parents: 14052
diff changeset
168 * @return true if the field is resolved
2f37b0e442fe removed remaining VMToCompiler calls for allocating Graal API objects
Doug Simon <doug.simon@oracle.com>
parents: 14052
diff changeset
169 */
14093
dd783f0ecf17 refactor CompilerToVM interface
twisti
parents: 14069
diff changeset
170 long resolveField(long metaspaceConstantPool, int cpi, byte opcode, long[] info);
14069
2f37b0e442fe removed remaining VMToCompiler calls for allocating Graal API objects
Doug Simon <doug.simon@oracle.com>
parents: 14052
diff changeset
171
14530
d87b84dade7d moved CompilerToVM.loadReferencedTypeInPool logic into Java
twisti
parents: 14529
diff changeset
172 int constantPoolRemapInstructionOperandFromCache(long metaspaceConstantPool, int cpi);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
173
14052
361acb279104 moved to-constant-pool-index conversion up to Java
twisti
parents: 14012
diff changeset
174 Object lookupAppendixInPool(long metaspaceConstantPool, int cpi);
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
175
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
176 /**
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
177 * Installs the result of a compilation into the code cache.
15045
0286888f792b fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14908
diff changeset
178 *
9669
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents: 9649
diff changeset
179 * @param compiledCode the result of a compilation
9604
8fe7e6e7b443 javadoc fix
Doug Simon <doug.simon@oracle.com>
parents: 9338
diff changeset
180 * @param code the details of the installed CodeBlob are written to this object
21414
b04f579c803f removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21413
diff changeset
181 * @return the outcome of the installation which will be one of
b04f579c803f removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21413
diff changeset
182 * {@link HotSpotVMConfig#codeInstallResultOk},
b04f579c803f removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21413
diff changeset
183 * {@link HotSpotVMConfig#codeInstallResultCacheFull},
b04f579c803f removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21413
diff changeset
184 * {@link HotSpotVMConfig#codeInstallResultCodeTooLarge},
b04f579c803f removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21413
diff changeset
185 * {@link HotSpotVMConfig#codeInstallResultDependenciesFailed} or
b04f579c803f removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21413
diff changeset
186 * {@link HotSpotVMConfig#codeInstallResultDependenciesInvalid}.
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
187 */
21414
b04f579c803f removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21413
diff changeset
188 int installCode(HotSpotCompiledCode compiledCode, InstalledCode code, SpeculationLog speculationLog);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
189
13103
c0b0974dd509 moved notification of Graal compilation statistics from VMToCompiler to CompilerToVM
Doug Simon <doug.simon@oracle.com>
parents: 12559
diff changeset
190 /**
c0b0974dd509 moved notification of Graal compilation statistics from VMToCompiler to CompilerToVM
Doug Simon <doug.simon@oracle.com>
parents: 12559
diff changeset
191 * Notifies the VM of statistics for a completed compilation.
15045
0286888f792b fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14908
diff changeset
192 *
13103
c0b0974dd509 moved notification of Graal compilation statistics from VMToCompiler to CompilerToVM
Doug Simon <doug.simon@oracle.com>
parents: 12559
diff changeset
193 * @param id the identifier of the compilation
c0b0974dd509 moved notification of Graal compilation statistics from VMToCompiler to CompilerToVM
Doug Simon <doug.simon@oracle.com>
parents: 12559
diff changeset
194 * @param method the method compiled
c0b0974dd509 moved notification of Graal compilation statistics from VMToCompiler to CompilerToVM
Doug Simon <doug.simon@oracle.com>
parents: 12559
diff changeset
195 * @param osr specifies if the compilation was for on-stack-replacement
c0b0974dd509 moved notification of Graal compilation statistics from VMToCompiler to CompilerToVM
Doug Simon <doug.simon@oracle.com>
parents: 12559
diff changeset
196 * @param processedBytecodes the number of bytecodes processed during the compilation, including
c0b0974dd509 moved notification of Graal compilation statistics from VMToCompiler to CompilerToVM
Doug Simon <doug.simon@oracle.com>
parents: 12559
diff changeset
197 * the bytecodes of all inlined methods
c0b0974dd509 moved notification of Graal compilation statistics from VMToCompiler to CompilerToVM
Doug Simon <doug.simon@oracle.com>
parents: 12559
diff changeset
198 * @param time the amount time spent compiling {@code method}
c0b0974dd509 moved notification of Graal compilation statistics from VMToCompiler to CompilerToVM
Doug Simon <doug.simon@oracle.com>
parents: 12559
diff changeset
199 * @param timeUnitsPerSecond the granularity of the units for the {@code time} value
c0b0974dd509 moved notification of Graal compilation statistics from VMToCompiler to CompilerToVM
Doug Simon <doug.simon@oracle.com>
parents: 12559
diff changeset
200 * @param installedCode the nmethod installed as a result of the compilation
c0b0974dd509 moved notification of Graal compilation statistics from VMToCompiler to CompilerToVM
Doug Simon <doug.simon@oracle.com>
parents: 12559
diff changeset
201 */
15161
2c940b1a48d8 Convert InstalledCode from an interface into an abstract class.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 15092
diff changeset
202 void notifyCompilationStatistics(int id, HotSpotResolvedJavaMethod method, boolean osr, int processedBytecodes, long time, long timeUnitsPerSecond, InstalledCode installedCode);
13103
c0b0974dd509 moved notification of Graal compilation statistics from VMToCompiler to CompilerToVM
Doug Simon <doug.simon@oracle.com>
parents: 12559
diff changeset
203
c0b0974dd509 moved notification of Graal compilation statistics from VMToCompiler to CompilerToVM
Doug Simon <doug.simon@oracle.com>
parents: 12559
diff changeset
204 void resetCompilationStatistics();
c0b0974dd509 moved notification of Graal compilation statistics from VMToCompiler to CompilerToVM
Doug Simon <doug.simon@oracle.com>
parents: 12559
diff changeset
205
6363
a73fcf1639fc HotSpotVMConfig object is now allocated in Java
Doug Simon <doug.simon@oracle.com>
parents: 5780
diff changeset
206 void initializeConfiguration(HotSpotVMConfig config);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
207
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
208 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
209
14104
a38a54030ea2 pass metaspace pointers instead of object to VM
twisti
parents: 14093
diff changeset
210 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: 9669
diff changeset
211
14104
a38a54030ea2 pass metaspace pointers instead of object to VM
twisti
parents: 14093
diff changeset
212 boolean hasFinalizableSubclass(long metaspaceKlass);
9126
bc26f978b0ce HotSpotResolvedObjectType: implement hasFinalizeSubclass() correctly
Bernhard Urban <bernhard.urban@jku.at>
parents: 9108
diff changeset
213
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
214 /**
13264
b23cbfb4366a merged CompilerToVM.getMetaspaceConstructor into CompilerToVM.getMetaspaceMethod
twisti
parents: 13263
diff changeset
215 * Gets the metaspace Method object corresponding to a given {@link Class} object and slot
b23cbfb4366a merged CompilerToVM.getMetaspaceConstructor into CompilerToVM.getMetaspaceMethod
twisti
parents: 13263
diff changeset
216 * number.
15045
0286888f792b fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14908
diff changeset
217 *
13264
b23cbfb4366a merged CompilerToVM.getMetaspaceConstructor into CompilerToVM.getMetaspaceMethod
twisti
parents: 13263
diff changeset
218 * @param holder method holder
b23cbfb4366a merged CompilerToVM.getMetaspaceConstructor into CompilerToVM.getMetaspaceMethod
twisti
parents: 13263
diff changeset
219 * @param slot slot number of the method
b23cbfb4366a merged CompilerToVM.getMetaspaceConstructor into CompilerToVM.getMetaspaceMethod
twisti
parents: 13263
diff changeset
220 * @return the metaspace Method
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
221 */
13264
b23cbfb4366a merged CompilerToVM.getMetaspaceConstructor into CompilerToVM.getMetaspaceMethod
twisti
parents: 13263
diff changeset
222 long getMetaspaceMethod(Class<?> holder, int slot);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
223
9649
dd62ccda1849 rename parameter
Doug Simon <doug.simon@oracle.com>
parents: 9610
diff changeset
224 long getMaxCallTargetOffset(long address);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
225
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
226 String disassembleCodeBlob(long codeBlob);
7784
016e23829147 added HotSpot implementation of disassembling APIs
Doug Simon <doug.simon@oracle.com>
parents: 7530
diff changeset
227
6950
41938af2b3d8 modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents: 6588
diff changeset
228 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
229
15161
2c940b1a48d8 Convert InstalledCode from an interface into an abstract class.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 15092
diff changeset
230 Object executeCompiledMethod(Object arg1, Object arg2, Object arg3, InstalledCode hotspotInstalledCode) throws InvalidInstalledCodeException;
4993
897b7d18bebc added RiCompiledMethod.execute and the required VM infrastructure
Lukas Stadler <lukas.stadler@jku.at>
parents: 4635
diff changeset
231
15161
2c940b1a48d8 Convert InstalledCode from an interface into an abstract class.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 15092
diff changeset
232 Object executeCompiledMethodVarargs(Object[] args, InstalledCode 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
233
14104
a38a54030ea2 pass metaspace pointers instead of object to VM
twisti
parents: 14093
diff changeset
234 long[] getLineNumberTable(long metaspaceMethod);
7307
dc3e86fd3be1 Introduce cutomization capability for canonicalizer.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 7225
diff changeset
235
14104
a38a54030ea2 pass metaspace pointers instead of object to VM
twisti
parents: 14093
diff changeset
236 long getLocalVariableTableStart(long metaspaceMethod);
13306
dfb780080923 moved most CompilerToVM.getLocalVariableTable to Java
twisti
parents: 13305
diff changeset
237
14104
a38a54030ea2 pass metaspace pointers instead of object to VM
twisti
parents: 14093
diff changeset
238 int getLocalVariableTableLength(long metaspaceMethod);
7786
8bbbde9d0a52 extended ResolvedJavaMethod API by getLocalVariableTable
Matthias Grimmer <grimmer@ssw.jku.at>
parents: 7784
diff changeset
239
7307
dc3e86fd3be1 Introduce cutomization capability for canonicalizer.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 7225
diff changeset
240 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
241
15052
5e6f29f287d6 added InstanceKlass::_graal_node_class field to accelerate Node.getNodeClass()
Doug Simon <doug.simon@oracle.com>
parents: 14908
diff changeset
242 Class<?> getJavaMirror(long metaspaceKlass);
5e6f29f287d6 added InstanceKlass::_graal_node_class field to accelerate Node.getNodeClass()
Doug Simon <doug.simon@oracle.com>
parents: 14908
diff changeset
243
10715
c3760150dc29 Add function to read compressed klass pointers of constant objects natively
Christos Kotselidis <christos.kotselidis@oracle.com>
parents: 10639
diff changeset
244 long readUnsafeKlassPointer(Object o);
c3760150dc29 Add function to read compressed klass pointers of constant objects natively
Christos Kotselidis <christos.kotselidis@oracle.com>
parents: 10639
diff changeset
245
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: 19766
diff changeset
246 /**
21413
15a46a918fc1 removed unnecessary HotSpotCodeCache.MarkId enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21119
diff changeset
247 * Reads an object pointer within a VM data structure. That is, any {@link HotSpotVMField} whose
15a46a918fc1 removed unnecessary HotSpotCodeCache.MarkId enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21119
diff changeset
248 * {@link HotSpotVMField#type() type} is {@code "oop"} (e.g.,
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: 19766
diff changeset
249 * {@code ArrayKlass::_component_mirror}, {@code Klass::_java_mirror},
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: 19766
diff changeset
250 * {@code JavaThread::_threadObj}).
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: 19766
diff changeset
251 *
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: 19766
diff changeset
252 * Note that {@link Unsafe#getObject(Object, long)} cannot be used for this since it does a
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: 19766
diff changeset
253 * {@code narrowOop} read if the VM is using compressed oops whereas oops within VM data
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: 19766
diff changeset
254 * structures are (currently) always uncompressed.
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: 19766
diff changeset
255 *
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: 19766
diff changeset
256 * @param address address of an oop field within a VM data structure
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: 19766
diff changeset
257 */
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: 19766
diff changeset
258 Object readUncompressedOop(long address);
18719
6484e5c068c7 Generalize object reading in HotSpotMemoryAccessProvider.
Roland Schatz <roland.schatz@oracle.com>
parents: 18195
diff changeset
259
12535
cee7f686c470 rename CompilerToVm.dontInline to doNotInlineOrCompile
Matthias Grimmer <grimmer@ssw.jku.at>
parents: 12533
diff changeset
260 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
261
8611
6c4db417385a added API to reset the profiling information for a method
Christian Haeubl <haeubl@ssw.jku.at>
parents: 8349
diff changeset
262 /**
6c4db417385a added API to reset the profiling information for a method
Christian Haeubl <haeubl@ssw.jku.at>
parents: 8349
diff changeset
263 * Invalidates the profiling information and restarts profiling upon the next invocation.
15045
0286888f792b fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14908
diff changeset
264 *
8611
6c4db417385a added API to reset the profiling information for a method
Christian Haeubl <haeubl@ssw.jku.at>
parents: 8349
diff changeset
265 * @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
266 */
6c4db417385a added API to reset the profiling information for a method
Christian Haeubl <haeubl@ssw.jku.at>
parents: 8349
diff changeset
267 void reprofile(long metaspaceMethod);
8945
7ef66078d837 add basic invokedynamic support
Andreas Woess <andreas.woess@jku.at>
parents: 8614
diff changeset
268
15161
2c940b1a48d8 Convert InstalledCode from an interface into an abstract class.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 15092
diff changeset
269 void invalidateInstalledCode(InstalledCode hotspotInstalledCode);
11520
7cca436d600b Add isLinked method to ResolvedJavaType
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 10715
diff changeset
270
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
271 /**
d7964e96b0b0 move benchmark counters into separate class and make them correct for multithreaded applications
Lukas Stadler <lukas.stadler@jku.at>
parents: 11520
diff changeset
272 * Collects the current values of all Graal benchmark counters, summed up over all threads.
d7964e96b0b0 move benchmark counters into separate class and make them correct for multithreaded applications
Lukas Stadler <lukas.stadler@jku.at>
parents: 11520
diff changeset
273 */
d7964e96b0b0 move benchmark counters into separate class and make them correct for multithreaded applications
Lukas Stadler <lukas.stadler@jku.at>
parents: 11520
diff changeset
274 long[] collectCounters();
13630
b1838411e896 Use compile ids assigned by hotspot
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 13483
diff changeset
275
13769
af344056124f Only use mature method datas
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 13669
diff changeset
276 boolean isMature(long metaspaceMethodData);
af344056124f Only use mature method datas
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 13669
diff changeset
277
13630
b1838411e896 Use compile ids assigned by hotspot
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 13483
diff changeset
278 /**
b1838411e896 Use compile ids assigned by hotspot
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 13483
diff changeset
279 * Generate a unique id to identify the result of the compile.
b1838411e896 Use compile ids assigned by hotspot
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 13483
diff changeset
280 */
14104
a38a54030ea2 pass metaspace pointers instead of object to VM
twisti
parents: 14093
diff changeset
281 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
282
49db2c1e3bee added support for co-existing GPU backends (JBS:GRAAL-1)
Doug Simon <doug.simon@oracle.com>
parents: 13769
diff changeset
283 /**
49db2c1e3bee added support for co-existing GPU backends (JBS:GRAAL-1)
Doug Simon <doug.simon@oracle.com>
parents: 13769
diff changeset
284 * Gets the names of the supported GPU architectures.
15045
0286888f792b fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14908
diff changeset
285 *
13819
49db2c1e3bee added support for co-existing GPU backends (JBS:GRAAL-1)
Doug Simon <doug.simon@oracle.com>
parents: 13769
diff changeset
286 * @return a comma separated list of names
49db2c1e3bee added support for co-existing GPU backends (JBS:GRAAL-1)
Doug Simon <doug.simon@oracle.com>
parents: 13769
diff changeset
287 */
49db2c1e3bee added support for co-existing GPU backends (JBS:GRAAL-1)
Doug Simon <doug.simon@oracle.com>
parents: 13769
diff changeset
288 String getGPUs();
14107
800057208a2c enable C1 + Graal tiered
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14105
diff changeset
289
800057208a2c enable C1 + Graal tiered
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14105
diff changeset
290 /**
15045
0286888f792b fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14908
diff changeset
291 *
14107
800057208a2c enable C1 + Graal tiered
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14105
diff changeset
292 * @param metaspaceMethod the method to check
800057208a2c enable C1 + Graal tiered
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14105
diff changeset
293 * @param entryBCI
800057208a2c enable C1 + Graal tiered
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14105
diff changeset
294 * @param level the compilation level
800057208a2c enable C1 + Graal tiered
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14105
diff changeset
295 * @return true if the {@code metaspaceMethod} has code for {@code level}
800057208a2c enable C1 + Graal tiered
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14105
diff changeset
296 */
800057208a2c enable C1 + Graal tiered
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14105
diff changeset
297 boolean hasCompiledCodeForOSR(long metaspaceMethod, int entryBCI, int level);
15045
0286888f792b fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14908
diff changeset
298
0286888f792b fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14908
diff changeset
299 /**
0286888f792b fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14908
diff changeset
300 * Fetch the time stamp used for printing inside hotspot. It's relative to VM start to that all
0286888f792b fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14908
diff changeset
301 * events can be ordered.
15059
4df6d7c966a2 fixed performance regression in hosted mode execution caused by 5e6f29f287d6
Doug Simon <doug.simon@oracle.com>
parents: 15054
diff changeset
302 *
15045
0286888f792b fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14908
diff changeset
303 * @return milliseconds since VM start
0286888f792b fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14908
diff changeset
304 */
0286888f792b fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14908
diff changeset
305 long getTimeStamp();
15063
36e1a11a72b3 new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents: 15059
diff changeset
306
36e1a11a72b3 new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents: 15059
diff changeset
307 /**
15968
42eaa579e134 more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents: 15843
diff changeset
308 * Gets the value of a metaspace {@code Symbol} as a String.
16006
66a9286203a2 decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents: 15968
diff changeset
309 *
15968
42eaa579e134 more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents: 15843
diff changeset
310 * @param metaspaceSymbol
42eaa579e134 more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents: 15843
diff changeset
311 */
42eaa579e134 more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents: 15843
diff changeset
312 String getSymbol(long metaspaceSymbol);
42eaa579e134 more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents: 15843
diff changeset
313
42eaa579e134 more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents: 15843
diff changeset
314 /**
15063
36e1a11a72b3 new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents: 15059
diff changeset
315 * Looks for the next Java stack frame with the given method.
36e1a11a72b3 new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents: 15059
diff changeset
316 *
36e1a11a72b3 new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents: 15059
diff changeset
317 * @param frame the starting point of the search, where {@code null} refers to the topmost frame
15088
d3add9b82b71 change to StackIntrospection and Truffle getStackTrace implementation
Lukas Stadler <lukas.stadler@oracle.com>
parents: 15063
diff changeset
318 * @param methods the metaspace methods to look for, where {@code null} means that any frame is
d3add9b82b71 change to StackIntrospection and Truffle getStackTrace implementation
Lukas Stadler <lukas.stadler@oracle.com>
parents: 15063
diff changeset
319 * returned
15063
36e1a11a72b3 new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents: 15059
diff changeset
320 * @return the frame, or {@code null} if the end of the stack was reached during the search
36e1a11a72b3 new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents: 15059
diff changeset
321 */
15092
c73ce0dd3583 add support for skipping stack frames in StackIntrospection.getStackTrace
Lukas Stadler <lukas.stadler@oracle.com>
parents: 15088
diff changeset
322 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
323
36e1a11a72b3 new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents: 15059
diff changeset
324 /**
36e1a11a72b3 new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents: 15059
diff changeset
325 * Materialized all virtual objects within the given stack frame and update the locals within
36e1a11a72b3 new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents: 15059
diff changeset
326 * the given stackFrame object.
36e1a11a72b3 new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents: 15059
diff changeset
327 *
36e1a11a72b3 new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents: 15059
diff changeset
328 * @param invalidate if {@code true}, the compiled method for the stack frame will be
36e1a11a72b3 new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents: 15059
diff changeset
329 * invalidated.
36e1a11a72b3 new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents: 15059
diff changeset
330 */
36e1a11a72b3 new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents: 15059
diff changeset
331 void materializeVirtualObjects(HotSpotStackFrameReference stackFrame, boolean invalidate);
15205
affef8631cf4 Add eager resolving for indy call sites
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 15193
diff changeset
332
affef8631cf4 Add eager resolving for indy call sites
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 15193
diff changeset
333 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
334
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
335 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
336
fb77eab05bd3 Respect the VM's wish to record non-safepoint debug info
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 16184
diff changeset
337 boolean shouldDebugNonSafepoints();
16405
9bfc4247262f send log output to native tty
Lukas Stadler <lukas.stadler@oracle.com>
parents: 16243
diff changeset
338
9bfc4247262f send log output to native tty
Lukas Stadler <lukas.stadler@oracle.com>
parents: 16243
diff changeset
339 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
340
294ed4ce1fa0 PrintStreamOption: also forward flushes to the VM
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents: 20176
diff changeset
341 void flushDebugOutput();
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
342 }