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

Access GC settings at runtime #8700

Closed
gregolsky opened this issue Aug 4, 2017 · 7 comments
Closed

Access GC settings at runtime #8700

gregolsky opened this issue Aug 4, 2017 · 7 comments

Comments

@gregolsky
Copy link

We would like to access runtime GC settings programmatically. The only one we could find was the ServerGarbageCollection setting which is accessible through:
https://github.com/dotnet/coreclr/blob/release/2.0.0/src/mscorlib/src/System/Runtime/GcSettings.cs

Can we somehow obtain the value of ConcurrentGarbageCollection and RetainVMGarbageCollection settings at runtime?

@Maoni0
Copy link
Member

Maoni0 commented Aug 4, 2017

you can know whether concurrent is enabled by checking for GCLatencyMode - if it's GCLatencyMode.Batch it means it's not enabled. This is exposed because you can change it at runtime.

can you please tell me what you would do with something like RetainVM?

@gregolsky
Copy link
Author

gregolsky commented Aug 4, 2017 via email

@Maoni0
Copy link
Member

Maoni0 commented Aug 4, 2017

Ahh, then I view this more like a general "how do we expose settings from the runtime" than a GC specific thing. @KrzysztofCwalina do you have an opinion for exposing runtime settings from APIs? settings can be RW or RO.

@Maoni0
Copy link
Member

Maoni0 commented Aug 10, 2017

Apparently @KrzysztofCwalina has been having issues with GH notifications as well so he didn't see this - I just emailed him about it.

@KrzysztofCwalina
Copy link
Member

I would simply open an API addition proposal with all the members you think we should add. You can put all the members in either GCSettings or RuntimeInformation, or any other type and we can have a discussion whats the best place for them at the API review.

@terrajobst, could you point us to the doc describing the API addition process?

@KrzysztofCwalina
Copy link
Member

the API additions/design process is at: https://aka.ms/apireview

@Maoni0
Copy link
Member

Maoni0 commented Oct 26, 2017

@gregolsky haven't heard from you in a while. I will close the issue for now. if you still need help please re-open it.

@Maoni0 Maoni0 closed this as completed Oct 26, 2017
@msftgits msftgits transferred this issue from dotnet/coreclr Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants