[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200810224403.GN3982@worktop.programming.kicks-ass.net>
Date: Tue, 11 Aug 2020 00:44:03 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: "Liang, Kan" <kan.liang@...ux.intel.com>
Cc: acme@...nel.org, mingo@...hat.com, linux-kernel@...r.kernel.org,
mark.rutland@....com, alexander.shishkin@...ux.intel.com,
jolsa@...hat.com, eranian@...gle.com, ak@...ux.intel.com,
dave.hansen@...el.com, kirill.shutemov@...ux.intel.com
Subject: Re: [PATCH V6 03/16] perf/core: Add support for
PERF_SAMPLE_CODE_PAGE_SIZE
On Mon, Aug 10, 2020 at 06:37:08PM -0400, Liang, Kan wrote:
>
>
> On 8/10/2020 5:41 PM, Peter Zijlstra wrote:
> > On Mon, Aug 10, 2020 at 02:24:23PM -0700, Kan Liang wrote:
> > > From: Stephane Eranian <eranian@...gle.com>
> > >
> > > When studying code layout, it is useful to capture the page size of the
> > > sampled code address.
> > >
> > > Add a new sample type for code page size.
> > > The new sample type requires collecting the ip. The code page size can
> > > be calculated from the IRQ-safe perf_get_page_size().
> > >
> > > Only the generic support is covered. The large PEBS will be disabled
> > > with this sample type.
> >
> > -ENOREASON
>
> I think the reason is similar to PERF_SAMPLE_DATA_PAGE_SIZE. For large PEBS,
> the mapping could be gone for the earlier PEBS records. Invalid page size
> may be retrieved. I will update the commit message.
That's extremely unlikely though.. We might as well just do it and pray.
The worst case is that we return '0' page-size because it's gone, that
seems fairly sane.
Alternatively, we can register mmu_notifiers or something and flush PEBS
buffers when ranges get invalidated.
Powered by blists - more mailing lists