Probingof syscall.*.return fails

Masami Hiramatsu mhiramat@redhat.com
Wed Sep 10 03:42:00 GMT 2008


Hi Martin,

Martin Süßkraut wrote:
>>> Do you have any suggestions how to probe syscall.*.return?
>> One possibility is to get away from kprobes and use the utrace-based
>> probes:
>>
>>   function iserr () { ... }
>>   probe process.syscall { if (iserr ($return)) ... }
>>
>> ... but this syntax requires newer than released 0.7 code.  Are you
>> willing to try building your own systemtap binary?
> I'm doing this anyway. I switched to the latest snapshot
> (cec7293bd301b4737da7abe8d1b70b9689fd3f00) from Sept. 6th.

I just push $return hack into git tree this evening,
could you try it?

> 
> The script is now:
> 
> probe process.syscall.return {
>     if (target() == pid())
> 	printf ("%d: %d\n", $syscall, $return)
> }

It will work. Note, AFAIK, rt_sigreturn() don't return
correct $syscall number in .return probe (because this
system call is very special, it breaks its context).
please take care of it.

Thank you,

-- 
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division

e-mail: mhiramat@redhat.com



More information about the Systemtap mailing list