From 2bf94d8a9a70e79496ec7bc928e5ab76853c963a Mon Sep 17 00:00:00 2001 From: Wenchao Hao Date: Fri, 12 Sep 2025 17:22:21 +0800 Subject: [PATCH] update Signed-off-by: Wenchao Hao --- applist | 19 ++++++++----------- run.sh | 18 +++++++++++++----- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/applist b/applist index f21bfec..bbc0d9d 100644 --- a/applist +++ b/applist @@ -1,13 +1,10 @@ -tv.danmaku.bili -com.xingin.xhs +com.UCMobile com.taobao.taobao -com.ss.android.article.news -com.sina.weibo -com.smile.gifmaker -air.tv.douyu.android -com.ss.android.ugc.aweme.lite -com.kuaishou.nebula -com.sup.android.superb +com.qiyi.video com.ss.android.ugc.aweme -com.taobao.idlefish -com.duowan.kiwi +com.smile.gifmaker +com.kugou.android +com.xunmeng.pinduoduo +tv.danmaku.bili +com.tencent.qqlive +com.jingdong.app.mall diff --git a/run.sh b/run.sh index 3481396..11d1dcb 100755 --- a/run.sh +++ b/run.sh @@ -1,11 +1,12 @@ #$dirput: round app start_time(ms) start_type rss(MB) pss(MB) ratio pagefault minorfaults majorfaults itlbmiss dtlbmiss cpustalled cycle=3 -wait=3 +WAIT=3 clear_background=0 mthp_stat=0 +cleancache=0 -while getopts ":s:c:w:h:kT" opt +while getopts ":s:c:w:h:kTC" opt do case $opt in s) @@ -18,11 +19,14 @@ do clear_background=1 ;; w) - wait=$OPTARG + WAIT=$OPTARG ;; T) mthp_stat=1 ;; + C) + cleancache=1 + ;; h) echo "usage: run.sh -s sid -c cycle -w wait_seconds" exit 1 @@ -68,7 +72,7 @@ mkdir $dir/meminfo mkdir $dir/simpleperf mkdir $dir/thpmaps -echo "round app start_type start_time rss pss pagefaults minorfaults majorfaults itlbmiss dtlbmiss cpustall inc_ratio order4_ratio order4_cont inc_total nr_direct_reclaim" > $dir/result +echo "round app start_type start_time rss pss pagefaults minorfaults majorfaults itlbmiss dtlbmiss cpustall inc_ratio inc_total order4_ratio order4_cont nr_inc_direct_reclaim" >> $dir/result for round in $(seq 1 $cycle); do # 重启并等待重启完成 @@ -172,7 +176,7 @@ for round in $(seq 1 $cycle); do adb shell cat /proc/vmstat > $dir/system_mem/after_vmstat-$app-$round # 睡眠3s后拉simpleperf和perfetto数据 - sleep $wait + sleep $WAIT adb pull /data/misc/perfetto-traces/trace-"$app"-"$round".ptrace $dir/traces adb pull /data/local/tmp/simpleperf-"$app"-"$round".txt $dir/simpleperf/ adb shell "rm /data/misc/perfetto-traces/trace-"$app"-"$round".ptrace" @@ -247,6 +251,10 @@ for round in $(seq 1 $cycle); do ./clearapp.sh fi + if [ $cleancache -ne 0 ]; then + adb shell "echo 3 > /proc/sys/vm/drop_caches" + fi + rm tmp.txt done done