Skip to content

Commit 8b4636a

Browse files
authored
Inject {SatoriGC, true} into config values. (VSadov#67)
* Inject {SatoriGC, true} into config values. * DOTNET_gcForceCompact
1 parent 85686c9 commit 8b4636a

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

src/coreclr/gc/satori/SatoriGC.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,7 @@ int64_t SatoriGC::GetTotalPauseDuration()
733733
void SatoriGC::EnumerateConfigurationValues(void* context, ConfigurationValueFunc configurationValueFunc)
734734
{
735735
GCConfig::EnumerateConfigurationValues(context, configurationValueFunc);
736+
configurationValueFunc(context, (void*)"SatoriGC", (void*)"SatoriGC", GCConfigurationType::Boolean, true);
736737
}
737738

738739
bool SatoriGC::CheckEscapeSatoriRange(size_t dst, size_t src, size_t len)

src/coreclr/gc/satori/SatoriRecycler.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3501,7 +3501,9 @@ void SatoriRecycler::Plan()
35013501
//
35023502
// As crude criteria, we will do relocations if at least 1/2
35033503
// of condemned regions want to participate. And at least 2.
3504-
size_t desiredRelocating = m_condemnedRegionsCount / 2 + 2;
3504+
size_t desiredRelocating = SatoriUtil::IsForceCompact() ?
3505+
0 :
3506+
m_condemnedRegionsCount / 2 + 2;
35053507

35063508
if (m_isRelocating == false ||
35073509
relocatableEstimate <= desiredRelocating)

src/coreclr/gc/satori/SatoriUtil.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,12 @@ class SatoriUtil
203203
return (GCConfig::GetConcurrentGC());
204204
}
205205

206+
// DOTNET_gcForceCompact
207+
static bool IsForceCompact()
208+
{
209+
return (GCConfig::GetForceCompact());
210+
}
211+
206212
// DOTNET_gcRelocatingGen1
207213
static bool IsRelocatingInGen1()
208214
{

0 commit comments

Comments
 (0)