--- old/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VMReg.java 2017-08-31 23:37:19.330565299 +0900 +++ new/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VMReg.java 2017-08-31 23:37:19.234564983 +0900 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -84,4 +84,8 @@ public boolean greaterThanOrEqual(VMReg arg) { return value >= arg.value; } public int minus(VMReg arg) { return value - arg.value; } + + public int reg2Stack() { + return value - VM.getVM().getVMRegImplInfo().getStack0().getValue(); + } }