cancel
Showing results for 
Search instead for 
Did you mean: 

Server Gurus Discussions

MashyDGreen
Journeyman III

AMDuProf cannot find source code despite adding source code location manually

I have been trying to profile our OpenMP code written in c++ (with c++-17 features) and compiled with gcc in Linux (OpenSUSE).  I am using the pre-defined Assess Performance settings, and in advance provide the path to the source code.  It runs fine and I seem to get all the counters I expect.  However, when I click on the hotspot function I am taken to the source window where I can only see assembly and counters - no source code!  It doesn't ask for the source code location either.  The name of the function is also very odd in the ANALYZE tab, and only actually shows the function name when I hover over it.

While finding out what type of operations are most expensive in the hottest functions through assembly is interesting, I do not know assembly well enough to associate this back to the line in source code where this happens.  

I have tried also to profile in CLI and provide the src directory when importing the DB, but I get the exact same problem. 

Are there any knows limitation in AMDuProf for reading c++-17 source code?  I would really like to make good use of this tool and see a lot of potential for it in our development, but it is really of limited use if I cannot associate the results with the source code.

 

0 Likes
6 Replies
swarup
Staff

Hi @MashyDGreen ,

It should work for C++17. Please check if the compiler debug option (-g) is used during compilation. If compiled without this option, display of correct function name and source code would not happen.

0 Likes

Yes, it is compiled with the debug information flag.  To be 100% sure I tried it again with a fresh version of the code, ensuring the option -g was enabled from the start.  Unfortunately the problem persists.

0 Likes

Hi @MashyDGreen ,

For OpenMP application profiling, you would see functions (1) which belong to the OpenMP library (libgomp for gcc). To view the source code with samples, you need to download the libgomp debug info (and source code), if its available on the OpenSUSE Support Server. (2) the functions added by the compiler for various OpenMP activities. These functions do not have any related source code show. They are mapped to the #pragma omp source lines. 

Similarly for system libs (e.g. libc, libm, etc.) you need to download debug info and source code to view the source.

We would like to analyze the issue. Will you be able to share a snippet of your source/program for us to try? Also if possible, share a screenshot if your observation if its ok with you.

0 Likes

Thanks for the reply.

I will check what we can share, but just to be clear, it is not the OpenMP or c++ related system libraries, bur our own source code which I cannot get working with the profiler using gcc.  I actually disabled the OpenMP tracing option and FPO, I'm just trying to use CSS with the source code folder provided in the path.  I tried with Time-Based Sampling presets and Asses Performace presets, as well as using the CLI tool and loading the results into the GUI.

I will get back to you with whatever I can share (at least some screenshots).

Thank you!

0 Likes

I have prepared some screenshots to better describe the problem, however the forums here only allow for videos or URLs.  Is it okay to upload the images elsewhere and link them to here?  Alternatively, we could discuss this via email if that would be acceptable for you?

Thank you.

0 Likes

Hi @MashyDGreen ,

You may share the image/screenshot links here.

0 Likes