diff options
| author | Namhyung Kim <[email protected]> | 2015-05-29 12:53:44 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2015-05-29 15:49:00 +0000 |
| commit | ed426915900db3c58c410b8b38f6ff0e46bf6c96 (patch) | |
| tree | 754aa0939698ea7cc04587ee0b10be323fc9c64d /tools/perf/ui/browsers/annotate.c | |
| parent | perf build: Do not fail on missing Build file (diff) | |
| download | kernel-ed426915900db3c58c410b8b38f6ff0e46bf6c96.tar.gz kernel-ed426915900db3c58c410b8b38f6ff0e46bf6c96.zip | |
perf tools: Make Ctrl-C stop processing on TUI
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).
However, after processing samples, Ctrl-C was used to in other cases as
well - like stepping back from annotate. So recover the original
behavior after processing.
[1] http://jedsoft.org/slang/doc/html/cslang-6.html#ss6.1
Signed-off-by: Namhyung Kim <[email protected]>
Tested-by: Arnaldo Carvalho de Melo <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/ui/browsers/annotate.c')
| -rw-r--r-- | tools/perf/ui/browsers/annotate.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c index e5250eb2dd57..acb0e23b138e 100644 --- a/tools/perf/ui/browsers/annotate.c +++ b/tools/perf/ui/browsers/annotate.c @@ -838,6 +838,10 @@ int map_symbol__tui_annotate(struct map_symbol *ms, struct perf_evsel *evsel, int hist_entry__tui_annotate(struct hist_entry *he, struct perf_evsel *evsel, struct hist_browser_timer *hbt) { + /* reset abort key so that it can get Ctrl-C as a key */ + SLang_reset_tty(); + SLang_init_tty(0, 0, 0); + return map_symbol__tui_annotate(&he->ms, evsel, hbt); } |
