Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
5 Views

Cannot go to source file

Jump to solution

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

Accepted Solutions
Highlighted
Employee
5 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
Highlighted
Employee
5 Views

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

0 Kudos
Highlighted
5 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
Highlighted
Employee
6 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
Highlighted
5 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