Skip to content

Commit 7cd9356

Browse files
authored
Merge pull request #93584 from carlossanlop/release/6.0-staging
[manual] Merge release/6.0-staging into release/6.0
2 parents a15b9c9 + c76ae01 commit 7cd9356

File tree

28 files changed

+521
-200
lines changed

28 files changed

+521
-200
lines changed

eng/Version.Details.xml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -102,49 +102,49 @@
102102
<Uri>https://github.com/microsoft/vstest</Uri>
103103
<Sha>140434f7109d357d0158ade9e5164a4861513965</Sha>
104104
</Dependency>
105-
<Dependency Name="System.ComponentModel.TypeConverter.TestData" Version="6.0.0-beta.23410.1">
105+
<Dependency Name="System.ComponentModel.TypeConverter.TestData" Version="6.0.0-beta.23502.2">
106106
<Uri>https://github.com/dotnet/runtime-assets</Uri>
107-
<Sha>b642300c07f64ba35fdf1e2d2c4476107519f8f4</Sha>
107+
<Sha>cee46f91361cc16cb1b0e95f52c87f1f5600f2c7</Sha>
108108
</Dependency>
109-
<Dependency Name="System.Data.Common.TestData" Version="6.0.0-beta.23410.1">
109+
<Dependency Name="System.Data.Common.TestData" Version="6.0.0-beta.23502.2">
110110
<Uri>https://github.com/dotnet/runtime-assets</Uri>
111-
<Sha>b642300c07f64ba35fdf1e2d2c4476107519f8f4</Sha>
111+
<Sha>cee46f91361cc16cb1b0e95f52c87f1f5600f2c7</Sha>
112112
</Dependency>
113-
<Dependency Name="System.Drawing.Common.TestData" Version="6.0.0-beta.23410.1">
113+
<Dependency Name="System.Drawing.Common.TestData" Version="6.0.0-beta.23502.2">
114114
<Uri>https://github.com/dotnet/runtime-assets</Uri>
115-
<Sha>b642300c07f64ba35fdf1e2d2c4476107519f8f4</Sha>
115+
<Sha>cee46f91361cc16cb1b0e95f52c87f1f5600f2c7</Sha>
116116
</Dependency>
117-
<Dependency Name="System.IO.Compression.TestData" Version="6.0.0-beta.23410.1">
117+
<Dependency Name="System.IO.Compression.TestData" Version="6.0.0-beta.23502.2">
118118
<Uri>https://github.com/dotnet/runtime-assets</Uri>
119-
<Sha>b642300c07f64ba35fdf1e2d2c4476107519f8f4</Sha>
119+
<Sha>cee46f91361cc16cb1b0e95f52c87f1f5600f2c7</Sha>
120120
</Dependency>
121-
<Dependency Name="System.IO.Packaging.TestData" Version="6.0.0-beta.23410.1">
121+
<Dependency Name="System.IO.Packaging.TestData" Version="6.0.0-beta.23502.2">
122122
<Uri>https://github.com/dotnet/runtime-assets</Uri>
123-
<Sha>b642300c07f64ba35fdf1e2d2c4476107519f8f4</Sha>
123+
<Sha>cee46f91361cc16cb1b0e95f52c87f1f5600f2c7</Sha>
124124
</Dependency>
125-
<Dependency Name="System.Net.TestData" Version="6.0.0-beta.23410.1">
125+
<Dependency Name="System.Net.TestData" Version="6.0.0-beta.23502.2">
126126
<Uri>https://github.com/dotnet/runtime-assets</Uri>
127-
<Sha>b642300c07f64ba35fdf1e2d2c4476107519f8f4</Sha>
127+
<Sha>cee46f91361cc16cb1b0e95f52c87f1f5600f2c7</Sha>
128128
</Dependency>
129-
<Dependency Name="System.Private.Runtime.UnicodeData" Version="6.0.0-beta.23410.1">
129+
<Dependency Name="System.Private.Runtime.UnicodeData" Version="6.0.0-beta.23502.2">
130130
<Uri>https://github.com/dotnet/runtime-assets</Uri>
131-
<Sha>b642300c07f64ba35fdf1e2d2c4476107519f8f4</Sha>
131+
<Sha>cee46f91361cc16cb1b0e95f52c87f1f5600f2c7</Sha>
132132
</Dependency>
133-
<Dependency Name="System.Runtime.TimeZoneData" Version="6.0.0-beta.23410.1">
133+
<Dependency Name="System.Runtime.TimeZoneData" Version="6.0.0-beta.23502.2">
134134
<Uri>https://github.com/dotnet/runtime-assets</Uri>
135-
<Sha>b642300c07f64ba35fdf1e2d2c4476107519f8f4</Sha>
135+
<Sha>cee46f91361cc16cb1b0e95f52c87f1f5600f2c7</Sha>
136136
</Dependency>
137-
<Dependency Name="System.Security.Cryptography.X509Certificates.TestData" Version="6.0.0-beta.23410.1">
137+
<Dependency Name="System.Security.Cryptography.X509Certificates.TestData" Version="6.0.0-beta.23502.2">
138138
<Uri>https://github.com/dotnet/runtime-assets</Uri>
139-
<Sha>b642300c07f64ba35fdf1e2d2c4476107519f8f4</Sha>
139+
<Sha>cee46f91361cc16cb1b0e95f52c87f1f5600f2c7</Sha>
140140
</Dependency>
141-
<Dependency Name="System.Windows.Extensions.TestData" Version="6.0.0-beta.23410.1">
141+
<Dependency Name="System.Windows.Extensions.TestData" Version="6.0.0-beta.23502.2">
142142
<Uri>https://github.com/dotnet/runtime-assets</Uri>
143-
<Sha>b642300c07f64ba35fdf1e2d2c4476107519f8f4</Sha>
143+
<Sha>cee46f91361cc16cb1b0e95f52c87f1f5600f2c7</Sha>
144144
</Dependency>
145-
<Dependency Name="Microsoft.DotNet.CilStrip.Sources" Version="6.0.0-beta.23410.1">
145+
<Dependency Name="Microsoft.DotNet.CilStrip.Sources" Version="6.0.0-beta.23502.2">
146146
<Uri>https://github.com/dotnet/runtime-assets</Uri>
147-
<Sha>b642300c07f64ba35fdf1e2d2c4476107519f8f4</Sha>
147+
<Sha>cee46f91361cc16cb1b0e95f52c87f1f5600f2c7</Sha>
148148
</Dependency>
149149
<Dependency Name="runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="11.1.0-alpha.1.21416.1">
150150
<Uri>https://github.com/dotnet/llvm-project</Uri>
@@ -246,9 +246,9 @@
246246
<Uri>https://github.com/dotnet/hotreload-utils</Uri>
247247
<Sha>dd752be1a2fa9ea5c55fbbf1e28dc65902b3a476</Sha>
248248
</Dependency>
249-
<Dependency Name="System.Runtime.Numerics.TestData" Version="6.0.0-beta.23410.1">
249+
<Dependency Name="System.Runtime.Numerics.TestData" Version="6.0.0-beta.23502.2">
250250
<Uri>https://github.com/dotnet/runtime-assets</Uri>
251-
<Sha>b642300c07f64ba35fdf1e2d2c4476107519f8f4</Sha>
251+
<Sha>cee46f91361cc16cb1b0e95f52c87f1f5600f2c7</Sha>
252252
</Dependency>
253253
<Dependency Name="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0-rc1.21413.4">
254254
<Uri>https://github.com/dotnet/roslyn-analyzers</Uri>

