diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp index e843935..716bd8d 100755 --- a/qxldod/QxlDod.cpp +++ b/qxldod/QxlDod.cpp @@ -5056,7 +5056,8 @@ void QxlDevice::PresentThreadRoutine() // No need for a mutex, only one consumer thread SPICE_RING_CONS_WAIT(m_PresentRing, wait); while (wait) { - WaitForObject(&m_PresentEvent, NULL); + // we do not want indication of long wait on this event + DoWaitForObject(&m_PresentEvent, NULL, NULL); SPICE_RING_CONS_WAIT(m_PresentRing, wait); } drawables = *SPICE_RING_CONS_ITEM(m_PresentRing); diff --git a/qxldod/QxlDod.h b/qxldod/QxlDod.h index 51c554d..a1e9634 100755 --- a/qxldod/QxlDod.h +++ b/qxldod/QxlDod.h @@ -416,11 +416,13 @@ struct Resource { BOOLEAN FORCEINLINE -WaitForObject( +DoWaitForObject( PVOID Object, - PLARGE_INTEGER Timeout) + PLARGE_INTEGER Timeout, + LPCSTR name) { NTSTATUS status; + TimeMeasurement tm; status = KeWaitForSingleObject ( Object, Executive, @@ -428,9 +430,18 @@ WaitForObject( FALSE, Timeout); ASSERT(NT_SUCCESS(status)); + tm.Stop(); + if (name && tm.Diff() > 1900) + { + // 2 seconds in PresentDisplayOnly triggers watchdog on Win10RS1 + // when VSync control enabled. Print the exact event name. + DbgPrint(TRACE_LEVEL_ERROR, ("Waiting %d ms for %s\n", tm.Diff(), name)); + } return (status == STATUS_SUCCESS); } +#define WaitForObject(o, timeout) DoWaitForObject((o), (timeout), #o) + VOID FORCEINLINE ReleaseMutex(