Xinliang David Li via llvm-dev
2021-Jul-07 04:25 UTC
[llvm-dev] RFC: Sanitizer-based Heap Profiler
On Tue, Jul 6, 2021 at 5:09 AM Andrey Bokhanko <andreybokhanko at gmail.com> wrote:> Hi Teresa, > > Thank you for the quick reply! I'm really happy to see the project is > moving forward! > > > We initially plan to use the profile information to provide guidance to > the dynamic allocation runtime on data allocation and placement. We'll send > more details on that when it is fleshed out too. > > Just to double check: do you plan to open-source this runtime? -- >It will be in tcmalloc initially.> perhaps as a part of LLVM? >A wrapper runtime layer in LLVM is possible, but not initially. David> > Yours, > Andrey > > On Tue, Jul 6, 2021 at 12:54 AM Teresa Johnson <tejohnson at google.com> > wrote: > > > > Hi Andrey, > > > > The compiler side support for the necessary instrumentation went in a > while back (D85948), as did the compiler-rt support (D87120 is the main > one, but there were a number of preparatory and follow-on patches). > Currently it dumps to a text file. We've been working on designs for the > binary profile format, IR handling for the profile data, and context > disambiguation support. We plan to send RFCs for some of this early this > quarter. > > > > We initially plan to use the profile information to provide guidance to > the dynamic allocation runtime on data allocation and placement. We'll send > more details on that when it is fleshed out too. > > > > Teresa > > > > On Mon, Jul 5, 2021 at 7:02 AM Andrey Bokhanko <andreybokhanko at gmail.com> > wrote: > >> > >> Hi Teresa, > >> > >> A year has passed since you posted this RFC; could you, please, give a > >> quick update on the current state of heap profiler development? > >> > >> (Sorry if you already did so; I looked through llvm-dev mailing list > >> to no avail -- but perhaps I missed something?) > >> > >> We (Huawei) are very interested in data cache optimizations; we are > >> discussing our plans with Maxim and others on the BOLT project github > >> (https://github.com/facebookincubator/BOLT/issues/178); I would be > >> really interested to hear your perspective / plans -- either on BOLT > >> project discussion or here. > >> > >> One area of particular interest are specific data cache optimizations > >> you plan (or not?) to implement either in compiler / binary optimizer > >> / runtime optimizer based on heap profiler data. > >> > >> Thank you! > >> > >> Yours, > >> Andrey > >> ==> >> Advanced Software Technology Lab > >> Huawei > > > > > > > > -- > > Teresa Johnson | Software Engineer | tejohnson at google.com | >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210706/e6822584/attachment.html>
Andrey Bokhanko via llvm-dev
2021-Jul-07 12:13 UTC
[llvm-dev] RFC: Sanitizer-based Heap Profiler
Hi David, On Wed, Jul 7, 2021 at 7:25 AM Xinliang David Li <xinliangli at gmail.com> wrote:> > > On Tue, Jul 6, 2021 at 5:09 AM Andrey Bokhanko <andreybokhanko at gmail.com> wrote: >> >> Hi Teresa, >> >> Thank you for the quick reply! I'm really happy to see the project is >> moving forward! >> >> > We initially plan to use the profile information to provide guidance to the dynamic allocation runtime on data allocation and placement. We'll send more details on that when it is fleshed out too. >> >> Just to double check: do you plan to open-source this runtime? -- > > > It will be in tcmalloc initially.Got it -- thanks! We (Huawei) would be happy to contribute -- for example, with extra testing, on a different set of workloads / environment / hardware target. Yours, Andrey
Andrey Bokhanko via llvm-dev
2021-Jul-08 15:06 UTC
[llvm-dev] RFC: Sanitizer-based Heap Profiler
Hi David, On Wed, Jul 7, 2021 at 7:25 AM Xinliang David Li <xinliangli at gmail.com> wrote:>> > We initially plan to use the profile information to provide guidance to the dynamic allocation runtime on data allocation and placement. We'll send more details on that when it is fleshed out too. >> >> Just to double check: do you plan to open-source this runtime? -- > > > It will be in tcmalloc initially. > >> >> perhaps as a part of LLVM? > > > A wrapper runtime layer in LLVM is possible, but not initially.I wonder how you plan to deliver guidance on what allocations should be made from the same memory chunk to tcmalloc -- unless you plan to read data profile directly from the runtime (I doubt so...) this should be done via some kind of instrumentation done by a compiler / binary optimizer (a la BOLT) -- right? Yours, Andrey