I am trying to add performance counters and custom events to a piece of software so that I can view them using the Windows Performance Toolkit programs such as XPerf and GPUView. I am going to refrain, using all my powers of restraint, from launching into Qatari speech about the state of documentation for software and the time that I have now wasted trying to tear up prompts from the Internet. I will tell you how I got to where I now, just in case, this is useful for other lost souls.
Until now, I realized that I had to write an Event manifest for my performance and event counters. You can do this manually or with a tool called ecmangen.exe . The documentation for this program provides a good step-by-step guide for creating an event manifest, but does not explain how to integrate them with your code.
The next step, as far as I can do this, is to use two crypto command-line applications: MC.exe and CTRPP.exe . It seems they generate C or C # headers, source and resource files to add events and counts to your code, respectively. Then you need to create your code (look at the samples in "C: \ Program Files \ Microsoft SDKs \ Windows \ v7.1 \ Samples \ winbase \ Eventing"), and then we'll move on to where I'm stuck right now: using the following correctly mysterious tool wevtutil.exe '
This tool needs two things: the binary (exe or DLL) that you compiled with these resources in it, and the manifest file that you used to create these resources. The problem I am facing is that it is very picky about where the binary is located, and I could not determine the shape of this nit-picking. Spells and sacrifices of the goat have not yielded any results.
If I have a path defined in the 'resourceFileName' field of the 'provider' tag in the manifest file, for example 'c: \ MYDIR \ TEd.exe', then this is normal. If, however, I put the same exe in another folder (one of which was not C: \ tw \ TEd.exe), it complains.
The indicated error message is 'Warning: TEd-Event-Provider developer resources are not available.' but no more detailed explanation of why and where he tried to look.
So, am I going to add the tools incorrectly, is there a manual explaining all gotchas, and what is the nature of "wevtutil.exe weird selectivity for directory names.
Thanks in advance,
Tim.