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


>> 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.

The script is now:

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

Unfortunately, stap cannot compile it because:
Pass 1: parsed user script and 44 library script(s) in 270usr/40sys/715real ms.
semantic error: invalid target symbol for utrace probe, $syscall
expected: identifier '$return' at tracing.stp:3:32 while resolving
probe point process.syscall.return
semantic error: no probes found
Pass 2: analyzed script: 0 probe(s), 0 function(s), 0 embed(s), 0
global(s) in 10usr/0sys/66real ms.
Pass 2: analysis failed.  Try again with more '-v' (verbose) options.

Judging from the source code of
utrace_var_expanding_copy_visitor::visit_target_symbol at
tapsets.cxx:5922 it seams that there is currently no support for
"$return".

Can I use returnval() for the same purpose? I tested it and the output
made sense.

Thanks,
      Martin
-- 
Martin SÃÃkraut
Dresden University of Technology,
Computer Science Department
Systems Engineering Group (Heinz-Nixdorf-Endowment)
Dresden, Germany
http://wwwse.inf.tu-dresden.de

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