From 7da80ec9def700cba45a317f1a30caf4651771d0 Mon Sep 17 00:00:00 2001 From: Wenchao Hao Date: Thu, 15 May 2025 16:09:34 +0800 Subject: [PATCH] update Signed-off-by: Wenchao Hao --- cold_start_app.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/cold_start_app.sh b/cold_start_app.sh index b7ebbf5..f2780f4 100755 --- a/cold_start_app.sh +++ b/cold_start_app.sh @@ -2,6 +2,8 @@ app=$1 round=$2 dir=$3 +# iqiyi com.qiyi.video/com.qiyi.video.WelcomeActivity + prev_alloc=$(adb shell cat /sys/kernel/mm/transparent_hugepage/hugepages-64kB/stats/anon_fault_alloc) prev_alloc_fallback=$(adb shell cat /sys/kernel/mm/transparent_hugepage/hugepages-64kB/stats/anon_fault_fallback) @@ -13,16 +15,24 @@ echo perfetto_pid is $perfetto_pid # 启动应用 sleep 1 -activity=$(adb shell dumpsys package $app | grep -A 1 -w "android.intent.action.MAIN:" | head -n 2 | tail -n 1 | awk '{print $2}') + +if [ "$app" == "com.qiyi.video" ]; then +elif [ "$app" == "com.netease.cloudmusic" ]; then + activity="com.qiyi.video/.WelcomeActivityBirthday" +else + activity="com.netease.cloudmusic/com.netease.cloudmusic.activity.IconChangeDefaultAlias" +else + activity=$(adb shell dumpsys package $app | grep -A 1 -w "android.intent.action.MAIN:" | head -n 2 | tail -n 1 | awk '{print $2}') +fi + if [ -z "$activity" ]; then continue fi -echo "starting $app" +echo "starting $activity" adb shell am start -n $activity # 睡眠15s等待perfetto退出 sleep 12 - wait # 后面的dumpsys meminfo也会分配大页