Allow method tracing for run-test
Adds "--trace" option to enable method tracing.
Bug: 11683397
Change-Id: I20a6b25c71067eafd848db26f13d62cfdb9a6159
diff --git a/test/run-test b/test/run-test
index d1c5bb2..2989f25 100755
--- a/test/run-test
+++ b/test/run-test
@@ -64,7 +64,6 @@
target_mode="yes"
dev_mode="no"
update_mode="no"
-debug_mode="no"
runtime="art"
usage="no"
build_only="no"
@@ -162,6 +161,9 @@
run_args="${run_args} --64"
suffix64="64"
shift
+ elif [ "x$1" = "x--trace" ]; then
+ run_args="${run_args} --runtime-option -Xmethod-trace --runtime-option -Xmethod-trace-file:${DEX_LOCATION}/trace.bin"
+ shift
elif expr "x$1" : "x--" >/dev/null 2>&1; then
echo "unknown $0 option: $1" 1>&2
usage="yes"
@@ -257,6 +259,7 @@
echo " --output-path [path] Location where to store the build" \
"files."
echo " --64 Run the test in 64-bit mode"
+ echo " --trace Run with method tracing"
) 1>&2
exit 1
fi