Skip to content

Commit

Permalink
tracing/fastboot: fix bootgraph.pl initcall name regexp
Browse files Browse the repository at this point in the history
The regexp used to match the start and the end of an initcall
are matching only on [a-zA-Z\_]. This rules out initcalls with
a number in them. This patch is fixing that.

Signed-off-by: Arnaud Patard <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
Arnaud Patard authored and Ingo Molnar committed Oct 14, 2008
1 parent 80a398a commit 5c54236
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/bootgraph.pl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

while (<>) {
my $line = $_;
if ($line =~ /([0-9\.]+)\] calling ([a-zA-Z\_]+)\+/) {
if ($line =~ /([0-9\.]+)\] calling ([a-zA-Z0-9\_]+)\+/) {
my $func = $2;
if ($done == 0) {
$start{$func} = $1;
Expand All @@ -60,7 +60,7 @@
$count = $count + 1;
}

if ($line =~ /([0-9\.]+)\] initcall ([a-zA-Z\_]+)\+.*returned/) {
if ($line =~ /([0-9\.]+)\] initcall ([a-zA-Z0-9\_]+)\+.*returned/) {
if ($done == 0) {
$end{$2} = $1;
$maxtime = $1;
Expand All @@ -75,8 +75,8 @@
}

if ($count == 0) {
print "No data found in the dmesg. Make sure CONFIG_PRINTK_TIME is enabled and\n";
print "that initcall_debug is passed on the kernel command line.\n\n";
print "No data found in the dmesg. Make sure that 'printk.time=1' and\n";
print "'initcall_debug' are passed on the kernel command line.\n\n";
print "Usage: \n";
print " dmesg | perl scripts/bootgraph.pl > output.svg\n\n";
exit;
Expand Down

0 comments on commit 5c54236

Please sign in to comment.