diff options
-rwxr-xr-x | tools/run-jdwp-tests.sh | 10 | ||||
-rwxr-xr-x | tools/run-libjdwp-tests.sh | 37 |
2 files changed, 45 insertions, 2 deletions
diff --git a/tools/run-jdwp-tests.sh b/tools/run-jdwp-tests.sh index eb33da2267..a435f2e03e 100755 --- a/tools/run-jdwp-tests.sh +++ b/tools/run-jdwp-tests.sh @@ -68,6 +68,7 @@ test="org.apache.harmony.jpda.tests.share.AllTests" mode="target" # Use JIT compiling by default. use_jit=true +instant_jit=false variant_cmdline_parameter="--variant=X32" dump_command="/bin/true" # Timeout of JDWP test in ms. @@ -129,6 +130,11 @@ while true; do elif [[ $1 == -Ximage:* ]]; then image="$1" shift + elif [[ "$1" == "--instant-jit" ]]; then + instant_jit=true + # Remove the --instant-jit from the arguments. + args=${args/$1} + shift elif [[ "$1" == "--no-jit" ]]; then use_jit=false # Remove the --no-jit from the arguments. @@ -310,6 +316,10 @@ if $use_jit; then debuggee_args="$debuggee_args -Xcompiler-option --compiler-filter=quicken" fi +if $instant_jit; then + debuggee_args="$debuggee_args -Xjitthreshold:0" +fi + if [[ $mode != "ri" ]]; then vm_args="$vm_args --vm-arg -Xusejit:$use_jit" debuggee_args="$debuggee_args -Xusejit:$use_jit" diff --git a/tools/run-libjdwp-tests.sh b/tools/run-libjdwp-tests.sh index e116facd98..bd052517fd 100755 --- a/tools/run-libjdwp-tests.sh +++ b/tools/run-libjdwp-tests.sh @@ -24,13 +24,18 @@ if [[ `uname` != 'Linux' ]]; then exit 2 fi -args=("$@") +declare -a args=("$@") debug="no" has_variant="no" has_mode="no" mode="target" has_timeout="no" +has_verbose="no" +# The bitmap of log messages in libjdwp. See list in the help message for more +# info on what these are. The default is 'errors | callbacks' +verbose_level=0xC0 +arg_idx=0 while true; do if [[ $1 == "--debug" ]]; then debug="yes" @@ -38,6 +43,7 @@ while true; do elif [[ $1 == --test-timeout-ms ]]; then has_timeout="yes" shift + arg_idx=$((arg_idx + 1)) shift elif [[ "$1" == "--mode=jvm" ]]; then has_mode="yes" @@ -47,6 +53,22 @@ while true; do has_mode="yes" mode="host" shift + elif [[ $1 == --verbose-all ]]; then + has_verbose="yes" + verbose_level=0xFFF + unset args[arg_idx] + shift + elif [[ $1 == --verbose ]]; then + has_verbose="yes" + shift + elif [[ $1 == --verbose-level ]]; then + shift + verbose_level=$1 + # remove both the --verbose-level and the argument. + unset args[arg_idx] + arg_idx=$((arg_idx + 1)) + unset args[arg_idx] + shift elif [[ $1 == --variant=* ]]; then has_variant="yes" shift @@ -55,6 +77,7 @@ while true; do else shift fi + arg_idx=$((arg_idx + 1)) done if [[ "$has_mode" = "no" ]]; then @@ -68,7 +91,17 @@ fi if [[ "$has_timeout" = "no" ]]; then # Double the timeout to 20 seconds args+=(--test-timeout-ms) - args+=(20000) + if [[ "$has_verbose" = "no" ]]; then + args+=(20000) + else + # Even more time if verbose is set since those can be quite heavy. + args+=(200000) + fi +fi + +if [[ "$has_verbose" = "yes" ]]; then + args+=(--vm-arg) + args+=(-Djpda.settings.debuggeeAgentExtraOptions=directlog=y,logfile=/proc/self/fd/2,logflags=$verbose_level) fi # We don't use full paths since it is difficult to determine them for device |