MCPcopy Create free account
hub / github.com/GameTechDev/PresentMon / Consume

Method Consume

IntelPresentMon/PresentMonService/MockPresentMonSession.cpp:380–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

378}
379
380void MockPresentMonSession::Consume(TRACEHANDLE traceHandle) {
381 SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
382
383 // You must call OpenTrace() prior to calling this function
384 //
385 // ProcessTrace() blocks the calling thread until it
386 // 1) delivers all events in a trace log file, or
387 // 2) the BufferCallback function returns FALSE, or
388 // 3) you call CloseTrace(), or
389 // 4) the controller stops the trace session.
390 //
391 // There may be a several second delay before the function returns.
392 //
393 // ProcessTrace() is supposed to return ERROR_CANCELLED if BufferCallback
394 // (EtwThreadShouldQuit) returns FALSE; and ERROR_SUCCESS if the trace
395 // completes (parse the entire ETL, fills the maximum file size, or is
396 // explicitly closed).
397 //
398 // However, it seems to always return ERROR_SUCCESS.
399
400 ProcessTrace(&traceHandle, 1, NULL, NULL);
401
402 // consider setting nsm header flag here to indicate end of playback without destroying nsm/trace session
403}
404
405void MockPresentMonSession::Output() {
406 // Structures to track processes and statistics from recorded events.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected