diff options
Diffstat (limited to 'scripts/bootgraph.pl')
| -rw-r--r-- | scripts/bootgraph.pl | 15 |
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 | ||
| 40 | my %start, %end; | 40 | use strict; |
| 41 | |||
| 42 | my %start; | ||
| 43 | my %end; | ||
| 41 | my $done = 0; | 44 | my $done = 0; |
| 42 | my $maxtime = 0; | 45 | my $maxtime = 0; |
| 43 | my $firsttime = 100; | 46 | my $firsttime = 100; |
| @@ -105,12 +108,14 @@ my $threshold = ($maxtime - $firsttime) / 60.0; | |||
| 105 | my $stylecounter = 0; | 108 | my $stylecounter = 0; |
| 106 | my %rows; | 109 | my %rows; |
| 107 | my $rowscount = 1; | 110 | my $rowscount = 1; |
| 111 | my $key; | ||
| 112 | my $value; | ||
| 108 | while (($key,$value) = each %start) { | 113 | while (($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) { | |||
| 140 | my $time = $firsttime; | 145 | my $time = $firsttime; |
| 141 | my $step = ($maxtime - $firsttime) / 15; | 146 | my $step = ($maxtime - $firsttime) / 15; |
| 142 | while ($time < $maxtime) { | 147 | while ($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 | ||
