Skip to content

Commit 9b43fd7

Browse files
author
Mike Kaufman
committed
[MERGE #5172 @mike-kaufman] Updating thread verification asserts to only fire if we're actually collecting telemetry
Merge pull request #5172 from mike-kaufman:build/mkaufman/fix-edge-drt-asserts In the MemGC case, some code paths are hit that validate the threading assumption in RecyclerTelemetryInfo. However, that's OK since in MemGC we're not collecting any telemetry data yet. This change relaxes these asserts to only fire in the event we're collecting telemetry data.
2 parents 83238de + 69adb52 commit 9b43fd7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/Common/Memory/RecyclerTelemetryInfo.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ namespace Memory
3434

3535
RecyclerTelemetryInfo::~RecyclerTelemetryInfo()
3636
{
37-
AssertOnValidThread(this, RecyclerTelemetryInfo::~RecyclerTelemetryInfo);
3837
if (this->hostInterface != nullptr && this->passCount > 0)
3938
{
39+
AssertOnValidThread(this, RecyclerTelemetryInfo::~RecyclerTelemetryInfo);
4040
this->hostInterface->TransmitTelemetry(*this);
41+
this->FreeGCPassStats();
4142
}
42-
this->FreeGCPassStats();
4343
}
4444

4545
const GUID& RecyclerTelemetryInfo::GetRecyclerID() const
@@ -195,10 +195,9 @@ namespace Memory
195195

196196
void RecyclerTelemetryInfo::FreeGCPassStats()
197197
{
198-
AssertOnValidThread(this, RecyclerTelemetryInfo::FreeGCPassStats);
199-
200198
if (this->lastPassStats != nullptr)
201199
{
200+
AssertOnValidThread(this, RecyclerTelemetryInfo::FreeGCPassStats);
202201
RecyclerTelemetryGCPassStats* head = this->lastPassStats->next;
203202
RecyclerTelemetryGCPassStats* curr = head;
204203
#ifdef DBG

0 commit comments

Comments
 (0)