Thu, 26 Sep 2013 10:25:02 -0400
7195622: CheckUnhandledOops has limited usefulness now
Summary: Enable CHECK_UNHANDLED_OOPS in fastdebug builds across all supported platforms.
Reviewed-by: coleenp, hseigel, dholmes, stefank, twisti, ihse, rdurbin
Contributed-by: lois.foltan@oracle.com
dsamersoff@5612 | 1 | #!/bin/sh |
dsamersoff@5612 | 2 | |
dsamersoff@5612 | 3 | # Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. |
dsamersoff@5612 | 4 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
dsamersoff@5612 | 5 | # |
dsamersoff@5612 | 6 | # This code is free software; you can redistribute it and/or modify it |
dsamersoff@5612 | 7 | # under the terms of the GNU General Public License version 2 only, as |
dsamersoff@5612 | 8 | # published by the Free Software Foundation. |
dsamersoff@5612 | 9 | # |
dsamersoff@5612 | 10 | # This code is distributed in the hope that it will be useful, but WITHOUT |
dsamersoff@5612 | 11 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
dsamersoff@5612 | 12 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
dsamersoff@5612 | 13 | # version 2 for more details (a copy is included in the LICENSE file that |
dsamersoff@5612 | 14 | # accompanied this code). |
dsamersoff@5612 | 15 | # |
dsamersoff@5612 | 16 | # You should have received a copy of the GNU General Public License version |
dsamersoff@5612 | 17 | # 2 along with this work; if not, write to the Free Software Foundation, |
dsamersoff@5612 | 18 | # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
dsamersoff@5612 | 19 | # |
dsamersoff@5612 | 20 | # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
dsamersoff@5612 | 21 | # or visit www.oracle.com if you need additional information or have any |
dsamersoff@5612 | 22 | # questions. |
dsamersoff@5612 | 23 | |
dsamersoff@5612 | 24 | # @test testme.sh |
dsamersoff@5612 | 25 | # @bug 8009062 |
dsamersoff@5612 | 26 | # @summary Poor performance of JNI AttachCurrentThread after fix for 7017193 |
dsamersoff@5612 | 27 | # @compile DoOverflow.java |
dsamersoff@5612 | 28 | # @run shell testme.sh |
dsamersoff@5612 | 29 | |
dsamersoff@5612 | 30 | set -x |
dsamersoff@5612 | 31 | if [ "${TESTSRC}" = "" ] |
dsamersoff@5612 | 32 | then |
dsamersoff@5612 | 33 | TESTSRC=${PWD} |
dsamersoff@5612 | 34 | echo "TESTSRC not set. Using "${TESTSRC}" as default" |
dsamersoff@5612 | 35 | fi |
dsamersoff@5612 | 36 | echo "TESTSRC=${TESTSRC}" |
dsamersoff@5612 | 37 | ## Adding common setup Variables for running shell tests. |
dsamersoff@5612 | 38 | . ${TESTSRC}/../../test_env.sh |
dsamersoff@5612 | 39 | |
dsamersoff@5612 | 40 | if [ "${VM_OS}" != "linux" ] |
dsamersoff@5612 | 41 | then |
dsamersoff@5612 | 42 | echo "Test only valid for Linux" |
dsamersoff@5612 | 43 | exit 0 |
dsamersoff@5612 | 44 | fi |
dsamersoff@5612 | 45 | |
dsamersoff@5670 | 46 | gcc_cmd=`which g++` |
dsamersoff@5670 | 47 | if [ "x$gcc_cmd" = "x" ]; then |
dsamersoff@5670 | 48 | echo "WARNING: g++ not found. Cannot execute test." 2>&1 |
dsamersoff@5612 | 49 | exit 0; |
dsamersoff@5612 | 50 | fi |
dsamersoff@5612 | 51 | |
dsamersoff@5612 | 52 | CFLAGS="-m${VM_BITS}" |
dsamersoff@5612 | 53 | |
dsamersoff@5612 | 54 | LD_LIBRARY_PATH=.:${COMPILEJAVA}/jre/lib/${VM_CPU}/${VM_TYPE}:/usr/lib:$LD_LIBRARY_PATH |
dsamersoff@5612 | 55 | export LD_LIBRARY_PATH |
dsamersoff@5612 | 56 | |
dsamersoff@5612 | 57 | cp ${TESTSRC}${FS}invoke.cxx . |
dsamersoff@5612 | 58 | |
dsamersoff@5612 | 59 | # Copy the result of our @compile action: |
dsamersoff@5612 | 60 | cp ${TESTCLASSES}${FS}DoOverflow.class . |
dsamersoff@5612 | 61 | |
dsamersoff@5612 | 62 | echo "Compilation flag: ${COMP_FLAG}" |
dsamersoff@5612 | 63 | # Note pthread may not be found thus invoke creation will fail to be created. |
dsamersoff@5612 | 64 | # Check to ensure you have a /usr/lib/libpthread.so if you don't please look |
dsamersoff@5612 | 65 | # for /usr/lib/`uname -m`-linux-gnu version ensure to add that path to below compilation. |
dsamersoff@5612 | 66 | |
dsamersoff@5612 | 67 | $gcc_cmd -DLINUX ${CFLAGS} -o invoke \ |
dsamersoff@5612 | 68 | -I${COMPILEJAVA}/include -I${COMPILEJAVA}/include/linux \ |
dsamersoff@5612 | 69 | -L${COMPILEJAVA}/jre/lib/${VM_CPU}/${VM_TYPE} \ |
dsamersoff@5612 | 70 | -ljvm -lpthread invoke.cxx |
dsamersoff@5612 | 71 | |
dsamersoff@5612 | 72 | ./invoke |
dsamersoff@5612 | 73 | exit $? |