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

Fixing the per object hard limit support for regions #72229

Merged
merged 4 commits into from
Jul 29, 2022

Conversation

cshung
Copy link
Member

@cshung cshung commented Jul 14, 2022

Fixes #71790
Fixes #36828

In regions, we can move regions from/to free lists, so just keeping track of the commits for which object-heap during commit/decommit time is no longer enough, we also need to update our accounting when we move them around.

This change created a new bucket for free, that counts the committed memory in the region free lists.

Much of the diff is a refactoring that change the value of total_oh_count from 4 to 3, which is more correct IMO. Many lines were doing -1 which is no longer needed.

The commit-accounting logging statements are intentionally structured so that they can be used to reconstruct the committed region ranges if we have all of them. These can be useful for future tooling purposes (e.g. creating an animated map of how the regions evolves over time)

@ghost
Copy link

ghost commented Jul 14, 2022

Tagging subscribers to this area: @dotnet/gc
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #71790

In regions, we can move regions from/to free lists, so just keeping track of the commits for which object-heap during commit/decommit time is no longer enough, we also need to update our accounting when we move them around.

This change created a new bucket for free, that counts the committed memory in the region free lists.

Much of the diff is a refactoring that change the value of total_oh_count from 4 to 3, which is more correct IMO. Many lines were doing -1 which is no longer needed.

The commit-accounting logging statements are intentionally structured so that they can be used to reconstruct the committed region ranges if we have all of them. These can be useful for future tooling purposes (e.g. creating an animated map of how the regions evolves over time)

Author: cshung
Assignees: -
Labels:

area-GC-coreclr

Milestone: -

@cshung cshung changed the title Fixing the per object hard limit support for regions [WIP] Fixing the per object hard limit support for regions Jul 14, 2022
@cshung cshung force-pushed the public/region-per-object-heap branch 2 times, most recently from 37ab1d8 to 3b3634e Compare July 20, 2022 05:07
@cshung cshung force-pushed the public/region-per-object-heap branch from 04cc2b2 to fda848b Compare July 26, 2022 16:39
src/coreclr/gc/gcpriv.h Outdated Show resolved Hide resolved
src/coreclr/gc/gcpriv.h Outdated Show resolved Hide resolved
src/coreclr/gc/gc.cpp Outdated Show resolved Hide resolved
@cshung cshung force-pushed the public/region-per-object-heap branch from c6ea14d to 3c36496 Compare July 28, 2022 00:44
@cshung cshung force-pushed the public/region-per-object-heap branch from 3c36496 to cebb65f Compare July 28, 2022 00:59
@cshung cshung changed the title [WIP] Fixing the per object hard limit support for regions Fixing the per object hard limit support for regions Jul 28, 2022
src/coreclr/gc/gc.cpp Outdated Show resolved Hide resolved
@cshung cshung merged commit 2781e17 into dotnet:main Jul 29, 2022
@cshung cshung deleted the public/region-per-object-heap branch July 29, 2022 05:36
@ghost ghost locked as resolved and limited conversation to collaborators Aug 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix per object heap commit tracking for regions Implement committed_by_oh_per_heap
2 participants