[llvm-dev] Memory utilization problems in profile reader
Diego Novillo via llvm-dev
llvm-dev at lists.llvm.org
Fri Dec 11 07:53:28 PST 2015
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/ae465acd/attachment.html>
More information about the llvm-dev
mailing list