diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-06-05 05:18:34 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-06-05 06:26:50 -0400 |
commit | 10b0256496fd6c162478547f7c6df1e052e87644 (patch) | |
tree | 7037905737ae83a86a5cdb376cd1d66f7f407e2e /Documentation | |
parent | c56d34064b6eb9f9cde9e35bbfe16eedf3d81f94 (diff) | |
parent | 69902c718c0b476e94ed7fccd3cf29ca39fe433a (diff) |
Merge branch 'perf/kprobes' into perf/core
Conflicts:
arch/x86/kernel/traps.c
The kprobes enhancements are fully cooked, ship them upstream.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/kprobes.txt | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt index 0cfb00fd86ff..4bbeca8483ed 100644 --- a/Documentation/kprobes.txt +++ b/Documentation/kprobes.txt | |||
@@ -22,8 +22,9 @@ Appendix B: The kprobes sysctl interface | |||
22 | 22 | ||
23 | Kprobes enables you to dynamically break into any kernel routine and | 23 | Kprobes enables you to dynamically break into any kernel routine and |
24 | collect debugging and performance information non-disruptively. You | 24 | collect debugging and performance information non-disruptively. You |
25 | can trap at almost any kernel code address, specifying a handler | 25 | can trap at almost any kernel code address(*), specifying a handler |
26 | routine to be invoked when the breakpoint is hit. | 26 | routine to be invoked when the breakpoint is hit. |
27 | (*: some parts of the kernel code can not be trapped, see 1.5 Blacklist) | ||
27 | 28 | ||
28 | There are currently three types of probes: kprobes, jprobes, and | 29 | There are currently three types of probes: kprobes, jprobes, and |
29 | kretprobes (also called return probes). A kprobe can be inserted | 30 | kretprobes (also called return probes). A kprobe can be inserted |
@@ -273,6 +274,19 @@ using one of the following techniques: | |||
273 | or | 274 | or |
274 | - Execute 'sysctl -w debug.kprobes_optimization=n' | 275 | - Execute 'sysctl -w debug.kprobes_optimization=n' |
275 | 276 | ||
277 | 1.5 Blacklist | ||
278 | |||
279 | Kprobes can probe most of the kernel except itself. This means | ||
280 | that there are some functions where kprobes cannot probe. Probing | ||
281 | (trapping) such functions can cause a recursive trap (e.g. double | ||
282 | fault) or the nested probe handler may never be called. | ||
283 | Kprobes manages such functions as a blacklist. | ||
284 | If you want to add a function into the blacklist, you just need | ||
285 | to (1) include linux/kprobes.h and (2) use NOKPROBE_SYMBOL() macro | ||
286 | to specify a blacklisted function. | ||
287 | Kprobes checks the given probe address against the blacklist and | ||
288 | rejects registering it, if the given address is in the blacklist. | ||
289 | |||
276 | 2. Architectures Supported | 290 | 2. Architectures Supported |
277 | 291 | ||
278 | Kprobes, jprobes, and return probes are implemented on the following | 292 | Kprobes, jprobes, and return probes are implemented on the following |