aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/ui/browsers/annotate.c
diff options
context:
space:
mode:
authorAhelenia Ziemiańska <[email protected]>2022-12-27 20:57:40 +0000
committerArnaldo Carvalho de Melo <[email protected]>2024-01-04 21:29:17 +0000
commit6af6d22495efeb00cb4e220a4e6e30b5be3afdf3 (patch)
tree2be11fd75a5e06e63d590eb3b9cb06f026e2095b /tools/perf/ui/browsers/annotate.c
parentperf vendor events intel: Update sapphirerapids events to v1.17 (diff)
downloadkernel-6af6d22495efeb00cb4e220a4e6e30b5be3afdf3.tar.gz
kernel-6af6d22495efeb00cb4e220a4e6e30b5be3afdf3.zip
perf TUI: Don't ignore job control
In its infinite wisdom, by default, SLang sets susp undef, and this can only be un-done by calling SLtty_set_suspend_state(true). After every SLang_init_tty(). Additionally, no provisions are made for maintaining the teletype attributes across suspend/continue (outside of curses emulation mode(?!), which provides full support, naturally), so we need to save and restore the flags ourselves, as well as reset the text colours when going under. We need to also re-draw the screen, and raising SIGWINCH, shockingly, Just Works. The correct solution would be to Not Use SLang, but as a stop-gap, this makes TUI 'perf report' usable. Signed-off-by: Ahelenia Ziemiańska <[email protected]> Tested-by: Arnaldo Carvalho de Melo <[email protected]> Tested-by: Namhyung Kim <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: yaowenbin <[email protected]> Link: https://lore.kernel.org/r/0354dcae23a8713f75f4fed609e0caec3c6e3cd5.1672174189.git.nabijaczleweli@nabijaczleweli.xyz 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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index cb2eb6dcb532..ec5e21932876 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -938,6 +938,7 @@ int hist_entry__tui_annotate(struct hist_entry *he, struct evsel *evsel,
/* reset abort key so that it can get Ctrl-C as a key */
SLang_reset_tty();
SLang_init_tty(0, 0, 0);
+ SLtty_set_suspend_state(true);
return map_symbol__tui_annotate(&he->ms, evsel, hbt);
}