-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
nuttxgdb memory commands performance optimization #14916
nuttxgdb memory commands performance optimization #14916
Conversation
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
@XuNeo please include Documentation/ for this new tools/scripts |
305dffc
to
8626b2b
Compare
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Tested on a complex project, results are promising. Command Time cost(s) Time saving(s) Peformance Boost Before After memleak 39.494172 22.366415 17.127757 1.8 memdump 41.872441 26.458386 15.414055 1.6 memdump -a 0x1234 28.116294 1.114119 27.002175 25.2 memdump --no-backtrace N/A 1.114119 memmap 7.973809 6.836468 1.137341 1.2 Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
This will make it easier to debug memory corruption when agacent node is corrupted. Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
Make the dump_nodes etc more common to use. Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
igned-off-by: xuxingliang <xuxingliang@xiaomi.com>
This is useful to exclude memory nodes for mempool. E.g. (gdb) mm dump --nob --top 5 --sort size --nop --no-pid -1 Pool CNT PID Size Overhead Seqno Address Backtrace H 1 0 16777264 44 13 0x41a79010 H 2 160 1536048 44 1129827490 0x41d6aad0 H 1 45374 1536176 44 1129829080 0x45ef1010 H 3 141 408440 44 145817 0x43905bf0 H 7 158 131120 44 32955 0x4308d090 Total 14 blks, 23528696 bytes (gdb) mm dump --nob --top 5 --sort size --nop Pool CNT PID Size Overhead Seqno Address Backtrace H 1 0 16777264 44 13 0x41a79010 * H 6 -1 1048640 44 116954 0x436a0fd0 * H 5 -1 1048640 44 146821 0x43b24fd0 * H 3 -1 1048640 44 66161 0x4335bfd0 * H 3 -1 1048640 44 156337 0x43d3ffd0 Total 18 blks, 16777264 bytes Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
1. The prev free flag should use field size instead of preceding to compare. 2. If not prev-free, then prevnode should be None. 3. Cast type to mm_freenode_s in order to access flink, blink when node is free. 4. Heap itself is also included in first region. Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
8626b2b
to
c6e0e5d
Compare
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
It could be disabled at compile time. Use utils.get_task_name to handle it Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
c6e0e5d
to
c3b9054
Compare
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Note: Please adhere to Contributing Guidelines.
Summary
This PR is not ready for review for now. because it depends on previous unmerged PRs.Optimize the performance of memleak, memdump commands.
Tested on a complex project, results are promising.
Optimize memdump command to include overhead dump.
Impact
Update this section, where applicable, on how change affects users,
build process, hardware, documentation, security, compatibility, etc.
Testing
Update this section with details on how did you verify the change,
what Host was used for build (OS, CPU, compiler, ..), what Target was
used for verification (arch, board:config, ..), etc. Providing build
and runtime logs from before and after change is highly appreciated.