path: root/tools/perf/scripts/perl/
AgeCommit message (Collapse)AuthorFilesLines
2013-02-06perf perl scripts: Fix SIGALRM and pipe read race for rwtopJiri Olsa1-1/+5
Fixing rwtop script race. The issue is caused by rwtop script triggering SIGALRM and underneath pipe reading layer reporting error when interrupted. Fixing this by setting SA_RESTART for rwtop SIGALRM handler, which avoids interruption of the pipe reading layer. The discussion for this issue & fix is here: Signed-off-by: Jiri Olsa <> Original-patch-by: Andrew Jones <> Cc: Andrew Jones <> Cc: Corey Ashford <> Cc: David Ahern <> Cc: Frederic Weisbecker <> Cc: Ingo Molnar <> Cc: Namhyung Kim <> Cc: Paul Mackerras <> Cc: Peter Zijlstra <> Link: Signed-off-by: Arnaldo Carvalho de Melo <>
2010-05-10perf/trace/scripting: rwtop script cleanupTom Zanussi1-13/+35
A couple of fixes for the rwtop script: - printing the totals and clearing the hashes in the signal handler eventually leads to various random and serious problems when running the rwtop script continuously. Moving the print_totals() calls to the event handlers solves that problem, and the event handlers are invoked frequently enough that it doesn't affect the timeliness of the output. - Fix nuisance 'use of uninitialized value' warnings Cc: Frédéric Weisbecker <> Cc: Ingo Molnar <> Message-Id: <> Signed-off-by: Tom Zanussi <> Signed-off-by: Arnaldo Carvalho de Melo <>
2010-04-14perf trace/scripting: Add rwtop and sctop scriptsTom Zanussi1-0/+177
A couple of scripts, one in Python and the other in Perl, that demonstrate 'live mode' tracing. For each, the output of the perf event stream is fed continuously to the script, which continuously aggregates the data and reports the current results every 3 seconds, or at the optionally specified interval. After the current results are displayed, the aggregations are cleared and the cycle begins anew. To run the scripts, simply pipe the output of the 'perf trace record' step as input to the corresponding 'perf trace report' step, using '-' as the filename to -o and -i: $ perf trace record sctop -o - | perf trace report sctop -i - Also adds clear_term() utility functions to the and utility modules, for use by any script to clear the screen. Signed-off-by: Tom Zanussi <> Acked-by: Thomas Gleixner <> Cc: Cc: Cc: Cc: LKML-Reference: <> Signed-off-by: Ingo Molnar <>