DALVIK THREADS:
“main” prio=5 tid=1 NATIVE
解释:
- Dalvik 是 Android平台的Java虚拟机
参考文章:理解Android虚拟机体系结构 - “tid=1” 表示 线程号为1的主线程
- NATIVE 表示线程状态
这里列举下,线程的几种状态
ThreadState (defined at “dalvik/vm/thread.h “)
THREAD_UNDEFINED = -1, /* makes enum compatible with int32_t /
THREAD_ZOMBIE = 0, / TERMINATED /
THREAD_RUNNING = 1, / RUNNABLE or running now /
THREAD_TIMED_WAIT = 2, / TIMED_WAITING in Object.wait() /
THREAD_MONITOR = 3, / BLOCKED on a monitor /
THREAD_WAIT = 4, / WAITING in Object.wait() /
THREAD_INITIALIZING= 5, / allocated, not yet running /
THREAD_STARTING = 6, / started, not yet on thread list /
THREAD_NATIVE = 7, / off in a JNI native method /
THREAD_VMWAIT = 8, / waiting on a VM resource /
THREAD_SUSPENDED = 9, / suspended, usually by GC or debugger */
上述处于 THREAD_NATIVE 。
作者:nothingwxq
链接:https://www.jianshu.com/p/f14e89641109
來源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。
这篇文章有详细介绍trace文件的关键字段
ANR日志traces.txt分析
网友评论