[llvm-dev] RFC: Sanitizer-based Heap Profiler

Xinliang David Li via llvm-dev llvm-dev at lists.llvm.org
Thu Jul 8 09:56:44 PDT 2021


On Thu, Jul 8, 2021 at 8:56 AM Andrey Bokhanko <andreybokhanko at gmail.com>
wrote:

> On Thu, Jul 8, 2021 at 6:25 PM Teresa Johnson <tejohnson at google.com>
> wrote:
>
>> Responding to this one first, I'll respond to your other email shortly.
>> Initially we plan to provide hints to tcmalloc via new APIs to help it make
>> allocation decisions (things like hotness and lifetime). The compiler will
>> be responsible for adding these hints, using some method to disambiguate
>> the calling context (e.g. via function cloning, new parameter, etc).
>>
> Sounds good -- thanks!
>
> (though this would increase code size and thus, instruction cache pressure
> -- tsk, tsk... :-))
>

There are lots of ways to control the overhead : 1) context merging if
their properties are similar; 2) context merging if memory in each context
is short lived; 3) context trimming etc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210708/3f616a00/attachment.html>


More information about the llvm-dev mailing list