Skip to content

GC cleanup#105517

Closed
markples wants to merge 10 commits into
dotnet:mainfrom
markples:94175_cleanup
Closed

GC cleanup#105517
markples wants to merge 10 commits into
dotnet:mainfrom
markples:94175_cleanup

Conversation

@markples

@markples markples commented Jul 25, 2024

Copy link
Copy Markdown
Contributor
  • Rename transfer_regions to transfer_regions_from
  • Include size in dprintf in get_region_info
  • Move decommit dprintf nearer to the relevant code
  • Clarify "regions" vs "region units" in dprintfs
  • [STRESS_]DYNAMIC_HEAP_COUNT -> [STRESS_]DYNAMIC_ADAPTATION_TO_APP
  • Delete a few obsolete comments

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

@Maoni0 Maoni0 added the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Jul 25, 2024
@Maoni0

Maoni0 commented Jul 25, 2024

Copy link
Copy Markdown
Member

please do not merge. I also have some cleanup stuff that I'll include.

@Maoni0 Maoni0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. I actually don't have time to do the cleanup changes I wanted to add due to my OOF. but could you please also add a change that rename the DYNAMIC_HEAP_COUNT define to DYNAMIC_ADAPTATION_TO_APP? since DATAS (and I imagine in the future we'd want to adapt to other things other than size) is not just limited to heap count changes.

@cshung

cshung commented Aug 13, 2024

Copy link
Copy Markdown
Contributor

Can we also remove this obsolete comment?

        // REGIONS TODO: we should reserve enough space at the end of what we reserved that's
        // big enough to accommodate if we were to materialize all the GC bookkeeping datastructures.
        // We only need to commit what we use and just need to commit more instead of having to
        // relocate the existing table and then calling copy_brick_card_table.
        // Right now all the non mark array portions are commmitted since I'm calling make_card_table
        // on the whole range. This can be committed as needed.

@markples markples removed the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Aug 14, 2024
Comment thread src/coreclr/gc/gc.cpp
heap_budget_in_region_units[i][large_free_region] = 0;
}

dprintf (1, ("moved %2zd regions (%8zd) to decommit based on time", num_decommit_regions_by_time, size_decommit_regions_by_time));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

dprintf(REGIONS_LOG)

Comment thread src/coreclr/gc/gc.cpp
#ifdef USE_REGIONS
if (regions_range)
{
// REGIONS TODO: we should reserve enough space at the end of what we reserved that's

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

not obsolete - not reserving a range for this today

(see make_card_table)

@markples

Copy link
Copy Markdown
Contributor Author

add "no functional changes" to title and wait for regions work ("region units" changes won't be needed after that)

@Maoni0 Maoni0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

other than the few trivial things you took notes off, the rest LGTM!

@stephentoub

Copy link
Copy Markdown
Member

@Maoni0, what would you like to have happen with this PR? Do you want to address your remaining comments or do you want to close this? Thanks.

@Maoni0

Maoni0 commented May 30, 2025

Copy link
Copy Markdown
Member

I'll close. no time for this currently.

@Maoni0 Maoni0 closed this May 30, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 29, 2025
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.

4 participants