Mercurial > hg > graal-jvmci-8
diff jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java @ 22782:bf8a5a6861b1
Add CompilerToVM.interpreterFrameSize to support stack banging for deopt
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Wed, 20 Jan 2016 13:56:34 -0800 |
parents | d57508b1bcb5 |
children | 2d1ca131b8be |
line wrap: on
line diff
--- a/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java Wed Jan 20 11:13:45 2016 +0100 +++ b/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java Wed Jan 20 13:56:34 2016 -0800 @@ -29,6 +29,7 @@ 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; @@ -587,4 +588,14 @@ * @throws IllegalArgumentException if an out of range position is given */ native int methodDataProfileDataSize(long metaspaceMethodData, int position); + + /** + * Return the amount of native stack required for the interpreter frames represented by + * {@code frame}. This is used when emitting the stack banging code to ensure that there is + * enough space for the frames during deoptimization. + * + * @param frame + * @return the number of bytes required for deoptimization of this frame state + */ + native int interpreterFrameSize(BytecodeFrame frame); }