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