mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-07 22:50:49 +00:00
8062247: [TESTBUG] Allow WhiteBox test to access JVM offsets
Reviewed-by: coleenp, iklam, mseledtsov
This commit is contained in:
parent
33477d9cac
commit
1768fe1eb9
@ -207,4 +207,13 @@ public class WhiteBox {
|
||||
.findAny()
|
||||
.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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user