From: Arnaldo Carvalho de Melo Date: Fri, 19 Jun 2015 20:35:25 +0000 (-0300) Subject: perf top: Tell the user how to unfreeze events after pressing 'f' X-Git-Tag: firefly_0821_release~176^2~1634^2^2~4 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ae3b6ab603bce6a74ca089f7a944196863166a52;p=firefly-linux-kernel-4.4.55.git perf top: Tell the user how to unfreeze events after pressing 'f' When the user presses 'f' to disable events the visual cues are, well, the percentages not changing and the number of events freezing. Be more explicit by changing the help line at the bottom of the screen to show the following messages when 'f' is pressed: "Press 'f' again to re-enable the events" And then, when 'f' is pressed again: "Press 'f' to disable the events or 'h' Suggested-by: Ingo Molnar Cc: Adrian Hunter Cc: Borislav Petkov Cc: David Ahern Cc: Don Zickus Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Namhyung Kim Cc: Stephane Eranian Link: http://lkml.kernel.org/n/tip-uhiswg9a9rxm5gxg7ptjskjn@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index ccf569ab08aa..70a9505aae83 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -599,7 +599,13 @@ static void *display_thread_tui(void *arg) * No need to refresh, resort/decay histogram entries * if we are not collecting samples: */ - hbt.refresh = top->evlist->enabled ? top->delay_secs : 0; + if (top->evlist->enabled) { + hbt.refresh = top->delay_secs; + help = "Press 'f' to disable the events or 'h' to see other hotkeys"; + } else { + help = "Press 'f' again to re-enable the events"; + hbt.refresh = 0; + } } done = 1;