<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:70.85pt 70.85pt 56.7pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Dear All,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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”).
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">               cd strace-4.15<o:p></o:p></p>
<p class="MsoNormal">               patch -p1 <strace-4.15i1.patch<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Note 2: automake would not run on my system, therefore the patch has both Makefile.in and Makefile.am. The latter was  not tested.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Best regards,<o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;mso-fareast-language:EN-GB">Burkhard Kohl<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><a href="mailto:Burkhard.Kohl@intel.com"><span style="font-size:8.0pt;font-family:"Times New Roman",serif;color:blue;mso-fareast-language:EN-GB">mailto:Burkhard.Kohl@intel.com</span></a><span style="font-size:8.0pt;font-family:"Verdana",sans-serif;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt;font-family:"Verdana",sans-serif;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt;font-family:"Verdana",sans-serif;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Intel Deutschland GmbH<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Tel: +49 89 99 8853-0,
</span><a href="http://www.intel.de"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">www.intel.de</span></a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p><font style="font-size: 9px;">Intel Deutschland GmbH<br>
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany<br>
Tel: +49 89 99 8853-0, www.intel.de<br>
Managing Directors: Christin Eisenschmid, Christian Lamprechter<br>
Chairperson of the Supervisory Board: Nicole Lau<br>
Registered Office: Munich<br>
Commercial Register: Amtsgericht Muenchen HRB 186928</font><br>
</p>
</body>
</html>