Re: [PATCH] perf record: Use an eventfd to wakeup when done

2020-05-12 Thread Anand K. Mistry
On Wed, 13 May 2020 at 00:12, Arnaldo Carvalho de Melo wrote: > > Em Tue, May 12, 2020 at 02:12:32PM +0200, Jiri Olsa escreveu: > > On Tue, May 12, 2020 at 02:59:36PM +1000, Anand K Mistry wrote: > > > > SNIP > > > > > diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c > > >

Re: [PATCH] perf record: Use an eventfd to wakeup when done

2020-05-12 Thread Arnaldo Carvalho de Melo
Em Tue, May 12, 2020 at 02:12:32PM +0200, Jiri Olsa escreveu: > On Tue, May 12, 2020 at 02:59:36PM +1000, Anand K Mistry wrote: > > SNIP > > > diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c > > index 1ab349abe90469..099ecaa66732a2 100644 > > ---

Re: [PATCH] perf record: Use an eventfd to wakeup when done

2020-05-12 Thread Jiri Olsa
On Tue, May 12, 2020 at 02:59:36PM +1000, Anand K Mistry wrote: SNIP > diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c > index 1ab349abe90469..099ecaa66732a2 100644 > --- a/tools/perf/builtin-record.c > +++ b/tools/perf/builtin-record.c > @@ -53,6 +53,7 @@ > #include >

[PATCH] perf record: Use an eventfd to wakeup when done

2020-05-11 Thread Anand K Mistry
The setting and checking of 'done' contains a rare race where the signal handler setting 'done' is run after checking to break the loop, but before waiting in evlist__poll(). In this case, the main loop won't wake up until either another signal is sent, or the perf data fd causes a wake up. The

Re: [PATCH] perf record: Use an eventfd to wakeup when done

2020-05-11 Thread Jiri Olsa
On Fri, May 08, 2020 at 02:56:43PM +1000, Anand K Mistry wrote: > The setting and checking of 'done' contains a rare race where the signal > handler setting 'done' is run after checking to break the loop, but > before waiting in evlist__poll(). In this case, the main loop won't wake > up until

[PATCH] perf record: Use an eventfd to wakeup when done

2020-05-07 Thread Anand K Mistry
The setting and checking of 'done' contains a rare race where the signal handler setting 'done' is run after checking to break the loop, but before waiting in evlist__poll(). In this case, the main loop won't wake up until either another signal is sent, or the perf data fd causes a wake up. The