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

Add option to resolve type when dumping heap summary. #1030

Merged
merged 5 commits into from Dec 22, 2023

Conversation

r12f
Copy link
Contributor

@r12f r12f commented Dec 21, 2023

Description

This change adds --resolve option to resolve the type and categorize the chunks, using vtable in the chunk.

Since multiple types of objects could share the same size, also it is impossible for anyone to remember the size of all the objects in the system, categorize and output the chunks by object type will become very handy when debugging issues like memory leaks.

Here is a screenshot to show how the change works:

image

In this test process, we can see we created 23423 Task objects, which pops up and might indicate a leak.

  • My code follows the code style of this project.
  • My change includes a change to the documentation, if required.
  • If my change adds new code, adequate tests have been added.
  • I have read and agree to the CONTRIBUTING document.

@r12f
Copy link
Contributor Author

r12f commented Dec 21, 2023

This change will have some merge conflicts with #1029 . Once #1029 is checked in, I will merge the changes and update the PR. But the current change should have the high level idea captured. Let's see if this idea makes sense or not.

Copy link
Owner

@hugsy hugsy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yet another awesome PR, LGTM

@hugsy hugsy added this to the 2024.01 milestone Dec 22, 2023
@Grazfather
Copy link
Collaborator

Seems there's no conflict.

@Grazfather Grazfather merged commit e629f02 into hugsy:main Dec 22, 2023
5 of 6 checks passed
@r12f r12f deleted the user/r12f/sym branch December 23, 2023 02:19
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.

None yet

3 participants