This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[PATCH v2 2/3] initscript: copy uprobes.ko to cache directory
- 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>, Masami Hiramatsu <masami dot hiramatsu dot pt at hitachi dot com>, Stefan Hajnoczi <stefanha at redhat dot com>
- Date: Mon, 11 Aug 2014 14:25:22 +0100
- Subject: [PATCH v2 2/3] initscript: copy uprobes.ko to cache directory
- Authentication-results: sourceware.org; auth=none
- References: <1407763523-30556-1-git-send-email-stefanha at redhat dot com>
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