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

mm: dump node overheadp during memdump ... #181

Closed
wants to merge 10 commits into from

Conversation

txy-21
Copy link

@txy-21 txy-21 commented Jan 23, 2025

Summary

gdb relation chain.

Impact

no impact

Testing

ci test

XuNeo added 10 commits January 23, 2025 16:36
So we can focus on single element of struct, same as array.
Fix typo in foreach array args.element

Signed-off-by: xuxingliang <[email protected]>
Added __format__ method to support format spec like {:>10} that gdb.Value doesn't support. For such case, gdb.Value is converted to python value firstly and then format natively.
Override all methods/attributes could return gdb.Value to return utils.Value instead.

Signed-off-by: xuxingliang <[email protected]>
GDB is slow to look up symbols, cache the result to speed up commands like memdump etc.

Signed-off-by: xuxingliang <[email protected]>
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 <[email protected]>
This will make it easier to debug memory corruption when agacent node is corrupted.

Signed-off-by: xuxingliang <[email protected]>
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 <[email protected]>
Only heap nodes are checked for now.

Signed-off-by: xuxingliang <[email protected]>
@txy-21
Copy link
Author

txy-21 commented Jan 23, 2025

There are too many pre-patch waiting to be merged later.

@txy-21 txy-21 closed this Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants