This repository was archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add new configuration mechanism for CoreCLR. #3896
Merged
adityamandaleeka
merged 1 commit into
dotnet:master
from
adityamandaleeka:configvalues4
Mar 26, 2016
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
| // See the LICENSE file in the project root for more information. | ||
| // | ||
| // -------------------------------------------------------------------------------------------------- | ||
| // configuration.h | ||
| // | ||
| // | ||
| // Access and update configuration values, falling back on legacy CLRConfig methods where necessary. | ||
| // | ||
| // -------------------------------------------------------------------------------------------------- | ||
|
|
||
| #include "clrconfig.h" | ||
|
|
||
| #ifndef __configuration_h__ | ||
| #define __configuration_h__ | ||
|
|
||
| class Configuration | ||
| { | ||
| public: | ||
| static void InitializeConfigurationKnobs(int numberOfConfigs, LPCWSTR *configNames, LPCWSTR *configValues); | ||
|
|
||
| // Returns (in priority order): | ||
| // - The value of the ConfigDWORDInfo if it's set | ||
| // - The value of the ConfigurationKnob (searched by name) if it's set (performs a wcstoul). | ||
| // - The default set in the ConfigDWORDInfo | ||
| static DWORD GetKnobDWORDValue(LPCWSTR name, const CLRConfig::ConfigDWORDInfo& dwordInfo); | ||
|
|
||
| // Returns (in priority order): | ||
| // - The value of the ConfigurationKnob (searched by name) if it's set (performs a wcstoul) | ||
| // - The default value passed in | ||
| static DWORD GetKnobDWORDValue(LPCWSTR name, DWORD defaultValue); | ||
|
|
||
| // Returns (in priority order): | ||
| // - The value of the ConfigStringInfo if it's set | ||
| // - The value of the ConfigurationKnob (searched by name) if it's set | ||
| // - nullptr | ||
| static LPCWSTR GetKnobStringValue(LPCWSTR name, const CLRConfig::ConfigStringInfo& stringInfo); | ||
|
|
||
| // Returns (in priority order): | ||
| // - The value of the ConfigurationKnob (searched by name) if it's set | ||
| // - nullptr | ||
| static LPCWSTR GetKnobStringValue(LPCWSTR name); | ||
|
|
||
| // Returns (in priority order): | ||
| // - The value of the ConfigDWORDInfo if it's set (1 is true, anything else is false) | ||
| // - The value of the ConfigurationKnob (searched by name) if it's set (performs a wcscmp with "true"). | ||
| // - The default set in the ConfigDWORDInfo (1 is true, anything else is false) | ||
| static bool GetKnobBooleanValue(LPCWSTR name, const CLRConfig::ConfigDWORDInfo& dwordInfo); | ||
|
|
||
| // Returns (in priority order): | ||
| // - The value of the ConfigurationKnob (searched by name) if it's set (performs a wcscmp with "true"). | ||
| // - The default value passed in | ||
| static bool GetKnobBooleanValue(LPCWSTR name, bool defaultValue); | ||
| }; | ||
|
|
||
| #endif // __configuration_h__ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't really need to set this flag anymore. For CoreCLR, we're going to default to concurrent GC enabled anyway, so the flag doesn't really do anything. To disable concurrent GC, the user will either set "System.GC.Concurrent" to false or set the COMPlus value to false.
Any thoughts?