xuxingliang
c319863834
nxgdb/mm: fix regular expression to parse log
...
There could be only one space ahead of address.
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2025-02-07 08:18:14 +08:00
xuxingliang
1577fe3160
nxgdb/mm: warning if corrupted memory node found
...
If the nodesize is 0, we cannot iterate to next node, siliently return None will cause memleak command to generate false positive report with no warnings.
Add log to indicate such case.
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2025-02-07 08:18:14 +08:00
xuxingliang
ef52c68e06
nxgdb/mm: add prenode, nextnode property for mempool
...
So it looks like a memory node in heap thus we can process it in a unified way
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2025-02-07 08:18:14 +08:00
xuxingliang
04bd00f80a
pynuttx: optimize memory leak check by skipping previously checked pointers
...
Reduce leak analysis time from 12s to 7.8s, achieving a 35% performance improvement that tested on an internal project.
1. Use memoryview to avoid creating int objects, reducing overhead
2. Store checked pointers in a dictionary for efficient lookups, improving performance.
3. While dictionary operations have some cost, the overall speedup is significant.
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2025-02-05 09:15:27 -03:00
xuxingliang
b90638493a
pynuttx: fix memleak
...
Only need to check used node, excluding free nodes.
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2025-02-05 09:15:27 -03:00
xuxingliang
f9d8cdcca2
nxgdb/memdump: add free command
...
(gdb) free
name total used free maxused maxfree nused nfree
GImageCache 10485756 10411964 73792 10602184 62328 217 7
uncache 10485756 127812 10357944 270512 10350560 4 2
Umem 26879516 17458732 9420784 20957888 9260768 1211 234
(gdb)
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2025-02-04 09:32:07 -03:00
xuxingliang
8995e5a66e
nxgdb/fs: simplify inode print and add more options
...
Use Inode.__repr__ for print and use single line for all information.
Add 'verbose' and 'nodetype' option to show more details and only print specifiy node type like PIPE.
Add / to name for pseudodir.
Catch memory error when accessing node element.
E.g.
(gdb) foreach inode --nodetype pipe
├── run/ 0x41a27a50 PSEUDODIR
│ ├── bt:bluetoothCS1fd26 0x4530c510 PIPE
│ ├── bt:bluetoothCS20 0x42daae40 PIPE
│ ├── socketpair0x457fd2e0SC20540 0x44ea27b0 PIPE
│ └── tmp/ 0x42dd7cf0 PSEUDODIR
│ │ └── usock/ 0x42dd6c10 PSEUDODIR
│ │ └── speech.usockHD 0x42dc8270 PIPE
│ ├── central_lite.socketCS5e 0x42e1e7b0 PIPE
│ ├── central_service_lite.socketSC86 0x432ee6d0 PIPE
│ │ └── usock/ 0x43d6ed60 PSEUDODIR
│ │ └── speech.usockHD 0x43da2ba0 PIPE
│ ├── uv-feature-sockSC8d 0x43540430 PIPE
│ ├── uv-miot-sockCS54 0x42e272e0 PIPE
│ └── uv-miot-sockSC54 0x42e270b0 PIPE
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2025-02-03 09:21:26 +01:00
xuxingliang
dc5251f9c8
nxgdb/fs: use default args
...
Instead of storing it to self
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2025-02-03 09:21:26 +01:00
Neo Xu
698b2e00e6
nxgdb: include all files to package
...
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2025-02-02 14:02:24 +08:00
xuxingliang
14cc23f42a
nxgdb: add missing protocols definitions
...
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2025-02-02 14:02:24 +08:00
yinshengkai
50fb43e23b
tools: rename tools/gdb/nuttxgdb to tools/pynuttx/nxgdb
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2025-02-02 14:02:24 +08:00