Android 活页夹跟踪 [英] Android Binder Tracing
问题描述
在Android OS源代码(路径:/drivers/staging/android/binder_trace.h
)中,我们有一个名为 binder_trace.h
的文件,也包含在中>/drivers/staging/android/binder.c
binder_trace
包括在内.正如我们在 binder_trace.h
文件中看到的那样,使用 TP_printk
指令跟踪了活页夹事务.
In Android OS source code (Path: /drivers/staging/android/binder_trace.h
), we have a file named binder_trace.h
and also in /drivers/staging/android/binder.c
binder_trace
is included. As we can see in binder_trace.h
file, the binder transactions are traced with TP_printk
instruction.
现在我的问题是,如何在带有adb shell的手机中看到这些内核日志?在/sys/kernel/debug/tracing
目录中也没有任何与活页夹跟踪相关的文件!
Now my question is that how I can see these kernel logs in my phone with adb shell? Also there isn't any file related to binder tracing in /sys/kernel/debug/tracing
directory!
推荐答案
$ cd /sys/kernel/debug/tracing
$ echo > set_event # clear all unrelated events
$ echo 1 > events/binder/enable
$ echo 1 > tracing_on
# .. do your test jobs ..
$ cat trace
请参阅 https://android.googlesource.com/kernel/common/+/android-3.10.y/Documentation/trace/ftrace.txt 了解更多详细信息.
refer to https://android.googlesource.com/kernel/common/+/android-3.10.y/Documentation/trace/ftrace.txt for more detail info.
这篇关于Android 活页夹跟踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!