a284628487 / AndroidPoint

Android Note
1 stars 0 forks source link

ANR? #12

Open a284628487 opened 6 years ago

a284628487 commented 6 years ago

EMPTY

a284628487 commented 5 years ago

时长定义

AMS

KeyDispatchTimeout
// How long we wait until we timeout on key dispatching.
static final int KEY_DISPATCHING_TIMEOUT = 5*1000;

BroadcastTimeout
static final int BROADCAST_FG_TIMEOUT = 10*1000;
static final int BROADCAST_BG_TIMEOUT = 60*1000;  

ActiveServices

ServiceTimeout
static final int SERVICE_TIMEOUT = (20*1000);
static final int SERVICE_BACKGROUND_TIMEOUT = SERVICE_TIMEOUT * 10;

日志

data/log/android_logs/applogcat-log.gz logcat信息

dumpsys ANR发生时额外的信息

traces stack信息

eventslog 关键事件信息,比如am_start_service,am_crash

system_app_anr@xxx.gz

Process: com.google.xxx
PID: 4899
Package: com.google.xxx
Foreground: No
Subject: Broadcast of Intent { act=...BOOT_COMPLETED, cmp=XxReceiver }
Lifetime: 82s

ANR类型

死锁卡死 主线程耗时操作(nativePollice) binder阻塞 waiting(Blocked) GC操作(systrace日志是否有频繁GC)