+ scripts-faddr2line-fix-error-when-addr2line-output-contains-discriminator.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: scripts/faddr2line: fix error when addr2line output contains discriminator
has been added to the -mm tree.  Its filename is
     scripts-faddr2line-fix-error-when-addr2line-output-contains-discriminator.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/scripts-faddr2line-fix-error-when-addr2line-output-contains-discriminator.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/scripts-faddr2line-fix-error-when-addr2line-output-contains-discriminator.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: Changbin Du <changbin.du@xxxxxxxxx>
Subject: scripts/faddr2line: fix error when addr2line output contains discriminator

When addr2line output contains discriminator, the current awk script
cannot parse it.  This patch fixes it by extracting key words using regex
which is more reliable.

$ scripts/faddr2line vmlinux tlb_flush_mmu_free+0x26
tlb_flush_mmu_free+0x26/0x50:
tlb_flush_mmu_free at mm/memory.c:258 (discriminator 3)
scripts/faddr2line: eval: line 173: unexpected EOF while looking for matching `)'

Link: http://lkml.kernel.org/r/1525323379-25193-1-git-send-email-changbin.du@xxxxxxxxx
Fixes: 6870c0165feaa5 ("scripts/faddr2line: show the code context")
Signed-off-by: Changbin Du <changbin.du@xxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: Philippe Ombredanne <pombredanne@xxxxxxxx>
Cc: NeilBrown <neilb@xxxxxxxx>
Cc: Richard Weinberger <richard@xxxxxx>
Cc: Kate Stewart <kstewart@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 scripts/faddr2line |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff -puN scripts/faddr2line~scripts-faddr2line-fix-error-when-addr2line-output-contains-discriminator scripts/faddr2line
--- a/scripts/faddr2line~scripts-faddr2line-fix-error-when-addr2line-output-contains-discriminator
+++ a/scripts/faddr2line
@@ -170,7 +170,10 @@ __faddr2line() {
 		echo "$file_lines" | while read -r line
 		do
 			echo $line
-			eval $(echo $line | awk -F "[ :]" '{printf("n1=%d;n2=%d;f=%s",$NF-5, $NF+5, $(NF-1))}')
+			n=$(echo $line | sed 's/.*:\([0-9]\+\).*/\1/g')
+			n1=$[$n-5]
+			n2=$[$n+5]
+			f=$(echo $line | sed 's/.*at \(.\+\):.*/\1/g')
 			awk 'NR>=strtonum("'$n1'") && NR<=strtonum("'$n2'") {printf("%d\t%s\n", NR, $0)}' $f
 		done
 
_

Patches currently in -mm which might be from changbin.du@xxxxxxxxx are

scripts-faddr2line-fix-error-when-addr2line-output-contains-discriminator.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux