diff options
author | Anton Lapounov <antonl@microsoft.com> | 2021-05-12 01:32:46 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-12 01:32:46 +0300 |
commit | 28ec20194010c2a3d06f2217998cfcb8e8b8fb5e (patch) | |
tree | 1a614d0a349df8be3c0275af87bac99d13ebdd3a /src/coreclr/inc | |
parent | 31c5a7c86e29b67c3a19cbc2d41e68376d184a46 (diff) |
Allow overriding processor count via configuration setting (#52492)
Diffstat (limited to 'src/coreclr/inc')
-rw-r--r-- | src/coreclr/inc/clrconfigvalues.h | 1 | ||||
-rw-r--r-- | src/coreclr/inc/utilcode.h | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/coreclr/inc/clrconfigvalues.h b/src/coreclr/inc/clrconfigvalues.h index 93aecaa8b45..fec282fbe10 100644 --- a/src/coreclr/inc/clrconfigvalues.h +++ b/src/coreclr/inc/clrconfigvalues.h @@ -554,6 +554,7 @@ RETAIL_CONFIG_DWORD_INFO(INTERNAL_Thread_DeadThreadCountThresholdForGCTrigger, W RETAIL_CONFIG_DWORD_INFO(INTERNAL_Thread_DeadThreadGCTriggerPeriodMilliseconds, W("Thread_DeadThreadGCTriggerPeriodMilliseconds"), 1000 * 60 * 30, "In the heuristics to clean up dead threads, this much time must have elapsed since the previous max-generation GC before triggering another GC will be considered") RETAIL_CONFIG_DWORD_INFO(EXTERNAL_Thread_UseAllCpuGroups, W("Thread_UseAllCpuGroups"), 0, "Specifies whether to query and use CPU group information for determining the processor count.") RETAIL_CONFIG_DWORD_INFO(EXTERNAL_Thread_AssignCpuGroups, W("Thread_AssignCpuGroups"), 1, "Specifies whether to automatically distribute threads created by the CLR across CPU Groups. Effective only when Thread_UseAllCpuGroups and GCCpuGroup are enabled.") +RETAIL_CONFIG_DWORD_INFO(EXTERNAL_ProcessorCount, W("PROCESSOR_COUNT"), 0, "Specifies the number of processors available for the process, which is returned by Environment.ProcessorCount") /// /// Threadpool diff --git a/src/coreclr/inc/utilcode.h b/src/coreclr/inc/utilcode.h index a3c446bb747..563fff829c9 100644 --- a/src/coreclr/inc/utilcode.h +++ b/src/coreclr/inc/utilcode.h @@ -1143,6 +1143,8 @@ DWORD_PTR GetCurrentProcessCpuMask(); #endif // HOST_WINDOWS +int GetTotalProcessorCount(); + //****************************************************************************** // Returns the number of processors that a process has been configured to run on //****************************************************************************** |