Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
4995 Discussions

Can VTune profile optimized code?

forall
Beginner
269 Views
I am evaluating the trial version of VTune 9.1 (with IVF11). I previously used the CVF profiler with useful results.

I can see that I need to generate a complete PDB file, which seems to require DEBUGGING=YES in Fortran and Linker tabs. Otherwise I am unable to see the clock time for any of the routines in my code.

Now, the documentation suggests that enabling debug info disables code optimization, meaning I will be profiling un-optimized code. If true, this does not seem to make a lot of sense.

Can somebody give a definitive answer whether VTune can profile Release (ie, optimized) code, and if so how to do it?

thanku
0 Kudos
2 Replies
TimP
Honored Contributor III
269 Views
Turning on debug defaults to -Od, this is only a matter of the default /O2 being changed to /Od. If you specify your optimization level, the compiler will observe it. You would either build in a release configuration with /Zi added, or in a debug configuration with -O2/O3 etc added, so as to generate .pdb and profile the optimized code. Due to the optimization, the code source view will not always associate samples with the exact source line, but it usually shows close to the location responsible for the operations.
0 Kudos
forall
Beginner
269 Views
tim - thanks for the quick reply. However, just to be sure:

The Intel fortran help says:

============
General > Debug Information Format

Description

This option enables or disables generation of debugging information. It is passed to the linker.

Note that if you turn debugging on, optimization is turned off.

If conflicting keywords are used in combination, the last one specified on the command line has precedence.
============
this seems to state that optimization (rather than 'default' optimization) is turned off when debug=full, etc

could you please clarify - thanks
0 Kudos
Reply