Mercurial > hg > truffle
annotate test/runtime/7020373/Test7020373.sh @ 3919:4f41766176cf
7084509: G1: fix inconsistencies and mistakes in the young list target length calculations
Summary: Fixed inconsistencies and mistakes in the young list target length calculations so that a) the calculated target length is optimal (before, it was not), b) other parameters like max survivor size and max gc locker eden expansion are always consistent with the calculated target length (before, they were not always), and c) the resulting target length was always bound by desired min and max values (before, it was not).
Reviewed-by: brutisso, johnc
author | tonyp |
---|---|
date | Thu, 08 Sep 2011 05:16:49 -0400 |
parents | bca686989d4b |
children | 037973617842 |
rev | line source |
---|---|
3862
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
1 #!/bin/sh |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
2 |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
3 ## |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
4 ## @test |
3863 | 5 ## @bug 7020373 7055247 |
3862
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
6 ## @key cte_test |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
7 ## @summary JSR rewriting can overflow memory address size variables |
3863 | 8 ## @ignore Ignore it until 7053586 fixed |
3862
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
9 ## @run shell Test7020373.sh |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
10 ## |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
11 |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
12 if [ "${TESTSRC}" = "" ] |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
13 then TESTSRC=. |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
14 fi |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
15 |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
16 if [ "${TESTJAVA}" = "" ] |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
17 then |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
18 PARENT=`dirname \`which java\`` |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
19 TESTJAVA=`dirname ${PARENT}` |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
20 echo "TESTJAVA not set, selecting " ${TESTJAVA} |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
21 echo "If this is incorrect, try setting the variable manually." |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
22 fi |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
23 |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
24 if [ "${TESTCLASSES}" = "" ] |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
25 then |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
26 echo "TESTCLASSES not set. Test cannot execute. Failed." |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
27 exit 1 |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
28 fi |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
29 |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
30 BIT_FLAG="" |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
31 |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
32 # set platform-dependent variables |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
33 OS=`uname -s` |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
34 case "$OS" in |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
35 SunOS | Linux ) |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
36 NULL=/dev/null |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
37 PS=":" |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
38 FS="/" |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
39 ## for solaris, linux it's HOME |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
40 FILE_LOCATION=$HOME |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
41 if [ -f ${FILE_LOCATION}${FS}JDK64BIT -a ${OS} = "SunOS" ] |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
42 then |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
43 BIT_FLAG=`cat ${FILE_LOCATION}${FS}JDK64BIT | grep -v '^#'` |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
44 fi |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
45 ;; |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
46 Windows_* ) |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
47 NULL=NUL |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
48 PS=";" |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
49 FS="\\" |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
50 ;; |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
51 * ) |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
52 echo "Unrecognized system!" |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
53 exit 1; |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
54 ;; |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
55 esac |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
56 |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
57 JEMMYPATH=${CPAPPEND} |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
58 CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
59 |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
60 THIS_DIR=`pwd` |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
61 |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
62 ${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} -version |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
63 |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
64 ${TESTJAVA}${FS}bin${FS}jar xvf ${TESTSRC}${FS}testcase.jar |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
65 |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
66 ${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} OOMCrashClass4000_1 > test.out 2>&1 |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
67 |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
68 cat test.out |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
69 |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
70 egrep "SIGSEGV|An unexpected error has been detected" test.out |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
71 |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
72 if [ $? = 0 ] |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
73 then |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
74 echo "Test Failed" |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
75 exit 1 |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
76 else |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
77 grep "java.lang.LinkageError" test.out |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
78 if [ $? = 0 ] |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
79 then |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
80 echo "Test Passed" |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
81 exit 0 |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
82 else |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
83 echo "Test Failed" |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
84 exit 1 |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
85 fi |
52e4ba46751f
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
86 fi |