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

Adding feature to query the fragmentation of immixspace #1089

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

udesou
Copy link
Contributor

@udesou udesou commented Feb 29, 2024

Currently we can use the count_live_bytes_in_gc feature to check the total fragmentation of the heap, by counting the bytes of all objects that are scanned and dividing that by the total number of pages used by MMTk.
I have introduced a new feature dump_memory_stats which at the moment, simply print some stats about memory usage in immixspace (live bytes, lines, blocks and used pages) and los (live bytes and used pages). These stats should be useful to investigate heap occupation and fragmentation.

src/memory_manager.rs Outdated Show resolved Hide resolved
dist.live_lines += Block::LINES;
}
BlockState::Reusable { unavailable_lines } => {
dist.live_lines += unavailable_lines as usize;
Copy link
Member

Choose a reason for hiding this comment

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

Is this number equivalent to linearly scan the line mark table and manually check the line mark bytes? Probably better to add an assertion to double check. Same as L506.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added an assertion in the latest commit that compares the number of live lines by just iterating the lines in the block and checking the mark table with the number from the block state. Is that what you meant?

Cargo.toml Outdated Show resolved Hide resolved
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.

4 participants