This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: How to track the functions in self-written module using SystemTap?
- From: David Smith <dsmith at redhat dot com>
- To: Nan Xiao <xiaonan830818 at gmail dot com>
- Cc: "Frank Ch. Eigler" <fche at redhat dot com>, systemtap at sourceware dot org
- Date: Wed, 2 Dec 2015 15:42:44 -0600
- Subject: Re: How to track the functions in self-written module using SystemTap?
- Authentication-results: sourceware.org; auth=none
- References: <CA+MhoaPMSTgpHCDjNhwcDkMaLryLy+F6tH6HNcrvDDF9bEbBbg at mail dot gmail dot com> <564B5A4C dot 1080302 at redhat dot com> <CA+MhoaNG0hENo=cnOrxogX2qofdQodh-sY7mbKoZabn+L5GgFg at mail dot gmail dot com> <564CD3C1 dot 2090900 at redhat dot com> <CA+MhoaPxCC1_CH86A7SuXaoNEJyzaRvv2wpha8shF4V8T9WeOQ at mail dot gmail dot com> <CA+MhoaPGgWuVCEnW8p6cvbN_6qFE1jeDjz+pYtDuCbL00b5Ong at mail dot gmail dot com> <564DE376 dot 3020104 at redhat dot com> <CA+MhoaPCnkDp=A8KD19g1J+Gu91Z=+re09i8xgbg8=DW++uegQ at mail dot gmail dot com> <565CC50B dot 90104 at redhat dot com> <CA+MhoaPHi6ORfgTtWu_Z09zLAcgaAEPO10vWFi1kNhvsS5V0Ow at mail dot gmail dot com> <y0mk2oync6p dot fsf at fche dot csb> <CA+MhoaO9kbLCWJ4S3jSGxW2gr=TW8fGhZ8znG5pX5dXzLLoh6Q at mail dot gmail dot com> <565DCA83 dot 6040102 at redhat dot com> <CA+MhoaOc18xQ0aa4e7uiKwVy6oEwHs-1GuP3pPPLyNtXyQA2nQ at mail dot gmail dot com>
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)