当前位置:网站首页>SWT / anr problem - how to open binder trace (bindertraces) when sending anr / SWT

SWT / anr problem - how to open binder trace (bindertraces) when sending anr / SWT

2022-07-01 13:58:00 Professional developer

Problem description :

Due to binding transactions , We often encounter some system watchdog ( or ANR) problem .  here , After getting the binder trace log , It is very helpful for us to analyze problems .  

In this document , Let's introduce how the watchdog happens ( or ANR) Enable binding tracing (BinderTraces) journal . 

Solution : 

 1. When ANR occurs , The file named “BinderTraces_pid__.txt”

2. Happen when WATCHDOG when , The file name is “BinderTraces_pid_.txt”

3. Patches:

1) diff --git a/services/core/java/com/android/server/Watchdog.java
b/services/core/java/com/android/server/Watchdog.java
index c04c2ac..0f58746 100644
--- a/services/core/java/com/android/server/Watchdog.java
+++ b/services/core/java/com/android/server/Watchdog.java
@@ -515,7 +515,7 @@ public class Watchdog extends Thread {
//Collect Binder State logs to get status of all the transactions
if (Build.IS_DEBUGGABLE) { //Note: the "ro.debuggable" system property must be set to
"1", then the binder trace log will be enabled
- binderStateRead();
+ binderStateRead(String.valueOf(Process.myPi
原网站

版权声明
本文为[Professional developer]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/182/202207011348023067.html