mirror of
https://github.com/apache/nuttx.git
synced 2025-12-09 03:33:51 +08:00
nxgdb/mm: show pool expand queue size
nqueue has been added to output.
E.g.
(gdb) mm pool
Total 16 pools
total blocksize bsize overhead nused nfree nifree nwaiter nqueue
Umem@0x10048dc 4068 16 16 0 3 251 0 0 1
Umem@0x100493c 4068 32 32 0 3 124 0 0 1
Umem@0x100499c 4036 48 48 0 10 74 0 0 1
Umem@0x10049fc 4036 64 64 0 1 62 0 0 1
Umem@0x1004a5c 0 80 80 0 0 0 0 0 0
Umem@0x1004abc 0 96 96 0 0 0 0 0 0
Umem@0x1004b1c 0 112 112 0 0 0 0 0 0
Umem@0x1004b7c 0 128 128 0 0 0 0 0 0
Umem@0x1004bdc 0 144 144 0 0 0 0 0 0
Umem@0x1004c3c 0 160 160 0 0 0 0 0 0
Umem@0x1004c9c 0 176 176 0 0 0 0 0 0
Umem@0x1004cfc 0 192 192 0 0 0 0 0 0
Umem@0x1004d5c 3956 208 208 0 1 18 0 0 1
Umem@0x1004dbc 0 224 224 0 0 0 0 0 0
Umem@0x1004e1c 0 240 240 0 0 0 0 0 0
Umem@0x1004e7c 0 256 256 0 0 0 0 0 0
(gdb)
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
This commit is contained in:
committed by
Alan C. Assis
parent
1e7532c381
commit
1b94d0e2cf
@@ -193,6 +193,10 @@ class MemPool(Value, p.MemPool):
|
||||
ninit = 0
|
||||
yield (int(entry) - blks * blksize, int(entry))
|
||||
|
||||
@property
|
||||
def nqueue(self) -> int:
|
||||
return lists.sq_count(self.equeue)
|
||||
|
||||
@property
|
||||
def size(self) -> int:
|
||||
"""Real block size including backtrace overhead"""
|
||||
@@ -654,7 +658,7 @@ class MMPoolInfo(gdb.Command):
|
||||
|
||||
name_max = max(len(pool.name) for pool in pools) + 11 # 11: "@0x12345678"
|
||||
formatter = (
|
||||
"{:>%d} {:>11} {:>9} {:>9} {:>9} {:>9} {:>9} {:>9} {:>9}\n" % name_max
|
||||
"{:>%d} {:>11} {:>9} {:>9} {:>9} {:>9} {:>9} {:>9} {:>9} {:>9}\n" % name_max
|
||||
)
|
||||
head = (
|
||||
"",
|
||||
@@ -666,6 +670,7 @@ class MMPoolInfo(gdb.Command):
|
||||
"nfree",
|
||||
"nifree",
|
||||
"nwaiter",
|
||||
"nqueue",
|
||||
)
|
||||
|
||||
gdb.write(formatter.format(*head))
|
||||
@@ -681,5 +686,6 @@ class MMPoolInfo(gdb.Command):
|
||||
pool.nfree,
|
||||
pool.nifree,
|
||||
pool.nwaiter,
|
||||
pool.nqueue,
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user