--- old/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java 2016-05-18 23:01:56.000000000 +0200 +++ new/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java 2016-05-18 23:01:56.000000000 +0200 @@ -23,8 +23,8 @@ 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; @@ -33,9 +33,9 @@ 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; @@ -79,7 +79,7 @@ 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); @@ -315,6 +315,21 @@ */ 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); /** @@ -475,10 +490,10 @@ 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); @@ -495,7 +510,6 @@ /** * Determines if debug info should also be emitted at non-safepoint locations. */ - native boolean shouldDebugNonSafepoints(); /**