diff options
author | Masami Hiramatsu <mhiramat@redhat.com> | 2009-10-07 18:27:59 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2009-10-12 17:30:29 -0400 |
commit | 2e06ff6389aedafc4a3a374344ac70672252f9b5 (patch) | |
tree | ec7c36f2da4e0a341da4ec79ac9aecfcb5a902af /Documentation/trace | |
parent | 99329c44f28a1b7ac83beebfb4319e612042e319 (diff) |
tracing/kprobes: Make special variable names more self-explainable
Rename special variables to more self-explainable names as below:
- $rv to $retval
- $sa to $stack
- $aN to $argN
- $sN to $stackN
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Jim Keniston <jkenisto@us.ibm.com>
Cc: Frank Ch. Eigler <fche@redhat.com>
LKML-Reference: <20091007222759.1684.3319.stgit@dhcp-100-2-132.bos.redhat.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'Documentation/trace')
-rw-r--r-- | Documentation/trace/kprobetrace.txt | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Documentation/trace/kprobetrace.txt b/Documentation/trace/kprobetrace.txt index 4208253b5a53..15415243a9a3 100644 --- a/Documentation/trace/kprobetrace.txt +++ b/Documentation/trace/kprobetrace.txt | |||
@@ -35,13 +35,13 @@ Synopsis of kprobe_events | |||
35 | MEMADDR : Address where the probe is inserted. | 35 | MEMADDR : Address where the probe is inserted. |
36 | 36 | ||
37 | FETCHARGS : Arguments. Each probe can have up to 128 args. | 37 | FETCHARGS : Arguments. Each probe can have up to 128 args. |
38 | %REG : Fetch register REG | 38 | %REG : Fetch register REG |
39 | @ADDR : Fetch memory at ADDR (ADDR should be in kernel) | 39 | @ADDR : Fetch memory at ADDR (ADDR should be in kernel) |
40 | @SYM[+|-offs] : Fetch memory at SYM +|- offs (SYM should be a data symbol) | 40 | @SYM[+|-offs] : Fetch memory at SYM +|- offs (SYM should be a data symbol) |
41 | $sN : Fetch Nth entry of stack (N >= 0) | 41 | $stackN : Fetch Nth entry of stack (N >= 0) |
42 | $sa : Fetch stack address. | 42 | $stack : Fetch stack address. |
43 | $aN : Fetch function argument. (N >= 0)(*) | 43 | $argN : Fetch function argument. (N >= 0)(*) |
44 | $rv : Fetch return value.(**) | 44 | $retval : Fetch return value.(**) |
45 | +|-offs(FETCHARG) : Fetch memory at FETCHARG +|- offs address.(***) | 45 | +|-offs(FETCHARG) : Fetch memory at FETCHARG +|- offs address.(***) |
46 | NAME=FETCHARG: Set NAME as the argument name of FETCHARG. | 46 | NAME=FETCHARG: Set NAME as the argument name of FETCHARG. |
47 | 47 | ||
@@ -84,13 +84,13 @@ Usage examples | |||
84 | To add a probe as a new event, write a new definition to kprobe_events | 84 | To add a probe as a new event, write a new definition to kprobe_events |
85 | as below. | 85 | as below. |
86 | 86 | ||
87 | echo p:myprobe do_sys_open dfd=$a0 filename=$a1 flags=$a2 mode=$a3 > /sys/kernel/debug/tracing/kprobe_events | 87 | echo p:myprobe do_sys_open dfd=$arg0 filename=$arg1 flags=$arg2 mode=$arg3 > /sys/kernel/debug/tracing/kprobe_events |
88 | 88 | ||
89 | This sets a kprobe on the top of do_sys_open() function with recording | 89 | This sets a kprobe on the top of do_sys_open() function with recording |
90 | 1st to 4th arguments as "myprobe" event. As this example shows, users can | 90 | 1st to 4th arguments as "myprobe" event. As this example shows, users can |
91 | choose more familiar names for each arguments. | 91 | choose more familiar names for each arguments. |
92 | 92 | ||
93 | echo r:myretprobe do_sys_open $rv >> /sys/kernel/debug/tracing/kprobe_events | 93 | echo r:myretprobe do_sys_open $retval >> /sys/kernel/debug/tracing/kprobe_events |
94 | 94 | ||
95 | This sets a kretprobe on the return point of do_sys_open() function with | 95 | This sets a kretprobe on the return point of do_sys_open() function with |
96 | recording return value as "myretprobe" event. | 96 | recording return value as "myretprobe" event. |
@@ -137,11 +137,11 @@ events, you need to enable it. | |||
137 | # TASK-PID CPU# TIMESTAMP FUNCTION | 137 | # TASK-PID CPU# TIMESTAMP FUNCTION |
138 | # | | | | | | 138 | # | | | | | |
139 | <...>-1447 [001] 1038282.286875: myprobe: (do_sys_open+0x0/0xd6) dfd=3 filename=7fffd1ec4440 flags=8000 mode=0 | 139 | <...>-1447 [001] 1038282.286875: myprobe: (do_sys_open+0x0/0xd6) dfd=3 filename=7fffd1ec4440 flags=8000 mode=0 |
140 | <...>-1447 [001] 1038282.286878: myretprobe: (sys_openat+0xc/0xe <- do_sys_open) $rv=fffffffffffffffe | 140 | <...>-1447 [001] 1038282.286878: myretprobe: (sys_openat+0xc/0xe <- do_sys_open) $retval=fffffffffffffffe |
141 | <...>-1447 [001] 1038282.286885: myprobe: (do_sys_open+0x0/0xd6) dfd=ffffff9c filename=40413c flags=8000 mode=1b6 | 141 | <...>-1447 [001] 1038282.286885: myprobe: (do_sys_open+0x0/0xd6) dfd=ffffff9c filename=40413c flags=8000 mode=1b6 |
142 | <...>-1447 [001] 1038282.286915: myretprobe: (sys_open+0x1b/0x1d <- do_sys_open) $rv=3 | 142 | <...>-1447 [001] 1038282.286915: myretprobe: (sys_open+0x1b/0x1d <- do_sys_open) $retval=3 |
143 | <...>-1447 [001] 1038282.286969: myprobe: (do_sys_open+0x0/0xd6) dfd=ffffff9c filename=4041c6 flags=98800 mode=10 | 143 | <...>-1447 [001] 1038282.286969: myprobe: (do_sys_open+0x0/0xd6) dfd=ffffff9c filename=4041c6 flags=98800 mode=10 |
144 | <...>-1447 [001] 1038282.286976: myretprobe: (sys_open+0x1b/0x1d <- do_sys_open) $rv=3 | 144 | <...>-1447 [001] 1038282.286976: myretprobe: (sys_open+0x1b/0x1d <- do_sys_open) $retval=3 |
145 | 145 | ||
146 | 146 | ||
147 | Each line shows when the kernel hits an event, and <- SYMBOL means kernel | 147 | Each line shows when the kernel hits an event, and <- SYMBOL means kernel |