equal
deleted
inserted
replaced
1 # Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. |
1 # Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. |
2 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
2 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 # |
3 # |
4 # This code is free software; you can redistribute it and/or modify it |
4 # This code is free software; you can redistribute it and/or modify it |
5 # under the terms of the GNU General Public License version 2 only, as |
5 # under the terms of the GNU General Public License version 2 only, as |
6 # published by the Free Software Foundation. |
6 # published by the Free Software Foundation. |
24 popd > /dev/null |
24 popd > /dev/null |
25 |
25 |
26 # set env variables |
26 # set env variables |
27 . $DIR/test-env.sh |
27 . $DIR/test-env.sh |
28 |
28 |
29 $JAVA_HOME/bin/java -XX:+UnlockDiagnosticVMOptions -XX:+UseAOTStrictLoading -XX:+PrintAOT -version | grep "aot library" || exit 1 |
29 $JAVA_HOME/bin/java -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseAOTStrictLoading -XX:+PrintAOT -version | grep "aot library" || exit 1 |
30 |
30 |
31 # Dump CDS archive. |
31 # Dump CDS archive. |
32 $JAVA_HOME/bin/java -Xshare:dump || exit 1 |
32 $JAVA_HOME/bin/java -Xshare:dump || exit 1 |
33 |
33 |
34 FILE="empty.js" |
34 FILE="empty.js" |
39 rm -f libjdk.nashorn.$SO_TYPE |
39 rm -f libjdk.nashorn.$SO_TYPE |
40 $JAVA_HOME/bin/jaotc --info --compile-commands jdk.scripting.nashorn-list.txt --module jdk.scripting.nashorn --output libjdk.nashorn.$SO_TYPE || exit 1 |
40 $JAVA_HOME/bin/jaotc --info --compile-commands jdk.scripting.nashorn-list.txt --module jdk.scripting.nashorn --output libjdk.nashorn.$SO_TYPE || exit 1 |
41 |
41 |
42 echo "Tiered C1:" |
42 echo "Tiered C1:" |
43 for i in `seq 1 $N`; do |
43 for i in `seq 1 $N`; do |
44 time $JAVA_HOME/bin/jjs $JAVA_OPTS -J-XX:-UseAOT -J-XX:TieredStopAtLevel=1 $FILE |
44 time $JAVA_HOME/bin/jjs $JAVA_OPTS -J-XX:+UnlockExperimentalVMOptions -J-XX:-UseAOT -J-XX:TieredStopAtLevel=1 $FILE |
45 if [ $? -ne 0 ]; then |
45 if [ $? -ne 0 ]; then |
46 exit 1 |
46 exit 1 |
47 fi |
47 fi |
48 done |
48 done |
49 |
49 |
50 echo "Tiered C1/C2:" |
50 echo "Tiered C1/C2:" |
51 for i in `seq 1 $N`; do |
51 for i in `seq 1 $N`; do |
52 time $JAVA_HOME/bin/jjs $JAVA_OPTS -J-XX:-UseAOT $FILE |
52 time $JAVA_HOME/bin/jjs $JAVA_OPTS -J-XX:+UnlockExperimentalVMOptions -J-XX:-UseAOT $FILE |
53 if [ $? -ne 0 ]; then |
53 if [ $? -ne 0 ]; then |
54 exit 1 |
54 exit 1 |
55 fi |
55 fi |
56 done |
56 done |
57 |
57 |
58 echo "Tiered AOT:" |
58 echo "Tiered AOT:" |
59 for i in `seq 1 $N`; do |
59 for i in `seq 1 $N`; do |
60 time $JAVA_HOME/bin/jjs $JAVA_OPTS -J-XX:+UnlockDiagnosticVMOptions -J-XX:+UseAOTStrictLoading -J-XX:AOTLibrary=./libjdk.nashorn.$SO_TYPE $FILE |
60 time $JAVA_HOME/bin/jjs $JAVA_OPTS -J-XX:+UnlockDiagnosticVMOptions -J-XX:+UnlockExperimentalVMOptions -J-XX:+UseAOTStrictLoading -J-XX:AOTLibrary=./libjdk.nashorn.$SO_TYPE $FILE |
61 if [ $? -ne 0 ]; then |
61 if [ $? -ne 0 ]; then |
62 exit 1 |
62 exit 1 |
63 fi |
63 fi |
64 done |
64 done |
65 |
65 |
66 echo "Tiered AOT -Xshare:on:" |
66 echo "Tiered AOT -Xshare:on:" |
67 for i in `seq 1 $N`; do |
67 for i in `seq 1 $N`; do |
68 time $JAVA_HOME/bin/jjs $JAVA_OPTS -J-Xshare:on -J-XX:+UnlockDiagnosticVMOptions -J-XX:+UseAOTStrictLoading -J-XX:AOTLibrary=./libjdk.nashorn.$SO_TYPE $FILE |
68 time $JAVA_HOME/bin/jjs $JAVA_OPTS -J-Xshare:on -J-XX:+UnlockDiagnosticVMOptions -J-XX:+UnlockExperimentalVMOptions -J-XX:+UseAOTStrictLoading -J-XX:AOTLibrary=./libjdk.nashorn.$SO_TYPE $FILE |
69 if [ $? -ne 0 ]; then |
69 if [ $? -ne 0 ]; then |
70 exit 1 |
70 exit 1 |
71 fi |
71 fi |
72 done |
72 done |
73 |
73 |