summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2009-04-21 21:21:02 +0200
committerMark Wielaard <mjw@redhat.com>2009-04-21 21:21:02 +0200
commita1e1eec32d27dec37acbc1d65696304abac7ff32 (patch)
tree65931cc528251495337a1a885388e6b1046c68ea
parent192d5136bbfcd1e61c2f17cc52df875a954d24ec (diff)
parent04f659b4cab24ea27dc91b361419bd29e0e73c55 (diff)
downloadsystemtap-steved-a1e1eec32d27dec37acbc1d65696304abac7ff32.tar.gz
systemtap-steved-a1e1eec32d27dec37acbc1d65696304abac7ff32.tar.xz
systemtap-steved-a1e1eec32d27dec37acbc1d65696304abac7ff32.zip
Merge branch 'master' of ssh://sourceware.org/git/systemtap
-rw-r--r--runtime/uprobes2/uprobes.c3
-rw-r--r--stapprobes.3stap.in42
2 files changed, 37 insertions, 8 deletions
diff --git a/runtime/uprobes2/uprobes.c b/runtime/uprobes2/uprobes.c
index 9ea05349..07ad3984 100644
--- a/runtime/uprobes2/uprobes.c
+++ b/runtime/uprobes2/uprobes.c
@@ -2239,7 +2239,8 @@ static u32 uprobe_report_exit(enum utrace_resume_action action,
}
}
up_read(&uproc->rwsem);
- if (utask->state == UPTASK_TRAMPOLINE_HIT)
+ if (utask->state == UPTASK_TRAMPOLINE_HIT ||
+ utask->state == UPTASK_BP_HIT)
uprobe_decref_process(uproc);
}
diff --git a/stapprobes.3stap.in b/stapprobes.3stap.in
index e60a8fe4..b3066611 100644
--- a/stapprobes.3stap.in
+++ b/stapprobes.3stap.in
@@ -412,10 +412,14 @@ contain wildcards, or the probe will not be registered.
Also, statement probes must be run under guru-mode only.
-
.SS USER-SPACE
-Early prototype support for user-space probing is available in the
-form of a non-symbolic probe point:
+Support for user-space probing is available for kernels
+that are configured with the utrace extensions. See
+.SAMPLE
+http://people.redhat.com/roland/utrace/
+.ESAMPLE
+.PP
+There are several forms. First, a non-symbolic probe point:
.SAMPLE
process(PID).statement(ADDRESS).absolute
.ESAMPLE
@@ -427,7 +431,8 @@ no $variables. The target PID parameter must identify a running
process, and ADDRESS should identify a valid instruction address.
All threads of that process will be probed.
.PP
-Additional user-space probing is available in the following forms:
+Second, non-symbolic user-kernel interface events handled by
+utrace may be probed:
.SAMPLE
process(PID).begin
process("PATH").begin
@@ -451,7 +456,6 @@ process(PID).insn
process("PATH").insn
process(PID).insn.block
process("PATH").insn.block
-process("PATH").mark("LABEL")
.ESAMPLE
.PP
A
@@ -490,6 +494,15 @@ probe gets called for every single-stepped instruction of the process described
A
.B .insn.block
probe gets called for every block-stepped instruction of the process described by PID or PATH.
+
+.PP
+Third, symbolic static instrumentation compiled into programs and
+shared libraries may be
+probed:
+.SAMPLE
+process("PATH").mark("LABEL")
+.ESAMPLE
+.PP
A
.B .mark
probe gets called via a static probe which is defined in the
@@ -501,14 +514,29 @@ for probes with 2 arguments, and so on.
The arguments of the probe are available in the context variables
$arg1, $arg2, ... An alternative to using the STAP_PROBE macros is to
use the dtrace script to create custom macros.
+
.PP
-Note that
+Finally, full symbolic source-level probes in user-space programs
+and shared libraries are supported. These are exactly analogous
+to the symbolic DWARF-based kernel/module probes described above,
+and expose similar contextual $-variables.
+.SAMPLE
+process("PATH").function("NAME")
+process("PATH").statement("*@FILE.c:123")
+process("PATH").function("*").return
+process("PATH").function("myfun").label("foo")
+.ESAMPLE
+
+.PP
+Note that for all process probes,
.I PATH
names refer to executables that are searched the same way shells do: relative
to the working directory if they contain a "/" character, otherwise in
.BR $PATH .
If a process probe is specified without a PID or PATH, all user
-threads are probed.
+threads are probed. PATH may sometimes name a shared library
+in which case all processes that map that shared library may be
+probed.
.SS PROCFS