summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorZheng Xu <zheng.xu@arm.com>2015-04-21 17:35:25 +0800
committerAndreas Gampe <agampe@google.com>2015-07-01 10:22:49 -0700
commit9b39188d8296d8d81106d04b9f1e466a3d00e97b (patch)
tree41e0b8e43dec61c40b87cc23827eea8bbe6136ba /tools
parentc4e75e2d4319bd57461aed6d138de23032e511d5 (diff)
downloadart-9b39188d8296d8d81106d04b9f1e466a3d00e97b.zip
art-9b39188d8296d8d81106d04b9f1e466a3d00e97b.tar.gz
art-9b39188d8296d8d81106d04b9f1e466a3d00e97b.tar.bz2
ART: Symbolize all oat files in /data folder.
Now we store oat files not only in /data/dalvik-cache, but also in other places. This patch tries to pull all oat files from device /data folder. Bug: 21760614 (cherry picked from commit 468bcf63207420f18c0c8a8621aa2d774393c155) Change-Id: Icf81cf28c29da2e248e4fbd84f5920f46ddc4cd6
Diffstat (limited to 'tools')
-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
}