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

Source level view - path to source

GaryBC
Beginner
388 Views
We have a system comprised of more than 100 shared libraries on Linux. Each shared library is built with a seperate Makefile and is comprised of a set of source files. When browsing the vtune sampling view, I get the list of modules and if I drill down another level I see the list of functions. If I want to get the source level view VTune always looks for the source file path relative to the makefile rather than the absolute path. This is a real pain because every time I open a source file it requires me to navigate through the source and manually locate the file.

I looked at the ELF binary and I noticed that the .debug_info section contains both the absolute path as well as the relative path. For example
DW_AT_name : address_space/as_address_order.cpp
DW_AT_comp_dir : /home/garybc/src/main/src/core/kernel/kernel

VTune always tries looking for the DW_AT_name and of course can never find it. If vtune concatonated the comp_dir with the name this would always give the absolute source path which is what I am looking for. I have looked through the settings and cannot find this configuration anywhere. It seems like it always uses the DW_AT_name and ignores the DW_AT_comp_dir.

The closest config item I could find was preferences -> Vtune -> directores and then enter the base to my source (in this case it would be /home/garybc/src/main/src and select the recursive option and vtune will start looking through the source tree for that file name. The only problem with this approach is if I have multiple files with the same name will vtune get confused and just display the first one it finds, or does it know the specifics of the file it is looking for (CRC or length or something else)? I have 15, 000 source files in my project and there are a number of files with the same name so I'm nervous using this approach.
0 Kudos
4 Replies
Peter_W_Intel
Employee
388 Views
As I know that Intel VTune Performance Analyzer doesn't support multiple *same* source file name in the project.

Other case I experienced that the developer had multiple versions ofmodules to work with VTune Analyzer, but only one version can be recognized at a time. If the developer want to profile other version, should clean up ISM infothen re-work.

-Peter
0 Kudos
Peter_W_Intel
Employee
388 Views
Other way to set source path is - use "vtl global-options" to set "source_search_dirs", then run vtlec.

Regards, Peter
0 Kudos
GaryBC
Beginner
388 Views
As I know that Intel VTune Performance Analyzer doesn't support multiple *same* source file name in the project.

Other case I experienced that the developer had multiple versions ofmodules to work with VTune Analyzer, but only one version can be recognized at a time. If the developer want to profile other version, should clean up ISM infothen re-work.

-Peter

That is very unfortunate. On any large project (10's of thousands of source files and 100's of developers over many years) it is impossible to guarantee source file naming uniqueness. Since the exact location of the source is already in the ELF binary debug information it sounds like VTune is not picking up the complete path. Would this be considered a bug or a feature request for VTune to pick up the complete path?
0 Kudos
Peter_W_Intel
Employee
388 Views
Quoting - GaryBC

That is very unfortunate. On any large project (10's of thousands of source files and 100's of developers over many years) it is impossible to guarantee source file naming uniqueness. Since the exact location of the source is already in the ELF binary debug information it sounds like VTune is not picking up the complete path. Would this be considered a bug or a feature request for VTune to pick up the complete path?

I agree this is a new feature request to support multiple source file names in the product.

Regards, Peter
0 Kudos
Reply