diff options
Diffstat (limited to 'meta/packages/linux/linux-moblin-2.6.27-rc6/0040-fastboot-fix-issues-and-improve-output-of-bootgraph.patch')
| -rw-r--r-- | meta/packages/linux/linux-moblin-2.6.27-rc6/0040-fastboot-fix-issues-and-improve-output-of-bootgraph.patch | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/meta/packages/linux/linux-moblin-2.6.27-rc6/0040-fastboot-fix-issues-and-improve-output-of-bootgraph.patch b/meta/packages/linux/linux-moblin-2.6.27-rc6/0040-fastboot-fix-issues-and-improve-output-of-bootgraph.patch new file mode 100644 index 0000000000..0daba9d2cf --- /dev/null +++ b/meta/packages/linux/linux-moblin-2.6.27-rc6/0040-fastboot-fix-issues-and-improve-output-of-bootgraph.patch | |||
| @@ -0,0 +1,91 @@ | |||
| 1 | From 5470e09b98074974316bbf98c8b8da01d670c2a4 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
| 3 | Date: Sun, 14 Sep 2008 15:30:52 -0700 | ||
| 4 | Subject: [PATCH] fastboot: fix issues and improve output of bootgraph.pl | ||
| 5 | |||
| 6 | David Sanders reported some issues with bootgraph.pl's display | ||
| 7 | of his sytems bootup; this commit fixes these by scaling the graph | ||
| 8 | not from 0 - end time but from the first initcall to the end time; | ||
| 9 | the minimum display size etc also now need to scale with this, as does | ||
| 10 | the axis display. | ||
| 11 | |||
| 12 | Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> | ||
| 13 | --- | ||
| 14 | scripts/bootgraph.pl | 25 +++++++++++++++++-------- | ||
| 15 | 1 files changed, 17 insertions(+), 8 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/scripts/bootgraph.pl b/scripts/bootgraph.pl | ||
| 18 | index d459b8b..4e5f4ab 100644 | ||
| 19 | --- a/scripts/bootgraph.pl | ||
| 20 | +++ b/scripts/bootgraph.pl | ||
| 21 | @@ -42,6 +42,7 @@ my %start, %end, %row; | ||
| 22 | my $done = 0; | ||
| 23 | my $rowcount = 0; | ||
| 24 | my $maxtime = 0; | ||
| 25 | +my $firsttime = 100; | ||
| 26 | my $count = 0; | ||
| 27 | while (<>) { | ||
| 28 | my $line = $_; | ||
| 29 | @@ -49,6 +50,9 @@ while (<>) { | ||
| 30 | my $func = $2; | ||
| 31 | if ($done == 0) { | ||
| 32 | $start{$func} = $1; | ||
| 33 | + if ($1 < $firsttime) { | ||
| 34 | + $firsttime = $1; | ||
| 35 | + } | ||
| 36 | } | ||
| 37 | $row{$func} = 1; | ||
| 38 | if ($line =~ /\@ ([0-9]+)/) { | ||
| 39 | @@ -71,6 +75,9 @@ while (<>) { | ||
| 40 | if ($line =~ /Write protecting the/) { | ||
| 41 | $done = 1; | ||
| 42 | } | ||
| 43 | + if ($line =~ /Freeing unused kernel memory/) { | ||
| 44 | + $done = 1; | ||
| 45 | + } | ||
| 46 | } | ||
| 47 | |||
| 48 | if ($count == 0) { | ||
| 49 | @@ -99,17 +106,17 @@ $styles[9] = "fill:rgb(255,255,128);fill-opacity:0.5;stroke-width:1;stroke:rgb(0 | ||
| 50 | $styles[10] = "fill:rgb(255,128,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"; | ||
| 51 | $styles[11] = "fill:rgb(128,255,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"; | ||
| 52 | |||
| 53 | -my $mult = 950.0 / $maxtime; | ||
| 54 | -my $threshold = 0.0500 / $maxtime; | ||
| 55 | +my $mult = 950.0 / ($maxtime - $firsttime); | ||
| 56 | +my $threshold = ($maxtime - $firsttime) / 60.0; | ||
| 57 | my $stylecounter = 0; | ||
| 58 | while (($key,$value) = each %start) { | ||
| 59 | my $duration = $end{$key} - $start{$key}; | ||
| 60 | |||
| 61 | if ($duration >= $threshold) { | ||
| 62 | my $s, $s2, $e, $y; | ||
| 63 | - $s = $value * $mult; | ||
| 64 | + $s = ($value - $firsttime) * $mult; | ||
| 65 | $s2 = $s + 6; | ||
| 66 | - $e = $end{$key} * $mult; | ||
| 67 | + $e = ($end{$key} - $firsttime) * $mult; | ||
| 68 | $w = $e - $s; | ||
| 69 | |||
| 70 | $y = $row{$key} * 150; | ||
| 71 | @@ -128,11 +135,13 @@ while (($key,$value) = each %start) { | ||
| 72 | |||
| 73 | |||
| 74 | # print the time line on top | ||
| 75 | -my $time = 0.0; | ||
| 76 | +my $time = $firsttime; | ||
| 77 | +my $step = ($maxtime - $firsttime) / 15; | ||
| 78 | while ($time < $maxtime) { | ||
| 79 | - my $s2 = $time * $mult; | ||
| 80 | - print "<text transform=\"translate($s2,89) rotate(90)\">$time</text>\n"; | ||
| 81 | - $time = $time + 0.1; | ||
| 82 | + my $s2 = ($time - $firsttime) * $mult; | ||
| 83 | + my $tm = int($time * 100) / 100.0; | ||
| 84 | + print "<text transform=\"translate($s2,89) rotate(90)\">$tm</text>\n"; | ||
| 85 | + $time = $time + $step; | ||
| 86 | } | ||
| 87 | |||
| 88 | print "</svg>\n"; | ||
| 89 | -- | ||
| 90 | 1.5.4.3 | ||
| 91 | |||
