< prev index next >
src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java
Print this page
@@ -21,23 +21,23 @@
* questions.
*/
package jdk.vm.ci.hotspot;
+import static jdk.vm.ci.common.InitTimer.timer;
import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime;
-import static jdk.vm.ci.inittimer.InitTimer.timer;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import jdk.vm.ci.code.BytecodeFrame;
import jdk.vm.ci.code.InstalledCode;
import jdk.vm.ci.code.InvalidInstalledCodeException;
import jdk.vm.ci.code.TargetDescription;
+import jdk.vm.ci.common.InitTimer;
import jdk.vm.ci.common.JVMCIError;
import jdk.vm.ci.hotspotvmconfig.HotSpotVMField;
-import jdk.vm.ci.inittimer.InitTimer;
import jdk.vm.ci.meta.JavaType;
import jdk.vm.ci.meta.ResolvedJavaMethod;
import jdk.vm.ci.meta.ResolvedJavaType;
import jdk.internal.misc.Unsafe;
@@ -77,11 +77,11 @@
* @return a new byte array containing the original bytecode of {@code method}
*/
native byte[] getBytecode(HotSpotResolvedJavaMethodImpl method);
/**
- * Gets the number of entries in {@code method}'s exception handler table or 0 if it has not
+ * Gets the number of entries in {@code method}'s exception handler table or 0 if it has no
* exception handler table.
*/
native int getExceptionTableLength(HotSpotResolvedJavaMethodImpl method);
/**
@@ -313,10 +313,25 @@
* @throws JVMCIError if there is something wrong with the compiled code or the associated
* metadata.
*/
native int installCode(TargetDescription target, HotSpotCompiledCode compiledCode, InstalledCode code, HotSpotSpeculationLog speculationLog);
+ /**
+ * Generates the VM metadata for some compiled code and copies them into {@code metaData}. This
+ * method does not install anything into the code cache.
+ *
+ * @param target the target where this code would be installed
+ * @param compiledCode the result of a compilation
+ * @param metaData the metadata is written to this object
+ * @return the outcome of the installation which will be one of
+ * {@link HotSpotVMConfig#codeInstallResultOk},
+ * {@link HotSpotVMConfig#codeInstallResultCacheFull},
+ * {@link HotSpotVMConfig#codeInstallResultCodeTooLarge},
+ * {@link HotSpotVMConfig#codeInstallResultDependenciesFailed} or
+ * {@link HotSpotVMConfig#codeInstallResultDependenciesInvalid}.
+ * @throws JVMCIError if there is something wrong with the compiled code or the metadata
+ */
public native int getMetadata(TargetDescription target, HotSpotCompiledCode compiledCode, HotSpotMetaData metaData);
/**
* Resets all compilation statistics.
*/
@@ -473,14 +488,14 @@
* @return the frame, or {@code null} if the end of the stack was reached during the search
*/
native HotSpotStackFrameReference getNextStackFrame(HotSpotStackFrameReference frame, ResolvedJavaMethod[] methods, int initialSkip);
/**
- * Materializes all virtual objects within {@code stackFrame} updates its locals.
+ * Materializes all virtual objects within {@code stackFrame} and updates its locals.
*
* @param invalidate if {@code true}, the compiled method for the stack frame will be
- * invalidated.
+ * invalidated
*/
native void materializeVirtualObjects(HotSpotStackFrameReference stackFrame, boolean invalidate);
/**
* Gets the v-table index for interface method {@code method} in the receiver {@code type} or
@@ -493,11 +508,10 @@
native int getVtableIndexForInterfaceMethod(HotSpotResolvedObjectTypeImpl type, HotSpotResolvedJavaMethodImpl method);
/**
* Determines if debug info should also be emitted at non-safepoint locations.
*/
-
native boolean shouldDebugNonSafepoints();
/**
* Writes {@code length} bytes from {@code bytes} starting at offset {@code offset} to the
* HotSpot's log stream.
< prev index next >