Dear experts,
My question is about using vtune (Amplifier XE 2016 Update 2 (build 444464)) to profile C++ code on MICs.
I was trying to find the top 5 functions with largest CPU_CLK_UNHALTED values and pinpoint the lines of source code causing the hotspots. When using -g -O0, vtune was able to find the functions' name and display the source, but when switching to -g -O2, apparently I could not find those functions' name any more and, instead of the source code, only the assembly was available. Why?
Is it because the compiler has inlined functions wherever possible and somehow stripped the debug info even if -g is present? Is there a way to show which line of source code the assembly belongs to?
Thanks for any advice.