This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Userspace probes on library functions ?
- From: Mark Wielaard <mjw at redhat dot com>
- To: "Daniel P. Berrange" <berrange at redhat dot com>
- Cc: systemtap at sourceware dot org
- Date: Thu, 21 Oct 2010 19:34:39 +0200
- Subject: Re: Userspace probes on library functions ?
- References: <20101021162038.GU27578@redhat.com>
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)
}
> Nor do I seem to be able to use function() matches in combination
> with a library() statement
>
> probe process("/usr/bin/virsh").library("libvirt.so").function("virConnectOpen") {
> printf("Open %s", $name)
> }
>
> semantic error: probe point mismatch at position 2 (alternatives:
> mark(string) provider(string)): keyword at demo.stp:9:55 while
> resolving probe point process("/usr/bin/virsh").library("libvirt.so").function("virConnectOpen")
> source: probe process("/usr/bin/virsh").library("libvirt.so").function("virConnectOpen") {
>
Apparently process().library() probes only work for static markers in
the current translator. Would be nice to extend it to function and
statement too.
Cheers,
Mark