@@ -241,10 +241,6 @@ void ThreadStore::SuspendAllThreads(bool waitForGCEvent)
241
241
// set the global trap for pinvoke leave and return
242
242
RhpTrapThreads |= (uint32_t )TrapThreadsFlags::TrapThreads;
243
243
244
- LARGE_INTEGER li;
245
- PalQueryPerformanceCounter (&li);
246
- int64_t startTicks = li.QuadPart ;
247
-
248
244
// Our lock-free algorithm depends on flushing write buffers of all processors running RH code. The
249
245
// reason for this is that we essentially implement Dekker's algorithm, which requires write ordering.
250
246
PalFlushProcessWriteBuffers ();
@@ -289,6 +285,7 @@ void ThreadStore::SuspendAllThreads(bool waitForGCEvent)
289
285
else
290
286
{
291
287
SpinWait (retries++, 100 );
288
+ observeOnly = false ;
292
289
293
290
// make sure our spining is not starving other threads, but not too often,
294
291
// 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)
297
294
{
298
295
PalSwitchToThread ();
299
296
}
300
-
301
- observeOnly = false ;
302
- // printf("RETRY: %i \n", retries);
303
297
}
304
298
}
305
299
@@ -312,15 +306,6 @@ void ThreadStore::SuspendAllThreads(bool waitForGCEvent)
312
306
// preemptive mode.
313
307
PalFlushProcessWriteBuffers ();
314
308
#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);
324
309
}
325
310
326
311
void ThreadStore::ResumeAllThreads (bool waitForGCEvent)
0 commit comments