On Fri, 29 Jun 2012 13:16:47 -0700
Yuri <y...@rawbw.com> wrote:

<SKIP>
> #  Declare DTrace script
> #
>   if ($COUNT) {          # aggregate style
> $dtrace = <<END;
> /usr/sbin/dtrace -n '
>          #pragma D option quiet
>          syscall:::return
>          /errno != 0 && pid != \$pid $FILTER/
>          {
>                  \@Errs[execname, probefunc, errno] = count();
>          }
>          dtrace:::END {
>                  printa("%s %s %d %\@d\\n", \@Errs);
>          }'
> END

Pardon my possibly naive question, but isn't using errno to detect
whether the syscall is succesful a wrong techique? Syscall will NOT
change errno unless unless it actually failed, so unless dtrace's errno
emulation is more magic than I thought, your script will mistakenly
attribute error code coming from a distant past to syscalls just
complete with no errors?
-- 
Alexander Kabaev

Attachment: signature.asc
Description: PGP signature

Reply via email to