Re: [PATCH] perf/core: Emit PERF_RECORD_LOST for pinned events

2021-01-20 Thread Arnaldo Carvalho de Melo
Em Wed, Jan 20, 2021 at 08:53:48PM +0900, Namhyung Kim escreveu: > On Tue, Jan 19, 2021 at 12:11 PM Namhyung Kim wrote: > > > > Hi Andi, > > > > On Tue, Jan 19, 2021 at 11:47 AM Andi Kleen wrote: > > > > > > > > I don't think I object to having an even in the stream, but your LOST > > > > > event

Re: [PATCH] perf/core: Emit PERF_RECORD_LOST for pinned events

2021-01-20 Thread Namhyung Kim
On Tue, Jan 19, 2021 at 12:11 PM Namhyung Kim wrote: > > Hi Andi, > > On Tue, Jan 19, 2021 at 11:47 AM Andi Kleen wrote: > > > > > > I don't think I object to having an even in the stream, but your LOST > > > > event is unfortunate in that it itself can get lost when there's no > > > > space in t

Re: [PATCH] perf/core: Emit PERF_RECORD_LOST for pinned events

2021-01-18 Thread Namhyung Kim
Hi Andi, On Tue, Jan 19, 2021 at 11:47 AM Andi Kleen wrote: > > > > I don't think I object to having an even in the stream, but your LOST > > > event is unfortunate in that it itself can get lost when there's no > > > space in the buffer (which arguably is unlikely, but still). > > > > > > So fro

Re: [PATCH] perf/core: Emit PERF_RECORD_LOST for pinned events

2021-01-18 Thread Andi Kleen
> > I don't think I object to having an even in the stream, but your LOST > > event is unfortunate in that it itself can get lost when there's no > > space in the buffer (which arguably is unlikely, but still). > > > > So from that point of view, I think overloading LOST is not so very nice > > for

Re: [PATCH] perf/core: Emit PERF_RECORD_LOST for pinned events

2021-01-18 Thread Namhyung Kim
On Mon, Jan 18, 2021 at 9:56 PM Peter Zijlstra wrote: > > On Mon, Jan 18, 2021 at 08:44:20PM +0900, Namhyung Kim wrote: > > Hi Peter, > > > > On Mon, Jan 18, 2021 at 7:11 PM Peter Zijlstra wrote: > > > > > > On Mon, Jan 18, 2021 at 12:43:23PM +0900, Namhyung Kim wrote: > > > > As of now we silent

Re: [PATCH] perf/core: Emit PERF_RECORD_LOST for pinned events

2021-01-18 Thread Peter Zijlstra
On Mon, Jan 18, 2021 at 12:43:23PM +0900, Namhyung Kim wrote: > As of now we silently ignore pinned events when it's failed to be > scheduled and make it error state not try to schedule it again. > That means we won't get any samples for the event. > > But there's no way for users to notice and re

Re: [PATCH] perf/core: Emit PERF_RECORD_LOST for pinned events

2021-01-18 Thread Namhyung Kim
Hi Peter, On Mon, Jan 18, 2021 at 7:11 PM Peter Zijlstra wrote: > > On Mon, Jan 18, 2021 at 12:43:23PM +0900, Namhyung Kim wrote: > > As of now we silently ignore pinned events when it's failed to be > > scheduled and make it error state not try to schedule it again. > > That means we won't get a

Re: [PATCH] perf/core: Emit PERF_RECORD_LOST for pinned events

2021-01-18 Thread Peter Zijlstra
On Mon, Jan 18, 2021 at 08:44:20PM +0900, Namhyung Kim wrote: > Hi Peter, > > On Mon, Jan 18, 2021 at 7:11 PM Peter Zijlstra wrote: > > > > On Mon, Jan 18, 2021 at 12:43:23PM +0900, Namhyung Kim wrote: > > > As of now we silently ignore pinned events when it's failed to be > > > scheduled and mak

[PATCH] perf/core: Emit PERF_RECORD_LOST for pinned events

2021-01-17 Thread Namhyung Kim
As of now we silently ignore pinned events when it's failed to be scheduled and make it error state not try to schedule it again. That means we won't get any samples for the event. But there's no way for users to notice and respond to it. Let's emit a lost event with a new misc bit to indicate th