Skip to content

Commit 0f84247

Browse files
committed
remove instrumentation
1 parent 47ec7f3 commit 0f84247

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

src/coreclr/nativeaot/Runtime/threadstore.cpp

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,6 @@ void ThreadStore::SuspendAllThreads(bool waitForGCEvent)
241241
// set the global trap for pinvoke leave and return
242242
RhpTrapThreads |= (uint32_t)TrapThreadsFlags::TrapThreads;
243243

244-
LARGE_INTEGER li;
245-
PalQueryPerformanceCounter(&li);
246-
int64_t startTicks = li.QuadPart;
247-
248244
// Our lock-free algorithm depends on flushing write buffers of all processors running RH code. The
249245
// reason for this is that we essentially implement Dekker's algorithm, which requires write ordering.
250246
PalFlushProcessWriteBuffers();
@@ -289,6 +285,7 @@ void ThreadStore::SuspendAllThreads(bool waitForGCEvent)
289285
else
290286
{
291287
SpinWait(retries++, 100);
288+
observeOnly = false;
292289

293290
// make sure our spining is not starving other threads, but not too often,
294291
// this can cause a 1-15 msec delay, depending on OS, and that is a lot while
@@ -297,9 +294,6 @@ void ThreadStore::SuspendAllThreads(bool waitForGCEvent)
297294
{
298295
PalSwitchToThread();
299296
}
300-
301-
observeOnly = false;
302-
// printf("RETRY: %i \n", retries);
303297
}
304298
}
305299

@@ -312,15 +306,6 @@ void ThreadStore::SuspendAllThreads(bool waitForGCEvent)
312306
// preemptive mode.
313307
PalFlushProcessWriteBuffers();
314308
#endif //TARGET_ARM || TARGET_ARM64
315-
316-
PalQueryPerformanceFrequency(&li);
317-
int64_t ticksPerSecond = li.QuadPart;
318-
319-
PalQueryPerformanceCounter(&li);
320-
int64_t endTicks = li.QuadPart;
321-
int64_t usecTotal = (endTicks - startTicks) * 1000000 / ticksPerSecond;
322-
323-
printf("@: %i \n", (int)usecTotal);
324309
}
325310

326311
void ThreadStore::ResumeAllThreads(bool waitForGCEvent)

0 commit comments

Comments
 (0)