<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:x="urn:schemas-microsoft-com:office:excel" 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=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        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:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
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="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">More data on different compression levels will be good.  In this case we're compressing fairly consistent looking input data (a DWARF section) so I think we
 stand a good chance of being able to pick a very reasonable level.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I cringe at the thought of yet another user-facing knob, though.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">--paulr<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></a></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> llvm-dev [mailto:llvm-dev-bounces@lists.llvm.org]
<b>On Behalf Of </b>James Henderson via llvm-dev<br>
<b>Sent:</b> Thursday, August 02, 2018 6:32 AM<br>
<b>To:</b> Pavel Labath<br>
<b>Cc:</b> LLVM Dev<br>
<b>Subject:</b> Re: [llvm-dev] Default compression level for -compress-debug-info=zlib?<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Also not an expert, but would it make sense for this to be configurable at a fine-grained level, perhaps with another option, or an extension to the compress-debug-sections switch interface? That way users who care about the finer details
 can configure it themselves. And we should pick sensible options for the default.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">James<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On 2 August 2018 at 11:08, Pavel Labath via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<o:p></o:p></p>
<p class="MsoNormal">I don't claim to be an expert, but I did some zlib compression<br>
benchmarks in the past. IIRC, my conclusion from that was that the<br>
"DEFAULT" zlib level (6) is indeed a very good default for a lot of<br>
cases -- it does not generate much larger outputs, while being<br>
significantly faster than the max level. This all depends on the data<br>
set and what you intend to do with the resulting data, of course, but<br>
I guess my point is you don't have to choose only between 1 and 9. I<br>
think it would be interesting to at least get the data for the default<br>
level before making choice.<br>
<br>
cheers,<br>
pl<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">On Thu, 2 Aug 2018 at 01:57, Rui Ueyama via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br>
><br>
> Folks,<br>
><br>
> I'd like to get expert's opinion on which compression level is suitable for lld's -compress-debug-section=zlib option, which let the linker compress .debug_* sections using zlib.<br>
><br>
> Currently, lld uses compression level 9 which produces the smallest output in exchange for a longer link time. My question is, is this what people actually want? We didn't consciously choose compression level 9. That was just the default compression level
 for zlib::compress function.<br>
><br>
> For an experiment, I created a patch to use compression level 1 instead of 9 and linked clang using that modified lld. By default, lld takes 1m4s to link clang with --compress-debug-sections=zlib. With that patch, it took only 31s.<br>
><br>
> Here is a comparison of clang executable size with various configurations:<br>
><br>
> no debug sections:    275 MB<br>
> level 9 compression:  855 MB<br>
> level 1 compression:  922 MB<br>
> no compression:      2044 MB<br>
><br>
> Given that the best compression takes significantly longer time than the fastest compression, we probably should change the default to level 1. Any objections?<br>
><br>
> I wonder what is the best compression level when -O2 is passed to lld. We could use level 9 when -O2 is passed, but is there any reason to compress debug sections that hard in the first place?<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal">> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</body>
</html>