public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mjw@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: systemtap@sourceware.org
Subject: Re: Userspace probes on library functions ?
Date: Thu, 21 Oct 2010 17:34:00 -0000	[thread overview]
Message-ID: <1287682479.2599.53.camel@springer.wildebeest.org> (raw)
In-Reply-To: <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

  reply	other threads:[~2010-10-21 17:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-21 16:20 Daniel P. Berrange
2010-10-21 17:34 ` Mark Wielaard [this message]
2010-10-22  8:43   ` Daniel P. Berrange
2010-10-22  9:34     ` Mark Wielaard
2010-10-21 17:58 ` Steve Fink
2010-10-22  8:46   ` Daniel P. Berrange

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1287682479.2599.53.camel@springer.wildebeest.org \
    --to=mjw@redhat.com \
    --cc=berrange@redhat.com \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).