aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAlan Jenkins <alan-jenkins@tuffmail.co.uk>2008-10-14 09:18:07 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-22 10:37:12 -0400
commit2a813f8cd8ce91d588a595c5709502dece3af289 (patch)
tree8695346bf06c22909574da1bd8f972119488f6bf /scripts
parent17d80fd07d35ae1d231b3378ee4f00ace54f9d31 (diff)
tracing/fastboot: fix bootgraph.pl to run with "use strict"
As a perl novice, I would prefer to have the benefit of the interpreters' wisdom. It turns out there were already some warnings, so let's fix them. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Acked-by: Frédéric Weisbecker <fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/bootgraph.pl15
1 files changed, 10 insertions, 5 deletions
diff --git a/scripts/bootgraph.pl b/scripts/bootgraph.pl
index 5e7316e5aa39..ea2b079af9fd 100644
--- a/scripts/bootgraph.pl
+++ b/scripts/bootgraph.pl
@@ -37,7 +37,10 @@
37# dmesg | perl scripts/bootgraph.pl > output.svg 37# dmesg | perl scripts/bootgraph.pl > output.svg
38# 38#
39 39
40my %start, %end; 40use strict;
41
42my %start;
43my %end;
41my $done = 0; 44my $done = 0;
42my $maxtime = 0; 45my $maxtime = 0;
43my $firsttime = 100; 46my $firsttime = 100;
@@ -105,12 +108,14 @@ my $threshold = ($maxtime - $firsttime) / 60.0;
105my $stylecounter = 0; 108my $stylecounter = 0;
106my %rows; 109my %rows;
107my $rowscount = 1; 110my $rowscount = 1;
111my $key;
112my $value;
108while (($key,$value) = each %start) { 113while (($key,$value) = each %start) {
109 my $duration = $end{$key} - $start{$key}; 114 my $duration = $end{$key} - $start{$key};
110 115
111 if ($duration >= $threshold) { 116 if ($duration >= $threshold) {
112 my $s, $s2, $e, $y; 117 my ($s, $s2, $e, $w, $y, $y2, $style);
113 $pid = $pids{$key}; 118 my $pid = $pids{$key};
114 119
115 if (!defined($rows{$pid})) { 120 if (!defined($rows{$pid})) {
116 $rows{$pid} = $rowscount; 121 $rows{$pid} = $rowscount;
@@ -140,9 +145,9 @@ while (($key,$value) = each %start) {
140my $time = $firsttime; 145my $time = $firsttime;
141my $step = ($maxtime - $firsttime) / 15; 146my $step = ($maxtime - $firsttime) / 15;
142while ($time < $maxtime) { 147while ($time < $maxtime) {
143 my $s2 = ($time - $firsttime) * $mult; 148 my $s3 = ($time - $firsttime) * $mult;
144 my $tm = int($time * 100) / 100.0; 149 my $tm = int($time * 100) / 100.0;
145 print "<text transform=\"translate($s2,89) rotate(90)\">$tm</text>\n"; 150 print "<text transform=\"translate($s3,89) rotate(90)\">$tm</text>\n";
146 $time = $time + $step; 151 $time = $time + $step;
147} 152}
148 153