Path: blob/master/test/hotspot/jtreg/serviceability/AsyncGetCallTrace/MyPackage/ASGCTBaseTest.java
41155 views
/*1* Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.2* Copyright (c) 2019, Google and/or its affiliates. All rights reserved.3* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.4*5* This code is free software; you can redistribute it and/or modify it6* under the terms of the GNU General Public License version 2 only, as7* published by the Free Software Foundation.8*9* This code is distributed in the hope that it will be useful, but WITHOUT10* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or11* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License12* version 2 for more details (a copy is included in the LICENSE file that13* accompanied this code).14*15* You should have received a copy of the GNU General Public License version16* 2 along with this work; if not, write to the Free Software Foundation,17* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.18*19* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA20* or visit www.oracle.com if you need additional information or have any21* questions.22*/2324package MyPackage;2526/**27* @test28* @summary Verifies that AsyncGetCallTrace is call-able and provides sane information.29* @compile ASGCTBaseTest.java30* @requires os.family == "linux"31* @requires os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64" | os.arch=="arm" | os.arch=="aarch64" | os.arch=="ppc64" | os.arch=="s390"32* @requires vm.jvmti33* @run main/othervm/native -agentlib:AsyncGetCallTraceTest MyPackage.ASGCTBaseTest34*/3536public class ASGCTBaseTest {37static {38try {39System.loadLibrary("AsyncGetCallTraceTest");40} catch (UnsatisfiedLinkError ule) {41System.err.println("Could not load AsyncGetCallTrace library");42System.err.println("java.library.path: " + System.getProperty("java.library.path"));43throw ule;44}45}4647private static native boolean checkAsyncGetCallTraceCall();4849public static void main(String[] args) {50if (!checkAsyncGetCallTraceCall()) {51throw new RuntimeException("AsyncGetCallTrace call failed.");52}53}54}555657