Signed-off-by: Wenchao Hao <haowenchao22@gmail.com>
This commit is contained in:
Wenchao Hao 2025-05-15 20:00:44 +08:00
parent 206ea0ba68
commit d86304795d
2 changed files with 18 additions and 3 deletions

View File

@ -5,7 +5,6 @@ com.taobao.taobao
com.xunmeng.pinduoduo
com.ss.android.article.news
com.sina.weibo
com.android.contacts
com.tencent.mobileqq
com.tencent.qqlive
com.smile.gifmaker

20
run.sh
View File

@ -1,5 +1,19 @@
#$dirput: round app start_time start_type rss pss ratio pagefault itlbmiss dtlbmiss cpustalled
nr_dev=$(adb devices | grep -v "List of devices" | grep device -c)
if [ $nr_dev -gt 1 ] && [ -z "$ANDROID_SERIAL" ] ; then
echo "adb: more than one device/emulator"
exit
fi
if [ -z "$ANDROID_SERIAL" ]; then
sid=$(adb devices | grep -v "List of devices" | grep device | awk '{print $1}')
export ANDROID_SERIAL=$sid
fi
echo $ANDROID_SERIAL
adb root
adb push perfconf.txt /data/misc/perfetto-configs
@ -7,12 +21,14 @@ if [ $? -ne 0 ]; then
exit
fi
dir=$(/usr/bin/date +%Y-%m%d-%H%M)
mkdir $dir
dir=$ANDROID_SERIAL/$(/usr/bin/date +%Y-%m%d-%H%M)
mkdir -p $dir
mkdir $dir/system_mem
mkdir $dir/traces
mkdir $dir/meminfo
mkdir $dir/simpleperf
echo "round app start_type start_time inc_ratio inc_total rss pss pagefaults itlbmiss dtlbmiss cpustall" > $dir/result
for round in $(seq 1 1); do