Skip to content

Fixing the per object hard limit support for regions - #72229

Merged
cshung merged 4 commits into
dotnet:mainfrom
cshung:public/region-per-object-heap
Jul 29, 2022
Merged

Fixing the per object hard limit support for regions#72229
cshung merged 4 commits into
dotnet:mainfrom
cshung:public/region-per-object-heap

Conversation

@cshung

@cshungcshung commented Jul 14, 2022

Copy link
Copy Markdown
Contributor

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)

@ghostghost added the area-GC-coreclr label Jul 14, 2022
@ghostghost assigned cshungJul 14, 2022
@ghost

Copy link
Copy Markdown

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:-

@cshungcshung changed the title Fixing the per object hard limit support for regions[WIP] Fixing the per object hard limit support for regionsJul 14, 2022
@cshung
cshungforce-pushed the public/region-per-object-heap branch 2 times, most recently from 37ab1d8 to 3b3634eCompareJuly 20, 2022 05:07
@cshung
cshungforce-pushed the public/region-per-object-heap branch from 04cc2b2 to fda848bCompareJuly 26, 2022 16:39
Comment threadsrc/coreclr/gc/gcpriv.h Outdated
Comment threadsrc/coreclr/gc/gcpriv.h Outdated
Comment threadsrc/coreclr/gc/gc.cpp Outdated
Comment threadsrc/coreclr/gc/gc.cpp Outdated
Comment threadsrc/coreclr/gc/gc.cpp Outdated
Comment threadsrc/coreclr/gc/gc.cpp Outdated
Comment threadsrc/coreclr/gc/gc.cpp Outdated
Comment threadsrc/coreclr/gc/gc.cpp Outdated
Comment threadsrc/coreclr/gc/gc.cpp Outdated
Comment threadsrc/coreclr/gc/gc.cpp Outdated
Comment threadsrc/coreclr/gc/gc.cpp Outdated
Comment threadsrc/coreclr/gc/gc.cpp Outdated
@cshung
cshungforce-pushed the public/region-per-object-heap branch from c6ea14d to 3c36496CompareJuly 28, 2022 00:44
@cshung
cshungforce-pushed the public/region-per-object-heap branch from 3c36496 to cebb65fCompareJuly 28, 2022 00:59
@cshungcshung changed the title [WIP] Fixing the per object hard limit support for regionsFixing the per object hard limit support for regionsJul 28, 2022
Comment threadsrc/coreclr/gc/gc.cpp Outdated
Comment threadsrc/coreclr/gc/gc.cpp Outdated
@cshung
cshung merged commit 2781e17 into dotnet:mainJul 29, 2022
@cshung
cshung deleted the public/region-per-object-heap branch July 29, 2022 05:36
@ghostghost locked as resolved and limited conversation to collaborators Aug 28, 2022
Sign up for freeto 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

@cshung@Maoni0