提交 f4223c64 编写于 作者: M minqi

8062247: [TESTBUG] Allow WhiteBox test to access JVM offsets

Reviewed-by: coleenp, iklam, mseledtsov
Contributed-by: yumin.qi@oracle.com
上级 8266a69e
...@@ -208,4 +208,13 @@ public class WhiteBox { ...@@ -208,4 +208,13 @@ public class WhiteBox {
.findAny() .findAny()
.orElse(null); .orElse(null);
} }
public native int getOffsetForName0(String name);
public int getOffsetForName(String name) throws Exception {
int offset = getOffsetForName0(name);
if (offset == -1) {
throw new RuntimeException(name + " not found");
}
return offset;
}
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册