diff options
author | Masami Hiramatsu <mhiramat@redhat.com> | 2009-11-03 19:12:47 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-11-04 07:02:48 -0500 |
commit | 77b44d1b7c28360910cdbd427fb62d485c08674c (patch) | |
tree | 00db4f966b488abb88e5f3884ab2635e06f3f1d6 /Documentation/trace/kprobetrace.txt | |
parent | 91365bbe4f8c39a821f390f785d606304d6dee3c (diff) |
tracing/kprobes: Rename Kprobe-tracer to kprobe-event
Rename Kprobes-based event tracer to kprobes-based tracing event
(kprobe-event), since it is not a tracer but an extensible
tracing event interface.
This also changes CONFIG_KPROBE_TRACER to CONFIG_KPROBE_EVENT
and sets it y by default.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Jim Keniston <jkenisto@us.ibm.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Frank Ch. Eigler <fche@redhat.com>
Cc: Jason Baron <jbaron@redhat.com>
Cc: K.Prasad <prasad@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
LKML-Reference: <20091104001247.3454.14131.stgit@harusame>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'Documentation/trace/kprobetrace.txt')
-rw-r--r-- | Documentation/trace/kprobetrace.txt | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/Documentation/trace/kprobetrace.txt b/Documentation/trace/kprobetrace.txt index 15415243a9a3..47aabeebbdf6 100644 --- a/Documentation/trace/kprobetrace.txt +++ b/Documentation/trace/kprobetrace.txt | |||
@@ -1,26 +1,23 @@ | |||
1 | Kprobe-based Event Tracer | 1 | Kprobe-based Event Tracing |
2 | ========================= | 2 | ========================== |
3 | 3 | ||
4 | Documentation is written by Masami Hiramatsu | 4 | Documentation is written by Masami Hiramatsu |
5 | 5 | ||
6 | 6 | ||
7 | Overview | 7 | Overview |
8 | -------- | 8 | -------- |
9 | This tracer is similar to the events tracer which is based on Tracepoint | 9 | These events are similar to tracepoint based events. Instead of Tracepoint, |
10 | infrastructure. Instead of Tracepoint, this tracer is based on kprobes(kprobe | 10 | this is based on kprobes (kprobe and kretprobe). So it can probe wherever |
11 | and kretprobe). It probes anywhere where kprobes can probe(this means, all | 11 | kprobes can probe (this means, all functions body except for __kprobes |
12 | functions body except for __kprobes functions). | 12 | functions). Unlike the Tracepoint based event, this can be added and removed |
13 | dynamically, on the fly. | ||
13 | 14 | ||
14 | Unlike the function tracer, this tracer can probe instructions inside of | 15 | To enable this feature, build your kernel with CONFIG_KPROBE_TRACING=y. |
15 | kernel functions. It allows you to check which instruction has been executed. | ||
16 | 16 | ||
17 | Unlike the Tracepoint based events tracer, this tracer can add and remove | 17 | Similar to the events tracer, this doesn't need to be activated via |
18 | probe points on the fly. | 18 | current_tracer. Instead of that, add probe points via |
19 | 19 | /sys/kernel/debug/tracing/kprobe_events, and enable it via | |
20 | Similar to the events tracer, this tracer doesn't need to be activated via | 20 | /sys/kernel/debug/tracing/events/kprobes/<EVENT>/enabled. |
21 | current_tracer, instead of that, just set probe points via | ||
22 | /sys/kernel/debug/tracing/kprobe_events. And you can set filters on each | ||
23 | probe events via /sys/kernel/debug/tracing/events/kprobes/<EVENT>/filter. | ||
24 | 21 | ||
25 | 22 | ||
26 | Synopsis of kprobe_events | 23 | Synopsis of kprobe_events |
@@ -55,9 +52,9 @@ Per-Probe Event Filtering | |||
55 | ------------------------- | 52 | ------------------------- |
56 | Per-probe event filtering feature allows you to set different filter on each | 53 | Per-probe event filtering feature allows you to set different filter on each |
57 | probe and gives you what arguments will be shown in trace buffer. If an event | 54 | probe and gives you what arguments will be shown in trace buffer. If an event |
58 | name is specified right after 'p:' or 'r:' in kprobe_events, the tracer adds | 55 | name is specified right after 'p:' or 'r:' in kprobe_events, it adds an event |
59 | an event under tracing/events/kprobes/<EVENT>, at the directory you can see | 56 | under tracing/events/kprobes/<EVENT>, at the directory you can see 'id', |
60 | 'id', 'enabled', 'format' and 'filter'. | 57 | 'enabled', 'format' and 'filter'. |
61 | 58 | ||
62 | enabled: | 59 | enabled: |
63 | You can enable/disable the probe by writing 1 or 0 on it. | 60 | You can enable/disable the probe by writing 1 or 0 on it. |
@@ -71,6 +68,7 @@ filter: | |||
71 | id: | 68 | id: |
72 | This shows the id of this probe event. | 69 | This shows the id of this probe event. |
73 | 70 | ||
71 | |||
74 | Event Profiling | 72 | Event Profiling |
75 | --------------- | 73 | --------------- |
76 | You can check the total number of probe hits and probe miss-hits via | 74 | You can check the total number of probe hits and probe miss-hits via |