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: Probingof syscall.*.return fails


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


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