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

Dmitry V. Levin ldv at altlinux.org
Tue Jan 17 19:48:29 UTC 2017


On Tue, Jan 17, 2017 at 09:35:54AM +0000, Kohl, Burkhard wrote:
> 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").

Thanks.  As strace is developed in git, please rebase your changes to HEAD
of strace.git; also please ensure that your patch does not contain
irrelevant changes, e.g. changes of indentation.  See also

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

The use of AC_USE_SYSTEM_EXTENSIONS macro results to _GNU_SOURCE being
defined unconditionally, so all _GNU_SOURCE checks are useless.
If you need to make some code conditional depending on open_memstream
availability, add this name to AC_CHECK_FUNCS and check for

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

Is it the desired behavior or known deficiency of new -z option?

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

There are no known issues with bootstrap script, please use it
instead of running automake manually.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20170117/bd34a4ff/attachment.bin>

More information about the Strace-devel mailing list