Skip to content

Commit

Permalink
Fix casing in COMPlus_GCStress env variable and remove COMPlus_gcServer
Browse files Browse the repository at this point in the history
Also changing a bunch of assert() calls to _ASSERTE. Usually when _ASSERTE fails in CI lab runs, we tend to get crash dumps associated with test results, unlike assert() which shows a GUI dialog that DHandler dismisses by clicking on the Abort button.
  • Loading branch information
Fadi Hanna committed Apr 9, 2020
1 parent a04b965 commit a26ac47
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
30 changes: 15 additions & 15 deletions src/coreclr/src/vm/gcenv.os.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ class GroupProcNo
GroupProcNo(uint16_t group, uint16_t procIndex) : m_groupProc((group << 6) | procIndex)
{
// Making this the same as the # of NUMA node we support.
assert(group < 0x40);
assert(procIndex <= 0x3f);
_ASSERTE(group < 0x40);
_ASSERTE(procIndex <= 0x3f);
}

uint16_t GetGroup() { return m_groupProc >> 6; }
Expand Down Expand Up @@ -120,7 +120,7 @@ bool GCToOSInterface::Initialize()
uint32_t currentProcessCpuCount = PAL_GetLogicalCpuCountFromOS();
if (PAL_GetCurrentThreadAffinitySet(AffinitySet::BitsetDataSize, g_processAffinitySet.GetBitsetData()))
{
assert(currentProcessCpuCount == g_processAffinitySet.Count());
_ASSERTE(currentProcessCpuCount == g_processAffinitySet.Count());
}
else
{
Expand Down Expand Up @@ -1322,31 +1322,31 @@ class GCEvent::Impl
{
WRAPPER_NO_CONTRACT;

assert(m_event.IsValid());
_ASSERTE(m_event.IsValid());
m_event.CloseEvent();
}

void Set()
{
WRAPPER_NO_CONTRACT;

assert(m_event.IsValid());
_ASSERTE(m_event.IsValid());
m_event.Set();
}

void Reset()
{
WRAPPER_NO_CONTRACT;

assert(m_event.IsValid());
_ASSERTE(m_event.IsValid());
m_event.Reset();
}

uint32_t Wait(uint32_t timeout, bool alertable)
{
WRAPPER_NO_CONTRACT;

assert(m_event.IsValid());
_ASSERTE(m_event.IsValid());
return m_event.Wait(timeout, alertable);
}

Expand Down Expand Up @@ -1400,31 +1400,31 @@ void GCEvent::CloseEvent()
{
WRAPPER_NO_CONTRACT;

assert(m_impl != nullptr);
_ASSERTE(m_impl != nullptr);
m_impl->CloseEvent();
}

void GCEvent::Set()
{
WRAPPER_NO_CONTRACT;

assert(m_impl != nullptr);
_ASSERTE(m_impl != nullptr);
m_impl->Set();
}

void GCEvent::Reset()
{
WRAPPER_NO_CONTRACT;

assert(m_impl != nullptr);
_ASSERTE(m_impl != nullptr);
m_impl->Reset();
}

uint32_t GCEvent::Wait(uint32_t timeout, bool alertable)
{
WRAPPER_NO_CONTRACT;

assert(m_impl != nullptr);
_ASSERTE(m_impl != nullptr);
return m_impl->Wait(timeout, alertable);
}

Expand All @@ -1435,7 +1435,7 @@ bool GCEvent::CreateManualEventNoThrow(bool initialState)
GC_NOTRIGGER;
} CONTRACTL_END;

assert(m_impl == nullptr);
_ASSERTE(m_impl == nullptr);
NewHolder<GCEvent::Impl> event = new (nothrow) GCEvent::Impl();
if (!event)
{
Expand All @@ -1454,7 +1454,7 @@ bool GCEvent::CreateAutoEventNoThrow(bool initialState)
GC_NOTRIGGER;
} CONTRACTL_END;

assert(m_impl == nullptr);
_ASSERTE(m_impl == nullptr);
NewHolder<GCEvent::Impl> event = new (nothrow) GCEvent::Impl();
if (!event)
{
Expand All @@ -1473,7 +1473,7 @@ bool GCEvent::CreateOSAutoEventNoThrow(bool initialState)
GC_NOTRIGGER;
} CONTRACTL_END;

assert(m_impl == nullptr);
_ASSERTE(m_impl == nullptr);
NewHolder<GCEvent::Impl> event = new (nothrow) GCEvent::Impl();
if (!event)
{
Expand All @@ -1492,7 +1492,7 @@ bool GCEvent::CreateOSManualEventNoThrow(bool initialState)
GC_NOTRIGGER;
} CONTRACTL_END;

assert(m_impl == nullptr);
_ASSERTE(m_impl == nullptr);
NewHolder<GCEvent::Impl> event = new (nothrow) GCEvent::Impl();
if (!event)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@
<PropertyGroup>
<CLRTestBatchPreCommands><![CDATA[
$(CLRTestBatchPreCommands)
set COMPlus_gcServer=1
set COMPlus_gcStress=7
set COMPlus_GCStress=f
]]></CLRTestBatchPreCommands>
<BashCLRTestPreCommands><![CDATA[
$(BashCLRTestPreCommands)
export COMPlus_gcServer=1
export COMPlus_gcStress=7
export COMPlus_GCStress=f
]]></BashCLRTestPreCommands>
</PropertyGroup>

Expand Down

0 comments on commit a26ac47

Please sign in to comment.