Hello.
I hope I’m not too far off topic here, as I will be asking a question on ETW in user mode, but since my question refers to measuring DPC routine execution times, I hope my question will be tolerated. Although I’ve been using WPP tracing for years, I’m very new to ETW. I would like to measure the maximum DPC routine execution time using ETW in user mode during a given period. Of course, advanced users can use xperf, or use other applications like dpclat and dpcmon. We do not intend to try and replace those last two applications, just have, if possible, a measurement of the last maximum DPC execution time during the measurement period. I’m not sure if this could be easily done, but I have found a DPC MOF class which looks interesting:
[Dynamic,
Description(“DPC”) : amended,
EventType{66, 68, 69},
EventTypeName{“ThreadedDPC”, “DPC”, “TimerDPC”} : amended
]
class DPC:PerfInfo
{
[WmiDataId(1),
Description(“Initial Time”) : amended,
extension(“WmiTime”),
read]
object InitialTime;
[WmiDataId(2),
Description(“Routine”) : amended,
pointer,
read]
uint32 Routine;
};
So far, by adapting MS sample ETW applications, I’ve been able to extract the member “Routine”, and the member “InitialTime”, which I gather is the 64 bit time since January 1, 1601, in 100 nanosecond units. The documentation says this is when the DPC has been entered by the routine in question. There is also a timestamp in the EVENT_RECORD structure, which represents when the trace was taken; it too, I gather, is the 64 bit time since January 1, 1601, in 100 nanosecond units. I could subtract the measured DPC entry time from the timestamp in the EVENT_RECORD structure, but that only gives part of the current routine’s DPC execution time. How could I get that routine’s full DPC execution time? Is another approach necessary? For the time being, I’m not considering threaded DPCs. Any help/insights would be appreciated.
Thank you,
Philip Lukidis