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

GC: Fix survival rates for LOH/POH #100716

Merged
merged 21 commits into from
May 2, 2024
Merged

GC: Fix survival rates for LOH/POH #100716

merged 21 commits into from
May 2, 2024

Conversation

markples
Copy link
Member

@markples markples commented Apr 5, 2024

The survival rate calculation for BGCs includes objects allocated during the BGC in the numerator but not denominator. This fixes that by adding them to size_before. The existing counters are reset mid-BGC, so the mark and sweep phases need to be added at separate points. I verified the fix over several gcperfsim runs and watched the counters getting updated in the debugger.

This includes some new and moved comments from going through the phases of BGC and putting similarly ifdef-ed code together.

Partial fix for #100594

@markples markples requested a review from Maoni0 April 5, 2024 23:13
@markples markples self-assigned this Apr 5, 2024
Copy link
Contributor

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

src/coreclr/gc/gc.cpp Outdated Show resolved Hide resolved
src/coreclr/gc/gcpriv.h Outdated Show resolved Hide resolved
@markples markples merged commit 7cde9aa into dotnet:main May 2, 2024
86 of 89 checks passed
michaelgsharp pushed a commit to michaelgsharp/runtime that referenced this pull request May 9, 2024
The survival rate calculation for BGCs includes objects allocated during the BGC in the numerator but not denominator. This fixes that by adding them to size_before. The existing counters are reset mid-BGC, so the mark and sweep phases need to be added at separate points. I verified the fix over several gcperfsim runs and watched the counters getting updated in the debugger.

This includes some new and moved comments from going through the phases of BGC and putting similarly ifdef-ed code together.

Partial fix for dotnet#100594
@markples markples deleted the survrate branch May 17, 2024 18:34
Ruihan-Yin pushed a commit to Ruihan-Yin/runtime that referenced this pull request May 30, 2024
The survival rate calculation for BGCs includes objects allocated during the BGC in the numerator but not denominator. This fixes that by adding them to size_before. The existing counters are reset mid-BGC, so the mark and sweep phases need to be added at separate points. I verified the fix over several gcperfsim runs and watched the counters getting updated in the debugger.

This includes some new and moved comments from going through the phases of BGC and putting similarly ifdef-ed code together.

Partial fix for dotnet#100594
@github-actions github-actions bot locked and limited conversation to collaborators Jun 17, 2024
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