test/sanity/WBApi.java

Tue, 19 Feb 2013 18:45:49 +0100

author
mgerdin
date
Tue, 19 Feb 2013 18:45:49 +0100
changeset 4637
1b0dc9f87e75
parent 3619
2d503de963b3
child 4916
b0301c02f38e
permissions
-rw-r--r--

8006753: fix failed for JDK-8002415 White box testing API for HotSpot
Summary: Modify WhiteBoxAPI to use interface classes from test/testlibrary instead, add ClassFileInstaller to resolve the boot class path issue
Reviewed-by: ctornqvi, dsamersoff, coleenp, kvn

mgerdin@4637 1 /*
mgerdin@4637 2 * Copyright (c) 2012, 2013 Oracle and/or its affiliates. All rights reserved.
mgerdin@4637 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
mgerdin@4637 4 *
mgerdin@4637 5 * This code is free software; you can redistribute it and/or modify it
mgerdin@4637 6 * under the terms of the GNU General Public License version 2 only, as
mgerdin@4637 7 * published by the Free Software Foundation.
mgerdin@4637 8 *
mgerdin@4637 9 * This code is distributed in the hope that it will be useful, but WITHOUT
mgerdin@4637 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
mgerdin@4637 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
mgerdin@4637 12 * version 2 for more details (a copy is included in the LICENSE file that
mgerdin@4637 13 * accompanied this code).
mgerdin@4637 14 *
mgerdin@4637 15 * You should have received a copy of the GNU General Public License version
mgerdin@4637 16 * 2 along with this work; if not, write to the Free Software Foundation,
mgerdin@4637 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
mgerdin@4637 18 *
mgerdin@4637 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
mgerdin@4637 20 * or visit www.oracle.com if you need additional information or have any
mgerdin@4637 21 * questions.
mgerdin@4637 22 */
mgerdin@4637 23
mgerdin@3619 24 /*
mgerdin@3619 25 * @test WBApi
mgerdin@3619 26 * @summary verify that whitebox functions can be linked and executed
mgerdin@4637 27 * @library /testlibrary /testlibrary/whitebox
mgerdin@4637 28 * @build WBApi
mgerdin@4637 29 * @run main ClassFileInstaller sun.hotspot.WhiteBox
mgerdin@4637 30 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI WBApi
mgerdin@3619 31 */
mgerdin@3619 32
mgerdin@3619 33 import sun.hotspot.WhiteBox;
mgerdin@3619 34 public class WBApi {
mgerdin@3619 35 public static void main(String... args) {
mgerdin@3619 36 System.out.printf("args at: %x\n",WhiteBox.getWhiteBox().getObjectAddress(args));
mgerdin@3619 37 }
mgerdin@3619 38 }

mercurial