X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Ftest_op_il_seq_point.sh;h=d29b282e2ba2889f6753055501a717ea08383f64;hb=8b43cc0761bce1653e7f7ffa661f140e2f636604;hp=d9a5d59862181067354c0fc45d4d6d9a19dc833c;hpb=2f5e9048a1be7db15ba193d5cf04effc0e2e4367;p=mono.git diff --git a/mono/mini/test_op_il_seq_point.sh b/mono/mini/test_op_il_seq_point.sh index d9a5d598621..d29b282e2ba 100755 --- a/mono/mini/test_op_il_seq_point.sh +++ b/mono/mini/test_op_il_seq_point.sh @@ -21,36 +21,36 @@ clean_aot () { get_methods () { if [ -z $4 ]; then - MONO_PATH=$1 $2 -v $3 | grep '^Method .*code length' | sed 's/emitted[^()]*//' | sort + MONO_PATH=$1 $2 -v --compile-all=1 $3 | grep '^Method .*code length' | sed 's/emitted[^()]*//' | sort else clean_aot - MONO_PATH=$1 $2 -v $3 | grep '^Method .*code length' | sed 's/emitted[^()]*//' | sort + MONO_PATH=$1 $2 -v --aot $3 | grep '^Method .*code length' | sed 's/emitted[^()]*//' | sort fi } get_method () { if [ -z $5 ]; then - MONO_VERBOSE_METHOD="$4" MONO_PATH=$1 $2 $3 | sed 's/0x[0-9a-fA-F]*/0x0/g' + MONO_VERBOSE_METHOD="$4" MONO_PATH=$1 $2 --compile-all=1 $3 | sed 's/0x[0-9a-fA-F]*/0x0/g' else clean_aot - MONO_VERBOSE_METHOD="$4" MONO_PATH=$1 $2 $3 | sed 's/0x[0-9a-fA-F]*/0x0/g' + MONO_VERBOSE_METHOD="$4" MONO_PATH=$1 $2 --aot $3 | sed 's/0x[0-9a-fA-F]*/0x0/g' fi } diff_methods () { - TMP_FILE=tmp_file + TMP_FILE=$(tmp_file) echo "$(get_methods $1 $2 $3 $4)" >$TMP_FILE - sdiff -s -w 1000 <(cat $TMP_FILE) <(echo "$(MONO_DEBUG=gen-compact-seq-points get_methods $1 $2 $3 $4)") + diff <(cat $TMP_FILE) <(echo "$(MONO_DEBUG=gen-compact-seq-points get_methods $1 $2 $3 $4)") } diff_method () { - TMP_FILE=tmp_file + TMP_FILE=$(tmp_file) echo "$(get_method $1 $2 $3 $4 $5)" >$TMP_FILE sdiff -w 150 <(cat $TMP_FILE) <(echo "$(MONO_DEBUG=gen-compact-seq-points get_method $1 $2 $3 $4 $5 | grep -Ev il_seq_point)") } get_method_name () { - echo $1 | sed -E 's/Method (\([^)]*\) )?([^ ]*).*/\2/g' + echo $1 | sed -E 's/.*Method (\([^)]*\) )?([^ ]*).*/\2/g' } get_method_length () { @@ -63,7 +63,7 @@ else echo "Checking unintended native code changes in $TEST_FILE with AOT" fi -TMP_FILE=tmp_file +TMP_FILE=$(tmp_file) echo "$(diff_methods $MONO_PATH $RUNTIME $TEST_FILE $USE_AOT)" > $TMP_FILE @@ -73,20 +73,40 @@ MIN_SIZE=10000 while read line; do if [ "$line" != "" ]; then - echo $line | sed 's/000.*//g' - CHANGES=$((CHANGES+1)) - SIZE=$(get_method_length "$line") - if [[ SIZE -lt MIN_SIZE ]]; then - MIN_SIZE=$SIZE - METHOD="$line" + echo $line + if [[ ${line:0:1} == "<" ]]; then + CHANGES=$((CHANGES+1)) + SIZE=$(get_method_length "$line") + if [[ SIZE -lt MIN_SIZE ]]; then + MIN_SIZE=$SIZE + METHOD="$line" + fi fi fi done < $TMP_FILE +echo -n " > TestResults_op_il_seq_point.xml + if [ $CHANGES != 0 ] then METHOD_NAME=$(get_method_name "$METHOD") + echo "False\">" >> TestResults_op_il_seq_point.xml + echo " " >> TestResults_op_il_seq_point.xml + echo -n " > TestResults_op_il_seq_point.xml + echo "Detected OP_IL_SEQ_POINT incompatibility on $TEST_FILE" >> TestResults_op_il_seq_point.xml + echo " $CHANGES methods differ when sequence points are enabled." >> TestResults_op_il_seq_point.xml + echo ' This is probably caused by a runtime optimization that is not handling OP_IL_SEQ_POINT' >> TestResults_op_il_seq_point.xml + echo '' >> TestResults_op_il_seq_point.xml + echo "Diff $METHOD_NAME" >> TestResults_op_il_seq_point.xml + echo "Without IL_OP_SEQ_POINT With IL_OP_SEQ_POINT" >> TestResults_op_il_seq_point.xml + echo -n "$(diff_method $MONO_PATH $RUNTIME $TEST_FILE $METHOD_NAME $USE_AOT)" >> TestResults_op_il_seq_point.xml + echo "]]>" >> TestResults_op_il_seq_point.xml + echo " " >> TestResults_op_il_seq_point.xml + echo " " >> TestResults_op_il_seq_point.xml + echo " " >> TestResults_op_il_seq_point.xml + echo " " >> TestResults_op_il_seq_point.xml + echo '' echo "Detected OP_IL_SEQ_POINT incompatibility on $TEST_FILE" echo " $CHANGES methods differ when sequence points are enabled." @@ -97,4 +117,6 @@ then echo "Without IL_OP_SEQ_POINT With IL_OP_SEQ_POINT" echo "$(diff_method $MONO_PATH $RUNTIME $TEST_FILE $METHOD_NAME $USE_AOT)" exit 1 +else + echo "True\" />" >> TestResults_op_il_seq_point.xml fi