* [PATCH] bootgraph: fix for use with dot symbols
@ 2009-01-28 3:30 Michael Neuling
2009-01-28 4:53 ` Arjan van de Ven
0 siblings, 1 reply; 4+ messages in thread
From: Michael Neuling @ 2009-01-28 3:30 UTC (permalink / raw)
To: Arjan van de Ven; +Cc: linuxppc-dev, linux-kernel, anton
powerpc has dot symbols, so the dmesg output looks like:
<4>[ 0.327310] calling .migration_init+0x0/0x9c @ 1
<4>[ 0.327595] initcall .migration_init+0x0/0x9c returned 1 after 0 usecs
The below fixes bootgraph.pl so it handles this correctly.
Signed-off-by: Michael Neuling <mikey@neuling.org>
---
scripts/bootgraph.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux-2.6-ozlabs/scripts/bootgraph.pl
===================================================================
--- linux-2.6-ozlabs.orig/scripts/bootgraph.pl
+++ linux-2.6-ozlabs/scripts/bootgraph.pl
@@ -51,7 +51,7 @@ my %pidctr;
while (<>) {
my $line = $_;
- if ($line =~ /([0-9\.]+)\] calling ([a-zA-Z0-9\_]+)\+/) {
+ if ($line =~ /([0-9\.]+)\] calling ([a-zA-Z0-9\_\.]+)\+/) {
my $func = $2;
if ($done == 0) {
$start{$func} = $1;
@@ -87,7 +87,7 @@ while (<>) {
$count = $count + 1;
}
- if ($line =~ /([0-9\.]+)\] initcall ([a-zA-Z0-9\_]+)\+.*returned/) {
+ if ($line =~ /([0-9\.]+)\] initcall ([a-zA-Z0-9\_\.]+)\+.*returned/) {
if ($done == 0) {
$end{$2} = $1;
$maxtime = $1;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] bootgraph: fix for use with dot symbols
2009-01-28 3:30 [PATCH] bootgraph: fix for use with dot symbols Michael Neuling
@ 2009-01-28 4:53 ` Arjan van de Ven
2009-01-28 10:56 ` Anton Blanchard
0 siblings, 1 reply; 4+ messages in thread
From: Arjan van de Ven @ 2009-01-28 4:53 UTC (permalink / raw)
To: Michael Neuling; +Cc: linuxppc-dev, linux-kernel, anton
Michael Neuling wrote:
> powerpc has dot symbols, so the dmesg output looks like:
>
> <4>[ 0.327310] calling .migration_init+0x0/0x9c @ 1
> <4>[ 0.327595] initcall .migration_init+0x0/0x9c returned 1 after 0 usecs
>
> The below fixes bootgraph.pl so it handles this correctly.
question for the ppc folks.... why does the "print symbol" magic format string
thing print a dot symbol and not the real function name?
Should that be fixed instead?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] bootgraph: fix for use with dot symbols
2009-01-28 4:53 ` Arjan van de Ven
@ 2009-01-28 10:56 ` Anton Blanchard
2009-02-08 0:57 ` Michael Neuling
0 siblings, 1 reply; 4+ messages in thread
From: Anton Blanchard @ 2009-01-28 10:56 UTC (permalink / raw)
To: Arjan van de Ven; +Cc: linuxppc-dev, Michael Neuling, linux-kernel
Hi Arjan,
> question for the ppc folks.... why does the "print symbol" magic format string
> thing print a dot symbol and not the real function name?
> Should that be fixed instead?
We have two symbols for each function, foo points to the function
descriptor, and .foo points to the instruction text. If we were to strip
the '.' when we print symbols then it would become harder to diagnose
some failures (eg branching to the function descriptor instead of the
instruction text).
Anton
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] bootgraph: fix for use with dot symbols
2009-01-28 10:56 ` Anton Blanchard
@ 2009-02-08 0:57 ` Michael Neuling
0 siblings, 0 replies; 4+ messages in thread
From: Michael Neuling @ 2009-02-08 0:57 UTC (permalink / raw)
To: Arjan van de Ven; +Cc: linuxppc-dev, Anton Blanchard, linux-kernel
> > question for the ppc folks.... why does the "print symbol" magic format str
ing
> > thing print a dot symbol and not the real function name?
> > Should that be fixed instead?
>
> We have two symbols for each function, foo points to the function
> descriptor, and .foo points to the instruction text. If we were to strip
> the '.' when we print symbols then it would become harder to diagnose
> some failures (eg branching to the function descriptor instead of the
> instruction text).
Arjan,
I don't think there is much scope for removing dot symbols in the near
future.
Can you please take the patch as is for now so bootgraph will at least
work for existing systems?
Mikey
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-02-08 0:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-28 3:30 [PATCH] bootgraph: fix for use with dot symbols Michael Neuling
2009-01-28 4:53 ` Arjan van de Ven
2009-01-28 10:56 ` Anton Blanchard
2009-02-08 0:57 ` Michael Neuling
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).