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

[NOT READY] GC: Rearrange finalization queue to put freelist in middle #91029

Closed
wants to merge 8 commits into from

Conversation

markples
Copy link
Member

@markples markples commented Aug 23, 2023

todo:

  • separate cleanup GC finalization cleanup #91129, merge that here to reduce diff noise
  • dac_finalize_queue -- code in request.cpp, etc., simply copies the the fillpointers array around. Later we may need to update clients.
  • grep the rest of the tree for references to the finalization queue
  • self-review
  • test again after factoring split/merge code
  • stress testing
  • performance testing
  • evaluate duplication

Partially regains loss in #87826

* adding clrgc variant with regions enabled

* only build regions for 64 bit platforms

* rename to clrgcexp for experimental
@ghost
Copy link

ghost commented Aug 23, 2023

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

Issue Details

null

Author: markples
Assignees: markples
Labels:

area-GC-coreclr

Milestone: -

src/coreclr/gc/gc.cpp Outdated Show resolved Hide resolved
src/coreclr/gc/gc.cpp Outdated Show resolved Hide resolved
src/coreclr/gc/gc.cpp Outdated Show resolved Hide resolved
src/coreclr/gc/gc.cpp Outdated Show resolved Hide resolved
markples added a commit that referenced this pull request Sep 8, 2023
Pulled from #91029

- Add `FinalizerStartSeg`, `FinalizerMaxSeg`, and `MaxSeg` to make some of the code resilient to changes in the layout of the finalization queue.  Also make `WalkFReachableObjects` resilient to layout changes.
- Add `FreeListSeg` as redundant entry for `FreeList`
  - The free list section is a segment; it just has its boundary stored differently. In #91029 it will be moved to the middle of the queue.
  - This provides a convenient audit point for all references to `FreeList` for #91029. The ones that are renamed here should be independent of the queue layout.
  - #91029 will remove `FreeList` when the other uses are updated.
- Add case for `SegQueueLimit` of last segment.  Add helper `UsedCount`.
- Fix `GetNumberFinalizableObjects` to include critical finalizers, though this method isn't called anywhere today.
- Add `const int INITIAL_FINALIZER_ARRAY_SIZE = 100;`
@ghost ghost closed this Oct 11, 2023
@ghost
Copy link

ghost commented Oct 11, 2023

Draft Pull Request was automatically closed for 30 days of inactivity. Please let us know if you'd like to reopen it.

@ghost ghost locked as resolved and limited conversation to collaborators Nov 11, 2023
This pull request was closed.
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.

2 participants