This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Userspace probes on library functions ?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]