<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 9, 2020 at 10:11 AM Renato Golin <<a href="mailto:rengolin@gmail.com">rengolin@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">On Wed, 9 Sep 2020 at 14:27, Nemanja Ivanovic <<a href="mailto:nemanja.i.ibm@gmail.com" target="_blank">nemanja.i.ibm@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>A more aesthetic comment I have is that personally, I would prefer a single option with a default percentage (say 0%) rather than having to specify two options.<br></div></div></blockquote><div><br></div><div>0% doesn't mean "don't do it", just means "only do that to functions I didn't see running at all", which could be misrepresented in the profiling run.</div><div><br></div><div>If we agree this should be *always* enabled, then only one option is needed. Otherwise, we'd need negative percentages to mean "don't do that" and that would be weird. :)</div><div><br></div></div></div></blockquote><div>I am not sure I follow. My suggestion was to have one option that would give you a default of 0% (i.e. only add the attribute on functions that were never called). So the semantics would be fairly straightforward:</div><div>- Default (i.e. no <span style="font-family:monospace">-profile-deopt-cold</span>): do nothing</div><div>- Option with no arg (i.e. <span style="font-family:monospace">-profile-deopt-cold</span>): add attribute only to functions that have an execution count of zero</div><div>- Option with an arg (i.e. <span style="font-family:monospace">-profile-deopt-cold=<N></span>): add attribute to functions that account for <span style="font-family:monospace"><N>%</span> of total execution counts</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div><div>Also, it might be useful to add an option to dump the names of functions that are decorated so the user can track an execution count of such functions when running their code. But of course, the debug messages may be adequate for this purpose.</div></div></blockquote><div><br></div><div>Remark options should be enough for that.</div><div><br></div><div>--renato </div></div></div>
</blockquote></div></div>