0

I am compiling a C++ source code with MinGW's g++. When analysing the performance of this on Vtune, the "bottom up" tab will let me see the assembly, but not the source code. This is the list of warnings that Vtune gives after running the program:

Vtune warnings

I assume this is because the symbol files are missing, but I have tried compiling with

-g
-g3
-gstabs
-gdwarf-2
-gdwarf-3

but none of these work, it still cannot locate the debugging information.

aloea
  • 191
  • 1
  • 12
  • Your screenshot only says that it can't find any debugging info for the windows dlls, but your executable is not listed. – ssbssa Jan 18 '21 at 11:26

1 Answers1

1

Consider explicitly specifying "Search Directories" in "Analysis configuration" to provide path to Sources and (if possible) to debug symbols (pdb files).

For vtune 2020/2021 versions they can be added/adjusted at the bottom right of Analysis Configuration (note also that for Intel Inspector and Intel Advisor those configurations are still located in more traditional "Project Properties" (CTRL+P) dialog) : Search Directories in Analysis configuration Dialog itself

Usually, source files are automatically integrated, but in some cases (either because of MinGW or because you moved your binaries/sources or project after profiling) - you may need to specify those explicitly as shown above

zam
  • 1,664
  • 9
  • 16
  • how could I find out where MinGW is saving those debug symbols? i havent moved them, because i cant find the file path. (also by path to sources do you mean the location of the .cpp file being compiled?) – aloea Jan 18 '21 at 16:28
  • Yes, for "sources" i mean location of .cpp files. In some cases it could be enough (without specifying path to PDB). – zam Jan 18 '21 at 19:54
  • And note I didn't mean PDB / symbols for kernel32, msvcrt etc (from warning in your question ; I would ignore this warning for now); i meant path to Your_Application's pdb. – zam Jan 18 '21 at 19:55
  • im afraid i dont know how to find the path to that either. also doesn't MinGW use .dwarf files, not pdb? – aloea Jan 18 '21 at 20:18
  • yes, correct, it should be dwarf. in case of dwarf it will normally be embedded inside of your main executable (exe for windows or whatever format .out / .so on linux) . So you need to provide path to your exe (sort of). Path to your application and executable is what you specified in Launch Application section when configuring vtune first time for your application profiling.. – zam Jan 19 '21 at 14:46