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 2/3] initscript: copy uprobes.ko to cache directory


If the uprobes.ko module was built then it will be needed at staprun
time.  Copy the module into the cache directory alongside compiled
scripts.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 initscript/systemtap.in | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/initscript/systemtap.in b/initscript/systemtap.in
index 2d770e4..ebd28e4 100755
--- a/initscript/systemtap.in
+++ b/initscript/systemtap.in
@@ -403,6 +403,8 @@ get_compile_opts () { # opts
        skip=1 ;;
     -h|-V|-k|-F)
       ;;
+    -u)
+      echo -n "--save-uprobes " ;;
     *)
       echo -n $o" " ;;
     esac
@@ -492,6 +494,13 @@ compile_script () { # script checkcache
   logex $STAP -m "$1" -p4 -r $KRELEASE $opts "$f"
   ret=$?
   if [ $ret -eq 0 ]; then
+    if [ -f "uprobes/uprobes.ko" ]; then
+      logex mkdir -p "$CACHE_PATH/uprobes"
+      logex mv "uprobes/uprobes.ko" "$CACHE_PATH/uprobes/"
+      ret=$?
+    fi
+  fi
+  if [ $ret -eq 0 ]; then
     $UNAME -a > "$1.opts"
     echo $opts >> "$1.opts"
     logex mv "$1.ko" "$1.opts" "$CACHE_PATH/"
-- 
1.9.3


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