aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorFrederic Weisbecker <[email protected]>2009-06-04 20:48:04 +0200
committerIngo Molnar <[email protected]>2009-06-04 21:44:53 +0200
commit0f5486b5c71a831a713ce356d8d06822e3c7c379 (patch)
tree4c62fd39d7477ac333a954934cad52d300e5a010 /tools/perf/scripts/python/bin
parent62fc44536c14b5787531bac7417580fca54c88b4 (diff)
perf_counter: Sleep before refresh using poll in perf top
perf top is refreshed every delay_secs the thread runs in such loop: while (sleep(delay_secs)) { print_sym_table(); } At the end of print_sym_table(), poll is used without sleep delay to check if we have something from stdin. It means that this check is done only every delay_secs, which can be higher that 2 secs if the user defined a custom refresh rate. We can drop sleep() here and directly use poll to wait between refresh periods, so that the reaction after the user stops perf top after typing "Enter" is immediate and doesn't suffer from the delay_secs latency. Nb: poll doesn't add any overhead that can parasite perf top measures since it sleeps the entire timeout here. Signed-off-by: Frederic Weisbecker <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Corey Ashford <[email protected]> Cc: Marcelo Tosatti <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Frederic Weisbecker <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions