This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH v2 3/3] initscript: allow scripts to load uprobes


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 | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/initscript/systemtap.in b/initscript/systemtap.in
index ebd28e4..d61d480 100755
--- a/initscript/systemtap.in
+++ b/initscript/systemtap.in
@@ -422,6 +422,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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]