<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 12, 2015 at 10:12 AM, Betul Buyukkurt <span dir="ltr"><<a href="mailto:betulb@codeaurora.org" target="_blank">betulb@codeaurora.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> davidxl added inline comments.<br>
><br>
> ================<br>
> Comment at: lib/profile/InstrProfiling.c:190<br>
> @@ +189,3 @@<br>
> +    }<br>
> +    I->ValueCounters = (void *)PerSiteCountsHead;<br>
> +    PerSiteCountsHead = (uint8_t *)VDataPtr;<br>
> ----------------<br>
> Release memory of ValueCounters ?<br>
<br>
</span>This is a function that's running only atexit, I thought of adding it in<br>
but then thought of it as unnecessary too due to this being one of the<br>
very last actions of the run time during the lifetime of the program.<br></blockquote><div><br></div><div><br></div><div>Ok to leave it as it is, but the assumption may not be true in the future.</div><div><br></div><div>Consider the case when profile dump is not done at exit (e.g. for a server program). APIs are provided for the user to periodically dump data for selected program phases they care about. One low overhead way of doing this is let the program continuously do the profiling without the need to check the state. APIs are provided so that user can do counter clearing and dumping at the start and end of the phase ...</div><div><br></div><div>Another thing we need to solve in the future is support raw profile data on-line merging -- otherwise the raw profile data can get really big with the current appending model. Without this, doing clang bootstrap with PGO (4 stage with clang/llvm sources as training data) will be impossible.</div><div><br></div><div>VP data certainly makes it trickier.</div><div><br></div><div>David</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
><br>
> <a href="http://reviews.llvm.org/D9009" rel="noreferrer" target="_blank">http://reviews.llvm.org/D9009</a><br>
><br>
><br>
><br>
><br>
<br>
<br>
</blockquote></div><br></div></div>