I need to profile a real time C++ app on Windows. Most of the available profilers are either terribly expensive, total overkill, or both. I don\'t need any .NET stuff. Since
Give consideration to the no-profiler option.
It is common wisdom regarding performance problems that measuring is a prerequisite to finding them.
Not so. More on that subject.
This is an example of tuning an app for maximum performance.
In case you're worried about overhead and how to do this in a DSP real-time app, here's how I would do it. Get it running with realistic input, and just halt it in its tracks with the pause button. Capture the call stack into Notepad. Then start it up again and repeat several times. (Throw away any sample that is irrelevant, like waiting for user input or otherwise in idle state.) Notice that this process puts zero profiling overhead on the program.
If you have the problem that your code runs off a timer and is actually running for only a small fraction of the overall time, then a) you may decide that you don't actually have a problem, or b) you can still try to make it go faster. If (b) then wrap a loop around your code so that whatever it does, it repeats 10, 100, or 1000 times, making it take a large enough fraction of time so that samples will land in it. Use those samples to find out what to fix to make it faster. When you are done, remove the outer loop, and it will run like a bandit.