From d15a69a406d5a2687bf9b3a6159f3989137d662f Mon Sep 17 00:00:00 2001 From: wangbowen6 Date: Fri, 26 May 2023 17:11:48 +0800 Subject: [PATCH] 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 --- 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]