Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nxgdb/mm: show pool expand queue size #15761

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

XuNeo
Copy link
Contributor

@XuNeo XuNeo commented Feb 5, 2025

Summary

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)

Impact

One more column to the output message, makes it easier to inspect pool status.

Testing

Tested with qemu.

cmake -Bbuild -GNinja -DBOARD_CONFIG=mps3-an547:nsh nuttx
ninja -C build

Make sure to enable pool.

diff --git a/boards/arm/mps/mps3-an547/configs/nsh/defconfig b/boards/arm/mps/mps3-an547/configs/nsh/defconfig
index 5ffdb8ae4c9..244f0d06da7 100644
--- a/boards/arm/mps/mps3-an547/configs/nsh/defconfig
+++ b/boards/arm/mps/mps3-an547/configs/nsh/defconfig
+CONFIG_DEBUG_SYMBOLS_LEVEL="-g3"
+CONFIG_MM_HEAP_MEMPOOL_THRESHOLD=256

Run qemu:

qemu-system-arm -M mps3-an547 -m 2G -nographic -kernel build/nuttx -gdb tcp::1127

Connect to qemu and loading GDB plugin.

 gdb-multiarch build/nuttx -ex "tar rem:1127" -ex "source nuttx/tools/pynuttx/gdbinit.py"

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 <[email protected]>
@github-actions github-actions bot added Area: Tooling Size: XS The size of the change in this PR is very small labels Feb 5, 2025
@Jasinsky
Copy link
Contributor

Jasinsky commented Feb 5, 2025

Minor -
Remove:
Note: Please adhere to Contributing Guidelines.
from PR description

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Tooling Size: XS The size of the change in this PR is very small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants