[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5910059f9334605a2fbe068dae35b816417383a3.camel@nokia.com>
Date: Fri, 6 Mar 2020 07:47:41 +0000
From: "Rantala, Tommi T. (Nokia - FI/Espoo)" <tommi.t.rantala@...ia.com>
To: "arnaldo.melo@...il.com" <arnaldo.melo@...il.com>
CC: "namhyung@...nel.org" <namhyung@...nel.org>,
"peterz@...radead.org" <peterz@...radead.org>,
"mingo@...hat.com" <mingo@...hat.com>,
"mark.rutland@....com" <mark.rutland@....com>,
"alexander.shishkin@...ux.intel.com"
<alexander.shishkin@...ux.intel.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"jolsa@...hat.com" <jolsa@...hat.com>
Subject: Re: [PATCH 1/3] perf top: Fix stdio interface input handling with
glibc 2.28+
On Thu, 2020-03-05 at 11:49 -0300, Arnaldo Carvalho de Melo wrote:
> Thanks for fixing this, I had stumbled on it at some point, but since
> I mostly use the TUI interface, it fell thru the cracks.
>
> Do you prefer it over the TUI one?
The stdio interface is important for us, as we're building perf without s-
lang. To reduce dependencies I assume... But the TUI interface is
certainly nice, so maybe we should just include s-lang to get it.
-Tommi
> Thanks, tested and applied.
>
> - Arnaldo
>
> > Signed-off-by: Tommi Rantala <tommi.t.rantala@...ia.com>
> > ---
> > tools/perf/builtin-top.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
> > index f6dd1a63f159e..d2539b793f9d4 100644
> > --- a/tools/perf/builtin-top.c
> > +++ b/tools/perf/builtin-top.c
> > @@ -684,7 +684,9 @@ static void *display_thread(void *arg)
> > delay_msecs = top->delay_secs * MSEC_PER_SEC;
> > set_term_quiet_input(&save);
> > /* trash return*/
> > - getc(stdin);
> > + clearerr(stdin);
> > + if (poll(&stdin_poll, 1, 0) > 0)
> > + getc(stdin);
> >
> > while (!done) {
> > perf_top__print_sym_table(top);
> > --
> > 2.21.1
> >
Powered by blists - more mailing lists