Re: Profiler
Hi Lars,
On Feb 21, 8:27am, Lars Ribe <larsr...@gmail.com> wrote:
> Dear C++ people,
> I was just wondering if anyone can recommend a profiler for Microsoft
> Windows (for a project written in Borland Developer Studio 2006 if
> that is of interest)?
I can recommend Intel VTune as a performance analysis tool. Go to
Intel's website find more info on how to get a copy.
> Also, I have a lot of getters/setters and loops which I clearly
> expects to be inlined and optimized when turning on optimization. Is
> it possible to profile on optimized code or has the code been
> "scrambled" so much that it is no longer possible to detect what is
> what? If it is not possible, how can one determine what is the
> bottleneck in optimized code (which clearly is the answer we are
> looking for...)?
>
When you want to profile your code, you generally want to create a
special "profiling" build. A profiling build is like a "release"
build (fully optimized), but it contains debugging symbols (like a
"debug" build would).
This way, the profiler is able to find function names, but is still
using optimized code. Note that the profiler may have a hard time
correlating an exact line of source code with the optimized machine
code. They often will provide a disassembly viewer for this reason.
You should consult the documentation for whatever profiling tool
you decide to use for more detailed information about the process of
profiling and optimizing your code.
Good luck!
-Eric
|