diff options
| author | Grant Likely <grant.likely@secretlab.ca> | 2010-05-25 00:38:26 -0600 |
|---|---|---|
| committer | Grant Likely <grant.likely@secretlab.ca> | 2010-05-25 00:38:26 -0600 |
| commit | b1e50ebcf24668e57f058deb48b0704b5391ed0f (patch) | |
| tree | 17e1b69b249d0738317b732186340c9dd053f1a1 /tools/perf/scripts/perl/wakeup-latency.pl | |
| parent | 0c2a2ae32793e3500a15a449612485f5d17dd431 (diff) | |
| parent | 7e125f7b9cbfce4101191b8076d606c517a73066 (diff) | |
Merge remote branch 'origin' into secretlab/next-spi
Diffstat (limited to 'tools/perf/scripts/perl/wakeup-latency.pl')
| -rw-r--r-- | tools/perf/scripts/perl/wakeup-latency.pl | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/perf/scripts/perl/wakeup-latency.pl b/tools/perf/scripts/perl/wakeup-latency.pl index ed58ef284e2..d9143dcec6c 100644 --- a/tools/perf/scripts/perl/wakeup-latency.pl +++ b/tools/perf/scripts/perl/wakeup-latency.pl @@ -22,8 +22,8 @@ my %last_wakeup; my $max_wakeup_latency; my $min_wakeup_latency; -my $total_wakeup_latency; -my $total_wakeups; +my $total_wakeup_latency = 0; +my $total_wakeups = 0; sub sched::sched_switch { @@ -67,8 +67,12 @@ sub trace_end { printf("wakeup_latency stats:\n\n"); print "total_wakeups: $total_wakeups\n"; - printf("avg_wakeup_latency (ns): %u\n", - avg($total_wakeup_latency, $total_wakeups)); + if ($total_wakeups) { + printf("avg_wakeup_latency (ns): %u\n", + avg($total_wakeup_latency, $total_wakeups)); + } else { + printf("avg_wakeup_latency (ns): N/A\n"); + } printf("min_wakeup_latency (ns): %u\n", $min_wakeup_latency); printf("max_wakeup_latency (ns): %u\n", $max_wakeup_latency); |
