This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Userspace probes on library functions ?
On Fri, 2010-10-22 at 09:43 +0100, Daniel P. Berrange wrote:
> On Thu, Oct 21, 2010 at 07:34:39PM +0200, Mark Wielaard wrote:
> > 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.
Frank just added basic process("/path/*/glob") support to git that
should probably take care of it when you write it as:
probe process("/usr/lib*/libvirt.so.0")
With the latest release you can do something like:
probe process("/usr/lib/libvirt.so.0").function("virConnectOpen")?,
process("/usr/lib64/libvirt.so.0").function("virConnectOpen")?
{
printf("Open %p\n", $name);
}
Which makes each probe point optional, so it matches either or both.
Cheers,
Mark