I run the Visual Studio 2008 profiler in the "RelDebug" assembly of my application. Optimization is enabled, but the attachment is only moderate, there are stack frames, and characters are emitted. In other words, RelDebug is a slightly optimized build that can be debugged (although restrictions are usually applied to check variables).
I run both Sampling and Instrumented profiler for individual runs.
Result? A sampler gives a result that looks reasonable. However, when I look at the results of the Instrumental Profiler, I see functions that should not even be closer to the top of the list, and go to it.
For example, a function such as "SetFont", which consists of only 1 line, assigning height to a class member. Or "SetClipRect", which simply assigns a rectangle.
Of course, I look at the "Exclusive" statistics (i.e. minus children).
Does this happen to someone else? This always happens as soon as my application has grown to a certain size. At this point, the device becomes useless.
I understood the problem. Both Visual Studio 2008 and the Visual Studio 2010 profilers are mediocre (to put it politely). I bought Intel C ++ Studio, which comes with vTune Amplifier (profiler). Using the Intel profiler for the same code, I was able to get profiling results that really made sense.
source share