Listing probe alias resolution failures

David Smith dsmith@redhat.com
Wed May 16 17:23:00 GMT 2007


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)



More information about the Systemtap mailing list