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: Listing probe alias resolution failures


Quoting David Smith <dsmith@redhat.com>:

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?

I'll file a bug later today. Also, I have found some probes that don't seem to behave correctly when used with that conditional (?) :


$ stap -p2 -u -e 'probe syscall.compat_sys_times {}'
...mismatch...cannot resolve probe point syscall.compat_sys_times

$ stap -p2 -u -e 'probe syscall.compat_sys_times? {}'
...mismatch...cannot resolve probe point syscall.compat_sys_times

Mostly syscall probes, especially syscall.compat_* , and signal.handle_stop is another example.


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