<div dir="ltr">Thanks all for the comments.<div><br></div><div>I've moved forward with "adding a new -f flag" solution in <a href="https://reviews.llvm.org/D25435">https://reviews.llvm.org/D25435</a></div><div><br></div><div>Please comment on that patch about flag naming etc.</div><div><br></div><div>Thanks,</div><div>Dehao</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 23, 2016 at 1:39 PM, Eric Christopher <span dir="ltr"><<a href="mailto:echristo@gmail.com" target="_blank">echristo@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">(Agreed for the record).<span class="HOEnZb"><font color="#888888"><div><br></div><div>-eric</div></font></span></div><br><div class="gmail_quote"><div><div class="h5"><div dir="ltr">On Wed, Nov 23, 2016 at 1:21 PM David Blaikie via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr" class="m_-5310599874208294453gmail_msg">yep, +1, seems like a -f flag to me. (you'd want to be able to combine it with any other level of debugging - no need to have to choose between profiling or debugging)<br class="m_-5310599874208294453gmail_msg"><br class="m_-5310599874208294453gmail_msg"><div class="gmail_quote m_-5310599874208294453gmail_msg"></div></div><div dir="ltr" class="m_-5310599874208294453gmail_msg"><div class="gmail_quote m_-5310599874208294453gmail_msg"><div dir="ltr" class="m_-5310599874208294453gmail_msg">On Tue, Nov 22, 2016 at 3:46 PM Greg Bedwell <<a href="mailto:gregbedwell@gmail.com" class="m_-5310599874208294453gmail_msg" target="_blank">gregbedwell@gmail.com</a>> wrote:<br class="m_-5310599874208294453gmail_msg"></div></div></div><div dir="ltr" class="m_-5310599874208294453gmail_msg"><div class="gmail_quote m_-5310599874208294453gmail_msg"><blockquote class="gmail_quote m_-5310599874208294453gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="m_-5310599874208294453gmail_msg"><span style="font-size:12.8px" class="m_-5310599874208294453gmail_msg">For our users we fully expect their profile/debug builds to be the same thing (that is, almost all debugging is on fully optimized code, where fully optimized also means part of an iterative profiling workflow). Having extra debug information that only benefits the profiling part seems reasonable. What would be unacceptable is if we ever had to ask our users to make a trade off between debug info that was best for profiling at the expense of debugging quality or vice versa. The "</span><span style="font-size:12.8px" class="m_-5310599874208294453gmail_msg">-femit-debug-for-profiling" flag seems to fit this model of it being more a strict superset rather than a tuning option more clearly.</span></div><div dir="ltr" class="m_-5310599874208294453gmail_msg"><br class="m_-5310599874208294453gmail_msg"><div class="m_-5310599874208294453gmail_msg"><span style="font-size:12.8px" class="m_-5310599874208294453gmail_msg"><br class="m_-5310599874208294453gmail_msg"></span></div><div class="m_-5310599874208294453gmail_msg"><span style="font-size:12.8px" class="m_-5310599874208294453gmail_msg">-Greg</span></div></div></blockquote></div></div><div dir="ltr" class="m_-5310599874208294453gmail_msg"><div class="gmail_quote m_-5310599874208294453gmail_msg"><blockquote class="gmail_quote m_-5310599874208294453gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra m_-5310599874208294453gmail_msg"><br class="m_-5310599874208294453gmail_msg"><div class="gmail_quote m_-5310599874208294453gmail_msg">On 22 November 2016 at 23:16, Dehao Chen via llvm-dev <span dir="ltr" class="m_-5310599874208294453gmail_msg"><<a href="mailto:llvm-dev@lists.llvm.org" class="m_-5310599874208294453gmail_msg" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br class="m_-5310599874208294453gmail_msg"><blockquote class="gmail_quote m_-5310599874208294453gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="m_-5310599874208294453gmail_msg">-gprofile should have:<div class="m_-5310599874208294453gmail_msg"><br class="m_-5310599874208294453gmail_msg"></div><div class="m_-5310599874208294453gmail_msg">1. emit linkage name in all subprograms</div><div class="m_-5310599874208294453gmail_msg">2. emit discriminator with dup-factor copy-factor encoded</div><div class="m_-5310599874208294453gmail_msg">3. use-unknown-locations=true</div><div class="m_-5310599874208294453gmail_msg"><br class="m_-5310599874208294453gmail_msg"></div><div class="m_-5310599874208294453gmail_msg">Here comes the problem: is it an intermediate -g mode between -g1 and -g2? If yes, this means that -g2 will also need to include all the 3 items above. If not, then it should not be called -gprofile, but rather a flag like -femit-debug-for-profiling", so that we can use it with "-g2 -femit-debug-for-profiling", or "-gmlt -femit-debug-for-profiling".</div></div></blockquote></div></div></blockquote></div></div><div dir="ltr" class="m_-5310599874208294453gmail_msg"><div class="gmail_quote m_-5310599874208294453gmail_msg"><blockquote class="gmail_quote m_-5310599874208294453gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote><div class="m_-5310599874208294453gmail_msg"><br class="m_-5310599874208294453gmail_msg"></div><div class="m_-5310599874208294453gmail_msg">Yep, sounds about right (should have a -fno- option too, should it imply -g of some kind if you specify it alone? I'd prefer to avoid implication (implies flags get weird/hard to handle imho) if possible. Just have a reasonable recommendation of -gmlt -fprof-debug or whatever we call it (I'm bad with names))<br class="m_-5310599874208294453gmail_msg"><br class="m_-5310599874208294453gmail_msg">- Dave</div></div></div></div></div><span class="">
______________________________<wbr>_________________<br class="m_-5310599874208294453gmail_msg">
LLVM Developers mailing list<br class="m_-5310599874208294453gmail_msg">
<a href="mailto:llvm-dev@lists.llvm.org" class="m_-5310599874208294453gmail_msg" target="_blank">llvm-dev@lists.llvm.org</a><br class="m_-5310599874208294453gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" class="m_-5310599874208294453gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br class="m_-5310599874208294453gmail_msg">
</span></blockquote></div>
</blockquote></div><br></div>