[strace-4.15] Proposal: Output Staging for -z Option (print successful syscalls only) / Patch included

Kohl, Burkhard burkhard.kohl at intel.com
Tue Jan 17 09:35:54 UTC 2017


Dear All,

I like to propose a change to strace version 4.15 that re-enacts the currently hidden -z option for output filtering ("print successful syscalls only").

Please find attached a patch file against 4.15 release that implements a staging approach, i.e. builds output in memory but prints successful syscalls only when the -z option was given on the cmdline. The implementation is based on the STDIO library function open_memstream(); since it might not be available all every target system, respective code sections were guarded with "#ifdef _GNU_SOURCE" directives. To apply the patchfile:

               cd strace-4.15
               patch -p1 <strace-4.15i1.patch

Note 1: Since the syserror macro (defined in defs.h) does not distinguish between failed and not-returned, the "exit_group()" syscall will be filtered as well with -z.

Note 2: automake would not run on my system, therefore the patch has both Makefile.in and Makefile.am. The latter was  not tested.

Best regards,
Burkhard Kohl
mailto:Burkhard.Kohl at intel.com


Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de<http://www.intel.de>

Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20170117/6a757284/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: strace-4.15i1.patch.tgz
Type: application/x-compressed
Size: 7187 bytes
Desc: strace-4.15i1.patch.tgz
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20170117/6a757284/attachment.bin>


More information about the Strace-devel mailing list