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

Cannot go to source file

nazarenko__vladimir
621 Views

Hi!

When I click "View Source", instead of the source code Amplifier shows me the Assembly and indicates that source file is undefined. I created a tiny example, which reproduces the issue.

Source:

#include <iostream>

void f() {
  int a = 0;
  for (int i = 0; i < 10000000; ++i) {
    int *c = new int[100];
    a += *c;
    delete c;
  }
  std::cout << a;
}
 
int main() {
  f();
  return 0;
}
 
Compiled with:
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609

 

Using the command:

g++ -O2 -shared-libgcc -o main -g main.cpp

I've double checked that source search path and symbols search path in the Amplifier are set to the right path, rebooted the machine, restarted the Amplifier with no effect. Also I step by step reproduced the https://software.intel.com/sites/default/files/managed/4e/7b/hotspots_amplxe_lin.pdf and still got the same problem.

Any ideas?

0 Kudos
1 Solution
Denis_M_Intel
Employee
621 Views

I cannot reproduce it with g++ (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609.

The issue is that your binary module has compressed debug sections in the format which is not supported in VTune Amplifier. As a result VTune cannot read debugging information. It will be fixed in future releases.

Workaround is not to use zlib-gabi compression for debug sections.
Can you try either "--compress-debug-sections=none" or "--compress-debug-sections=zlib-gnu" build option? 

  g++  -Wl,--compress-debug-sections=none  -O2 -shared-libgcc -o main -g ./main.cpp

 

View solution in original post

0 Kudos
4 Replies
Denis_M_Intel
Employee
621 Views

  Can you attach your executable module (main) and VTune result? What function you are looking at?

0 Kudos
nazarenko__vladimir
621 Views

Hi!

I've attached the executable, collected logs, Amplifier project and the screenshot of the Amplifier interface. I'm trying to go to the source of the function f().

0 Kudos
Denis_M_Intel
Employee
622 Views

I cannot reproduce it with g++ (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609.

The issue is that your binary module has compressed debug sections in the format which is not supported in VTune Amplifier. As a result VTune cannot read debugging information. It will be fixed in future releases.

Workaround is not to use zlib-gabi compression for debug sections.
Can you try either "--compress-debug-sections=none" or "--compress-debug-sections=zlib-gnu" build option? 

  g++  -Wl,--compress-debug-sections=none  -O2 -shared-libgcc -o main -g ./main.cpp

 

0 Kudos
nazarenko__vladimir
621 Views

Yay! Thanks for immediate reaction! Compiling as g++ -Wl,--compress-debug-sections=none -O2 -o main -g ./main.cpp solves the problem! I guess, for now it's ok, will be waiting for future releases. If you need any additional information to reproduce the problem, feel free to write me.

0 Kudos
Reply