* + scripts-decode_stacktrace-skip-missing-symbols.patch added to -mm tree
@ 2020-06-25 5:29 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2020-06-25 5:29 UTC (permalink / raw)
To: mm-commits, sashal, khlebnikov
The patch titled
Subject: scripts/decode_stacktrace.sh: skip missing symbols
has been added to the -mm tree. Its filename is
scripts-decode_stacktrace-skip-missing-symbols.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/scripts-decode_stacktrace-skip-missing-symbols.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/scripts-decode_stacktrace-skip-missing-symbols.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Subject: scripts/decode_stacktrace.sh: skip missing symbols
For now script turns missing symbols into '0' and make bogus decode. Skip
them instead. Also simplify parsing output of 'nm'.
Before:
$ echo 'xxx+0x0/0x0' | ./scripts/decode_stacktrace.sh vmlinux ""
xxx (home/khlebnikov/src/linux/./arch/x86/include/asm/processor.h:398)
After:
$ echo 'xxx+0x0/0x0' | ./scripts/decode_stacktrace.sh vmlinux ""
xxx+0x0/0x0
Link: http://lkml.kernel.org/r/159282922499.248444.4883465570858385250.stgit@buzz
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Cc: Sasha Levin <sashal@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
scripts/decode_stacktrace.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/scripts/decode_stacktrace.sh~scripts-decode_stacktrace-skip-missing-symbols
+++ a/scripts/decode_stacktrace.sh
@@ -56,7 +56,11 @@ parse_symbol() {
if [[ "${cache[$module,$name]+isset}" == "isset" ]]; then
local base_addr=${cache[$module,$name]}
else
- local base_addr=$(nm "$objfile" | grep -i ' t ' | awk "/ $name\$/ {print \$1}" | head -n1)
+ local base_addr=$(nm "$objfile" | awk '$3 == "'$name'" && ($2 == "t" || $2 == "T") {print $1; exit}')
+ if [[ $base_addr == "" ]] ; then
+ # address not found
+ return
+ fi
cache[$module,$name]="$base_addr"
fi
# Let's start doing the math to get the exact address into the
_
Patches currently in -mm which might be from khlebnikov@yandex-team.ru are
scripts-decode_stacktrace-skip-missing-symbols.patch
scripts-decode_stacktrace-guess-basepath-if-not-specified.patch
scripts-decode_stacktrace-guess-path-to-modules.patch
scripts-decode_stacktrace-guess-path-to-vmlinux-by-release-name.patch
kernel-watchdog-flush-all-printk-nmi-buffers-when-hardlockup-detected.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-06-25 5:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-25 5:29 + scripts-decode_stacktrace-skip-missing-symbols.patch added to -mm tree akpm
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).