From: Roberto Nibali <ratz@drugphish.ch>
To: vda@port.imtp.ilyichevsk.odessa.ua
Cc: linux-kernel@vger.kernel.org, Keith Owens <kaos@ocs.com.au>,
Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: Improved ksymoops output
Date: Wed, 13 Feb 2002 11:12:54 +0100 [thread overview]
Message-ID: <3C6A3C26.4050908@drugphish.ch> (raw)
In-Reply-To: <200202130805.g1D85st16817@Port.imtp.ilyichevsk.odessa.ua>
Hello,
I like the idea very much. As I have to maintain a kernel tree for
various customers too, I think this could be a nice addition for the bug
reports (seldom luckily) I sometimes get.
> gen_func2file.map
> =================
[snipped rest of the bash script]
This can be improved a little bit:
----------------------------------------------------------------
#!/bin/sh
# Meant to be run in top lever kernel source dir
# after kernel has been built
#
# Makes list of the form:
# symbol1 object_file_pathname1
# symbol2 object_file_pathname2
# symbol3 object_file_pathname3
> func2file.map
find -name '*.c' | while read a; do
#nm: get symbols from .o
#grep: discard non-text symbols
#awk: remove './', add .o pathname
#cut: remove address and symbol type letter
b=${a%.*}
test -e "${b}.o" && {
nm "${b}.o" \
| grep '\( T \)\|\( t \)' \
| awk "BEGIN { N=\" ${a:2}\" } { print \$0,N }" \
| cut -b12- \
>> func2file.map
}
done
----------------------------------------------------------------
This script compared to yours does (it's nitpicking):
o run faster (5%) ;)
o should never have problems when one day there will be a lot of *.c
files. In your approach LIST could someday not hold all entries
anymore.
o simplifies the bash 'regexp' to snip away the '.c' and print the rest
I'm propably going to rewrite the python script in bash too, since I
don't run python on my distro (and I do not intend to use 2.5.x anytime
soon).
Best regards,
Roberto Nibali, ratz
next prev parent reply other threads:[~2002-02-13 10:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-13 12:05 Improved ksymoops output Denis Vlasenko
2002-02-13 10:12 ` Roberto Nibali [this message]
[not found] ` <200202131223.g1DCN5t17824@Port.imtp.ilyichevsk.odessa.ua>
2002-02-14 1:30 ` Roberto Nibali
2002-02-13 10:15 ` Russell King
2002-02-14 16:02 ` Denis Vlasenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3C6A3C26.4050908@drugphish.ch \
--to=ratz@drugphish.ch \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=kaos@ocs.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=vda@port.imtp.ilyichevsk.odessa.ua \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox