This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Probingof syscall.*.return fails
- From: "Martin SÃÃkraut" <martin dot suesskraut at googlemail dot com>
- To: "Frank Ch. Eigler" <fche at redhat dot com>
- Cc: systemtap at sourceware dot org
- Date: Wed, 10 Sep 2008 00:43:48 +0200
- Subject: Re: Probingof syscall.*.return fails
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=0z13d5rlrDwuu8R1g2PANzOSGH2vS2kaSllWgrTYg4Y=; b=L1u5fJneBQlcxGaXsYRfM+2q26CyFN2ptb8bZDSaCXmTbLcVkofh429V1/1Cb1mQRa u/E+UphoO5MukbKzCT2uxhkwvJIDx1x+MZbsSunzoqRPdefwB5qSTQVaRlsNVmWyiZcq fXhJcmogf8y/AYWN/9e/YNAiAvLr3HQa4s30U=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=klDSrMESwnnLF+YxWrdTdeV5OcfS+8K8oxpUMa5b4wXvJ6Xym1pGdfh2x3Ktwu2lle 45M7oDKw7UzLjjflpNuq/qklN5IhYoQ7icEEtNYoxHFK1Dq1+xYD4cghuNVAp667bTSx nfcU/3KmEL1dfWtn2GuRJLz+rLFQGw87QqDLs=
- References: <16fcdbda0809090917n62a9addua55d2383e83d2e57@mail.gmail.com> <y0mhc8pnjun.fsf@ton.toronto.redhat.com>
>> 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