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

Dumping the entire dynamic heap #5

Open
HertzDevil opened this issue Sep 19, 2023 · 0 comments
Open

Dumping the entire dynamic heap #5

HertzDevil opened this issue Sep 19, 2023 · 0 comments

Comments

@HertzDevil
Copy link
Collaborator

MemProf.log_object_sizes can be extremely slow if all the objects on the heap are highly interconnected, because running a BFS for every pointer must have at least quadratic time complexity.

If it is possible to dump the contents of the entire dynamic heap to an external file, then we could perform analysis on that dump instead, minimizing the impact on the running process. Only pointers would be included in an object's dump; non-atomic fields do not affect garbage collection, so they can be omitted.

This assumes such a dump can be performed in sub-quadratic time. This should indeed be the case because no traversal is needed; it is the responsibility of the external tools to rebuild the heap graph.

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

No branches or pull requests

1 participant