<div class="gmail_extra">Hi!<br><br><div class="gmail_quote">On Thu, Apr 26, 2012 at 12:44 AM, Eric Christopher <span dir="ltr"><<a href="mailto:echristo@apple.com" target="_blank">echristo@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
On Apr 25, 2012, at 4:51 AM, Alexey Samsonov <<a href="mailto:samsonov@google.com">samsonov@google.com</a>> wrote:<br>
<br>
> Hi, cfe-commits!<br>
><br>
> This patch adds a new Clang compiler flag "-gline-tables-only". It should reduce the amount of emitted debug information:<br>
> 1) DIEs in .debug_info should only have types DW_TAG_compile_unit, DW_TAG_subprogram, DW_TAG_inlined_subroutine (for opt builds), DW_TAG_lexical_block.<br>
> 2) .debug_str should only contain function names<br>
> 3) No debug data for types/namespaces/variables should be emitted.<br>
> 4) The data in .debug_line should be enough to produce valid stack traces with function names and line numbers.<br>
><br>
> This flag can reduce the size of the binary by some factor, but still allow to obtain valid stack traces (both for debug and opt builds, and for inlined functions).<br>
> Results of measurements on SPEC CPU 2006 benchmarks (for Clang r155349):<br>
><br>
> binary size increase factor for:<br>
> "-O0 -g": average - 2x, max - 5.85x<br>
> "-O0 -gline-tables-only": average - 1.2x, max - 1.44x<br>
> "-O2 -g": average - 3.45x, max - 11x<br>
> "-O2 -gline-tables-only": average - 1.47x, max - 2.76x<br>
><br>
> Similar patch exists for gcc but is not yet in trunk<br>
> (See this patch at <a href="http://old.nabble.com/-patch--Add-new--gmlt-option-for-min.-debug-info-with-line-tables-(issue4440072)-td31482851.html" target="_blank">http://old.nabble.com/-patch--Add-new--gmlt-option-for-min.-debug-info-with-line-tables-(issue4440072)-td31482851.html</a><br>

> or <a href="http://codereview.appspot.com/4440072" target="_blank">http://codereview.appspot.com/4440072</a>). gcc patch is used in Google for about 2 years already.<br>
><br>
> You can review the Clang patch at: <a href="http://codereview.appspot.com/6112056/" target="_blank">http://codereview.appspot.com/6112056/</a><br>
<br>
</div></div>So two requests:<br>
<br>
a) Please do turn it into an enum and refactor the current uses before as a separate patch.<br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">b) I think the fixme should be fixed first. Also, no need to put your name next to a fixme.<br>
</blockquote><div><br></div><div>Sending the revised (modulo r155697) patch. Please take a look.</div><div><br></div><div>Codereview: <a href="http://codereview.appspot.com/6112056/#ps9001">http://codereview.appspot.com/6112056/#ps9001</a></div>
</div><div><br></div>-- <br><div>Alexey Samsonov, MSK</div><br>
</div>