2

I have an application relying on user mode tracing via wpp framework. However, Microsoft introduced some changes in the couple of latest version of Windows SDK which broke the tracewpp.exe tool somehow. The actual problem I'm seeing looks as following:

& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x64\tracewpp.exe" ... more args ...

Works as expected (I have checked older versions of SDK, down to 8.0 - all nice and good).

However, when I try to perform the same build with newer version of the SDK the build breaks with a rather cryptic error:

& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x64\tracewpp.exe" ... all the same args ...

Results in:

provider.tpl(0) : error wpp : (Template::DoId) Var not found: Provider tracewpp(0) : error wpp : (RealMain) Fatal error: Template parse error

The template in question originally comes from here: https://github.com/antoxar/WPPTracingSample/blob/master/sample/WppTracing/WppConfig/Rev1/provider.tpl

Can somebody point me at the change log for the tracewpp.exe tool, outlining what changes were done to it recently or otherwise shed light on the above issue?

Mark Tolonen
  • 166,664
  • 26
  • 169
  • 251
oakad
  • 6,945
  • 1
  • 22
  • 31

1 Answers1

0

I had the same problem and solved it. In my case Microsoft Visual Studio 2017 was using the 10.0.17763.0 SDK and running the WPP tools in:

WindowsSdkVerBinPath=C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\

But my tracewpp command was referring to an older "WppConfig\Rev1" directory. The newer tools expected a different provider.tpl configuration. I had these various version installed, and was referring to an older version (the last one) instead of the matching "17763" one.

C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\WppConfig\Rev1
C:\Program Files (x86)\Windows Kits\10\bin\WppConfig\Rev1

If using a Pre-Build step in Visual Stdio, changing the path from $(WindowsSdkDir) to $(WDKBinRoot) worked for me (your other options may vary):

 tracewpp -I"$(WDKBinRoot)\WppConfig\Rev1" -odir:$(IntDir) -scan:Trace.h *.cpp

As an aside, a Debug build of my project failed as well. Make sure to use the compiler flag /Zi if you want debug symbols instead of /Zl (Debug with Edit and Continue). wpptrace doesn't support it.

Mark Tolonen
  • 166,664
  • 26
  • 169
  • 251
  • Surprisingly enough, I also solved it - by dropping tracewpp and never looking back. :-) – oakad Jul 30 '20 at 02:37
  • @oakad It's very useful and efficient for tracking interprocess locking issues between multiple applications using the same WPP-instrumented DLL and wasn't hard to implement...I just had an old demo project that set it up and when I added it to a new "real" project I had a new SDK and ran into this issue. I found this old question looking for an answer today and when I solved it figured I'd share. – Mark Tolonen Jul 30 '20 at 03:38
  • Central Kibana setup with cunningly crafted log queries. Also, multiplatform. – oakad Jul 30 '20 at 04:43