Mercurial > hg > graal-jvmci-8
annotate jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java @ 24127:6d70d9c43369
added ResolvedJavaType.isPlatformType (JDK-8177845)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Sat, 15 Apr 2017 23:54:19 +0200 |
parents | 11f0412408cd |
children | 26a414946c56 |
rev | line source |
---|---|
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1 /* |
23989
115d4e0d7b87
removed HotSpotResolvedJavaFieldImpl.name field
Doug Simon <doug.simon@oracle.com>
parents:
23986
diff
changeset
|
2 * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
4 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
8 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code). |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
14 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
18 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
21 * questions. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
22 */ |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
23 |
22672
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22650
diff
changeset
|
24 package jdk.vm.ci.hotspot; |
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:
19782
diff
changeset
|
25 |
23393
1d4ce2d19e52
clean up and minimize JVMCI (JDK-8156835)
Doug Simon <doug.simon@oracle.com>
parents:
23392
diff
changeset
|
26 import static jdk.vm.ci.common.InitTimer.timer; |
22672
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22650
diff
changeset
|
27 import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime; |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
28 |
23749
d6bd0b9cd0b6
remove uses of setAccessible (JDK-8165434)
Doug Simon <doug.simon@oracle.com>
parents:
23741
diff
changeset
|
29 import java.lang.reflect.Executable; |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
30 |
22782
bf8a5a6861b1
Add CompilerToVM.interpreterFrameSize to support stack banging for deopt
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22769
diff
changeset
|
31 import jdk.vm.ci.code.BytecodeFrame; |
22672
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22650
diff
changeset
|
32 import jdk.vm.ci.code.InstalledCode; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22650
diff
changeset
|
33 import jdk.vm.ci.code.InvalidInstalledCodeException; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22650
diff
changeset
|
34 import jdk.vm.ci.code.TargetDescription; |
23393
1d4ce2d19e52
clean up and minimize JVMCI (JDK-8156835)
Doug Simon <doug.simon@oracle.com>
parents:
23392
diff
changeset
|
35 import jdk.vm.ci.common.InitTimer; |
23392
b3a816d3b844
Backed out changeset: a920338dd4d4
Doug Simon <doug.simon@oracle.com>
parents:
23390
diff
changeset
|
36 import jdk.vm.ci.common.JVMCIError; |
22672
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22650
diff
changeset
|
37 import jdk.vm.ci.meta.JavaType; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22650
diff
changeset
|
38 import jdk.vm.ci.meta.ResolvedJavaMethod; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22650
diff
changeset
|
39 import jdk.vm.ci.meta.ResolvedJavaType; |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
40 import sun.misc.Unsafe; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
41 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
42 /** |
22455
7ad03bf3d4a9
renames related to using metaspace wrappers instead of raw metaspace values
Doug Simon <doug.simon@oracle.com>
parents:
22454
diff
changeset
|
43 * Calls from Java into HotSpot. The behavior of all the methods in this class that take a native |
7ad03bf3d4a9
renames related to using metaspace wrappers instead of raw metaspace values
Doug Simon <doug.simon@oracle.com>
parents:
22454
diff
changeset
|
44 * pointer as an argument (e.g., {@link #getSymbol(long)}) is undefined if the argument does not |
7ad03bf3d4a9
renames related to using metaspace wrappers instead of raw metaspace values
Doug Simon <doug.simon@oracle.com>
parents:
22454
diff
changeset
|
45 * denote a valid native object. |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
46 */ |
22636
1ec4129907b3
made CompilerToVM package-private
Doug Simon <doug.simon@oracle.com>
parents:
22635
diff
changeset
|
47 final class CompilerToVM { |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
48 /** |
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
49 * Initializes the native part of the JVMCI runtime. |
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
50 */ |
22650
939d5da65929
reduced delta against jvmci-9
Doug Simon <doug.simon@oracle.com>
parents:
22648
diff
changeset
|
51 private static native void registerNatives(); |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
52 |
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
53 static { |
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
54 initialize(); |
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
55 } |
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
56 |
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
57 @SuppressWarnings("try") |
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
58 private static void initialize() { |
22650
939d5da65929
reduced delta against jvmci-9
Doug Simon <doug.simon@oracle.com>
parents:
22648
diff
changeset
|
59 try (InitTimer t = timer("CompilerToVM.registerNatives")) { |
939d5da65929
reduced delta against jvmci-9
Doug Simon <doug.simon@oracle.com>
parents:
22648
diff
changeset
|
60 registerNatives(); |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
61 } |
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
62 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
63 |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6588
diff
changeset
|
64 /** |
22582
232c53e17ea0
added CompilerToVM.compilerToVM() for static access to the CompilerToVM instance
Doug Simon <doug.simon@oracle.com>
parents:
22573
diff
changeset
|
65 * Gets the {@link CompilerToVM} instance associated with the singleton |
232c53e17ea0
added CompilerToVM.compilerToVM() for static access to the CompilerToVM instance
Doug Simon <doug.simon@oracle.com>
parents:
22573
diff
changeset
|
66 * {@link HotSpotJVMCIRuntime} instance. |
232c53e17ea0
added CompilerToVM.compilerToVM() for static access to the CompilerToVM instance
Doug Simon <doug.simon@oracle.com>
parents:
22573
diff
changeset
|
67 */ |
232c53e17ea0
added CompilerToVM.compilerToVM() for static access to the CompilerToVM instance
Doug Simon <doug.simon@oracle.com>
parents:
22573
diff
changeset
|
68 public static CompilerToVM compilerToVM() { |
232c53e17ea0
added CompilerToVM.compilerToVM() for static access to the CompilerToVM instance
Doug Simon <doug.simon@oracle.com>
parents:
22573
diff
changeset
|
69 return runtime().getCompilerToVM(); |
232c53e17ea0
added CompilerToVM.compilerToVM() for static access to the CompilerToVM instance
Doug Simon <doug.simon@oracle.com>
parents:
22573
diff
changeset
|
70 } |
232c53e17ea0
added CompilerToVM.compilerToVM() for static access to the CompilerToVM instance
Doug Simon <doug.simon@oracle.com>
parents:
22573
diff
changeset
|
71 |
232c53e17ea0
added CompilerToVM.compilerToVM() for static access to the CompilerToVM instance
Doug Simon <doug.simon@oracle.com>
parents:
22573
diff
changeset
|
72 /** |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
73 * Copies the original bytecode of {@code 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
|
74 * |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
75 * @return a new byte array containing the original bytecode of {@code method} |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6588
diff
changeset
|
76 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
77 native byte[] getBytecode(HotSpotResolvedJavaMethodImpl method); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
78 |
22414
c1c05278cdf8
renamed exceptionTable* methods in CompilerToVM to getExceptionTable* and added javadoc (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22054
diff
changeset
|
79 /** |
23393
1d4ce2d19e52
clean up and minimize JVMCI (JDK-8156835)
Doug Simon <doug.simon@oracle.com>
parents:
23392
diff
changeset
|
80 * Gets the number of entries in {@code method}'s exception handler table or 0 if it has no |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
81 * exception handler table. |
22414
c1c05278cdf8
renamed exceptionTable* methods in CompilerToVM to getExceptionTable* and added javadoc (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22054
diff
changeset
|
82 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
83 native int getExceptionTableLength(HotSpotResolvedJavaMethodImpl method); |
14105 | 84 |
22414
c1c05278cdf8
renamed exceptionTable* methods in CompilerToVM to getExceptionTable* and added javadoc (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22054
diff
changeset
|
85 /** |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
86 * Gets the address of the first entry in {@code method}'s exception handler table. |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
87 * |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
88 * Each entry is a native object described by these fields: |
22414
c1c05278cdf8
renamed exceptionTable* methods in CompilerToVM to getExceptionTable* and added javadoc (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22054
diff
changeset
|
89 * |
c1c05278cdf8
renamed exceptionTable* methods in CompilerToVM to getExceptionTable* and added javadoc (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22054
diff
changeset
|
90 * <ul> |
c1c05278cdf8
renamed exceptionTable* methods in CompilerToVM to getExceptionTable* and added javadoc (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22054
diff
changeset
|
91 * <li>{@link HotSpotVMConfig#exceptionTableElementSize}</li> |
c1c05278cdf8
renamed exceptionTable* methods in CompilerToVM to getExceptionTable* and added javadoc (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22054
diff
changeset
|
92 * <li>{@link HotSpotVMConfig#exceptionTableElementStartPcOffset}</li> |
c1c05278cdf8
renamed exceptionTable* methods in CompilerToVM to getExceptionTable* and added javadoc (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22054
diff
changeset
|
93 * <li>{@link HotSpotVMConfig#exceptionTableElementEndPcOffset}</li> |
c1c05278cdf8
renamed exceptionTable* methods in CompilerToVM to getExceptionTable* and added javadoc (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22054
diff
changeset
|
94 * <li>{@link HotSpotVMConfig#exceptionTableElementHandlerPcOffset}</li> |
c1c05278cdf8
renamed exceptionTable* methods in CompilerToVM to getExceptionTable* and added javadoc (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22054
diff
changeset
|
95 * <li>{@link HotSpotVMConfig#exceptionTableElementCatchTypeIndexOffset} |
c1c05278cdf8
renamed exceptionTable* methods in CompilerToVM to getExceptionTable* and added javadoc (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22054
diff
changeset
|
96 * </ul> |
c1c05278cdf8
renamed exceptionTable* methods in CompilerToVM to getExceptionTable* and added javadoc (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22054
diff
changeset
|
97 * |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
98 * @return 0 if {@code method} has no exception handlers (i.e. |
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
99 * {@code getExceptionTableLength(method) == 0}) |
22414
c1c05278cdf8
renamed exceptionTable* methods in CompilerToVM to getExceptionTable* and added javadoc (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22054
diff
changeset
|
100 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
101 native long getExceptionTableStart(HotSpotResolvedJavaMethodImpl method); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
102 |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6588
diff
changeset
|
103 /** |
23986
6d2c72b822b0
add ResolvedJavaMethod.hasNeverInlineDirective (JDK-8172733)
Doug Simon <doug.simon@oracle.com>
parents:
23749
diff
changeset
|
104 * Determines whether {@code method} is currently compilable by the JVMCI compiler being used by |
6d2c72b822b0
add ResolvedJavaMethod.hasNeverInlineDirective (JDK-8172733)
Doug Simon <doug.simon@oracle.com>
parents:
23749
diff
changeset
|
105 * the VM. This can return false if JVMCI compilation failed earlier for {@code method}, a |
6d2c72b822b0
add ResolvedJavaMethod.hasNeverInlineDirective (JDK-8172733)
Doug Simon <doug.simon@oracle.com>
parents:
23749
diff
changeset
|
106 * breakpoint is currently set in {@code method} or {@code method} contains other bytecode |
6d2c72b822b0
add ResolvedJavaMethod.hasNeverInlineDirective (JDK-8172733)
Doug Simon <doug.simon@oracle.com>
parents:
23749
diff
changeset
|
107 * features that require special handling by the VM. |
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
|
108 */ |
23986
6d2c72b822b0
add ResolvedJavaMethod.hasNeverInlineDirective (JDK-8172733)
Doug Simon <doug.simon@oracle.com>
parents:
23749
diff
changeset
|
109 native boolean isCompilable(HotSpotResolvedJavaMethodImpl method); |
6d2c72b822b0
add ResolvedJavaMethod.hasNeverInlineDirective (JDK-8172733)
Doug Simon <doug.simon@oracle.com>
parents:
23749
diff
changeset
|
110 |
6d2c72b822b0
add ResolvedJavaMethod.hasNeverInlineDirective (JDK-8172733)
Doug Simon <doug.simon@oracle.com>
parents:
23749
diff
changeset
|
111 /** |
6d2c72b822b0
add ResolvedJavaMethod.hasNeverInlineDirective (JDK-8172733)
Doug Simon <doug.simon@oracle.com>
parents:
23749
diff
changeset
|
112 * Determines if {@code method} is targeted by a VM directive (e.g., |
6d2c72b822b0
add ResolvedJavaMethod.hasNeverInlineDirective (JDK-8172733)
Doug Simon <doug.simon@oracle.com>
parents:
23749
diff
changeset
|
113 * {@code -XX:CompileCommand=dontinline,<pattern>}) or annotation (e.g., |
6d2c72b822b0
add ResolvedJavaMethod.hasNeverInlineDirective (JDK-8172733)
Doug Simon <doug.simon@oracle.com>
parents:
23749
diff
changeset
|
114 * {@code jdk.internal.vm.annotation.DontInline}) that specifies it should not be inlined. |
6d2c72b822b0
add ResolvedJavaMethod.hasNeverInlineDirective (JDK-8172733)
Doug Simon <doug.simon@oracle.com>
parents:
23749
diff
changeset
|
115 */ |
6d2c72b822b0
add ResolvedJavaMethod.hasNeverInlineDirective (JDK-8172733)
Doug Simon <doug.simon@oracle.com>
parents:
23749
diff
changeset
|
116 native boolean hasNeverInlineDirective(HotSpotResolvedJavaMethodImpl method); |
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
|
117 |
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
|
118 /** |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
119 * Determines if {@code method} should be inlined at any cost. This could be because: |
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
|
120 * <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
|
121 * <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
|
122 * <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
|
123 * </ul> |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6588
diff
changeset
|
124 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
125 native boolean shouldInlineMethod(HotSpotResolvedJavaMethodImpl method); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
126 |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6588
diff
changeset
|
127 /** |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6588
diff
changeset
|
128 * 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
|
129 * |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
130 * @param method the method on which to base the search |
22455
7ad03bf3d4a9
renames related to using metaspace wrappers instead of raw metaspace values
Doug Simon <doug.simon@oracle.com>
parents:
22454
diff
changeset
|
131 * @param actualHolderType the best known type of receiver |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
132 * @return the method result or 0 is there is no unique concrete method for {@code method} |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6588
diff
changeset
|
133 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
134 native HotSpotResolvedJavaMethodImpl findUniqueConcreteMethod(HotSpotResolvedObjectTypeImpl actualHolderType, HotSpotResolvedJavaMethodImpl method); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
135 |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6588
diff
changeset
|
136 /** |
22455
7ad03bf3d4a9
renames related to using metaspace wrappers instead of raw metaspace values
Doug Simon <doug.simon@oracle.com>
parents:
22454
diff
changeset
|
137 * Gets the implementor for the interface class {@code type}. |
15045
0286888f792b
fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
14908
diff
changeset
|
138 * |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
139 * @return the implementor if there is a single implementor, 0 if there is no implementor, or |
22455
7ad03bf3d4a9
renames related to using metaspace wrappers instead of raw metaspace values
Doug Simon <doug.simon@oracle.com>
parents:
22454
diff
changeset
|
140 * {@code type} itself if there is more than one implementor |
7225
31c4d9f9e922
adder better CHA support
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7147
diff
changeset
|
141 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
142 native HotSpotResolvedObjectTypeImpl getImplementor(HotSpotResolvedObjectTypeImpl type); |
7225
31c4d9f9e922
adder better CHA support
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7147
diff
changeset
|
143 |
31c4d9f9e922
adder better CHA support
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7147
diff
changeset
|
144 /** |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
145 * Determines if {@code method} is ignored by security stack walks. |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6588
diff
changeset
|
146 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
147 native boolean methodIsIgnoredBySecurityStackWalk(HotSpotResolvedJavaMethodImpl method); |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6588
diff
changeset
|
148 |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6588
diff
changeset
|
149 /** |
22455
7ad03bf3d4a9
renames related to using metaspace wrappers instead of raw metaspace values
Doug Simon <doug.simon@oracle.com>
parents:
22454
diff
changeset
|
150 * Converts a name to a type. |
15045
0286888f792b
fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
14908
diff
changeset
|
151 * |
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
|
152 * @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
|
153 * @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
|
154 * @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
|
155 * either return a {@link ResolvedJavaType} or throw an exception |
22455
7ad03bf3d4a9
renames related to using metaspace wrappers instead of raw metaspace values
Doug Simon <doug.simon@oracle.com>
parents:
22454
diff
changeset
|
156 * @return the type for {@code name} or 0 if resolution failed and {@code resolve == false} |
14117
2b2f0022900f
removed unnecessary lookupKlassByName method
Doug Simon <doug.simon@oracle.com>
parents:
14107
diff
changeset
|
157 * @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
|
158 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
159 native HotSpotResolvedObjectTypeImpl lookupType(String name, Class<?> accessingClass, boolean resolve); |
14093 | 160 |
22415
c25188911c49
added javadoc to more methods in CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22414
diff
changeset
|
161 /** |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
162 * Resolves the entry at index {@code cpi} in {@code constantPool} to an object. |
22415
c25188911c49
added javadoc to more methods in CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22414
diff
changeset
|
163 * |
22611
5baefb241788
restricted and documented constant pool entry types supported by resolveConstantInPool and resolvePossiblyCachedConstantInPool
Doug Simon <doug.simon@oracle.com>
parents:
22605
diff
changeset
|
164 * The behavior of this method is undefined if {@code cpi} does not denote one of the following |
5baefb241788
restricted and documented constant pool entry types supported by resolveConstantInPool and resolvePossiblyCachedConstantInPool
Doug Simon <doug.simon@oracle.com>
parents:
22605
diff
changeset
|
165 * entry types: {@code JVM_CONSTANT_MethodHandle}, {@code JVM_CONSTANT_MethodHandleInError}, |
5baefb241788
restricted and documented constant pool entry types supported by resolveConstantInPool and resolvePossiblyCachedConstantInPool
Doug Simon <doug.simon@oracle.com>
parents:
22605
diff
changeset
|
166 * {@code JVM_CONSTANT_MethodType} and {@code JVM_CONSTANT_MethodTypeInError}. |
22415
c25188911c49
added javadoc to more methods in CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22414
diff
changeset
|
167 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
168 native Object resolveConstantInPool(HotSpotConstantPool constantPool, int cpi); |
14529 | 169 |
22415
c25188911c49
added javadoc to more methods in CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22414
diff
changeset
|
170 /** |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
171 * Resolves the entry at index {@code cpi} in {@code constantPool} to an object, looking in the |
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
172 * constant pool cache first. |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
173 * |
22611
5baefb241788
restricted and documented constant pool entry types supported by resolveConstantInPool and resolvePossiblyCachedConstantInPool
Doug Simon <doug.simon@oracle.com>
parents:
22605
diff
changeset
|
174 * The behavior of this method is undefined if {@code cpi} does not denote a |
5baefb241788
restricted and documented constant pool entry types supported by resolveConstantInPool and resolvePossiblyCachedConstantInPool
Doug Simon <doug.simon@oracle.com>
parents:
22605
diff
changeset
|
175 * {@code JVM_CONSTANT_String} entry. |
22415
c25188911c49
added javadoc to more methods in CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22414
diff
changeset
|
176 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
177 native Object resolvePossiblyCachedConstantInPool(HotSpotConstantPool constantPool, int cpi); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
178 |
22415
c25188911c49
added javadoc to more methods in CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22414
diff
changeset
|
179 /** |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
180 * Gets the {@code JVM_CONSTANT_NameAndType} index from the entry at index {@code cpi} in |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
181 * {@code constantPool}. |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
182 * |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
183 * The behavior of this method is undefined if {@code cpi} does not denote an entry containing a |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
184 * {@code JVM_CONSTANT_NameAndType} index. |
22415
c25188911c49
added javadoc to more methods in CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22414
diff
changeset
|
185 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
186 native int lookupNameAndTypeRefIndexInPool(HotSpotConstantPool constantPool, int cpi); |
14093 | 187 |
22415
c25188911c49
added javadoc to more methods in CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22414
diff
changeset
|
188 /** |
22605
f0ec628cb987
fixed javadoc for lookupNameRefInPool and lookupSignatureRefInPool in CompilerToVM and renamed them to lookupNameInPool and lookupSignatureInPool
Doug Simon <doug.simon@oracle.com>
parents:
22597
diff
changeset
|
189 * Gets the name of the {@code JVM_CONSTANT_NameAndType} entry referenced by another entry |
f0ec628cb987
fixed javadoc for lookupNameRefInPool and lookupSignatureRefInPool in CompilerToVM and renamed them to lookupNameInPool and lookupSignatureInPool
Doug Simon <doug.simon@oracle.com>
parents:
22597
diff
changeset
|
190 * denoted by {@code which} in {@code constantPool}. |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
191 * |
22605
f0ec628cb987
fixed javadoc for lookupNameRefInPool and lookupSignatureRefInPool in CompilerToVM and renamed them to lookupNameInPool and lookupSignatureInPool
Doug Simon <doug.simon@oracle.com>
parents:
22597
diff
changeset
|
192 * The behavior of this method is undefined if {@code which} does not denote a entry that |
f0ec628cb987
fixed javadoc for lookupNameRefInPool and lookupSignatureRefInPool in CompilerToVM and renamed them to lookupNameInPool and lookupSignatureInPool
Doug Simon <doug.simon@oracle.com>
parents:
22597
diff
changeset
|
193 * references a {@code JVM_CONSTANT_NameAndType} entry. |
22415
c25188911c49
added javadoc to more methods in CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22414
diff
changeset
|
194 */ |
22605
f0ec628cb987
fixed javadoc for lookupNameRefInPool and lookupSignatureRefInPool in CompilerToVM and renamed them to lookupNameInPool and lookupSignatureInPool
Doug Simon <doug.simon@oracle.com>
parents:
22597
diff
changeset
|
195 native String lookupNameInPool(HotSpotConstantPool constantPool, int which); |
14093 | 196 |
22415
c25188911c49
added javadoc to more methods in CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22414
diff
changeset
|
197 /** |
22605
f0ec628cb987
fixed javadoc for lookupNameRefInPool and lookupSignatureRefInPool in CompilerToVM and renamed them to lookupNameInPool and lookupSignatureInPool
Doug Simon <doug.simon@oracle.com>
parents:
22597
diff
changeset
|
198 * Gets the signature of the {@code JVM_CONSTANT_NameAndType} entry referenced by another entry |
f0ec628cb987
fixed javadoc for lookupNameRefInPool and lookupSignatureRefInPool in CompilerToVM and renamed them to lookupNameInPool and lookupSignatureInPool
Doug Simon <doug.simon@oracle.com>
parents:
22597
diff
changeset
|
199 * denoted by {@code which} in {@code constantPool}. |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
200 * |
22605
f0ec628cb987
fixed javadoc for lookupNameRefInPool and lookupSignatureRefInPool in CompilerToVM and renamed them to lookupNameInPool and lookupSignatureInPool
Doug Simon <doug.simon@oracle.com>
parents:
22597
diff
changeset
|
201 * The behavior of this method is undefined if {@code which} does not denote a entry that |
f0ec628cb987
fixed javadoc for lookupNameRefInPool and lookupSignatureRefInPool in CompilerToVM and renamed them to lookupNameInPool and lookupSignatureInPool
Doug Simon <doug.simon@oracle.com>
parents:
22597
diff
changeset
|
202 * references a {@code JVM_CONSTANT_NameAndType} entry. |
22415
c25188911c49
added javadoc to more methods in CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22414
diff
changeset
|
203 */ |
22605
f0ec628cb987
fixed javadoc for lookupNameRefInPool and lookupSignatureRefInPool in CompilerToVM and renamed them to lookupNameInPool and lookupSignatureInPool
Doug Simon <doug.simon@oracle.com>
parents:
22597
diff
changeset
|
204 native String lookupSignatureInPool(HotSpotConstantPool constantPool, int which); |
14093 | 205 |
22415
c25188911c49
added javadoc to more methods in CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22414
diff
changeset
|
206 /** |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
207 * Gets the {@code JVM_CONSTANT_Class} index from the entry at index {@code cpi} in |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
208 * {@code constantPool}. |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
209 * |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
210 * The behavior of this method is undefined if {@code cpi} does not denote an entry containing a |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
211 * {@code JVM_CONSTANT_Class} index. |
22415
c25188911c49
added javadoc to more methods in CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22414
diff
changeset
|
212 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
213 native int lookupKlassRefIndexInPool(HotSpotConstantPool constantPool, int cpi); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
214 |
22415
c25188911c49
added javadoc to more methods in CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22414
diff
changeset
|
215 /** |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
216 * Looks up a class denoted by the {@code JVM_CONSTANT_Class} entry at index {@code cpi} in |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
217 * {@code constantPool}. This method does not perform any resolution. |
15045
0286888f792b
fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
14908
diff
changeset
|
218 * |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
219 * The behavior of this method is undefined if {@code cpi} does not denote a |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
220 * {@code JVM_CONSTANT_Class} entry. |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
221 * |
22455
7ad03bf3d4a9
renames related to using metaspace wrappers instead of raw metaspace values
Doug Simon <doug.simon@oracle.com>
parents:
22454
diff
changeset
|
222 * @return the resolved class entry or a String otherwise |
14069
2f37b0e442fe
removed remaining VMToCompiler calls for allocating Graal API objects
Doug Simon <doug.simon@oracle.com>
parents:
14052
diff
changeset
|
223 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
224 native Object lookupKlassInPool(HotSpotConstantPool constantPool, int cpi); |
14093 | 225 |
226 /** | |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
227 * Looks up a method denoted by the entry at index {@code cpi} in {@code constantPool}. This |
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
228 * method does not perform any resolution. |
15045
0286888f792b
fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
14908
diff
changeset
|
229 * |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
230 * The behavior of this method is undefined if {@code cpi} does not denote an entry representing |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
231 * a method. |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
232 * |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
233 * @param opcode the opcode of the instruction for which the lookup is being performed or |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
234 * {@code -1}. If non-negative, then resolution checks specific to the bytecode it |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
235 * denotes are performed if the method is already resolved. Should any of these |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
236 * checks fail, 0 is returned. |
22455
7ad03bf3d4a9
renames related to using metaspace wrappers instead of raw metaspace values
Doug Simon <doug.simon@oracle.com>
parents:
22454
diff
changeset
|
237 * @return the resolved method entry, 0 otherwise |
14093 | 238 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
239 native HotSpotResolvedJavaMethodImpl lookupMethodInPool(HotSpotConstantPool constantPool, int cpi, byte opcode); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
240 |
14069
2f37b0e442fe
removed remaining VMToCompiler calls for allocating Graal API objects
Doug Simon <doug.simon@oracle.com>
parents:
14052
diff
changeset
|
241 /** |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
242 * Ensures that the type referenced by the specified {@code JVM_CONSTANT_InvokeDynamic} entry at |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
243 * index {@code cpi} in {@code constantPool} is loaded and initialized. |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
244 * |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
245 * The behavior of this method is undefined if {@code cpi} does not denote a |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
246 * {@code JVM_CONSTANT_InvokeDynamic} entry. |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
247 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
248 native void resolveInvokeDynamicInPool(HotSpotConstantPool constantPool, int cpi); |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
249 |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
250 /** |
23741
6542cd8da2da
include VarHandle in signature polymorphic method test (JDK-8164214)
Doug Simon <doug.simon@oracle.com>
parents:
23738
diff
changeset
|
251 * If {@code cpi} denotes an entry representing a |
23345
1c4b6a7f1917
update to Eclipse 4.5.2 format style
Doug Simon <doug.simon@oracle.com>
parents:
23322
diff
changeset
|
252 * <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-2.html#jvms-2.9">signature |
23741
6542cd8da2da
include VarHandle in signature polymorphic method test (JDK-8164214)
Doug Simon <doug.simon@oracle.com>
parents:
23738
diff
changeset
|
253 * polymorphic</a> method, this method ensures that the type referenced by the entry is loaded |
6542cd8da2da
include VarHandle in signature polymorphic method test (JDK-8164214)
Doug Simon <doug.simon@oracle.com>
parents:
23738
diff
changeset
|
254 * and initialized. It {@code cpi} does not denote a signature polymorphic method, this method |
6542cd8da2da
include VarHandle in signature polymorphic method test (JDK-8164214)
Doug Simon <doug.simon@oracle.com>
parents:
23738
diff
changeset
|
255 * does nothing. |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
256 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
257 native void resolveInvokeHandleInPool(HotSpotConstantPool constantPool, int cpi); |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
258 |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
259 /** |
23741
6542cd8da2da
include VarHandle in signature polymorphic method test (JDK-8164214)
Doug Simon <doug.simon@oracle.com>
parents:
23738
diff
changeset
|
260 * Gets the list of type names (in the format of {@link JavaType#getName()}) denoting the |
6542cd8da2da
include VarHandle in signature polymorphic method test (JDK-8164214)
Doug Simon <doug.simon@oracle.com>
parents:
23738
diff
changeset
|
261 * classes that define signature polymorphic methods. |
6542cd8da2da
include VarHandle in signature polymorphic method test (JDK-8164214)
Doug Simon <doug.simon@oracle.com>
parents:
23738
diff
changeset
|
262 */ |
6542cd8da2da
include VarHandle in signature polymorphic method test (JDK-8164214)
Doug Simon <doug.simon@oracle.com>
parents:
23738
diff
changeset
|
263 native String[] getSignaturePolymorphicHolders(); |
6542cd8da2da
include VarHandle in signature polymorphic method test (JDK-8164214)
Doug Simon <doug.simon@oracle.com>
parents:
23738
diff
changeset
|
264 |
6542cd8da2da
include VarHandle in signature polymorphic method test (JDK-8164214)
Doug Simon <doug.simon@oracle.com>
parents:
23738
diff
changeset
|
265 /** |
22455
7ad03bf3d4a9
renames related to using metaspace wrappers instead of raw metaspace values
Doug Simon <doug.simon@oracle.com>
parents:
22454
diff
changeset
|
266 * Gets the resolved type denoted by the entry at index {@code cpi} in {@code constantPool}. |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
267 * |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
268 * The behavior of this method is undefined if {@code cpi} does not denote an entry representing |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
269 * a class. |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
270 * |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
271 * @throws LinkageError if resolution failed |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
272 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
273 native HotSpotResolvedObjectTypeImpl resolveTypeInPool(HotSpotConstantPool constantPool, int cpi) throws LinkageError; |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
274 |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
275 /** |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
276 * Looks up and attempts to resolve the {@code JVM_CONSTANT_Field} entry at index {@code cpi} in |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
277 * {@code constantPool}. The values returned in {@code info} are: |
15045
0286888f792b
fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
14908
diff
changeset
|
278 * |
14069
2f37b0e442fe
removed remaining VMToCompiler calls for allocating Graal API objects
Doug Simon <doug.simon@oracle.com>
parents:
14052
diff
changeset
|
279 * <pre> |
23989
115d4e0d7b87
removed HotSpotResolvedJavaFieldImpl.name field
Doug Simon <doug.simon@oracle.com>
parents:
23986
diff
changeset
|
280 * [ flags, // fieldDescriptor::access_flags() |
115d4e0d7b87
removed HotSpotResolvedJavaFieldImpl.name field
Doug Simon <doug.simon@oracle.com>
parents:
23986
diff
changeset
|
281 * offset, // fieldDescriptor::offset() |
115d4e0d7b87
removed HotSpotResolvedJavaFieldImpl.name field
Doug Simon <doug.simon@oracle.com>
parents:
23986
diff
changeset
|
282 * index // fieldDescriptor::index() |
115d4e0d7b87
removed HotSpotResolvedJavaFieldImpl.name field
Doug Simon <doug.simon@oracle.com>
parents:
23986
diff
changeset
|
283 * ] |
14069
2f37b0e442fe
removed remaining VMToCompiler calls for allocating Graal API objects
Doug Simon <doug.simon@oracle.com>
parents:
14052
diff
changeset
|
284 * </pre> |
15045
0286888f792b
fix PrintCompilation formatting and use same time source
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
14908
diff
changeset
|
285 * |
23989
115d4e0d7b87
removed HotSpotResolvedJavaFieldImpl.name field
Doug Simon <doug.simon@oracle.com>
parents:
23986
diff
changeset
|
286 * The values encoded in {@code info} are only valid if the field is resolved. The behavior of |
115d4e0d7b87
removed HotSpotResolvedJavaFieldImpl.name field
Doug Simon <doug.simon@oracle.com>
parents:
23986
diff
changeset
|
287 * this method is undefined if {@code cpi} does not denote a {@code JVM_CONSTANT_Field} entry. |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
288 * |
14069
2f37b0e442fe
removed remaining VMToCompiler calls for allocating Graal API objects
Doug Simon <doug.simon@oracle.com>
parents:
14052
diff
changeset
|
289 * @param info an array in which the details of the field are returned |
22455
7ad03bf3d4a9
renames related to using metaspace wrappers instead of raw metaspace values
Doug Simon <doug.simon@oracle.com>
parents:
22454
diff
changeset
|
290 * @return the type defining the field if resolution is successful, 0 otherwise |
14069
2f37b0e442fe
removed remaining VMToCompiler calls for allocating Graal API objects
Doug Simon <doug.simon@oracle.com>
parents:
14052
diff
changeset
|
291 */ |
23989
115d4e0d7b87
removed HotSpotResolvedJavaFieldImpl.name field
Doug Simon <doug.simon@oracle.com>
parents:
23986
diff
changeset
|
292 native HotSpotResolvedObjectTypeImpl resolveFieldInPool(HotSpotConstantPool constantPool, int cpi, byte opcode, int[] info); |
14069
2f37b0e442fe
removed remaining VMToCompiler calls for allocating Graal API objects
Doug Simon <doug.simon@oracle.com>
parents:
14052
diff
changeset
|
293 |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
294 /** |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
295 * Converts {@code cpci} from an index into the cache for {@code constantPool} to an index |
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
296 * directly into {@code constantPool}. |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
297 * |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
298 * The behavior of this method is undefined if {@code ccpi} is an invalid constant pool cache |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
299 * index. |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
300 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
301 native int constantPoolRemapInstructionOperandFromCache(HotSpotConstantPool constantPool, int cpci); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
302 |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
303 /** |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
304 * Gets the appendix object (if any) associated with the entry at index {@code cpi} in |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
305 * {@code constantPool}. |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
306 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
307 native Object lookupAppendixInPool(HotSpotConstantPool constantPool, 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
|
308 |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6588
diff
changeset
|
309 /** |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6588
diff
changeset
|
310 * 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
|
311 * |
22496
90c4254dc25a
Pass TargetDescription argument to CompilerToVM.installCode.
Roland Schatz <roland.schatz@oracle.com>
parents:
22455
diff
changeset
|
312 * @param target the target where this code should be installed |
9669
ed6202820ecf
renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
9649
diff
changeset
|
313 * @param compiledCode the result of a compilation |
9604 | 314 * @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
|
315 * @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
|
316 * {@link HotSpotVMConfig#codeInstallResultOk}, |
b04f579c803f
removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21413
diff
changeset
|
317 * {@link HotSpotVMConfig#codeInstallResultCacheFull}, |
b04f579c803f
removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21413
diff
changeset
|
318 * {@link HotSpotVMConfig#codeInstallResultCodeTooLarge}, |
b04f579c803f
removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21413
diff
changeset
|
319 * {@link HotSpotVMConfig#codeInstallResultDependenciesFailed} or |
b04f579c803f
removed unnecessary CompilerToVM.CodeInstallResult enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21413
diff
changeset
|
320 * {@link HotSpotVMConfig#codeInstallResultDependenciesInvalid}. |
23392
b3a816d3b844
Backed out changeset: a920338dd4d4
Doug Simon <doug.simon@oracle.com>
parents:
23390
diff
changeset
|
321 * @throws JVMCIError if there is something wrong with the compiled code or the associated |
b3a816d3b844
Backed out changeset: a920338dd4d4
Doug Simon <doug.simon@oracle.com>
parents:
23390
diff
changeset
|
322 * metadata. |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6588
diff
changeset
|
323 */ |
22699
ea58bbafd5b9
Move SpeculationLog implementation to HotSpotSpeculationLog, because it is not useful for other VMs
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22686
diff
changeset
|
324 native int installCode(TargetDescription target, HotSpotCompiledCode compiledCode, InstalledCode code, HotSpotSpeculationLog speculationLog); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
325 |
13103
c0b0974dd509
moved notification of Graal compilation statistics from VMToCompiler to CompilerToVM
Doug Simon <doug.simon@oracle.com>
parents:
12559
diff
changeset
|
326 /** |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
327 * Resets all compilation statistics. |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
328 */ |
22636
1ec4129907b3
made CompilerToVM package-private
Doug Simon <doug.simon@oracle.com>
parents:
22635
diff
changeset
|
329 native void resetCompilationStatistics(); |
13103
c0b0974dd509
moved notification of Graal compilation statistics from VMToCompiler to CompilerToVM
Doug Simon <doug.simon@oracle.com>
parents:
12559
diff
changeset
|
330 |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
331 /** |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23393
diff
changeset
|
332 * Reads the database of VM info. The return value encodes the info in a nested object array |
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23393
diff
changeset
|
333 * that is described by the pseudo Java object {@code info} below: |
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23393
diff
changeset
|
334 * |
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23393
diff
changeset
|
335 * <pre> |
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23393
diff
changeset
|
336 * info = [ |
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23393
diff
changeset
|
337 * VMField[] vmFields, |
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23393
diff
changeset
|
338 * [String name, Long size, ...] vmTypeSizes, |
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23393
diff
changeset
|
339 * [String name, Long value, ...] vmConstants, |
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23393
diff
changeset
|
340 * [String name, Long value, ...] vmAddresses, |
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23393
diff
changeset
|
341 * VMFlag[] vmFlags |
23996
11f0412408cd
8173912: [JVMCI] fix memory overhead of JVMCI
Doug Simon <doug.simon@oracle.com>
parents:
23994
diff
changeset
|
342 * VMIntrinsicMethod[] vmIntrinsics |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23393
diff
changeset
|
343 * ] |
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23393
diff
changeset
|
344 * </pre> |
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23393
diff
changeset
|
345 * |
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23393
diff
changeset
|
346 * @return VM info as encoded above |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
347 */ |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23393
diff
changeset
|
348 native Object[] readConfiguration(); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
349 |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
350 /** |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
351 * Resolves the implementation of {@code method} for virtual dispatches on objects of dynamic |
22455
7ad03bf3d4a9
renames related to using metaspace wrappers instead of raw metaspace values
Doug Simon <doug.simon@oracle.com>
parents:
22454
diff
changeset
|
352 * type {@code exactReceiver}. This resolution process only searches "up" the class hierarchy of |
7ad03bf3d4a9
renames related to using metaspace wrappers instead of raw metaspace values
Doug Simon <doug.simon@oracle.com>
parents:
22454
diff
changeset
|
353 * {@code exactReceiver}. |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
354 * |
22455
7ad03bf3d4a9
renames related to using metaspace wrappers instead of raw metaspace values
Doug Simon <doug.simon@oracle.com>
parents:
22454
diff
changeset
|
355 * @param caller the caller or context type used to perform access checks |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
356 * @return the link-time resolved method (might be abstract) or {@code 0} if it can not be |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
357 * linked |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
358 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
359 native HotSpotResolvedJavaMethodImpl resolveMethod(HotSpotResolvedObjectTypeImpl exactReceiver, HotSpotResolvedJavaMethodImpl method, HotSpotResolvedObjectTypeImpl caller); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
360 |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
361 /** |
22455
7ad03bf3d4a9
renames related to using metaspace wrappers instead of raw metaspace values
Doug Simon <doug.simon@oracle.com>
parents:
22454
diff
changeset
|
362 * Gets the static initializer of {@code type}. |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
363 * |
22455
7ad03bf3d4a9
renames related to using metaspace wrappers instead of raw metaspace values
Doug Simon <doug.simon@oracle.com>
parents:
22454
diff
changeset
|
364 * @return 0 if {@code type} has no static initializer |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
365 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
366 native HotSpotResolvedJavaMethodImpl getClassInitializer(HotSpotResolvedObjectTypeImpl type); |
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
|
367 |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
368 /** |
22455
7ad03bf3d4a9
renames related to using metaspace wrappers instead of raw metaspace values
Doug Simon <doug.simon@oracle.com>
parents:
22454
diff
changeset
|
369 * Determines if {@code type} or any of its currently loaded subclasses overrides |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
370 * {@code Object.finalize()}. |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
371 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
372 native boolean hasFinalizableSubclass(HotSpotResolvedObjectTypeImpl type); |
9126
bc26f978b0ce
HotSpotResolvedObjectType: implement hasFinalizeSubclass() correctly
Bernhard Urban <bernhard.urban@jku.at>
parents:
9108
diff
changeset
|
373 |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6588
diff
changeset
|
374 /** |
23749
d6bd0b9cd0b6
remove uses of setAccessible (JDK-8165434)
Doug Simon <doug.simon@oracle.com>
parents:
23741
diff
changeset
|
375 * Gets the method corresponding to {@code executable}. |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6588
diff
changeset
|
376 */ |
23749
d6bd0b9cd0b6
remove uses of setAccessible (JDK-8165434)
Doug Simon <doug.simon@oracle.com>
parents:
23741
diff
changeset
|
377 native HotSpotResolvedJavaMethodImpl asResolvedJavaMethod(Executable executable); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
378 |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
379 /** |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
380 * Gets the maximum absolute offset of a PC relative call to {@code address} from any position |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
381 * in the code cache. |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
382 * |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
383 * @param address an address that may be called from any code in the code cache |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
384 * @return -1 if {@code address == 0} |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
385 */ |
22636
1ec4129907b3
made CompilerToVM package-private
Doug Simon <doug.simon@oracle.com>
parents:
22635
diff
changeset
|
386 native long getMaxCallTargetOffset(long address); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
387 |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
388 /** |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
389 * Gets a textual disassembly of {@code codeBlob}. |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
390 * |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
391 * @return a non-zero length string containing a disassembly of {@code codeBlob} or null if |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
392 * {@code codeBlob} could not be disassembled for some reason |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
393 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
394 // The HotSpot disassembler seems not to be thread safe so it's better to synchronize its usage |
22643
456800cd1a17
Ensure that not_entrant InstalledCode can still be invalidated
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22636
diff
changeset
|
395 synchronized native String disassembleCodeBlob(InstalledCode installedCode); |
7784
016e23829147
added HotSpot implementation of disassembling APIs
Doug Simon <doug.simon@oracle.com>
parents:
7530
diff
changeset
|
396 |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
397 /** |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
398 * Gets a stack trace element for {@code method} at bytecode index {@code bci}. |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
399 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
400 native StackTraceElement getStackTraceElement(HotSpotResolvedJavaMethodImpl method, 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
|
401 |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
402 /** |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
403 * Executes some {@code installedCode} with arguments {@code args}. |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
404 * |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
405 * @return the result of executing {@code installedCode} |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
406 * @throws InvalidInstalledCodeException if {@code installedCode} has been invalidated |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
407 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
408 native Object executeInstalledCode(Object[] args, InstalledCode installedCode) throws InvalidInstalledCodeException; |
4993
897b7d18bebc
added RiCompiledMethod.execute and the required VM infrastructure
Lukas Stadler <lukas.stadler@jku.at>
parents:
4635
diff
changeset
|
409 |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
410 /** |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
411 * Gets the line number table for {@code method}. The line number table is encoded as (bci, |
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
412 * source line number) pairs. |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
413 * |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
414 * @return the line number table for {@code method} or null if it doesn't have one |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
415 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
416 native long[] getLineNumberTable(HotSpotResolvedJavaMethodImpl method); |
7307
dc3e86fd3be1
Introduce cutomization capability for canonicalizer.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7225
diff
changeset
|
417 |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
418 /** |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
419 * Gets the number of entries in the local variable table for {@code method}. |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
420 * |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
421 * @return the number of entries in the local variable table for {@code method} |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
422 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
423 native int getLocalVariableTableLength(HotSpotResolvedJavaMethodImpl method); |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
424 |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
425 /** |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
426 * Gets the address of the first entry in the local variable table for {@code method}. |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
427 * |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
428 * Each entry is a native object described by these fields: |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
429 * |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
430 * <ul> |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
431 * <li>{@link HotSpotVMConfig#localVariableTableElementSize}</li> |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
432 * <li>{@link HotSpotVMConfig#localVariableTableElementLengthOffset}</li> |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
433 * <li>{@link HotSpotVMConfig#localVariableTableElementNameCpIndexOffset}</li> |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
434 * <li>{@link HotSpotVMConfig#localVariableTableElementDescriptorCpIndexOffset}</li> |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
435 * <li>{@link HotSpotVMConfig#localVariableTableElementSlotOffset} |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
436 * <li>{@link HotSpotVMConfig#localVariableTableElementStartBciOffset} |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
437 * </ul> |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
438 * |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
439 * @return 0 if {@code method} does not have a local variable table |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
440 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
441 native long getLocalVariableTableStart(HotSpotResolvedJavaMethodImpl method); |
13306
dfb780080923
moved most CompilerToVM.getLocalVariableTable to Java
twisti
parents:
13305
diff
changeset
|
442 |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
443 /** |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23393
diff
changeset
|
444 * Reads an object pointer within a VM data structure. That is, any {@link VMField} whose |
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23393
diff
changeset
|
445 * {@link VMField#type type} is {@code "oop"} (e.g., {@code ArrayKlass::_component_mirror}, |
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23393
diff
changeset
|
446 * {@code Klass::_java_mirror}, {@code JavaThread::_threadObj}). |
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:
19782
diff
changeset
|
447 * |
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:
19782
diff
changeset
|
448 * 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:
19782
diff
changeset
|
449 * {@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:
19782
diff
changeset
|
450 * 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:
19782
diff
changeset
|
451 * |
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:
19782
diff
changeset
|
452 * @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:
19782
diff
changeset
|
453 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
454 native Object readUncompressedOop(long address); |
18719
6484e5c068c7
Generalize object reading in HotSpotMemoryAccessProvider.
Roland Schatz <roland.schatz@oracle.com>
parents:
18195
diff
changeset
|
455 |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
456 /** |
23738
1140503536ae
Backport style fixes and comments from jdk9.
Roland Schatz <roland.schatz@oracle.com>
parents:
23734
diff
changeset
|
457 * Determines if {@code method} should not be inlined or compiled. |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
458 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
459 native void doNotInlineOrCompile(HotSpotResolvedJavaMethodImpl method); |
12532
9b1cc2628961
Extend the CompilerToVM interface to explicitly avoid compilation and inlining of methods
Matthias Grimmer <grimmer@ssw.jku.at>
parents:
11852
diff
changeset
|
460 |
8611
6c4db417385a
added API to reset the profiling information for a method
Christian Haeubl <haeubl@ssw.jku.at>
parents:
8349
diff
changeset
|
461 /** |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
462 * Invalidates the profiling information for {@code method} and (re)initializes it such that |
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
463 * profiling restarts upon its next invocation. |
8611
6c4db417385a
added API to reset the profiling information for a method
Christian Haeubl <haeubl@ssw.jku.at>
parents:
8349
diff
changeset
|
464 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
465 native void reprofile(HotSpotResolvedJavaMethodImpl method); |
8945
7ef66078d837
add basic invokedynamic support
Andreas Woess <andreas.woess@jku.at>
parents:
8614
diff
changeset
|
466 |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
467 /** |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
468 * Invalidates {@code installedCode} such that {@link InvalidInstalledCodeException} will be |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
469 * raised the next time {@code installedCode} is executed. |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
470 */ |
22636
1ec4129907b3
made CompilerToVM package-private
Doug Simon <doug.simon@oracle.com>
parents:
22635
diff
changeset
|
471 native void invalidateInstalledCode(InstalledCode installedCode); |
11520
7cca436d600b
Add isLinked method to ResolvedJavaType
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
10715
diff
changeset
|
472 |
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
|
473 /** |
21558
d563baeca9df
changed uses of Graal terminology to JVMCI (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21556
diff
changeset
|
474 * Collects the current values of all JVMCI benchmark counters, summed up over all threads. |
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
|
475 */ |
22636
1ec4129907b3
made CompilerToVM package-private
Doug Simon <doug.simon@oracle.com>
parents:
22635
diff
changeset
|
476 native long[] collectCounters(); |
13630
b1838411e896
Use compile ids assigned by hotspot
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13483
diff
changeset
|
477 |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
478 /** |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
479 * Determines if {@code metaspaceMethodData} is mature. |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
480 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
481 native boolean isMature(long metaspaceMethodData); |
13769
af344056124f
Only use mature method datas
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13669
diff
changeset
|
482 |
13630
b1838411e896
Use compile ids assigned by hotspot
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13483
diff
changeset
|
483 /** |
b1838411e896
Use compile ids assigned by hotspot
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
13483
diff
changeset
|
484 * 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
|
485 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
486 native int allocateCompileId(HotSpotResolvedJavaMethodImpl method, int entryBCI); |
14107
800057208a2c
enable C1 + Graal tiered
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
14105
diff
changeset
|
487 |
800057208a2c
enable C1 + Graal tiered
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
14105
diff
changeset
|
488 /** |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
489 * Determines if {@code method} has OSR compiled code identified by {@code entryBCI} for |
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
490 * compilation level {@code level}. |
14107
800057208a2c
enable C1 + Graal tiered
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
14105
diff
changeset
|
491 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
492 native boolean hasCompiledCodeForOSR(HotSpotResolvedJavaMethodImpl method, int entryBCI, int level); |
15063
36e1a11a72b3
new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15059
diff
changeset
|
493 |
36e1a11a72b3
new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15059
diff
changeset
|
494 /** |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
495 * Gets the value of {@code metaspaceSymbol} as a String. |
15968
42eaa579e134
more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents:
15843
diff
changeset
|
496 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
497 native String getSymbol(long metaspaceSymbol); |
15968
42eaa579e134
more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents:
15843
diff
changeset
|
498 |
42eaa579e134
more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents:
15843
diff
changeset
|
499 /** |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
500 * Looks for the next Java stack frame matching an entry in {@code methods}. |
15063
36e1a11a72b3
new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15059
diff
changeset
|
501 * |
36e1a11a72b3
new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15059
diff
changeset
|
502 * @param frame the starting point of the search, where {@code null} refers to the topmost frame |
22455
7ad03bf3d4a9
renames related to using metaspace wrappers instead of raw metaspace values
Doug Simon <doug.simon@oracle.com>
parents:
22454
diff
changeset
|
503 * @param methods the methods to look for, where {@code null} means that any frame is returned |
15063
36e1a11a72b3
new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15059
diff
changeset
|
504 * @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
|
505 */ |
22636
1ec4129907b3
made CompilerToVM package-private
Doug Simon <doug.simon@oracle.com>
parents:
22635
diff
changeset
|
506 native HotSpotStackFrameReference getNextStackFrame(HotSpotStackFrameReference frame, ResolvedJavaMethod[] methods, int initialSkip); |
15063
36e1a11a72b3
new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15059
diff
changeset
|
507 |
36e1a11a72b3
new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15059
diff
changeset
|
508 /** |
23393
1d4ce2d19e52
clean up and minimize JVMCI (JDK-8156835)
Doug Simon <doug.simon@oracle.com>
parents:
23392
diff
changeset
|
509 * Materializes all virtual objects within {@code stackFrame} and updates its locals. |
15063
36e1a11a72b3
new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15059
diff
changeset
|
510 * |
36e1a11a72b3
new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15059
diff
changeset
|
511 * @param invalidate if {@code true}, the compiled method for the stack frame will be |
23393
1d4ce2d19e52
clean up and minimize JVMCI (JDK-8156835)
Doug Simon <doug.simon@oracle.com>
parents:
23392
diff
changeset
|
512 * invalidated |
15063
36e1a11a72b3
new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15059
diff
changeset
|
513 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
514 native 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
|
515 |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
516 /** |
22455
7ad03bf3d4a9
renames related to using metaspace wrappers instead of raw metaspace values
Doug Simon <doug.simon@oracle.com>
parents:
22454
diff
changeset
|
517 * Gets the v-table index for interface method {@code method} in the receiver {@code type} or |
7ad03bf3d4a9
renames related to using metaspace wrappers instead of raw metaspace values
Doug Simon <doug.simon@oracle.com>
parents:
22454
diff
changeset
|
518 * {@link HotSpotVMConfig#invalidVtableIndex} if {@code method} is not in {@code type}'s |
7ad03bf3d4a9
renames related to using metaspace wrappers instead of raw metaspace values
Doug Simon <doug.simon@oracle.com>
parents:
22454
diff
changeset
|
519 * v-table. |
22583
c9f8eec77163
CompilerToVm.getVtableIndexForInterfaceMethod must not allow non-interface methods (JDK-8136659)
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22582
diff
changeset
|
520 * |
c9f8eec77163
CompilerToVm.getVtableIndexForInterfaceMethod must not allow non-interface methods (JDK-8136659)
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22582
diff
changeset
|
521 * @throws InternalError if {@code type} is an interface or {@code method} is not held by an |
22584
f94fd2b4f794
CompilerToVM.getVtableIndexForInterfaceMethod check if receiver class is initialized (JDK-8136655)
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22583
diff
changeset
|
522 * interface or class represented by {@code type} is not initialized |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
523 */ |
22583
c9f8eec77163
CompilerToVm.getVtableIndexForInterfaceMethod must not allow non-interface methods (JDK-8136659)
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22582
diff
changeset
|
524 native int getVtableIndexForInterfaceMethod(HotSpotResolvedObjectTypeImpl type, HotSpotResolvedJavaMethodImpl method); |
16243
fb77eab05bd3
Respect the VM's wish to record non-safepoint debug info
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
16184
diff
changeset
|
525 |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
526 /** |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
527 * Determines if debug info should also be emitted at non-safepoint locations. |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
528 */ |
22636
1ec4129907b3
made CompilerToVM package-private
Doug Simon <doug.simon@oracle.com>
parents:
22635
diff
changeset
|
529 native boolean shouldDebugNonSafepoints(); |
16405
9bfc4247262f
send log output to native tty
Lukas Stadler <lukas.stadler@oracle.com>
parents:
16243
diff
changeset
|
530 |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
531 /** |
22650
939d5da65929
reduced delta against jvmci-9
Doug Simon <doug.simon@oracle.com>
parents:
22648
diff
changeset
|
532 * Writes {@code length} bytes from {@code bytes} starting at offset {@code offset} to the |
939d5da65929
reduced delta against jvmci-9
Doug Simon <doug.simon@oracle.com>
parents:
22648
diff
changeset
|
533 * HotSpot's log stream. |
939d5da65929
reduced delta against jvmci-9
Doug Simon <doug.simon@oracle.com>
parents:
22648
diff
changeset
|
534 * |
939d5da65929
reduced delta against jvmci-9
Doug Simon <doug.simon@oracle.com>
parents:
22648
diff
changeset
|
535 * @exception NullPointerException if {@code bytes == null} |
939d5da65929
reduced delta against jvmci-9
Doug Simon <doug.simon@oracle.com>
parents:
22648
diff
changeset
|
536 * @exception IndexOutOfBoundsException if copying would cause access of data outside array |
939d5da65929
reduced delta against jvmci-9
Doug Simon <doug.simon@oracle.com>
parents:
22648
diff
changeset
|
537 * bounds |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
538 */ |
22636
1ec4129907b3
made CompilerToVM package-private
Doug Simon <doug.simon@oracle.com>
parents:
22635
diff
changeset
|
539 native void writeDebugOutput(byte[] bytes, int offset, int length); |
21119
294ed4ce1fa0
PrintStreamOption: also forward flushes to the VM
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
20176
diff
changeset
|
540 |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
541 /** |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
542 * Flush HotSpot's log stream. |
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22415
diff
changeset
|
543 */ |
22636
1ec4129907b3
made CompilerToVM package-private
Doug Simon <doug.simon@oracle.com>
parents:
22635
diff
changeset
|
544 native void flushDebugOutput(); |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
545 |
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
546 /** |
22647
a2af5a344c65
Expand javadoc for getResolvedJavaMethod
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22644
diff
changeset
|
547 * Read a HotSpot Method* value from the memory location described by {@code base} plus |
a2af5a344c65
Expand javadoc for getResolvedJavaMethod
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22644
diff
changeset
|
548 * {@code displacement} and return the {@link HotSpotResolvedJavaMethodImpl} wrapping it. This |
a2af5a344c65
Expand javadoc for getResolvedJavaMethod
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22644
diff
changeset
|
549 * method does no checking that the memory location actually contains a valid pointer and may |
a2af5a344c65
Expand javadoc for getResolvedJavaMethod
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22644
diff
changeset
|
550 * crash the VM if an invalid location is provided. If the {@code base} is null then |
a2af5a344c65
Expand javadoc for getResolvedJavaMethod
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22644
diff
changeset
|
551 * {@code displacement} is used by itself. If {@code base} is a |
a2af5a344c65
Expand javadoc for getResolvedJavaMethod
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22644
diff
changeset
|
552 * {@link HotSpotResolvedJavaMethodImpl}, {@link HotSpotConstantPool} or |
22617
e8f298580f99
Correct javadoc for CompilerToVM
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22611
diff
changeset
|
553 * {@link HotSpotResolvedObjectTypeImpl} then the metaspace pointer is fetched from that object |
22644
cefe66df3455
Update CompilerToVM javadoc
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22643
diff
changeset
|
554 * and added to {@code displacement}. Any other non-null object type causes an |
cefe66df3455
Update CompilerToVM javadoc
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22643
diff
changeset
|
555 * {@link IllegalArgumentException} to be thrown. |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
556 * |
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
557 * @param base an object to read from or null |
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
558 * @param displacement |
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
559 * @return null or the resolved method for this location |
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
560 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
561 native HotSpotResolvedJavaMethodImpl getResolvedJavaMethod(Object base, long displacement); |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
562 |
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
563 /** |
23734
2e17c65dddd7
8163105: SIGSEGV: constantPoolHandle::constantPoolHandle(ConstantPool*)
Doug Simon <doug.simon@oracle.com>
parents:
23706
diff
changeset
|
564 * Gets the {@code ConstantPool*} associated with {@code object} and returns a |
2e17c65dddd7
8163105: SIGSEGV: constantPoolHandle::constantPoolHandle(ConstantPool*)
Doug Simon <doug.simon@oracle.com>
parents:
23706
diff
changeset
|
565 * {@link HotSpotConstantPool} wrapping it. |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
566 * |
23734
2e17c65dddd7
8163105: SIGSEGV: constantPoolHandle::constantPoolHandle(ConstantPool*)
Doug Simon <doug.simon@oracle.com>
parents:
23706
diff
changeset
|
567 * @param object a {@link HotSpotResolvedJavaMethodImpl} or |
2e17c65dddd7
8163105: SIGSEGV: constantPoolHandle::constantPoolHandle(ConstantPool*)
Doug Simon <doug.simon@oracle.com>
parents:
23706
diff
changeset
|
568 * {@link HotSpotResolvedObjectTypeImpl} object |
2e17c65dddd7
8163105: SIGSEGV: constantPoolHandle::constantPoolHandle(ConstantPool*)
Doug Simon <doug.simon@oracle.com>
parents:
23706
diff
changeset
|
569 * @return a {@link HotSpotConstantPool} wrapping the {@code ConstantPool*} associated with |
2e17c65dddd7
8163105: SIGSEGV: constantPoolHandle::constantPoolHandle(ConstantPool*)
Doug Simon <doug.simon@oracle.com>
parents:
23706
diff
changeset
|
570 * {@code object} |
2e17c65dddd7
8163105: SIGSEGV: constantPoolHandle::constantPoolHandle(ConstantPool*)
Doug Simon <doug.simon@oracle.com>
parents:
23706
diff
changeset
|
571 * @throws NullPointerException if {@code object == null} |
2e17c65dddd7
8163105: SIGSEGV: constantPoolHandle::constantPoolHandle(ConstantPool*)
Doug Simon <doug.simon@oracle.com>
parents:
23706
diff
changeset
|
572 * @throws IllegalArgumentException if {@code object} is neither a |
2e17c65dddd7
8163105: SIGSEGV: constantPoolHandle::constantPoolHandle(ConstantPool*)
Doug Simon <doug.simon@oracle.com>
parents:
23706
diff
changeset
|
573 * {@link HotSpotResolvedJavaMethodImpl} nor a {@link HotSpotResolvedObjectTypeImpl} |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
574 */ |
23734
2e17c65dddd7
8163105: SIGSEGV: constantPoolHandle::constantPoolHandle(ConstantPool*)
Doug Simon <doug.simon@oracle.com>
parents:
23706
diff
changeset
|
575 native HotSpotConstantPool getConstantPool(Object object); |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
576 |
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
577 /** |
22647
a2af5a344c65
Expand javadoc for getResolvedJavaMethod
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22644
diff
changeset
|
578 * Read a HotSpot Klass* value from the memory location described by {@code base} plus |
a2af5a344c65
Expand javadoc for getResolvedJavaMethod
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22644
diff
changeset
|
579 * {@code displacement} and return the {@link HotSpotResolvedObjectTypeImpl} wrapping it. This |
a2af5a344c65
Expand javadoc for getResolvedJavaMethod
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22644
diff
changeset
|
580 * method does no checking that the memory location actually contains a valid pointer and may |
a2af5a344c65
Expand javadoc for getResolvedJavaMethod
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22644
diff
changeset
|
581 * crash the VM if an invalid location is provided. If the {@code base} is null then |
a2af5a344c65
Expand javadoc for getResolvedJavaMethod
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22644
diff
changeset
|
582 * {@code displacement} is used by itself. If {@code base} is a |
a2af5a344c65
Expand javadoc for getResolvedJavaMethod
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22644
diff
changeset
|
583 * {@link HotSpotResolvedJavaMethodImpl}, {@link HotSpotConstantPool} or |
22617
e8f298580f99
Correct javadoc for CompilerToVM
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22611
diff
changeset
|
584 * {@link HotSpotResolvedObjectTypeImpl} then the metaspace pointer is fetched from that object |
22644
cefe66df3455
Update CompilerToVM javadoc
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22643
diff
changeset
|
585 * and added to {@code displacement}. Any other non-null object type causes an |
cefe66df3455
Update CompilerToVM javadoc
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22643
diff
changeset
|
586 * {@link IllegalArgumentException} to be thrown. |
22454
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
587 * |
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
588 * @param base an object to read from or null |
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
589 * @param displacement |
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
590 * @param compressed true if the location contains a compressed Klass* |
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
591 * @return null or the resolved method for this location |
76af33d4d504
Make jvmci redefinition safe
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22420
diff
changeset
|
592 */ |
22547
10a9e989850e
made CompilertoVM a final concrete class and removed CompilerToVMImpl (GRAAL-1255)
Doug Simon <doug.simon@oracle.com>
parents:
22531
diff
changeset
|
593 native HotSpotResolvedObjectTypeImpl getResolvedJavaType(Object base, long displacement, boolean compressed); |
22573
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22547
diff
changeset
|
594 |
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22547
diff
changeset
|
595 /** |
22686
2408f05d0ae7
Update javadoc for methodDataProfileDataSize
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22672
diff
changeset
|
596 * Return the size of the HotSpot ProfileData* pointed at by {@code position}. If |
2408f05d0ae7
Update javadoc for methodDataProfileDataSize
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22672
diff
changeset
|
597 * {@code position} is outside the space of the MethodData then an |
2408f05d0ae7
Update javadoc for methodDataProfileDataSize
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22672
diff
changeset
|
598 * {@link IllegalArgumentException} is thrown. A {@code position} inside the MethodData but that |
2408f05d0ae7
Update javadoc for methodDataProfileDataSize
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22672
diff
changeset
|
599 * isn't pointing at a valid ProfileData will crash the VM. |
2408f05d0ae7
Update javadoc for methodDataProfileDataSize
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22672
diff
changeset
|
600 * |
22573
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22547
diff
changeset
|
601 * @param metaspaceMethodData |
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22547
diff
changeset
|
602 * @param position |
22686
2408f05d0ae7
Update javadoc for methodDataProfileDataSize
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22672
diff
changeset
|
603 * @return the size of the ProfileData item pointed at by {@code position} |
2408f05d0ae7
Update javadoc for methodDataProfileDataSize
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22672
diff
changeset
|
604 * @throws IllegalArgumentException if an out of range position is given |
22573
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22547
diff
changeset
|
605 */ |
be44a5efeaff
HotSpotMethodData must handle profile data when TypeProfileLevel is non-zero
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22547
diff
changeset
|
606 native int methodDataProfileDataSize(long metaspaceMethodData, int position); |
22782
bf8a5a6861b1
Add CompilerToVM.interpreterFrameSize to support stack banging for deopt
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22769
diff
changeset
|
607 |
bf8a5a6861b1
Add CompilerToVM.interpreterFrameSize to support stack banging for deopt
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22769
diff
changeset
|
608 /** |
bf8a5a6861b1
Add CompilerToVM.interpreterFrameSize to support stack banging for deopt
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22769
diff
changeset
|
609 * Return the amount of native stack required for the interpreter frames represented by |
bf8a5a6861b1
Add CompilerToVM.interpreterFrameSize to support stack banging for deopt
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22769
diff
changeset
|
610 * {@code frame}. This is used when emitting the stack banging code to ensure that there is |
bf8a5a6861b1
Add CompilerToVM.interpreterFrameSize to support stack banging for deopt
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22769
diff
changeset
|
611 * enough space for the frames during deoptimization. |
bf8a5a6861b1
Add CompilerToVM.interpreterFrameSize to support stack banging for deopt
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22769
diff
changeset
|
612 * |
bf8a5a6861b1
Add CompilerToVM.interpreterFrameSize to support stack banging for deopt
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22769
diff
changeset
|
613 * @param frame |
bf8a5a6861b1
Add CompilerToVM.interpreterFrameSize to support stack banging for deopt
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22769
diff
changeset
|
614 * @return the number of bytes required for deoptimization of this frame state |
bf8a5a6861b1
Add CompilerToVM.interpreterFrameSize to support stack banging for deopt
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22769
diff
changeset
|
615 */ |
bf8a5a6861b1
Add CompilerToVM.interpreterFrameSize to support stack banging for deopt
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22769
diff
changeset
|
616 native int interpreterFrameSize(BytecodeFrame frame); |
23994
ebce30b702eb
[GR-2538] reduced memory overhead of HotSpotVMConfigStore
Doug Simon <doug.simon@oracle.com>
parents:
23992
diff
changeset
|
617 |
ebce30b702eb
[GR-2538] reduced memory overhead of HotSpotVMConfigStore
Doug Simon <doug.simon@oracle.com>
parents:
23992
diff
changeset
|
618 /** |
23996
11f0412408cd
8173912: [JVMCI] fix memory overhead of JVMCI
Doug Simon <doug.simon@oracle.com>
parents:
23994
diff
changeset
|
619 * Invokes non-public method {@code java.lang.invoke.LambdaForm.compileToBytecode()} on |
11f0412408cd
8173912: [JVMCI] fix memory overhead of JVMCI
Doug Simon <doug.simon@oracle.com>
parents:
23994
diff
changeset
|
620 * {@code lambdaForm} (which must be a {@code java.lang.invoke.LambdaForm} instance). |
11f0412408cd
8173912: [JVMCI] fix memory overhead of JVMCI
Doug Simon <doug.simon@oracle.com>
parents:
23994
diff
changeset
|
621 */ |
11f0412408cd
8173912: [JVMCI] fix memory overhead of JVMCI
Doug Simon <doug.simon@oracle.com>
parents:
23994
diff
changeset
|
622 native void compileToBytecode(Object lambdaForm); |
11f0412408cd
8173912: [JVMCI] fix memory overhead of JVMCI
Doug Simon <doug.simon@oracle.com>
parents:
23994
diff
changeset
|
623 |
11f0412408cd
8173912: [JVMCI] fix memory overhead of JVMCI
Doug Simon <doug.simon@oracle.com>
parents:
23994
diff
changeset
|
624 /** |
11f0412408cd
8173912: [JVMCI] fix memory overhead of JVMCI
Doug Simon <doug.simon@oracle.com>
parents:
23994
diff
changeset
|
625 * Gets the value of the VM flag named {@code name}. |
23994
ebce30b702eb
[GR-2538] reduced memory overhead of HotSpotVMConfigStore
Doug Simon <doug.simon@oracle.com>
parents:
23992
diff
changeset
|
626 * |
ebce30b702eb
[GR-2538] reduced memory overhead of HotSpotVMConfigStore
Doug Simon <doug.simon@oracle.com>
parents:
23992
diff
changeset
|
627 * @param name name of a VM option |
23996
11f0412408cd
8173912: [JVMCI] fix memory overhead of JVMCI
Doug Simon <doug.simon@oracle.com>
parents:
23994
diff
changeset
|
628 * @return {@code this} if the named VM option doesn't exist, a {@link String} or {@code null} |
11f0412408cd
8173912: [JVMCI] fix memory overhead of JVMCI
Doug Simon <doug.simon@oracle.com>
parents:
23994
diff
changeset
|
629 * if its type is {@code ccstr} or {@code ccstrlist}, a {@link Double} if its type is |
11f0412408cd
8173912: [JVMCI] fix memory overhead of JVMCI
Doug Simon <doug.simon@oracle.com>
parents:
23994
diff
changeset
|
630 * {@code double}, a {@link Boolean} if its type is {@code bool} otherwise a |
11f0412408cd
8173912: [JVMCI] fix memory overhead of JVMCI
Doug Simon <doug.simon@oracle.com>
parents:
23994
diff
changeset
|
631 * {@link Long} |
23994
ebce30b702eb
[GR-2538] reduced memory overhead of HotSpotVMConfigStore
Doug Simon <doug.simon@oracle.com>
parents:
23992
diff
changeset
|
632 */ |
ebce30b702eb
[GR-2538] reduced memory overhead of HotSpotVMConfigStore
Doug Simon <doug.simon@oracle.com>
parents:
23992
diff
changeset
|
633 native Object getFlagValue(String name); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
634 } |