Kprobes: Difference between revisions
→Kernel configuration: add necessary FTRACE options |
|||
| Line 9: | Line 9: | ||
==Working with kprobes== | ==Working with kprobes== | ||
List kernel | The primary means for working with kprobes from userspace is [[sysfs]] and the [[perf]] tool. | ||
{|class="wikitable" | |||
! Task !! sysfs !! perf | |||
|- | |||
| List enabled kprobes || <tt>cat /sys/kernel/debug/tracing/kprobe_events</tt> || <tt>perf probe -l</tt> | |||
|- | |||
| Enable kprobe || <tt>echo > /sys/kernel/debug/tracing/kprobe_events</tt> | |||
|| <tt>perf probe -a</tt> | |||
|} | |||
===Kprobe definition=== | ===Kprobe definition=== | ||