This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: new syscall tapset checked in, but needs work
hunt wrote:
> [...]
> rc = _stp_copy_from_user (THIS->__retvalue,
> [...] THIS->addr,
> num);
If, as appears from the runtime sources, this particular function is
not atomic, then it should not be called from an atomic probe handler.
Here is a more compact version of your final probe:
probe strace.* {
if (pid() != target()) next
if (returnp) {
if (argstr != "") printf("%s(%s) = %d\n", name, argstr, returnval())
else printf("%d\n", returnval())
} else if (argstr != "")
printf("%s(%s) = ", name, argstr)
}
> [...]Output looks like this:
>
> > stap -c ps -g strace.stp
> open("/etc/ld.so.cache", O_RDONLY) = 4
> open("/lib/libtermcap.so.2", O_RDONLY) = 4
> read(4, [.ELF....................`K#.4.], 30) = 512
> [...]
Neato.
- FChE