[PATCH] kprobes base patch
This patch helps developers to trap at almost any kernel code address, specifying a handler routine to be invoked when the breakpoint is hit. Useful for analysing the Linux kernel by collecting debugging information non-disruptively. Employs single-stepping out-of-line to avoid probe misses on SMP and may be especially useful in aiding debugging elusive races and problems on live systems. More elaborate dynamic tracing tools such as DProbes can be built over the kprobes interface. Helps developers to trap at almost any kernel code address, specifying a handler routine to be invoked when the breakpoint is hit. Useful for analysing the Linux kernel by collecting debugging information non-disruptively. Employs single-stepping out-of-line to avoid probe misses on SMP and may be especially useful in aiding debugging elusive races and problems on live systems. More elaborate dynamic tracing tools such as DProbes can be built over the kprobes interface. Sample usage: To place a probe on __blockdev_direct_IO: static int probe_handler(struct kprobe *p, struct pt_regs *) { ... whatever ... } struct kprobe kp = { .addr = __blockdev_direct_IO, .pre_handler = probe_handler }; register_kprobe(&kp); Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing
arch/i386/kernel/kprobes.c
0 → 100644
include/asm-i386/kprobes.h
0 → 100644
include/linux/kprobes.h
0 → 100644
kernel/kprobes.c
0 → 100644
Please register or sign in to comment