hotspot/test/sanity/WBApi.java
author mgerdin
Thu, 23 Feb 2012 14:58:35 +0100
changeset 12095 cc3d6f08a4c4
child 15793 4867678e3517
permissions -rw-r--r--
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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12095
cc3d6f08a4c4 7148152: Add whitebox testing API to HotSpot
mgerdin
parents:
diff changeset
     1
/*
cc3d6f08a4c4 7148152: Add whitebox testing API to HotSpot
mgerdin
parents:
diff changeset
     2
 * @test WBApi
cc3d6f08a4c4 7148152: Add whitebox testing API to HotSpot
mgerdin
parents:
diff changeset
     3
 * @summary verify that whitebox functions can be linked and executed
cc3d6f08a4c4 7148152: Add whitebox testing API to HotSpot
mgerdin
parents:
diff changeset
     4
 * @run compile -J-XX:+UnlockDiagnosticVMOptions -J-XX:+WhiteBoxAPI WBApi.java
cc3d6f08a4c4 7148152: Add whitebox testing API to HotSpot
mgerdin
parents:
diff changeset
     5
 * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI WBApi
cc3d6f08a4c4 7148152: Add whitebox testing API to HotSpot
mgerdin
parents:
diff changeset
     6
 */
cc3d6f08a4c4 7148152: Add whitebox testing API to HotSpot
mgerdin
parents:
diff changeset
     7
cc3d6f08a4c4 7148152: Add whitebox testing API to HotSpot
mgerdin
parents:
diff changeset
     8
import sun.hotspot.WhiteBox;
cc3d6f08a4c4 7148152: Add whitebox testing API to HotSpot
mgerdin
parents:
diff changeset
     9
public class WBApi {
cc3d6f08a4c4 7148152: Add whitebox testing API to HotSpot
mgerdin
parents:
diff changeset
    10
    public static void main(String... args) {
cc3d6f08a4c4 7148152: Add whitebox testing API to HotSpot
mgerdin
parents:
diff changeset
    11
        System.out.printf("args at: %x\n",WhiteBox.getWhiteBox().getObjectAddress(args));
cc3d6f08a4c4 7148152: Add whitebox testing API to HotSpot
mgerdin
parents:
diff changeset
    12
    }
cc3d6f08a4c4 7148152: Add whitebox testing API to HotSpot
mgerdin
parents:
diff changeset
    13
}