Skip to content

Dumping the entire dynamic heap #5

@HertzDevil

Description

@HertzDevil

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions