Uh oh!
There was an error while loading. Please reload this page.
Read public GC options if available - #86068
Conversation
ghost
commented
May 10, 2023
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsAlso pass RuntimeHostConfigurationOption into --runtimeopt ILC parameter Fixes : #85961
|
0edad47 to
b4a4f08CompareMichalStrehovsky
commented
May 11, 2023
These configuration names come from different "namespaces". Like I wrote in #85961 (comment) "We need to either add another blob with the new values, or come up with some sort of mangling so that we can store both key/value pairs in the same blob. I don't have an opinion. Whichever looks better." The approach in this PR will run into issues as soon as there's a conflict between a "Config" name and "Knob" name. Here's how CoreCLR implements this: runtime/src/coreclr/vm/gcenv.ee.cpp Lines 1158 to 1176 in 0b5f137
|
MichalStrehovsky
left a comment
There was a problem hiding this comment.
Thanks for taking up the challenge!
There was a problem hiding this comment.
We just switched ReadConfigValue from TCHAR to char*. Could you rebase against latest main and apply similar changes as in #86393? Cc @elinor-fung
There was a problem hiding this comment.
decimal = false doesn't look right - we don't pass this as true for GC settings but the GC settings in runtimeconfig.json are documented to be decimal (as opposed to the GC settings set through environment variables that are hex).
In fact, do we need the hex support in knobs?
There was a problem hiding this comment.
We should use UTF-8 - users can dump anything they want into RuntimeHostConfigurationOption ItemGroup.
| byte[]optionBytes=System.Text.Encoding.ASCII.GetBytes(option); | |
| byte[]optionBytes=System.Text.Encoding.UTF8.GetBytes(option); |
kant2002
commented
May 23, 2023
MichalStrehovsky
commented
May 23, 2023
We should be already honoring the |
kant2002
commented
May 23, 2023
Yes |
jkotas
commented
May 23, 2023
|
e4c84c5 to
a0a1a65CompareThere was a problem hiding this comment.
TODO: compare with coreclr - is this case insensitive?
There was a problem hiding this comment.
Whoops, that TODO was for me, but might as well dump it on you :). Can you compare how this is done in CoreCLR?
There was a problem hiding this comment.
casesensetive comparison always. for knobs and configs.
There was a problem hiding this comment.
RCV_Count only make sense if we know the upper bound because this is not something that is user-configurable. RuntimeHostConfigurationOption is unbounded. We need to keep track of the real count. (Same comment applies to other uses of RCV_Count in this file)
There was a problem hiding this comment.
The new methods look very similar to the existing ones. Can we share them?
There was a problem hiding this comment.
If we share, we'd delete the concept of RCV_Count.
There was a problem hiding this comment.
Note that there's another PR in flight making changes here so we might want to pause for a moment to avoid conflicts. #86656 cc @elinor-fung
There was a problem hiding this comment.
I do not sure if sharing make things better, but please take a look.
There was a problem hiding this comment.
This won't work for settings that specify true/false. Could you mirror how this is handled in CoreCLR?
Also pass RuntimeHostConfigurationOption into --runtimeopt ILC parameter Fixes : dotnet#85961
d1a4693 to
b128588CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
kant2002
commented
May 30, 2023
Looks like you are tired to babysit me 😄 thank you! |
MichalStrehovsky
commented
May 30, 2023
It was already close enough that we could avoid another round :). Thanks! |
Previously AppContext switches were set by injecting a method that calls `AppContext.SetSwitch` at startup. Use the configuration blob added in dotnet#86068 instead. This makes startup a tiny bit faster and the outputs a tiny bit smaller. Fixesdotnet#77054.

Also pass RuntimeHostConfigurationOption into --runtimeopt ILC parameter Fixes : #85961