Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116680
b: refs/heads/master
c: ddc7a01
h: refs/heads/master
v: v3
  • Loading branch information
Frederic Weisbecker authored and Ingo Molnar committed Oct 14, 2008
1 parent a4c6060 commit ab1b6ed
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8a5d900cca57115326bc5b9e7f3bac980986c2c8
refs/heads/master: ddc7a01aad195708fc943d9446411d11e3547784
26 changes: 14 additions & 12 deletions trunk/scripts/bootgraph.pl
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,21 @@
# dmesg | perl scripts/bootgraph.pl > output.svg
#

my @rows;
my %start, %end, %row;
my %start, %end;
my $done = 0;
my $rowcount = 0;
my $maxtime = 0;
my $count = 0;
my %pids;

while (<>) {
my $line = $_;
if ($line =~ /([0-9\.]+)\] calling ([a-zA-Z\_]+)\+/) {
my $func = $2;
if ($done == 0) {
$start{$func} = $1;
}
$row{$func} = 1;
if ($line =~ /\@ ([0-9]+)/) {
my $pid = $1;
if (!defined($rows[$pid])) {
$rowcount = $rowcount + 1;
$rows[$pid] = $rowcount;
}
$row{$func} = $rows[$pid];
$pids{$func} = $1;
}
$count = $count + 1;
}
Expand Down Expand Up @@ -102,17 +96,25 @@
my $mult = 950.0 / $maxtime;
my $threshold = 0.0500 / $maxtime;
my $stylecounter = 0;
my %rows;
my $rowscount = 1;
while (($key,$value) = each %start) {
my $duration = $end{$key} - $start{$key};

if ($duration >= $threshold) {
my $s, $s2, $e, $y;
$s = $value * $mult;
$pid = $pids{$key};

if (!defined($rows{$pid})) {
$rows{$pid} = $rowscount;
$rowscount = $rowscount + 1;
}
$s = ($value - $firsttime) * $mult;
$s2 = $s + 6;
$e = $end{$key} * $mult;
$w = $e - $s;

$y = $row{$key} * 150;
$y = $rows{$pid} * 150;
$y2 = $y + 4;

$style = $styles[$stylecounter];
Expand Down

0 comments on commit ab1b6ed

Please sign in to comment.