<div dir="ltr">So, I traced it down to the DenseMaps in class FunctionSamples. I've replaced them with two std::vector, and the read operation causes the compiler to grow from 70Mb to 280Mb. With the DenseMaps, reading the profile causes the compiler to grow from 70Mb to 3Gb.<div><br></div><div>Somehow the DenseMaps are causing a 10x growth factor. Those keys are probably an issue. Or perhaps we just need a different representation for sample records and call sites.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 10, 2015 at 3:56 PM, Diego Novillo <span dir="ltr"><<a href="mailto:dnovillo@google.com" target="_blank">dnovillo@google.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"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Wed, Dec 9, 2015 at 3:14 PM, Xinliang David Li <span dir="ltr"><<a href="mailto:xinliangli@gmail.com" target="_blank">xinliangli@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">Can you extract the relevant part of the heap profile data?</div></blockquote><div><br></div></span><div>It's all profile data, actually. The heap utilization is massively dominated by the profile reader.</div><span class=""><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"> How large is the sample profile data fed to the compiler? <div><br></div></div></blockquote><div><br></div></span><div>For this run, the input file was 21Mb.</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div></div><div>The indexed format profile size for clang is <100MB. The InstrProfRecord for each function is read, used and discarded one at a time, so there should not be problem as described.</div></div></blockquote><div><br></div></span><div>Good. </div></div></div></div>
</blockquote></div><br></div>