summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2015-07-01 17:50:21 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-07-01 17:50:22 +0000
commit4990f5c14a04b9aad1be50d206b7c1f8989d8923 (patch)
tree4c4654041792003e58286834cc5ef423b71b4a47
parentb46ff2c3c24c9b45457db80494056b7792ae0edb (diff)
parent9b39188d8296d8d81106d04b9f1e466a3d00e97b (diff)
downloadart-4990f5c14a04b9aad1be50d206b7c1f8989d8923.zip
art-4990f5c14a04b9aad1be50d206b7c1f8989d8923.tar.gz
art-4990f5c14a04b9aad1be50d206b7c1f8989d8923.tar.bz2
Merge "ART: Symbolize all oat files in /data folder." into mnc-dev
-rwxr-xr-xtools/symbolize.sh31
1 files changed, 12 insertions, 19 deletions
diff --git a/tools/symbolize.sh b/tools/symbolize.sh
index 0168e7d..7365a9b 100755
--- a/tools/symbolize.sh
+++ b/tools/symbolize.sh
@@ -37,30 +37,23 @@ function one() {
exit 0
fi
fi
- adb pull /data/dalvik-cache/$1/$2 /tmp || exit 1
- mkdir -p $OUT/symbols/data/dalvik-cache/$1
- oatdump --symbolize=/tmp/$2 --output=$OUT/symbols/data/dalvik-cache/$1/$2
+ adb pull $1/$2 /tmp || exit 1
+ mkdir -p $OUT/symbols/$1
+ oatdump --symbolize=/tmp/$2 --output=$OUT/symbols/$1/$2
}
-# adb shell ls seems to output in DOS format (CRLF), which messes up scripting
-function adbls() {
- adb shell ls $@ | sed 's/\r$//'
+# adb shell find seems to output in DOS format (CRLF), which messes up scripting
+function adbshellstrip() {
+ adb shell $@ | sed 's/\r$//'
}
-# Check for all ISA directories on device.
+# Search in all of /data on device.
function all() {
- DIRS=$(adbls /data/dalvik-cache/)
- for DIR in $DIRS ; do
- case $DIR in
- arm|arm64|mips|mips64|x86|x86_64)
- FILES=$(adbls /data/dalvik-cache/$DIR/*.oat /data/dalvik-cache/$DIR/*.dex)
- for FILE in $FILES ; do
- # Cannot use basename as the file doesn't exist.
- NAME=$(echo $FILE | sed -e 's/.*\///')
- one $DIR $NAME
- done
- ;;
- esac
+ FILES=$(adbshellstrip find /data -name "'*.oat'" -o -name "'*.dex'" -o -name "'*.odex'")
+ for FILE in $FILES ; do
+ DIR=$(dirname $FILE)
+ NAME=$(basename $FILE)
+ one $DIR $NAME
done
}