[PATCH v3] decode extend getsockopt/setsockopt options
Mike Frysinger
vapier at gentoo.org
Thu Aug 20 13:22:08 UTC 2015
On 20 Aug 2015 14:42, Dmitry V. Levin wrote:
> On Wed, Aug 19, 2015 at 01:29:27PM -0400, Mike Frysinger wrote:
> > * util.c (printxval): Rename to ...
> > (printxvals): ... this. Rewrite to be varargs based.
>
> OK, let's have two separate functions so that
> the most frequent use case won't be penalized.
so i made a small file:
main() { int i; for (i = 0; i < 1000000; ++i) arch_prctl(0, 0); }
then i ran it like so:
$ time strace -o /dev/null ./a.out
i didn't observe significant diff in speed between two funcs and one varargs.
the new version took 17.510s on average while the old one took 17.478s. that's
like 30ns per syscall. i think we can live with that ;).
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20150820/1efb8c42/attachment.bin>
More information about the Strace-devel
mailing list