Thu, 23 Feb 2012 14:58:35 +0100
7148152: Add whitebox testing API to HotSpot
Summary: Add an internal testing API to HotSpot to enable more targeted testing of vm functionality
Reviewed-by: phh, dholmes
mgerdin@3619 | 1 | /* |
mgerdin@3619 | 2 | * @test WBApi |
mgerdin@3619 | 3 | * @summary verify that whitebox functions can be linked and executed |
mgerdin@3619 | 4 | * @run compile -J-XX:+UnlockDiagnosticVMOptions -J-XX:+WhiteBoxAPI WBApi.java |
mgerdin@3619 | 5 | * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI WBApi |
mgerdin@3619 | 6 | */ |
mgerdin@3619 | 7 | |
mgerdin@3619 | 8 | import sun.hotspot.WhiteBox; |
mgerdin@3619 | 9 | public class WBApi { |
mgerdin@3619 | 10 | public static void main(String... args) { |
mgerdin@3619 | 11 | System.out.printf("args at: %x\n",WhiteBox.getWhiteBox().getObjectAddress(args)); |
mgerdin@3619 | 12 | } |
mgerdin@3619 | 13 | } |