linux-kernel 追踪I2C事件
示例
注意:我假设它debugfs安装在/sys/kernel/debug
如果没有,请尝试:
mount -t debugfs none /sys/kernel/debug
转到跟踪目录:
cd /sys/kernel/debug/tracing/
确保功能跟踪器已禁用:
echo nop > current_tracer
启用所有I2C事件:
echo 1 > events/i2c/enable
确保启用了跟踪:
echo 1 > tracing_on
跟踪消息可以在中查看/sys/kernel/debug/tracing/trace,例如:
... i2c_write: i2c-5 #0 a=044 f=0000 l=2 [02-14] ... i2c_read: i2c-5 #1 a=044 f=0001 l=4 ... i2c_reply: i2c-5 #1 a=044 f=0001 l=4 [33-00-00-00] ... i2c_result: i2c-5 n=2 ret=2
跟踪事件用户空间API文档可以Documentation/trace/events.txt在内核源文件中找到。
热门推荐
1 训练狗狗憋尿
2 狗狗追踪训练
3 狗狗训练要多少钱
5 深圳狗狗训练
6 训练狗狗唤回
7 狗狗叫怎么训练
8 狗狗训练班
10 狗狗社会化训练
11 狗狗叫回训练
12 广州狗狗训练学校
13 狗狗训练躺下
14 狗狗随行训练
15 训练狗狗巡回
16 狗狗要怎么训练
17 狗狗喂食训练
18 训练狗狗躺下