public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Jiri Olsa <jolsa@redhat.com>, LKML <linux-kernel@vger.kernel.org>,
	David Ahern <dsahern@gmail.com>
Subject: Re: [PATCH] perf tools: Make Ctrl-C stop processing on TUI
Date: Fri, 29 May 2015 08:45:08 +0200	[thread overview]
Message-ID: <20150529064508.GB22749@gmail.com> (raw)
In-Reply-To: <1432856452-10631-1-git-send-email-namhyung@kernel.org>


* Namhyung Kim <namhyung@kernel.org> wrote:

> It was inconvenient that perf cannot be quit with SIGINT during
> processing samples on TUI especially for large data files.
> 
> This was because the first argument of SLang_init_tty(), abort_char,
> being 0.  The manual says it's the ascii value of the control
> character that will be used to generate the interrupt signal [1].
> Passing -1 means to use the default value (Ctrl-C).
> 
> [1] http://jedsoft.org/slang/doc/html/cslang-6.html#ss6.1
> 
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
>  tools/perf/ui/tui/setup.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/ui/tui/setup.c b/tools/perf/ui/tui/setup.c
> index b77e1d771363..60d1f29b4b50 100644
> --- a/tools/perf/ui/tui/setup.c
> +++ b/tools/perf/ui/tui/setup.c
> @@ -129,7 +129,7 @@ int ui__init(void)
>  	err = SLsmg_init_smg();
>  	if (err < 0)
>  		goto out;
> -	err = SLang_init_tty(0, 0, 0);
> +	err = SLang_init_tty(-1, 0, 0);
>  	if (err < 0)
>  		goto out;

Will this change the current Ctrl-C behavior in other places in any way?

Right now Ctrl-C behavior is pretty sensible: it essentially means instant abort 
of whatever was done, i.e. stepping back a level in 'perf top', exit the app if 
it's done at the highest level. I hope that's preserved! :-)

Thanks,

	Ingo

  reply	other threads:[~2015-05-29  6:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-28 23:40 [PATCH] perf tools: Make Ctrl-C stop processing on TUI Namhyung Kim
2015-05-29  6:45 ` Ingo Molnar [this message]
2015-05-29 12:53   ` [PATCH v2] " Namhyung Kim
2015-05-29 13:24     ` Arnaldo Carvalho de Melo
2015-05-29 15:49       ` Arnaldo Carvalho de Melo
2015-05-29 18:39     ` [tip:perf/core] " tip-bot for Namhyung Kim

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=20150529064508.GB22749@gmail.com \
    --to=mingo@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=dsahern@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.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