[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140728065413.GJ6758@twins.programming.kicks-ass.net>
Date: Mon, 28 Jul 2014 08:54:13 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Andi Kleen <andi@...stfloor.org>
Cc: "Yan, Zheng" <zheng.z.yan@...el.com>, linux-kernel@...r.kernel.org,
mingo@...nel.org, acme@...radead.org, eranian@...gle.com
Subject: Re: [PATCH v3 6/9] perf, x86: handle multiple records in PEBS buffer
On Fri, Jul 25, 2014 at 06:40:41PM +0200, Andi Kleen wrote:
> > Suppose two pebs events, one has exclude_kernel set. It overflows,
> > before entering the kernel, the other event generates PEBS records from
> > inside the kernel with both events marked in the overflow field.
> >
> > And only once we leave the kernel can the exclude_kernel event tick
> > again and trigger the assist, finalyl clearing the bit.
> >
> > If you were to report the records to both events, one would get a lot of
> > kernel info he was not entitled to.
>
> Ok that case can be filtered in software. Shouldn't be too difficult.
> Perhaps just using ip
>
> if (event->attr.exclude_kernel && pebs->ip >= __PAGE_OFFSET)
> skip;
> if (event->attr.exclude_user && pebs->ip < __PAGE_OFFSET)
> skip;
>
> This would also help with the existing skid.
>
> Any other concerns?
Yeah, why fuck about and do ugly hacks when you can actually do it
right? That way you're sure you've not forgotten anything.
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists