From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29374 invoked by alias); 2 Dec 2015 21:42:48 -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 29358 invoked by uid 89); 2 Dec 2015 21:42:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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; Wed, 02 Dec 2015 21:42:46 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id BE599C0B0203; Wed, 2 Dec 2015 21:42:45 +0000 (UTC) Received: from t540p.usersys.redhat.com (dhcp-10-15-1-6.hsv.redhat.com [10.15.1.6]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tB2LgiqW029941 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 2 Dec 2015 16:42:45 -0500 Subject: Re: How to track the functions in self-written module using SystemTap? To: Nan Xiao References: <564B5A4C.1080302@redhat.com> <564CD3C1.2090900@redhat.com> <564DE376.3020104@redhat.com> <565CC50B.90104@redhat.com> <565DCA83.6040102@redhat.com> Cc: "Frank Ch. Eigler" , systemtap@sourceware.org From: David Smith Message-ID: <565F65D4.4050005@redhat.com> Date: Wed, 02 Dec 2015 21:42:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-q4/txt/msg00225.txt.bz2 On 12/01/2015 08:22 PM, Nan Xiao wrote: >> Hmm. OK, let's try a couple more things: > >> 1) It could be that systemtap is missing the module load somehow. So, >> try this: > >> - load the module >> - run stap >> - exercise the module >> - unload the module >> - kill stap > > Still outputs nothing. Can you do the same thing here and add '-DDEBUG_KPROBES' to the stap command and show us the output? >> 2) It looks like you are running the rpm version. Can you install the >> systemtap-testsuite rpm and try the following (as root): > >> # cd /usr/share/systemtap/testsuite >> # make installcheck RUNTESTFLAGS="modules_out_of_tree.exp kmodule.exp" > >> That should run 2 testcases that test out-of-tree modules and in-tree >> modules. > > The output likes this: > > # make installcheck RUNTESTFLAGS="modules_out_of_tree.exp kmodule.exp" ... stuff deleted ... > spawn -ignore SIGHUP gcc hello.c -g -m32 -lm -o hello-m32 > /usr/bin/ld: skipping incompatible > /usr/lib/gcc/x86_64-redhat-linux/4.8.2/libgcc_s.so when searching for > -lgcc_s > /usr/bin/ld: cannot find -lgcc_s > collect2: error: ld returned 1 exit status > > > > **** failed gcc m32 smoke test: > > /usr/bin/ld: cannot find -lgcc_s > collect2: error: ld returned 1 exit status > > Please install libgcc and glibc development packages for m32 The testsuite checks a few things before starting, one of them being that gcc can create 32-bit executables on an x86_64 system. If you want to proceed further here, you'll have to do the following: # yum install glibc.i686 libgcc.i686 glibc-devel.i686 libstdc++-devel.i686 -- David Smith dsmith@redhat.com Red Hat http://www.redhat.com 256.217.0141 (direct) 256.837.0057 (fax)