Re: [PATCH 02/26] perf: Introduce mmap3 version of mmap event

From: Arnaldo Carvalho de Melo
Date: Mon Sep 14 2020 - 11:34:32 EST


Em Mon, Sep 14, 2020 at 11:08:11AM +0200, peterz@xxxxxxxxxxxxx escreveu:
> On Sun, Sep 13, 2020 at 11:41:00PM -0700, Stephane Eranian wrote:
> > On Sun, Sep 13, 2020 at 2:03 PM Jiri Olsa <jolsa@xxxxxxxxxx> wrote:
> > what happens if I set mmap3 and mmap2?
> >
> > I think using mmap3 for every mmap may be overkill as you add useless
> > 20 bytes to an mmap record.
> > I am not sure if your code handles the case where mmap3 is not needed
> > because there is no buildid, e.g, anonymous memory.
> > It seems to me you've written the patch in such a way that if the user
> > tool supports mmap3, then it supersedes mmap2, and thus
> > you need all the fields of mmap2. But if could be more interesting to
> > return either MMAP2 or MMAP3 depending on tool support
> > and type of mmap, that would certainly save 20 bytes on any anon mmap.
> > But maybe that logic is already in your patch and I missed it.
>
> That, and what if you don't want any of that buildid nonsense at all? I
> always kill that because it makes perf pointlessly slow and has
> absolutely no upsides for me.

So, for you nothing should change, no MMAP3 used, no collection at the
end (which is your pet peeve).

I'm not saying this is what is in his patches right now, but what I
think his patches should be doing.

- Arnaldo