This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[PATCH 2/2] initscript: allow scripts to load uprobes
- From: Stefan Hajnoczi <stefanha at redhat dot com>
- To: systemtap at sourceware dot org
- Cc: "Frank Ch. Eigler" <fche at redhat dot com>, Josh Stone <jistone at redhat dot com>, Jonathan Lebon <jlebon at redhat dot com>, Stefan Hajnoczi <stefanha at redhat dot com>
- Date: Fri, 8 Aug 2014 07:33:43 +0100
- Subject: [PATCH 2/2] initscript: allow scripts to load uprobes
- Authentication-results: sourceware.org; auth=none
- References: <1407479623-30970-1-git-send-email-stefanha at redhat dot com>
Scripts that rely on userspace probing must include the -u option in
their conf file:
# cat /etc/systemtap/conf.d/example.conf
example_OPT=-u
The uprobe kernel module will be loaded when the script runs.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
initscript/systemtap.in | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/initscript/systemtap.in b/initscript/systemtap.in
index 7e9c680..1e66694 100755
--- a/initscript/systemtap.in
+++ b/initscript/systemtap.in
@@ -401,7 +401,7 @@ get_compile_opts () { # opts
case $o in
-p|-m|-r|-c|-x|-e|-s|-o|-S)
skip=1 ;;
- -h|-V|-k|-F)
+ -h|-V|-k|-F|-u)
;;
*)
echo -n $o" " ;;
@@ -420,6 +420,12 @@ get_run_opts () { # normalized_opts
show=0
for o in $opts; do
case $o in
+ -u)
+ # Use cached uprobes module, if available
+ if [ -f "$CACHE_PATH/uprobes/uprobes.ko" ]; then
+ echo -n "-u$CACHE_PATH/uprobes/uprobes.ko "
+ fi
+ ;;
-c|-x|-s|-o|-S)
[ $o == '-s' ] && o='-b'
[ $o == '-o' ] && mode='-D'
--
1.9.3