>Is it (still) true that OSR is using its own tracing package?
Yes, no, maybe.
The biggest problems with WPP tracing are historical. Over the years, compatibility among versions of tracing in kernel mode drivers has been “problematic” – and that’s putting the nicest possible spin on the topic. The tools and documentation (and the actual macros used for implementation) have also historically, ah, “sucked” would be a good term.
In recent years this has gotten better.
At OSR, we typically use DbgPrint for developing and debugging our projects. It’s up to the dev whether we actually code “DbgPrint” (in the appropriate conditional) in-line in the driver code or embed the DbgPrint statement in a macro with fancy categories and levels. But, no matter what, we always start with just good old DbgPrint. It’s fast, it’s easy, it’s predictable and you get to just sit in your debugger on your dev box and watch the spew arrive. Sort of like OutputDebugString for an app.
Of course, DbgPrint has issues as well. For one thing, it does no good at all for tracing issues that occur in the field. So, when we implement a project that is likely to benefit from in-field tracing to aid support, our typical approach is to convert the DbgPrint statements (or macros that invoke DbgPrint) to use WPP tracing before release.
The other issue with DbgPrint vs WPP Tracing is timing. DbgPrint output is something like synchronous (it’s not REALLY synchronous, the data goes to a circular buffer, but it *definitely* slows down code paths). I recently (like last week) was dealing with a driver for real-time control of an instrument that could repro a problem *very* quickly without DbgPrint enabled, but could *never* repro the problem with DbgPrint in use. To solve this, I simply converted the DbgPrint statements to WPP trace statements, ran TraceView on the target machine, and bingo! Repro in about one minute. When I get a minute, I’m going to write a blog post about how to quickly convert DbgPrint statements to WPP tracing.
In terms of the historical problems with WPP Tracing, compatibility seems to be good in Windows 7 and later. The docs and tools still pretty much suck, and there’s way too much “magic” involved… even with the nice, IDE integrated, build environment (which introduces its own “magic”).
So, there are trade-offs.
Here at OSR, we started off as being VERY bullish on WPP tracing. We were the first ones to introduce it to the third party development community, we were the first to document it, and we’re the guys who wrote TraceView (don’t hate on us for that, OK… it’s not like we’re proud and it’s not like we’re app developers).
When we spent lots of quality time with WPP tracing, we learned to not only dislike it but to loathe it. We regretted ever introducing it to the community. We apologized. We stopped using it, and were quite loud about telling other people our opinions of it.
This all took place 10 years ago. Times change, really old OS versions are no longer necessarily part of the mix, and our opinion has to be revised.
Now we don’t hate WPP tracing anymore. Yes, we still think it’s got too much mystical monkey magic. Yes, we still think it’s cumbersome to implement. Yes, we still think the tools and the docs suck.
But it does work. And it appears to be reliable… at least on Win7 and later. And we DO use it when called for. But we do NOT view it as a substitute for DbgPrint for the driver development phase.
Peter
OSR
@OSRDrivers