public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: David Smith <dsmith@redhat.com>
To: patm@pdx.edu
Cc: systemtap@sources.redhat.com
Subject: Re: Listing probe alias resolution failures
Date: Wed, 16 May 2007 17:23:00 -0000	[thread overview]
Message-ID: <464B3DFC.60506@redhat.com> (raw)
In-Reply-To: <20070516095817.4iq72cr8lpz448oo@webmail.pdx.edu>

patm@pdx.edu wrote:
> Quoting David Smith <dsmith@redhat.com>:
>> The only thing that doesn't work is:
>>
>> # stap -p2 -u -e 'probe syscall.compat_getitimer {}'
>>
>> So, the only error I get is when I explicitly list the system call that
>> doesn't exist on my current arch and kernel.  I could see where if you
>> were writing a script targeting either multiple architectures or
>> multiple kernel versions that might bother you.  However, the solution
>> is easy - make that probe optional:
>>
>> # stap -p2 -u -e 'probe syscall.compat_getitimer ? { }'
> 
> Very nice, I had no idea that you could do this to a probe alias. But, 
> and I don't know if this is intended or not, it still fails on certain 
> errors:
> 
> $ stap -p2 -u -e 'probe vm.mmap ? { }'
> semantic error: failed to retrieve location attribute for local 'addr' 
> (dieoffset: 0xb84881): identifier '$addr' at 

Hmm.

Here I've got good news and bad news.  The good news is that if you take 
away the '-u', then your example works (since the optimizer removes 
references to the variables that aren't read).

The bad news is that if you reference the local variable version of the 
function's parameters in your optional probe, it errors out, like this:

# stap -p2 -e 'probe vm.mmap ? { printf("%p %d\n", address, length) }'
semantic error: failed to retrieve location attribute for local 'addr' 
(dieoffset: 0xbf6524): identifier '$addr' at 
/usr/local/share/systemtap/tapset/memory.stp:118:15
...

Here it seems like we should be able to discard the probe before trying 
to look up its parameters.

Could you file a bugzilla on this so we don't forget to look at this?

-- 
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)

  reply	other threads:[~2007-05-16 17:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-15 21:14 patm
2007-05-15 21:33 ` David Smith
2007-05-15 22:02   ` patm
2007-05-15 22:16   ` Mike Mason
2007-05-16 13:47     ` David Smith
2007-05-15 22:21   ` patm
2007-05-16 14:12     ` David Smith
2007-05-16 16:58       ` patm
2007-05-16 17:23         ` David Smith [this message]
2007-05-16 18:54           ` patm
2007-05-16 18:54           ` Frank Ch. Eigler
2007-05-16 20:18             ` David Smith
2007-05-16 20:30               ` Frank Ch. Eigler
2007-05-16 21:20                 ` David Smith
2007-05-16 21:59                   ` Frank Ch. Eigler
2007-05-18 20:05                     ` David Smith
2007-05-19  0:27                       ` Stone, Joshua I
2007-05-19 16:11                         ` Frank Ch. Eigler
2007-05-17  0:09                   ` Mike Mason

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=464B3DFC.60506@redhat.com \
    --to=dsmith@redhat.com \
    --cc=patm@pdx.edu \
    --cc=systemtap@sources.redhat.com \
    /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).