<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Fri, Feb 5, 2016 at 5:51 PM Mehdi Amini via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
> On Feb 5, 2016, at 5:40 PM, Peter Collingbourne <<a href="mailto:peter@pcc.me.uk" target="_blank">peter@pcc.me.uk</a>> wrote:<br>
><br>
> On Fri, Feb 05, 2016 at 04:58:45PM -0800, Mehdi Amini wrote:<br>
>><br>
>>> On Feb 5, 2016, at 3:17 PM, Peter Collingbourne via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
>>><br>
>>> Hi all,<br>
>>><br>
>>> We have profiled [1] the memory usage in LLVM when LTO'ing Chromium, and<br>
>>> we've found that one of the top consumers of memory is the DWARF emitter in<br>
>>> lib/CodeGen/AsmPrinter/Dwarf*.<br>
>><br>
>> I'm staring at the profile attached to the post #15 on the link you posted, can you confirm that the Dwarf emitter accounts for 6.7%+15.6%=22.3% of the the total allocated memory?<br>
>> If I understand correctly the numbers, this does not tell anything about how much the Dwarf emitter accounts on the *peak memory* usage (could be more, could be nothing...).<br>
><br>
> I think these nodes represent allocations from the DWARF emitter:<br>
><br>
> DwarfDebug::DwarfDebug 9.5%<br>
> DwarfDebug::endFunction 15.6%<br>
> DIEValueList::addValue 9.1%<br>
> total 34.2%<br>
><br>
> I believe they are totals, but my reading of the code is that the DWARF<br>
> emitter does not deallocate its memory until the end of code generation,<br>
<br>
That's sad :(<br>
<br>
> so total ~= peak in this case.<br>
<br>
Assuming the peak occurs during CodeGen (which is what I on my profile), that sounds pretty reasonable!<br>
<br>
Thanks for the information (and the work!).<br>
<br>
Another question I have, is how worse the split codegen make the situation? Naively there will be a lot of redundancy in the split modules, for ThinLTO Teresa has to proceed with care to limit the amount of duplication.<br>
<br></blockquote><div><br></div><div>Hmm? Can you reword this slightly? I'm not sure what you're asking here.</div><div><br></div><div>-eric</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Mehdi<br>
<br>
<br>
><br>
> I am not surprised by these figures -- see e.g. DIEValueList::Node which in<br>
> the worst case can use up to 24 bytes on a 1-byte DWARF attribute record.<br>
><br>
> Ivan was the person who collected the numbers, he may be able to comment more.<br>
><br>
> Thanks,<br>
> --<br>
> Peter<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div>