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

Getting started with the ITTAPI on an application in a docker container

ChrisHarvey
Beginner
870 Views

Hello Everybody,

 

This is my first post here.

 

I'm trying to get the following setup to work:

 

vTune Gui Host <----> linux VM <----> docker container <----> ittapi instrumented app

 

I have INTEL_LIBITTNOTIFY64 set properly, and I can see that libittnotify_collector.so got loaded properly in the target program by looking at the /proc/<pid>/maps file:

 

 

7f71bb01f000-7f71bb0d5000 r-xp 00000000 fb:00 16941621                   [snip]/vtune/lib64/runtime/libittnotify_collector.so
7f71bb0d5000-7f71bb2d5000 ---p 000b6000 fb:00 16941621                   [snip]/vtune/lib64/runtime/libittnotify_collector.so
7f71bb2d5000-7f71bb2d6000 r--p 000b6000 fb:00 16941621                   [snip]/vtune/lib64/runtime/libittnotify_collector.so
7f71bb2d6000-7f71bb2d7000 rw-p 000b7000 fb:00 16941621                   [snip]/vtune/lib64/runtime/libittnotify_collector.so

 

When attaching to the already running process in the vTune GUI I am able to get a successful trace, but the 'User Tasks' are not present in the vTune GUI timeline.

 

If I move the instrumented app outside of the docker container, but within the same VM and run the same analysis configuration I am able to see the 'User Tasks' in the timeline.

 

I'm not able to see the libittnotify_collector.so source code so I'm not really sure what to do in order to debug this further. If I run the instrumented application with strace to try to get a hint as to what might be wrong I interfere with the normal behaviour of vTune. 

 

I'm looking for hints as to what to look at next to continue to debug this. Is the libittnotify_collector.so source code available?

 

Thanks,

Chris

 

Labels (1)
0 Kudos
3 Replies
RajashekarK_Intel
829 Views

Hi, Good day to you.


Thanks for posting in Intel communities.


Inorder to debug your issue kindly let us know the following details.


1. Provide the detailed steps on how you are launching your docker instance to check if you are missing any command/option.

2. Check if you are launching the docker instance via root user? if not please try once again as root and let us know.

3. Kindly review the documentation on enabling Analyzing "User Tasks" from here, if you are missing any step, https://www.intel.com/content/www/us/en/docs/vtune-profiler/user-guide/2023-2/task-api.html 


If we could also review below additional details, it helps us to replicate your environment and understand your issue even better.

1. OS Details of Host system and VTune version

2. Kernel and OS details of Linux VM.

3. Sample reproducer and steps to reproduce.


Regards,

Rajashekar


0 Kudos
ChrisHarvey
Beginner
818 Views

I was reading https://www.intel.com/content/www/us/en/docs/vtune-profiler/cookbook/2023-0/profiling-in-docker-container.html

and I noticed this line:

However, you cannot profile applications running in the container that are instrumented with ITT/JIT API.


I think that applies only to the "attach to process" case, but that's the only way I can use vTune in my application. 

 

If you can confirm that is still a limitation in vtune 2023 then I think we are good to close this thread.

0 Kudos
RajashekarK_Intel
792 Views

Hi,


Apologies for the inconvenience, This is a limitation for ITT API usage inside a docker when attached as process.


Please refer latest VTune 2023.2 documentation below for the same,


https://www.intel.com/content/www/us/en/docs/vtune-profiler/cookbook/2023-2/profiling-in-docker-container.html


Since your initial query is answered. Please post any additional question in a new thread as this thread will be no longer monitored by Intel.


Regards,

Rajashekar



0 Kudos
Reply