<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Oct 11, 2013 at 12:57 PM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="im">On Fri, Oct 11, 2013 at 12:51 PM, Manman Ren <span dir="ltr"><<a href="mailto:manman.ren@gmail.com" target="_blank">manman.ren@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi, David<div><br></div><div>I just noticed this has great size reduction on xalan (a SPEC benchmark), thanks for the work.</div>

<div>The number of MDNodes in a lto debug build decreased from 29M to 12M.</div></div></blockquote><div><br></div></div><div>Great - thanks for the stats.</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div dir="ltr">
<div>This may degrade the debugger's speed since we are now emitting declarations instead of definitions, and the debugger will have to search for the definition.<br></div></div></blockquote><div><br></div></div><div>
Perhaps. I suppose moreso on Apple platforms where debug info isn't linked, so searching multiple object files' debug info could be more costly. But do the accelerator tables handle this by making it easy to find the object file with the definition?</div>
<div class="im">
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div></div><div>One example is building XercesWrapperNavigator.cpp with -O0 -g, we are now emitting a forward declaration for XercesDocumentWrapper.</div>


<div>XercesWrapperNavigator has a member (m_d) pointing to XercesDocumentWrapper, and we call m_d->func() inside XercesWrapperNavigator.cpp.<br></div></div></blockquote><div><br></div></div><div>Do you have any evidence that this adversely affects debugger performance?</div>
</div></div></div></blockquote><div>For our internal tool chains, we now have to perform a string search to find the definition. In theory, the extra search should make it slower. Yes, the accelerator table can help the search.</div>
<div>  </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div class="im">
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div></div><div>Is it reasonable for this commit to be enabled only for limit-debug-info, when no-limit-debug-info is on, we don't see effects of this patch?<br>

</div></div></blockquote><div><br></div></div><div>GCC does this by default, at least on Linux - I haven't tested on MacOS. I would guess it does so there too (but as you point out, there are different tradeoffs there, so I might be wrong).<br>

<br> I'd like to understand the performance tradeoff to justify such a large regression in debug info size (it's worth about ~20% on Clang/LLVM based on my experiments).</div></div></div></div></blockquote><div><br>
</div><div>Our default is -limit-debug-info, so this will be on by default. I was asking whether we should guard this so when people use "-fno-limit-debug-info", they will get the definition.</div><div><br></div>
<div>Thanks,</div><div>Manman</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><span class="HOEnZb"><font color="#888888"><br>
<br>- David</font></span></div><div><div class="h5"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div dir="ltr"><div></div>
<div><br></div><div>Thanks,</div><div>Manman</div><div><br></div></div></blockquote></div></div></div></div></div></blockquote></div></div></div>