Skip to content

Commit a93c77d

Browse files
[PresentData] Simplify --debug_verbose_trace variables
When a variable changes, output NAME=VALUE instead of NAME=OLDVALUE->VALUE. This is less text, and the OLDVALUE wasn't often useful (and, when it is, you can search for it earlier in the trace).
1 parent c08c307 commit a93c77d

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

PresentData/Debug.cpp

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,6 @@ void FlushModifiedPresent()
248248
wprintf(L"%*hsp%u", 17 + 6 + 6, "", gModifiedPresent->FrameId); \
249249
} \
250250
wprintf(L" " L#_Name L"="); \
251-
_Fn(gOriginalPresentValues._Name); \
252-
wprintf(L"->"); \
253251
_Fn(gModifiedPresent->_Name); \
254252
}
255253
FLUSH_MEMBER(PrintTimeDelta, TimeInPresent)
@@ -287,23 +285,15 @@ void FlushModifiedPresent()
287285
if (changedCount++ == 0) {
288286
wprintf(L"%*hsp%u", 17 + 6 + 6, "", gModifiedPresent->FrameId);
289287
}
290-
wprintf(L" PresentId=[");
288+
wprintf(L" PresentId=");
291289
auto first = true;
292-
for (auto const& pr : gOriginalPresentValues.PresentIds) {
293-
if (first) first = false; else wprintf(L",");
294-
auto vidPnSourceId = uint32_t(pr.first >> 32);
295-
auto layerIndex = uint32_t(pr.first & 0xffffffff);
296-
wprintf(L" %u:%u:%llu", vidPnSourceId, layerIndex, pr.second);
297-
}
298-
wprintf(L" ]->[");
299-
first = true;
300290
for (auto const& pr : gModifiedPresent->PresentIds) {
301-
if (first) first = false; else wprintf(L",");
302291
auto vidPnSourceId = uint32_t(pr.first >> 32);
303292
auto layerIndex = uint32_t(pr.first & 0xffffffff);
304-
wprintf(L" %u:%u:%llu", vidPnSourceId, layerIndex, pr.second);
293+
wprintf(L"%c %u:%u:%llu", first ? L'[' : L',', vidPnSourceId, layerIndex, pr.second);
294+
first = false;
305295
}
306-
wprintf(L" ]");
296+
wprintf(L"%c]", first ? L'[' : L' ');
307297
}
308298

309299
if (changedCount > 0) {
@@ -413,7 +403,8 @@ void VerboseTraceEventImpl(PMTraceConsumer* pmConsumer, EVENT_RECORD* eventRecor
413403
using namespace Microsoft_Windows_DxgKrnl;
414404
if (pmConsumer->mTrackDisplay) {
415405
switch (hdr.EventDescriptor.Id) {
416-
case Blit_Info::Id: PrintEventHeader(hdr, "Blit_Info"); break;
406+
case Blit_Info::Id: PrintEventHeader(eventRecord, metadata, "Blit_Info", { L"hwnd", PrintU64x,
407+
L"bRedirectedPresent", PrintU32 }); break;
417408
case BlitCancel_Info::Id: PrintEventHeader(hdr, "BlitCancel_Info"); break;
418409
case FlipMultiPlaneOverlay_Info::Id: PrintEventHeader(hdr, "FlipMultiPlaneOverlay_Info"); break;
419410
case Present_Info::Id: PrintEventHeader(hdr, "DxgKrnl_Present_Info"); break;

0 commit comments

Comments
 (0)