eng/Versions.props

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -108,18 +108,18 @@
108108
<SystemValueTupleVersion>4.5.0</SystemValueTupleVersion>
109109
<runtimenativeSystemIOPortsVersion>6.0.0-rc.1.21415.6</runtimenativeSystemIOPortsVersion>
110110
<!-- Runtime-Assets dependencies -->
111-
<SystemRuntimeNumericsTestDataVersion>6.0.0-beta.23410.1</SystemRuntimeNumericsTestDataVersion>
112-
<SystemComponentModelTypeConverterTestDataVersion>6.0.0-beta.23410.1</SystemComponentModelTypeConverterTestDataVersion>
113-
<SystemDataCommonTestDataVersion>6.0.0-beta.23410.1</SystemDataCommonTestDataVersion>
114-
<SystemDrawingCommonTestDataVersion>6.0.0-beta.23410.1</SystemDrawingCommonTestDataVersion>
115-
<SystemIOCompressionTestDataVersion>6.0.0-beta.23410.1</SystemIOCompressionTestDataVersion>
116-
<SystemIOPackagingTestDataVersion>6.0.0-beta.23410.1</SystemIOPackagingTestDataVersion>
117-
<SystemNetTestDataVersion>6.0.0-beta.23410.1</SystemNetTestDataVersion>
118-
<SystemPrivateRuntimeUnicodeDataVersion>6.0.0-beta.23410.1</SystemPrivateRuntimeUnicodeDataVersion>
119-
<SystemRuntimeTimeZoneDataVersion>6.0.0-beta.23410.1</SystemRuntimeTimeZoneDataVersion>
120-
<SystemSecurityCryptographyX509CertificatesTestDataVersion>6.0.0-beta.23410.1</SystemSecurityCryptographyX509CertificatesTestDataVersion>
121-
<SystemWindowsExtensionsTestDataVersion>6.0.0-beta.23410.1</SystemWindowsExtensionsTestDataVersion>
122-
<MicrosoftDotNetCilStripSourcesVersion>6.0.0-beta.23410.1</MicrosoftDotNetCilStripSourcesVersion>
111+
<SystemRuntimeNumericsTestDataVersion>6.0.0-beta.23502.2</SystemRuntimeNumericsTestDataVersion>
112+
<SystemComponentModelTypeConverterTestDataVersion>6.0.0-beta.23502.2</SystemComponentModelTypeConverterTestDataVersion>
113+
<SystemDataCommonTestDataVersion>6.0.0-beta.23502.2</SystemDataCommonTestDataVersion>
114+
<SystemDrawingCommonTestDataVersion>6.0.0-beta.23502.2</SystemDrawingCommonTestDataVersion>
115+
<SystemIOCompressionTestDataVersion>6.0.0-beta.23502.2</SystemIOCompressionTestDataVersion>
116+
<SystemIOPackagingTestDataVersion>6.0.0-beta.23502.2</SystemIOPackagingTestDataVersion>
117+
<SystemNetTestDataVersion>6.0.0-beta.23502.2</SystemNetTestDataVersion>
118+
<SystemPrivateRuntimeUnicodeDataVersion>6.0.0-beta.23502.2</SystemPrivateRuntimeUnicodeDataVersion>
119+
<SystemRuntimeTimeZoneDataVersion>6.0.0-beta.23502.2</SystemRuntimeTimeZoneDataVersion>
120+
<SystemSecurityCryptographyX509CertificatesTestDataVersion>6.0.0-beta.23502.2</SystemSecurityCryptographyX509CertificatesTestDataVersion>
121+
<SystemWindowsExtensionsTestDataVersion>6.0.0-beta.23502.2</SystemWindowsExtensionsTestDataVersion>
122+
<MicrosoftDotNetCilStripSourcesVersion>6.0.0-beta.23502.2</MicrosoftDotNetCilStripSourcesVersion>
123123
<!-- dotnet-optimization dependencies -->
124124
<optimizationwindows_ntx64MIBCRuntimeVersion>1.0.0-prerelease.21416.5</optimizationwindows_ntx64MIBCRuntimeVersion>
125125
<optimizationwindows_ntx86MIBCRuntimeVersion>1.0.0-prerelease.21416.5</optimizationwindows_ntx86MIBCRuntimeVersion>

