Comment capturer une trace

1. Lorsque l'application est dans un état normal :

racine adb

adb logcat –b tous > logcat_normal.txt

Commencez à récupérer le shell adb trace "
atrace -c -b 40960 gfx vue d'entrée webview wm am sm audio vidéo caméra hal res dalvik power pm ss sched irq freq inactif workq disk --async_start "

ou

adb shell "atrace -c -b 40960 -t 10 gfx vue d'entrée webview wm am sm audio vidéo caméra hal res dalvik binder_driver puissance pm ss sched freq inactif workq disk --async_start"


Explorez et exécutez :
adb shell atrace --async_stop -z -c -o /sdcard/ atrace_normal . atrace "
Enfin, extrayez la trace adb pull /sdcard/ atrace_normal . atrace atrace_normal . atrace

2. À l'état bloqué :

racine adb

adb logcat –b tous > logcat_abnormal.txt

Commencez à récupérer le shell adb trace "
atrace -c -b 40960 gfx vue d'entrée webview wm am sm audio vidéo caméra hal res dalvik power pm ss sched irq freq inactif workq disk --async_start "

ou

adb shell "atrace -c -b 40960 -t 10 gfx vue d'entrée webview wm am sm audio vidéo caméra hal res dalvik binder_driver puissance pm ss sched freq inactif workq disk --async_start"


Explorez et exécutez :
adb shell atrace --async_stop -z -c -o /sdcard/ atrace_abnormal . atrace "
Enfin, extrayez la trace adb pull /sdcard/ atrace_normal . atrace atrace_abnormal . atrace

3. Vérifiez l'état du nœud suivant :

shell adb

cat proc/meminfo

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_cur_freq
cat /sys/devices/system/cpu/cpu2/cpufreq/scaling_cur_freq
cat /sys/devices /system/cpu/cpu3/cpufreq/scaling_cur_freq

4. Exécutez la commande suivante pour afficher les informations relatives au processus

shell adb 

haut

おすすめ

転載: blog.csdn.net/weixin_41028555/article/details/130583494