This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new d15a69a406 parsememdump.py: support the sequence number parse
d15a69a406 is described below

commit d15a69a406d5a2687bf9b3a6159f3989137d662f
Author: wangbowen6 <[email protected]>
AuthorDate: Fri May 26 17:11:48 2023 +0800

    parsememdump.py: support the sequence number parse
    
    In https://github.com/apache/nuttx/pull/9335, the sequence numbuer
    is added to the memory node, the memdump log changed also, so update
    the parsememdump.py script to keep in sync.
    
    Signed-off-by: wangbowen6 <[email protected]>
---
 tools/parsememdump.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tools/parsememdump.py b/tools/parsememdump.py
index c5194e2d01..71cd894bcc 100755
--- a/tools/parsememdump.py
+++ b/tools/parsememdump.py
@@ -25,7 +25,7 @@ This program will help you analyze memdump log files,
 analyze the number of occurrences of backtrace,
 and output stack information
 memdump log files need this format:
-pid   size  addr   mem
+pid   size  seq  addr   mem
 """
 
 
@@ -44,6 +44,11 @@ class dump_line:
             self.err = 1
             return
         self.size = int(tmp.group(0)[1:])
+        tmp = re.search("( \d+ )", line_str[tmp.span()[1] :])
+        if tmp is None:
+            self.err = 1
+            return
+        self.seq = int(tmp.group(0)[1:])
 
         tmp = re.findall("0x([0-9a-fA-F]+)", line_str[tmp.span()[1] :])
         self.addr = tmp[0]

Reply via email to