eng/pipelines/coreclr/templates/helix-queues-setup.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ jobs:
6666
# Linux musl x64
6767
- ${{ if eq(parameters.platform, 'Linux_musl_x64') }}:
6868
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
69-
- (Alpine.314.Amd64.Open)ubuntu.1604[email protected]/dotnet-buildtools/prereqs:alpine-3.14-helix-amd64
69+
- (Alpine.314.Amd64.Open)ubuntu.2204.amd64.open.svc@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.14-helix-amd64
7070
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
71-
- (Alpine.314.Amd64)ubuntu.1604[email protected]/dotnet-buildtools/prereqs:alpine-3.14-helix-amd64
71+
- (Alpine.314.Amd64)ubuntu.2204.amd64.svc@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.14-helix-amd64
7272

7373
# Linux musl arm32
7474
- ${{ if eq(parameters.platform, 'Linux_musl_arm') }}:
@@ -97,7 +97,7 @@ jobs:
9797
- (Debian.10.Amd64)[email protected]/dotnet-buildtools/prereqs:debian-10-helix-amd64
9898
- (Debian.11.Amd64)[email protected]/dotnet-buildtools/prereqs:debian-11-helix-amd64
9999
- Ubuntu.1804.Amd64
100-
- (Fedora.34.Amd64)Ubuntu.1604[email protected]/dotnet-buildtools/prereqs:fedora-34-helix
100+
- (Fedora.34.Amd64)Ubuntu.2204.amd64.svc@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-34-helix
101101
- RedHat.7.Amd64
102102

