summaryrefslogtreecommitdiffstats
path: root/scripts/bootgraph.pl
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-10-31 00:38:21 +0100
committerIngo Molnar <mingo@elte.hu>2008-10-31 00:38:21 +0100
commite1e302d8a9ab06ba8d7d5ec503d8996e6cf0eca4 (patch)
tree6a6c805fdfd6a2f6433956cbee348b2c3a277784 /scripts/bootgraph.pl
parent944ac4259e39801c843a915c3da8194ac9af0440 (diff)
parent7f82f000ed030d1108b4de47d9e2d556092980c6 (diff)
downloadlinux-stable-e1e302d8a9ab06ba8d7d5ec503d8996e6cf0eca4.tar.gz
linux-stable-e1e302d8a9ab06ba8d7d5ec503d8996e6cf0eca4.tar.bz2
linux-stable-e1e302d8a9ab06ba8d7d5ec503d8996e6cf0eca4.zip
Merge branch 'linus' into tracing/ftrace
Diffstat (limited to 'scripts/bootgraph.pl')
-rw-r--r--scripts/bootgraph.pl19
1 files changed, 12 insertions, 7 deletions
diff --git a/scripts/bootgraph.pl b/scripts/bootgraph.pl
index 5e7316e5aa39..d2c61efc216f 100644
--- a/scripts/bootgraph.pl
+++ b/scripts/bootgraph.pl
@@ -37,7 +37,10 @@
# dmesg | perl scripts/bootgraph.pl > output.svg
#
-my %start, %end;
+use strict;
+
+my %start;
+my %end;
my $done = 0;
my $maxtime = 0;
my $firsttime = 100;
@@ -105,18 +108,20 @@ my $threshold = ($maxtime - $firsttime) / 60.0;
my $stylecounter = 0;
my %rows;
my $rowscount = 1;
-while (($key,$value) = each %start) {
+my @initcalls = sort { $start{$a} <=> $start{$b} } keys(%start);
+my $key;
+foreach $key (@initcalls) {
my $duration = $end{$key} - $start{$key};
if ($duration >= $threshold) {
- my $s, $s2, $e, $y;
- $pid = $pids{$key};
+ my ($s, $s2, $e, $w, $y, $y2, $style);
+ my $pid = $pids{$key};
if (!defined($rows{$pid})) {
$rows{$pid} = $rowscount;
$rowscount = $rowscount + 1;
}
- $s = ($value - $firsttime) * $mult;
+ $s = ($start{$key} - $firsttime) * $mult;
$s2 = $s + 6;
$e = ($end{$key} - $firsttime) * $mult;
$w = $e - $s;
@@ -140,9 +145,9 @@ while (($key,$value) = each %start) {
my $time = $firsttime;
my $step = ($maxtime - $firsttime) / 15;
while ($time < $maxtime) {
- my $s2 = ($time - $firsttime) * $mult;
+ my $s3 = ($time - $firsttime) * $mult;
my $tm = int($time * 100) / 100.0;
- print "<text transform=\"translate($s2,89) rotate(90)\">$tm</text>\n";
+ print "<text transform=\"translate($s3,89) rotate(90)\">$tm</text>\n";
$time = $time + $step;
}