I'm using Xperf to measure the load time of my WDF driver. By some reason the load time is rather big - up to 1 sec. Odd enough it stays so even when I remove all code from the driver.
My question is - how XPerf (or to be more correct Event Tracing for Windows) measures the drive load time? I can see t开发者_运维知识库hat it's not the time that DriveEntry takes, and not the time that the binary loading takes. Any hints? Thank you.
I'll answer my own question:
XPerf measures only the time that Windows loader needs to load the driver binary. I.e. it doesn't account for the time that the driver internal routines take to execute.
Also - for some odd reason, if the driver isn't signed the XPerf output is inconsistent and simply wrong. This behavior remains even if the "driver signature check" is disabled at system start. As soon as the driver is signed the loading time figures become feasible.
精彩评论