<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 2, 2016, at 4:13 PM, Piotr Padlewski <<a href="mailto:piotr.padlewski@gmail.com" class="">piotr.padlewski@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">The profile summary is saved in the global metadata ASAIK. If we want to calculate if something is hot/cold while choosing functions for importing, we would either need to read whole Module (which we clearly don't want to do)<div class="">or duplicate this information in the summary, so we could get it without reading Module.</div></div></div></blockquote><div><br class=""></div><div>When I say “explain a bit more” I meant:</div><div><br class=""></div><div>- what is the profile summary?</div><div>- how do you compute the hot/cold information from it and from the count we attache to edges?</div><div><br class=""></div><div>— </div><div>Mehdi</div><br class=""><blockquote type="cite" class=""><div class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">2016-09-02 15:49 GMT-07:00 Mehdi Amini <span dir="ltr" class=""><<a href="mailto:mehdi.amini@apple.com" target="_blank" class="">mehdi.amini@apple.com</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><br class=""><div class=""><span class=""><blockquote type="cite" class=""><div class="">On Sep 2, 2016, at 3:16 PM, Piotr Padlewski <<a href="mailto:piotr.padlewski@gmail.com" target="_blank" class="">piotr.padlewski@gmail.com</a>> wrote:</div><br class=""><div class=""><br class=""><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><div class="gmail_quote" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">2016-09-02 15:04 GMT-07:00 Xinliang David Li<span class=""> </span><span dir="ltr" class=""><<a href="mailto:davidxl@google.com" target="_blank" class="">davidxl@google.com</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span class="">On Fri, Sep 2, 2016 at 2:58 PM, Piotr Padlewski<br class=""><<a href="mailto:piotr.padlewski@gmail.com" target="_blank" class="">piotr.padlewski@gmail.com</a>> wrote:<br class="">> Hi,<br class="">> I am working right now on importing based on PGO/FDO data. There is one<br class="">> issue that I found - when we calculate the list of imports, we can't get the<br class="">> ProfileSummaryInfo, which is the best and I<br class="">> think only valid way of checking if callsite/callee is hot (isHotCount()).<br class="">> There are 2 solutions that I come up with Teresa and Easwaran:<br class="">><br class="">> 1. Add PGO data to summary<br class="">> 2. Replace CalleeInfo::ProfileCount with enum {None, Cold, Hot} computed<br class="">> during computing summary.<br class=""><br class=""><br class=""></span>Don't we already have edge profile count in the callgraph summary?<br class="">I think what is missing is the Profile SUmmary data itself -- that one<br class="">should be copied over to thinLTO summary so that the importing<br class="">analysis can use. However I we should not need to duplicate the<br class="">information in every module.<br class=""><span class=""><font color="#888888" class=""><br class="">David<br class=""></font></span><div class=""><div class=""><br class=""></div></div></blockquote><div class="">Yes we do have edge profile cout, but in order to compare it with global couts we need Profile Summary as you said. <br class=""></div></div></div></blockquote><div class=""><br class=""></div></span><div class="">Can you explain a bit more the issue here?</div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""></div><div class="">Mehid</div><span class=""><div class=""><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div class="gmail_quote" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div class="">If we will follow 2) then we won't have to duplicate the data.</div><div class=""> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div class=""><div class="">><br class="">> I like the 2. much more. It will reduce the summary size slightly and I<br class="">> don't think we will need ProfileCount anywhere else.<br class="">><br class="">> The other thing I would like to mention is that I think we should start<br class="">> using the summary versioning and drop support of old version.<br class="">> ThinLTO doesn't have enough users right now and parsing many versions of<br class="">> summary will just add additional cost, that will start to grow.<br class="">><br class="">> Piotr</div></div></blockquote></div></div></blockquote></span></div><br class=""></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></body></html>