[RFC PATCH -tip 11/16] tracing/docs: add explanation aboutdisassembler interface

From: Masami Hiramatsu
Date: Sun Apr 01 2012 - 12:04:15 EST


Add an entry for explaining x86 disassembler interface
to kprobetrace.txt, because that is very useful for
someone who wants to put a probe on somewhere without
using perf-probe.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu@xxxxxxxxx>
---
Documentation/trace/kprobetrace.txt | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/Documentation/trace/kprobetrace.txt b/Documentation/trace/kprobetrace.txt
index d0d0bb9..1dc7b44 100644
--- a/Documentation/trace/kprobetrace.txt
+++ b/Documentation/trace/kprobetrace.txt
@@ -92,6 +92,20 @@ Event Profiling
the third is the number of probe miss-hits.


+Function disassembling
+----------------------
+ To find a probe target, you have two options.
+1) Use perf-probe in perftools. This allows you to find a probe target
+ by using source-code level information.
+2) Use a kernel function disassembling interface on debugfs.
+The first one is easy to use, very helpful for noraml user, but also
+requires kernel debuginfo package (or built binary with CONFIG_DEBUGINFO).
+The second one is easy to use, but requires a knowladge of assembly
+language (and also, this is currently available on x86 with
+CONFIG_X86_DISASSEMBLER=y and CONFIG_DEBUG_X86_DISASSEMBLY=y).
+The debugfs interface is /sys/kernel/debug/x86/disassembly. At first,
+you should write a function name to the file, and then, read it.
+
Usage examples
--------------
To add a probe as a new event, write a new definition to kprobe_events

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/