linux-kernel
イベントのトレース
サーチ…
I2Cイベントのトレース
注:私はdebugfs
が/sys/kernel/debug
下にマウントされていると仮定してい/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
ファイルにあります。
Modified text is an extract of the original Stack Overflow Documentation
ライセンスを受けた CC BY-SA 3.0
所属していない Stack Overflow