Commit c66dbae
[release/10.0] [mono][sgen] Fix incorrect condition when checking if we should do a major collection (#120532)
Backport of #120432 to release/10.0
/cc @BrzVlad
## Customer Impact
- [x] Customer reported
- [ ] Found internally
This impacts all platforms using mono. A customer reported a 40x
regression on an XML Serialization benchmark when moving from .NET8 to
.NET9. This regression is caused by the runtime triggering excessive GCs
due to a bug in the heuristic. This is more likely to happen if the GC
concurrent sweep phase takes longer and the application allocates large
objects frequently. This likely impacts many applications, but with less
noticeable performance impact.
## Regression
- [x] Yes
- [ ] No
This regressed in .NET9
## Testing
Tested the fix on sample benchmark that it works correctly.
## Risk
Low risk. The fix is localized and the previous condition was blatantly
wrong by mistake.
Co-authored-by: Vlad Brezae <brezaevlad@gmail.com>1 parent 6d0c7d7 commit c66dbae
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| |||
0 commit comments