diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-20 16:35:07 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-20 16:35:07 -0400 |
| commit | 92b29b86fe2e183d44eb467e5e74a5f718ef2e43 (patch) | |
| tree | 1bac8a1aa11d47322b66d10ec3a370016d843d06 /scripts/bootgraph.pl | |
| parent | b9d7ccf56be1ac77b71a284a1c0e6337f9a7aff0 (diff) | |
| parent | 98d9c66ab07471006fd7910cb16453581c41a3e7 (diff) | |
Merge branch 'tracing-v28-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'tracing-v28-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (131 commits)
tracing/fastboot: improve help text
tracing/stacktrace: improve help text
tracing/fastboot: fix initcalls disposition in bootgraph.pl
tracing/fastboot: fix bootgraph.pl initcall name regexp
tracing/fastboot: fix issues and improve output of bootgraph.pl
tracepoints: synchronize unregister static inline
tracepoints: tracepoint_synchronize_unregister()
ftrace: make ftrace_test_p6nop disassembler-friendly
markers: fix synchronize marker unregister static inline
tracing/fastboot: add better resolution to initcall debug/tracing
trace: add build-time check to avoid overrunning hex buffer
ftrace: fix hex output mode of ftrace
tracing/fastboot: fix initcalls disposition in bootgraph.pl
tracing/fastboot: fix printk format typo in boot tracer
ftrace: return an error when setting a nonexistent tracer
ftrace: make some tracers reentrant
ring-buffer: make reentrant
ring-buffer: move page indexes into page headers
tracing/fastboot: only trace non-module initcalls
ftrace: move pc counter in irqtrace
...
Manually fix conflicts:
- init/main.c: initcall tracing
- kernel/module.c: verbose level vs tracepoints
- scripts/bootgraph.pl: fallout from cherry-picking commits.
Diffstat (limited to 'scripts/bootgraph.pl')
| -rw-r--r-- | scripts/bootgraph.pl | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/scripts/bootgraph.pl b/scripts/bootgraph.pl index 2243353fe55d..5e7316e5aa39 100644 --- a/scripts/bootgraph.pl +++ b/scripts/bootgraph.pl | |||
| @@ -37,13 +37,13 @@ | |||
| 37 | # dmesg | perl scripts/bootgraph.pl > output.svg | 37 | # dmesg | perl scripts/bootgraph.pl > output.svg |
| 38 | # | 38 | # |
| 39 | 39 | ||
| 40 | my @rows; | 40 | my %start, %end; |
| 41 | my %start, %end, %row; | ||
| 42 | my $done = 0; | 41 | my $done = 0; |
| 43 | my $rowcount = 0; | ||
| 44 | my $maxtime = 0; | 42 | my $maxtime = 0; |
| 45 | my $firsttime = 100; | 43 | my $firsttime = 100; |
| 46 | my $count = 0; | 44 | my $count = 0; |
| 45 | my %pids; | ||
| 46 | |||
| 47 | while (<>) { | 47 | while (<>) { |
| 48 | my $line = $_; | 48 | my $line = $_; |
| 49 | if ($line =~ /([0-9\.]+)\] calling ([a-zA-Z0-9\_]+)\+/) { | 49 | if ($line =~ /([0-9\.]+)\] calling ([a-zA-Z0-9\_]+)\+/) { |
| @@ -54,14 +54,8 @@ while (<>) { | |||
| 54 | $firsttime = $1; | 54 | $firsttime = $1; |
| 55 | } | 55 | } |
| 56 | } | 56 | } |
| 57 | $row{$func} = 1; | ||
| 58 | if ($line =~ /\@ ([0-9]+)/) { | 57 | if ($line =~ /\@ ([0-9]+)/) { |
| 59 | my $pid = $1; | 58 | $pids{$func} = $1; |
| 60 | if (!defined($rows[$pid])) { | ||
| 61 | $rowcount = $rowcount + 1; | ||
| 62 | $rows[$pid] = $rowcount; | ||
| 63 | } | ||
| 64 | $row{$func} = $rows[$pid]; | ||
| 65 | } | 59 | } |
| 66 | $count = $count + 1; | 60 | $count = $count + 1; |
| 67 | } | 61 | } |
| @@ -109,17 +103,25 @@ $styles[11] = "fill:rgb(128,255,255);fill-opacity:0.5;stroke-width:1;stroke:rgb( | |||
| 109 | my $mult = 950.0 / ($maxtime - $firsttime); | 103 | my $mult = 950.0 / ($maxtime - $firsttime); |
| 110 | my $threshold = ($maxtime - $firsttime) / 60.0; | 104 | my $threshold = ($maxtime - $firsttime) / 60.0; |
| 111 | my $stylecounter = 0; | 105 | my $stylecounter = 0; |
| 106 | my %rows; | ||
| 107 | my $rowscount = 1; | ||
| 112 | while (($key,$value) = each %start) { | 108 | while (($key,$value) = each %start) { |
| 113 | my $duration = $end{$key} - $start{$key}; | 109 | my $duration = $end{$key} - $start{$key}; |
| 114 | 110 | ||
| 115 | if ($duration >= $threshold) { | 111 | if ($duration >= $threshold) { |
| 116 | my $s, $s2, $e, $y; | 112 | my $s, $s2, $e, $y; |
| 113 | $pid = $pids{$key}; | ||
| 114 | |||
| 115 | if (!defined($rows{$pid})) { | ||
| 116 | $rows{$pid} = $rowscount; | ||
| 117 | $rowscount = $rowscount + 1; | ||
| 118 | } | ||
| 117 | $s = ($value - $firsttime) * $mult; | 119 | $s = ($value - $firsttime) * $mult; |
| 118 | $s2 = $s + 6; | 120 | $s2 = $s + 6; |
| 119 | $e = ($end{$key} - $firsttime) * $mult; | 121 | $e = ($end{$key} - $firsttime) * $mult; |
| 120 | $w = $e - $s; | 122 | $w = $e - $s; |
| 121 | 123 | ||
| 122 | $y = $row{$key} * 150; | 124 | $y = $rows{$pid} * 150; |
| 123 | $y2 = $y + 4; | 125 | $y2 = $y + 4; |
| 124 | 126 | ||
| 125 | $style = $styles[$stylecounter]; | 127 | $style = $styles[$stylecounter]; |
