aboutsummaryrefslogtreecommitdiff
path: root/scripts/bootgraph.pl
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-28 09:52:25 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-28 09:52:25 -0700
commite946217e4fdaa67681bbabfa8e6b18641921f750 (patch)
tree057ad6cb5869e20db7b93f154319560b55cbc725 /scripts/bootgraph.pl
parenta1865769254dd4eefbc1e857d17bc2a77d5f8580 (diff)
parent60063a66236c15f5613f91390631e06718689782 (diff)
Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (31 commits) ftrace: fix current_tracer error return tracing: fix a build error on alpha ftrace: use a real variable for ftrace_nop in x86 tracing/ftrace: make boot tracer select the sched_switch tracer tracepoint: check if the probe has been registered asm-generic: define DIE_OOPS in asm-generic trace: fix printk warning for u64 ftrace: warning in kernel/trace/ftrace.c ftrace: fix build failure ftrace, powerpc, sparc64, x86: remove notrace from arch ftrace file ftrace: remove ftrace hash ftrace: remove mcount set ftrace: remove daemon ftrace: disable dynamic ftrace for all archs that use daemon ftrace: add ftrace warn on to disable ftrace ftrace: only have ftrace_kill atomic ftrace: use probe_kernel ftrace: comment arch ftrace code ftrace: return error on failed modified text. ftrace: dynamic ftrace process only text section ...
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 5e7316e5aa3..d2c61efc216 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;
}