Skip to content

Commit d15a69a

Browse files
CV-Bowenxiaoxiang781216
authored andcommitted
parsememdump.py: support the sequence number parse
In apache#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]>
1 parent 029bbf6 commit d15a69a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tools/parsememdump.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
analyze the number of occurrences of backtrace,
2626
and output stack information
2727
memdump log files need this format:
28-
pid size addr mem
28+
pid size seq addr mem
2929
"""
3030

3131

@@ -44,6 +44,11 @@ def __init__(self, line_str):
4444
self.err = 1
4545
return
4646
self.size = int(tmp.group(0)[1:])
47+
tmp = re.search("( \d+ )", line_str[tmp.span()[1] :])
48+
if tmp is None:
49+
self.err = 1
50+
return
51+
self.seq = int(tmp.group(0)[1:])
4752

4853
tmp = re.findall("0x([0-9a-fA-F]+)", line_str[tmp.span()[1] :])
4954
self.addr = tmp[0]

0 commit comments

Comments
 (0)