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

Debug information for a vtune collect of a Docker container

SeanInColo
Beginner
1,426 Views

My host is Redhat 8.10 and has the Intel VTune 2024.1 installed.    There is a docker container that I want to profile a specific executable.   The command is below:

 

vtune -collect hotspots -knob sampling-mode=hw -knob enable-stack-collection=true -knob stack-size=4096  --duration=600 --target-pid=xxxxxxxx

 

This works 100%.  I get a beautiful collect, but when I use vtune-gui to look at the Top-down tree for example, it doesn't have the function names, etc.   The executable is compiled as RelwithDebInfo so it has -O2 -g  as its CMAKE flags.    The debug information does live INSIDE THE DOCKER CONTAINER at /usr/src/debug/*      but when the collection is finalized, , I get warnings of:

 

Cannot locate debugging information for /tmp/amplxe-tmp-root/modues.python-container-get/libxxxxx.so/<big hash number>/libxxxxx.so

 

I have tried running vtune collect with --source-search-dir=   but then it tells me that the path does not exist (which it does NOT on the HOST.  It DOES exist INSIDE the container)

 

I am running the vtune-gui from the host that I do the vtune collect. Are the debug packages supposed to be installed on the host  or IN the container?

 

What am I missing?

0 Kudos
5 Replies
yuzhang3_intel
Moderator
1,392 Views

Does VTune run on the host or inside docker? What about the target process you profiled?

 

Is it the executable or the related library that displays no function name? From your description, you just build your executable with RelwithDebInfo option, right?

0 Kudos
SeanInColo
Beginner
1,380 Views

Vtune is installed on the host and runs ON the host.  The Target is a C++ executable inside a docker container.   The process shows itself as a PID at the host level and the "--target-pid=xxxx" binds to the running executable that is running in the docker container.

 

What I dont understand is when it is finalizing, I get warnings saying it can't find debug info for the libraries that are part of my executable.  I use CMake and CPack to build the exe, the libraries, and turns it into a RPM.   That is installed within the docker container and run in the docker container.

 

Does that help?

0 Kudos
yuzhang3_intel
Moderator
1,369 Views

The library is linked to your executable, right? Did you build the library with the Debug option?

I think you can try with the Debug option instead of RelwithDebInfo.

0 Kudos
SeanInColo
Beginner
1,341 Views
Yes the libraries are also compiled with RelwithDebInfo so has debug flag. But when you build with CMake/CPack, I can get my library.rpm and a library-devel.rpm. When the devel package is installed, it goes into /usr/src/debug

What does the —source-search-dir= do?
0 Kudos
yuzhang3_intel
Moderator
1,338 Views

source-search-dir just specifies a search directory for source files. However, your issue is that no function name is displayed, so I suggest you build your executable and associated library using 'Debug' instead of 'RelwithDebInfo'.

0 Kudos
Reply