-
-
Notifications
You must be signed in to change notification settings - Fork 741
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
Dump memory usage when listing arenas, and add summary option in heap chunks command. #1024
Conversation
🤖 Coverage Update
To this point, this PR:
|
4 similar comments
🤖 Coverage Update
To this point, this PR:
|
🤖 Coverage Update
To this point, this PR:
|
🤖 Coverage Update
To this point, this PR:
|
🤖 Coverage Update
To this point, this PR:
|
Seems that you wrote this on an older version of Gef. The diff removes a lot of recent changes. Please rebase onto main and fix conflicts before we can review it. |
This is super bizarre.... yea, will do that and send another one. |
e9e2106
to
d4e3984
Compare
🤖 Coverage Update
To this point, this PR:
|
No need for a new PR. This looks better now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good to me. Have you profiles to see if it runs a lot slower than normally?
yea, from my experience, it actually runs faster. likely because we don't need to craft that many strings. additionally, output the chunks take long time, so we don't need to wait anymore. |
🤖 Coverage Update
To this point, this PR:
|
🤖 Coverage Update
To this point, this PR:
|
for the performance, I measure it:
|
Looks good, once approved by @hugsy we can merge, but also, since you changed the headings you should also update the screen shots. You can wait until it's approved for that just in case it's changed again. |
Sounds great! Let me update the doc and PR description. |
both doc and PR descriptions are updated. |
🤖 Coverage Update
To this point, this PR:
|
🤖 Coverage Update
To this point, this PR:
|
Thanks a lot, @hugsy ! Does this mean this PR can be merged? @Grazfather 🥳 |
Description
This change adds 2 things:
--summary
option toheap chunks
command. Instead of dumping all chunks, it dumps the summary of all the chunks, grouped by size and flags.This helps us to get a high level of the distribution of the objects on the heap, which helps debugging memory issues.
For example, this is one of our recent memory analysis:
With memory usage showing in the arena list, we immediately know the main arena is causing the problem here.
With
--summary
options, we immediately know that some huge chunks are the ones causing the problem, and none of them are mmap.Here are the screenshots as proof.
Arena list:
Heap summary: