I am trying to profile my application with VTune Amplifier 2018.
If I compile my application with GCC everything works fine. However with Intel fortran and optimizations higher or equal to -O1 VTune fails to find the debug symbols, i.e. compiling with
fails to find the debug symbols, and so cannot display the source code of the functions, while using
works fine. If I collect data with the optimized code, then recompile with -g -O0 and then re-resolve the collected data, debug symbols are found correctly, however it is quite inconvenient.
How can I get both an optimized executable and correct debug symbols compiling with intel fortran?
What compiler version is it? Can you check that addr2line Linux utility is able to show function names and source lines for the binary file built with -O2? Can you reproduce the issue on another (some "hello word" application) and attach it?
Re-resolving VTune result with recompiled binaries is not recommended because it could lead to wrong attribution of performance data to functions and source lines.