103103
# OSX arm64

eng/pipelines/libraries/helix-queues-setup.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ jobs:
4141

4242
# Linux musl x64
4343
- ${{ if eq(parameters.platform, 'Linux_musl_x64') }}:
44-
- (Alpine.314.Amd64.Open)ubuntu.1604[email protected]/dotnet-buildtools/prereqs:alpine-3.14-helix-amd64
44+
- (Alpine.314.Amd64.Open)ubuntu.2204.amd64.open.svc@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.14-helix-amd64
4545
- ${{ if eq(parameters.jobParameters.isFullMatrix, true) }}:
46-
- (Alpine.313.Amd64.Open)ubuntu.1604[email protected]/dotnet-buildtools/prereqs:alpine-3.13-helix-amd64
46+
- (Alpine.313.Amd64.Open)ubuntu.2204.amd64.open.svc@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.13-helix-amd64
4747

4848
# Linux musl arm64
4949
- ${{ if and(eq(parameters.platform, 'Linux_musl_arm64'), eq(parameters.jobParameters.isFullMatrix, true)) }}:
@@ -56,23 +56,23 @@ jobs:
5656
- ${{ if and(eq(parameters.jobParameters.testScope, 'outerloop'), eq(parameters.jobParameters.runtimeFlavor, 'mono')) }}:
5757
- RedHat.7.Amd64.Open
5858
- SLES.15.Amd64.Open
59-
- (Fedora.34.Amd64.Open)ubuntu.1604[email protected]/dotnet-buildtools/prereqs:fedora-34-helix
60-
- (Ubuntu.1910.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-19.10-helix-amd64
61-
- (Debian.10.Amd64.Open)ubuntu.1604[email protected]/dotnet-buildtools/prereqs:debian-10-helix-amd64
59+
- (Fedora.34.Amd64.Open)ubuntu.2204.amd64.open.svc@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-34-helix
60+
- ubuntu.2204.amd64.open.svc
61+
- (Debian.10.Amd64.Open)ubuntu.2204.amd64.open.svc@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-10-helix-amd64
6262
- ${{ if or(ne(parameters.jobParameters.testScope, 'outerloop'), ne(parameters.jobParameters.runtimeFlavor, 'mono')) }}:
6363
- ${{ if eq(parameters.jobParameters.isFullMatrix, true) }}:
64-
- (Centos.7.Amd64.Open)Ubuntu.1604[email protected]/dotnet-buildtools/prereqs:centos-7-mlnet-helix
64+
- (Centos.7.Amd64.Open)Ubuntu.2204.Amd64.Open.svc@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-mlnet-helix
6565
- RedHat.7.Amd64.Open
6666
- Ubuntu.1804.Amd64.Open
6767
- SLES.12.Amd64.Open
6868
- SLES.15.Amd64.Open
69-
- (Fedora.34.Amd64.Open)ubuntu.1604[email protected]/dotnet-buildtools/prereqs:fedora-34-helix
70-
- (Ubuntu.1910.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-19.10-helix-amd64
69+
- (Fedora.34.Amd64.Open)ubuntu.2204.amd64.open.svc@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-34-helix
70+
- ubuntu.2204.amd64.open.svc
7171
- (Debian.10.Amd64.Open)[email protected]/dotnet-buildtools/prereqs:debian-10-helix-amd64
7272
- (Debian.11.Amd64.Open)[email protected]/dotnet-buildtools/prereqs:debian-11-helix-amd64
73-
- (Mariner.1.0.Amd64.Open)ubuntu.1604[email protected]/dotnet-buildtools/prereqs:cbl-mariner-1.0-helix
73+
- (Mariner.1.0.Amd64.Open)ubuntu.2204.amd64.open.svc@mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-1.0-helix
7474
- ${{ if eq(parameters.jobParameters.isFullMatrix, false) }}:
75-
- (Centos.7.Amd64.Open)Ubuntu.1604[email protected]/dotnet-buildtools/prereqs:centos-7-mlnet-helix
75+
- (Centos.7.Amd64.Open)Ubuntu.2204.Amd64.Open.svc@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-mlnet-helix
7676
- RedHat.7.Amd64.Open
7777
- (Debian.10.Amd64.Open)[email protected]/dotnet-buildtools/prereqs:debian-10-helix-amd64
7878
- Ubuntu.1804.Amd64.Open

src/coreclr/inc/clrconfigvalues.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,8 @@ RETAIL_CONFIG_DWORD_INFO(INTERNAL_ThreadPool_UnfairSemaphoreSpinLimit, W("Thread
577577
#else // !TARGET_ARM64
578578
RETAIL_CONFIG_DWORD_INFO(INTERNAL_ThreadPool_UnfairSemaphoreSpinLimit, W("ThreadPool_UnfairSemaphoreSpinLimit"), 0x46, "Maximum number of spins a thread pool worker thread performs before waiting for work")
579579
#endif // TARGET_ARM64
580+
RETAIL_CONFIG_DWORD_INFO_EX(EXTERNAL_ThreadPool_ThreadTimeoutMs, W("ThreadPool_ThreadTimeoutMs"), (DWORD)-2, "The amount of time in milliseconds a thread pool thread waits without having done any work before timing out and exiting. Set to -1 to disable the timeout. Applies to worker threads, completion port threads, and wait threads. Also see the ThreadPool_ThreadsToKeepAlive config value for relevant information.", CLRConfig::LookupOptions::ParseIntegerAsBase10)
581+
RETAIL_CONFIG_DWORD_INFO_EX(EXTERNAL_ThreadPool_ThreadsToKeepAlive, W("ThreadPool_ThreadsToKeepAlive"), 0, "The number of worker or completion port threads to keep alive after they are created. Set to -1 to keep all created worker or completion port threads alive. When the ThreadPool_ThreadTimeoutMs config value is also set, for worker and completion port threads the timeout applies to threads in the respective pool that are in excess of the number configured for ThreadPool_ThreadsToKeepAlive.", CLRConfig::LookupOptions::ParseIntegerAsBase10)
580582

581583
RETAIL_CONFIG_DWORD_INFO(INTERNAL_HillClimbing_Disable, W("HillClimbing_Disable"), 0, "Disables hill climbing for thread adjustments in the thread pool");
582584
RETAIL_CONFIG_DWORD_INFO(INTERNAL_HillClimbing_WavePeriod, W("HillClimbing_WavePeriod"), 4, "");

src/coreclr/inc/safemath.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,9 @@ template<typename T> class ClrSafeInt
481481
Which ought to inline nicely
482482
*/
483483
// Returns true if safe, false for overflow.
484+
#if defined(_MSC_VER) && defined(HOST_ARM64) // Workaround for https://github.com/dotnet/runtime/issues/93442
485+
#pragma optimize("", off)
486+
#endif
484487
static bool multiply(T lhs, T rhs, T &result)
485488
{
486489
if(Is64Bit())
@@ -675,6 +678,9 @@ template<typename T> class ClrSafeInt
675678
}
676679
}
677680
}
681+
#if defined(_MSC_VER) && defined(HOST_ARM64) // Workaround for https://github.com/dotnet/runtime/issues/93442
682+
#pragma optimize("", on)
683+
#endif
678684

679685
// Returns true if safe, false on overflow
680686
static inline bool addition(T lhs, T rhs, T &result)

src/coreclr/vm/comthreadpool.cpp

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,34 @@ FCIMPL4(INT32, ThreadPoolNative::GetNextConfigUInt32Value,
192192
case 19: if (TryGetConfig(CLRConfig::INTERNAL_HillClimbing_SampleIntervalHigh, false, W("System.Threading.ThreadPool.HillClimbing.SampleIntervalHigh"))) { return 20; } FALLTHROUGH;
193193
case 20: if (TryGetConfig(CLRConfig::INTERNAL_HillClimbing_GainExponent, false, W("System.Threading.ThreadPool.HillClimbing.GainExponent"))) { return 21; } FALLTHROUGH;
194194

195+
case 21:
196+
{
197+
int threadPoolThreadTimeoutMs = g_pConfig->ThreadPoolThreadTimeoutMs();
198+
if (threadPoolThreadTimeoutMs >= -1)
199+
{
200+
*configValueRef = (UINT32)threadPoolThreadTimeoutMs;
201+
*isBooleanRef = false;
202+
*appContextConfigNameRef = W("System.Threading.ThreadPool.ThreadTimeoutMs");
203+
return 22;
204+
}
205+
206+
FALLTHROUGH;
207+
}
208+
209+
case 22:
210+
{
211+
int threadPoolThreadsToKeepAlive = g_pConfig->ThreadPoolThreadsToKeepAlive();
212+
if (threadPoolThreadsToKeepAlive >= -1)
213+
{
214+
*configValueRef = (UINT32)threadPoolThreadsToKeepAlive;
215+
*isBooleanRef = false;
216+
*appContextConfigNameRef = W("System.Threading.ThreadPool.ThreadsToKeepAlive");
217+
return 23;
218+
}
219+
220+
FALLTHROUGH;
221+
}
222+
195223
default:
196224
*configValueRef = 0;
197225
*isBooleanRef = false;

src/coreclr/vm/eeconfig.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ HRESULT EEConfig::Init()
237237
bDiagnosticSuspend = false;
238238
#endif
239239

240+
threadPoolThreadTimeoutMs = -2; // not configured
241+
threadPoolThreadsToKeepAlive = 0;
242+
240243
fDisableDefaultCodeVersioning = false;
241244

242245
#if defined(FEATURE_TIERED_COMPILATION)
@@ -738,6 +741,19 @@ HRESULT EEConfig::sync()
738741

739742
#endif //_DEBUG
740743

744+
threadPoolThreadTimeoutMs =
745+
(int)Configuration::GetKnobDWORDValue(
746+
W("System.Threading.ThreadPool.ThreadTimeoutMs"),
747+
CLRConfig::EXTERNAL_ThreadPool_ThreadTimeoutMs);
748+
threadPoolThreadsToKeepAlive =
749+
(int)Configuration::GetKnobDWORDValue(
750+
W("System.Threading.ThreadPool.ThreadsToKeepAlive"),
751+
CLRConfig::EXTERNAL_ThreadPool_ThreadsToKeepAlive);
752+
if (threadPoolThreadsToKeepAlive < -1)
753+
{
754+
threadPoolThreadsToKeepAlive = 0;
755+
}
756+
741757
m_fInteropValidatePinnedObjects = (CLRConfig::GetConfigValue(CLRConfig::UNSUPPORTED_InteropValidatePinnedObjects) != 0);
742758
m_fInteropLogArguments = (CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_InteropLogArguments) != 0);
743759

src/coreclr/vm/eeconfig.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,9 @@ class EEConfig
483483

484484
#endif
485485

486+
int ThreadPoolThreadTimeoutMs() const { LIMITED_METHOD_CONTRACT; return threadPoolThreadTimeoutMs; }
487+
int ThreadPoolThreadsToKeepAlive() const { LIMITED_METHOD_CONTRACT; return threadPoolThreadsToKeepAlive; }
488+
486489
private: //----------------------------------------------------------------
487490

488491
bool fInited; // have we synced to the registry at least once?
@@ -680,6 +683,9 @@ class EEConfig
680683
DWORD testThreadAbort;
681684
#endif
682685

686+
int threadPoolThreadTimeoutMs;
687+
int threadPoolThreadsToKeepAlive;
688+
683689
bool fDisableDefaultCodeVersioning;
684690

685691
#if defined(FEATURE_TIERED_COMPILATION)

src/coreclr/vm/ilmarshalers.h

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3134,39 +3134,13 @@ class ILMngdMarshaler : public ILMarshaler
31343134
void EmitClearNative(ILCodeStream* pslILEmit) override
31353135
{
31363136
WRAPPER_NO_CONTRACT;
3137-
ILCodeLabel* pNoManagedValueLabel = nullptr;
3138-
if (IsFieldMarshal(m_dwMarshalFlags))
3139-
{
3140-
pNoManagedValueLabel = pslILEmit->NewCodeLabel();
3141-
pslILEmit->EmitLDARG(StructMarshalStubs::MANAGED_STRUCT_ARGIDX);
3142-
pslILEmit->EmitBRFALSE(pNoManagedValueLabel);
3143-
}
3144-
31453137
EmitCallMngdMarshalerMethod(pslILEmit, GetClearNativeMethod());
3146-
3147-
if (IsFieldMarshal(m_dwMarshalFlags))
3148-
{
3149-
pslILEmit->EmitLabel(pNoManagedValueLabel);
3150-
}
31513138
}
31523139

31533140
void EmitClearNativeContents(ILCodeStream* pslILEmit) override
31543141
{
31553142
WRAPPER_NO_CONTRACT;
3156-
ILCodeLabel* pNoManagedValueLabel = nullptr;
3157-
if (IsFieldMarshal(m_dwMarshalFlags))
3158-
{
3159-
pNoManagedValueLabel = pslILEmit->NewCodeLabel();
3160-
pslILEmit->EmitLDARG(StructMarshalStubs::MANAGED_STRUCT_ARGIDX);
3161-
pslILEmit->EmitBRFALSE(pNoManagedValueLabel);
3162-
}
3163-
31643143
EmitCallMngdMarshalerMethod(pslILEmit, GetClearNativeContentsMethod());
3165-
3166-
if (IsFieldMarshal(m_dwMarshalFlags))
3167-
{
3168-
pslILEmit->EmitLabel(pNoManagedValueLabel);
3169-
}
31703144
}
31713145

31723146
bool NeedsClearCLR() override

0 commit comments

Comments
 (0)