Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/test/runtime/InitialThreadOverflow/testme.sh
32284 views
#!/bin/sh12# Copyright (c) 2013, Oracle 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.2223# @test testme.sh24# @bug 800906225# @summary Poor performance of JNI AttachCurrentThread after fix for 701719326# @compile DoOverflow.java27# @run shell testme.sh2829set -x30if [ "${TESTSRC}" = "" ]31then32TESTSRC=${PWD}33echo "TESTSRC not set. Using "${TESTSRC}" as default"34fi35echo "TESTSRC=${TESTSRC}"36## Adding common setup Variables for running shell tests.37. ${TESTSRC}/../../test_env.sh3839if [ "${VM_OS}" != "linux" ]40then41echo "Test only valid for Linux"42exit 043fi4445gcc_cmd=`which g++`46if [ "x$gcc_cmd" = "x" ]; then47echo "WARNING: g++ not found. Cannot execute test." 2>&148exit 0;49fi5051CFLAGS="-m${VM_BITS}"5253LD_LIBRARY_PATH=.:${COMPILEJAVA}/jre/lib/${VM_CPU}/${VM_TYPE}:/usr/lib:$LD_LIBRARY_PATH54export LD_LIBRARY_PATH5556cp ${TESTSRC}${FS}invoke.cxx .5758# Copy the result of our @compile action:59cp ${TESTCLASSES}${FS}DoOverflow.class .6061echo "Compilation flag: ${COMP_FLAG}"62# Note pthread may not be found thus invoke creation will fail to be created.63# Check to ensure you have a /usr/lib/libpthread.so if you don't please look64# for /usr/lib/`uname -m`-linux-gnu version ensure to add that path to below compilation.6566$gcc_cmd -DLINUX ${CFLAGS} -o invoke \67-I${COMPILEJAVA}/include -I${COMPILEJAVA}/include/linux \68-L${COMPILEJAVA}/jre/lib/${VM_CPU}/${VM_TYPE} \69-ljvm -lpthread invoke.cxx7071./invoke72exit $?737475