From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27484 invoked by alias); 8 Aug 2014 06:33:59 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 27405 invoked by uid 89); 8 Aug 2014 06:33:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 08 Aug 2014 06:33:56 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s786XtN5009530 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 8 Aug 2014 02:33:55 -0400 Received: from localhost (ovpn-112-27.ams2.redhat.com [10.36.112.27]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s786XsYj014794; Fri, 8 Aug 2014 02:33:54 -0400 From: Stefan Hajnoczi To: systemtap@sourceware.org Cc: "Frank Ch. Eigler" , Josh Stone , Jonathan Lebon , Stefan Hajnoczi Subject: [PATCH 2/2] initscript: allow scripts to load uprobes Date: Fri, 08 Aug 2014 06:33:00 -0000 Message-Id: <1407479623-30970-3-git-send-email-stefanha@redhat.com> In-Reply-To: <1407479623-30970-1-git-send-email-stefanha@redhat.com> References: <1407479623-30970-1-git-send-email-stefanha@redhat.com> X-SW-Source: 2014-q3/txt/msg00135.txt.bz2 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 --- 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