From: "Rantala, Tommi T. (Nokia - FI/Espoo)" <tommi.t.rantala@nokia.com>
To: "arnaldo.melo@gmail.com" <arnaldo.melo@gmail.com>
Cc: "namhyung@kernel.org" <namhyung@kernel.org>,
"peterz@infradead.org" <peterz@infradead.org>,
"mingo@redhat.com" <mingo@redhat.com>,
"mark.rutland@arm.com" <mark.rutland@arm.com>,
"alexander.shishkin@linux.intel.com"
<alexander.shishkin@linux.intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"jolsa@redhat.com" <jolsa@redhat.com>
Subject: Re: [PATCH 1/3] perf top: Fix stdio interface input handling with glibc 2.28+
Date: Fri, 6 Mar 2020 07:47:41 +0000 [thread overview]
Message-ID: <5910059f9334605a2fbe068dae35b816417383a3.camel@nokia.com> (raw)
In-Reply-To: <20200305144943.GA7895@kernel.org>
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@nokia.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
> >
next prev parent reply other threads:[~2020-03-06 7:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200305083714.9381-1-tommi.t.rantala@nokia.com>
2020-03-05 8:37 ` Tommi Rantala
2020-03-05 14:49 ` Arnaldo Carvalho de Melo
2020-03-06 7:47 ` Rantala, Tommi T. (Nokia - FI/Espoo) [this message]
2020-03-07 7:36 ` [tip: perf/urgent] " tip-bot2 for Tommi Rantala
2020-03-05 8:37 ` [PATCH 2/3] perf bench futex-wake: Restore thread count default to online CPU count Tommi Rantala
2020-03-05 14:51 ` Arnaldo Carvalho de Melo
2020-03-05 15:34 ` Davidlohr Bueso
2020-03-05 18:14 ` Arnaldo Melo
2020-03-07 7:36 ` [tip: perf/urgent] " tip-bot2 for Tommi Rantala
2020-03-05 8:37 ` [PATCH 3/3] perf bench: Clear struct sigaction before sigaction() syscall Tommi Rantala
2020-03-05 14:53 ` Arnaldo Carvalho de Melo
2020-03-07 7:36 ` [tip: perf/urgent] " tip-bot2 for Tommi Rantala
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5910059f9334605a2fbe068dae35b816417383a3.camel@nokia.com \
--to=tommi.t.rantala@nokia.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=arnaldo.melo@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®