<div dir="ltr">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>or duplicate this information in the summary, so we could get it without reading Module.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-09-02 15:49 GMT-07:00 Mehdi Amini <span dir="ltr"><<a href="mailto:mehdi.amini@apple.com" target="_blank">mehdi.amini@apple.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span class=""><blockquote type="cite"><div>On Sep 2, 2016, at 3:16 PM, Piotr Padlewski <<a href="mailto:piotr.padlewski@gmail.com" target="_blank">piotr.padlewski@gmail.com</a>> wrote:</div><br><div><br><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"><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> </span><span dir="ltr"><<a href="mailto:davidxl@google.com" target="_blank">davidxl@google.com</a>></span>:<br><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>On Fri, Sep 2, 2016 at 2:58 PM, Piotr Padlewski<br><<a href="mailto:piotr.padlewski@gmail.com" target="_blank">piotr.padlewski@gmail.com</a>> wrote:<br>> Hi,<br>> I am working right now on importing based on PGO/FDO data. There is one<br>> issue that I found - when we calculate the list of imports, we can't get the<br>> ProfileSummaryInfo, which is the best and I<br>> think only valid way of checking if callsite/callee is hot (isHotCount()).<br>> There are 2 solutions that I come up with Teresa and Easwaran:<br>><br>> 1. Add PGO data to summary<br>> 2. Replace CalleeInfo::ProfileCount with enum {None, Cold, Hot} computed<br>> during computing summary.<br><br><br></span>Don't we already have edge profile count in the callgraph summary?<br>I think what is missing is the Profile SUmmary data itself -- that one<br>should be copied over to thinLTO summary so that the importing<br>analysis can use. However I we should not need to duplicate the<br>information in every module.<br><span><font color="#888888"><br>David<br></font></span><div><div><br></div></div></blockquote><div>Yes we do have edge profile cout, but in order to compare it with global couts we need Profile Summary as you said. <br></div></div></div></blockquote><div><br></div></span><div>Can you explain a bit more the issue here?</div><div><br></div><div>Thanks,</div><div><br></div><div>Mehid</div><span class=""><div><br></div><br><blockquote type="cite"><div><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>If we will follow 2) then we won't have to duplicate the data.</div><div> </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><div>><br>> I like the 2. much more. It will reduce the summary size slightly and I<br>> don't think we will need ProfileCount anywhere else.<br>><br>> The other thing I would like to mention is that I think we should start<br>> using the summary versioning and drop support of old version.<br>> ThinLTO doesn't have enough users right now and parsing many versions of<br>> summary will just add additional cost, that will start to grow.<br>><br>> Piotr</div></div></blockquote></div></div></blockquote></span></div><br></div></blockquote></div><br></div>