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

Make it an error to try to use the server GC in macOS #16853

Closed
rolfbjarne opened this issue Nov 21, 2022 · 5 comments · Fixed by #20569
Closed

Make it an error to try to use the server GC in macOS #16853

rolfbjarne opened this issue Nov 21, 2022 · 5 comments · Fixed by #20569
Assignees
Labels
enhancement The issue or pull request is an enhancement good first issue This is a good first issue for someone to start working with our code
Milestone

Comments

@rolfbjarne
Copy link
Member

Customer's should have to run into random issues due to this:

https://github.com/xamarin/xamarin-macios/blob/main/runtime/coreclr-bridge.m#L203-L210

we should just make this a build-time error.

It's probably enough to check for the ServerGarbageCollection property:

dotnet/runtime#78280 (comment)

@rolfbjarne rolfbjarne added the enhancement The issue or pull request is an enhancement label Nov 21, 2022
@rolfbjarne rolfbjarne added this to the .NET 8 milestone Nov 21, 2022
@AustinWise
Copy link

There is also the GC.GetConfigurationVariables() API. It returns a dictionary with a key ServerGC that can be checked. This API was added in .NET 7.

@jkotas
Copy link

jkotas commented Nov 21, 2022

GCSettings.IsServerGC is more straightforward to test for server GC at runtime (this API existed since forever).

@slluis
Copy link

slluis commented Dec 12, 2022

@rolfbjarne is there a possibility of adding Server GC support and short/mid term?

@rolfbjarne
Copy link
Member Author

@slluis it could probably be implemented, is it something that would be interesting for VSMac? It's not trivial though, because this is a rather complex area of the runtime.

@slluis
Copy link

slluis commented Dec 12, 2022

@rolfbjarne we are having many problems with GC pauses in VS Mac, and I'm being told by @sharwell that enabling Server GC together with other GC options made a huge difference on Windows.

@rolfbjarne rolfbjarne added the good first issue This is a good first issue for someone to start working with our code label Sep 6, 2023
@rolfbjarne rolfbjarne modified the milestones: .NET 8, .NET 9 Sep 6, 2023
rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue May 7, 2024
@rolfbjarne rolfbjarne self-assigned this May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue or pull request is an enhancement good first issue This is a good first issue for someone to start working with our code
Projects
Status: Done
4 participants