kernel 动态调试

来源:互联网 发布:连接池 java 编辑:程序博客网 时间:2024/05/21 21:23

http://lwn.net/Articles/434856/

http://kernel.org/doc/local/pr_debug.txt


kernel 代码里使用 pr_debug 打印 log


$ adb shell "mount -t debugfs debugfs /sys/kernel/debug"

$ adb shell "echo -n \"file msm.c +p\" > /sys/kernel/debug/dynamic_debug/control"

+p 表示打开 pr_debug ,-p 表示关闭 pr_debug


$ adb shell cat /proc/kmsg