Messages in this thread Patch in this message | | | Subject | [RFC PATCH -tip 11/16] tracing/docs: add explanation about disassembler interface | From | Masami Hiramatsu <> | Date | Mon, 02 Apr 2012 01:04:11 +0900 |
| |
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@gmail.com> --- 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
| |