[llvm-dev] Memory utilization problems in profile reader
Xinliang David Li via llvm-dev
llvm-dev at lists.llvm.org
Fri Dec 11 08:58:42 PST 2015
Isn't that ironic as 'Dense' should mean small and compact? Can that be
fixed?
David
On Fri, Dec 11, 2015 at 7:53 AM, Diego Novillo <dnovillo at google.com> wrote:
>
>
> On Fri, Dec 11, 2015 at 9:58 AM, Diego Novillo <dnovillo at google.com>
> wrote:
>
>> 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.
>>
>> 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.
>>
>
> Yes. In going through DenseMap's implementation I see that large values
> for keys will cause a lot of growth. And the documentation confirms it
> (someday I'll learn to read documentation first).
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151211/6475cadd/attachment.html>
More information about the llvm-dev
mailing list