hotspot/test/runtime/6929067/Test6929067.sh
author johnc
Fri, 13 Jan 2012 13:27:48 -0800
changeset 11574 8a7fe61966c0
parent 10565 dc90c239f4ec
child 12729 684b5857e506
permissions -rw-r--r--
7121547: G1: High number mispredicted branches while iterating over the marking bitmap Summary: There is a high number of mispredicted branches associated with calling BitMap::iteratate() from within CMBitMapRO::iterate(). Implement a version of CMBitMapRO::iterate() directly using inline-able routines. Reviewed-by: tonyp, iveresov
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5085
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
     1
#!/bin/sh
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
     2
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
     3
##
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
     4
## @test Test6929067.sh
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
     5
## @bug 6929067
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
     6
## @summary Stack guard pages should be removed when thread is detached
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
     7
## @run shell Test6929067.sh
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
     8
##
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
     9
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    10
if [ "${TESTSRC}" = "" ]
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    11
then TESTSRC=.
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    12
fi
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    13
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    14
if [ "${TESTJAVA}" = "" ]
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    15
then
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    16
  PARENT=`dirname \`which java\``
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    17
  TESTJAVA=`dirname ${PARENT}`
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    18
  echo "TESTJAVA not set, selecting " ${TESTJAVA}
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    19
  echo "If this is incorrect, try setting the variable manually."
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    20
fi
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    21
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    22
BIT_FLAG=""
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    23
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    24
# set platform-dependent variables
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    25
OS=`uname -s`
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    26
case "$OS" in
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    27
  Linux)
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    28
    NULL=/dev/null
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    29
    PS=":"
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    30
    FS="/"
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    31
    ;;
10565
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5085
diff changeset
    32
  SunOS | Windows_* | *BSD)
5085
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    33
    NULL=NUL
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    34
    PS=";"
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    35
    FS="\\"
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    36
    echo "Test passed; only valid for Linux"
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    37
    exit 0;
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    38
    ;;
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    39
  * )
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    40
    echo "Unrecognized system!"
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    41
    exit 1;
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    42
    ;;
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    43
esac
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    44
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    45
LD_LIBRARY_PATH=.:${TESTJAVA}/jre/lib/i386/client:/usr/openwin/lib:/usr/dt/lib:/usr/lib:$LD_LIBRARY_PATH
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    46
export LD_LIBRARY_PATH
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    47
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    48
THIS_DIR=`pwd`
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    49
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    50
cp ${TESTSRC}${FS}invoke.c ${THIS_DIR}
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    51
cp ${TESTSRC}${FS}T.java ${THIS_DIR}
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    52
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    53
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    54
${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} -fullversion
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    55
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    56
${TESTJAVA}${FS}bin${FS}javac T.java
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    57
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    58
gcc -o invoke -I${TESTJAVA}/include -I${TESTJAVA}/include/linux invoke.c ${TESTJAVA}/jre/lib/i386/client/libjvm.so
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    59
./invoke
4f0c435f8c3c 6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff changeset
    60
exit $?