This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Userspace probes on library functions ?
On Thu, Oct 21, 2010 at 07:34:39PM +0200, Mark Wielaard wrote:
> On Thu, 2010-10-21 at 17:20 +0100, Daniel P. Berrange wrote:
> > I'm trying to use userspace probes to trace public API calls into the
> > libvirt.so library. While I can trace functions in the virsh executable
> > without trouble, eg
> >
> > probe process("/usr/bin/virsh").function("vshInit") {
> > printf("init %p", $ctl)
> > }
> >
> > I'm unable to trace functions that are defined in the libvirt.so
> >
> > probe process("/usr/bin/virsh").function("virConnectOpen") {
> > printf("Open %p", $name)
> > }
> >
> > semantic error: no match while resolving probe point process("/usr/bin/virsh").function("virConnectOpen")
>
> You can use the slightly non-intuitive:
>
> probe process("/usr/lib64/libvirt.so.0").function("virConnectOpen") {
> printf("Open %p\n", $name)
> }
Ha, I should have thought of that one! That works, but there's the slight
issue of having to include path (/usr/lib64) in the tapset, because that
prevents it working on i686. I could of course auto-generate the path bit
at build time, but I'm wondering how to make it work on a multilib x86_64
platform where you can have both the 32 & 64 bit libraries installed at
the same time in /usr/lib & /usr/lib64.
Regards,
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|