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

Function addresses in Vtune

mgambhir
Beginner
1,075 Views

Hi, 

Pasting an excerpt from the vtune user guide

 

If the VTune Profiler does not find debug information for the binaries, it statically identifies function
boundaries and assigns hotspot addresses to generated pseudo names func@address for such functions, for
example:

 

How are the host spot addresses "assigned". Are these virtual addresses?

To give some context, we are trying to match the hot function addresses against virtual addresses printed with other tools to find out if the hot functions are really in the critical path or not. The address ranges printed by vtune dont seem to match other tools so I wanted to understand how vtune is assigning addresses to functions. 

 

Thanks! 

Labels (1)
0 Kudos
6 Replies
SreedeviK_Intel
Moderator
1,026 Views

Hi,


Thanks for posting in Intel Communities.


Can you try compiling the binary application with the -g option so debugging information are included in the DWARF format. This can be used by VTune to correctly assign function names.


Reference: https://www.intel.com/content/www/us/en/docs/vtune-profiler/user-guide/2023-0/debug-info-for-linux-binaries.html#GUID-2A8F3232-B5F5-4545-B852-2DE60A2877EA


We are also checking with the development team for better documentation to answer your queries. We will get back to you with updates shortly.


Regards,

Sreedevi


0 Kudos
SreedeviK_Intel
Moderator
964 Views

Hi,


Intel VTune Profiler is a statistical sampler tool. Based on the sampling interval, Intel VTune Profiler resolves the current CS:EIP for each core to the source code at the time of the sampling interval interrupt. To enhance the ability to correctly resolve the addresses, you can refer to below guide:

https://www.intel.com/content/www/us/en/docs/vtune-profiler/user-guide/2023-2/prepare-application.html

For better accuracy, you can also try with small sample interval(<1ms and call stack collection disabled to reduce overhead) and also try specifying the binary and source search directories during collection and finalization properly to locate supporting files and display analysis information in relation to your source code.

Reference: https://www.intel.com/content/www/us/en/docs/vtune-profiler/user-guide/2023-2/search-directories.html)

If you need any further clarifications, please let us know.


Regards,

Sreedevi

 


0 Kudos
mgambhir
Beginner
951 Views

Thanks for your response. Resolving addresses using symbols will not be possible for us at the moment. We have to rely on addresses  to identify functions. We are using 1ms sampling interval with Call Stacks disabled (default Microarchitectural Exploration  configuration). 

 

Are there any insights on how the highlighted address is generated in vtune? How do we get the Relative Virtual Address in the binary for this function

 

mgambhir_0-1696354590336.png

 

 

0 Kudos
SreedeviK_Intel
Moderator
907 Views

Hi,

We have checked with our engineering team on your query and they have provided us the below suggestions:

1.To configure search directories in the VTune GUI, please refer:

 https://www.intel.com/content/www/us/en/docs/vtune-profiler/user-guide/2023-2/search-directories.html

 (Note: when you collect data from a remote Linux system, try to copy the source and binaries of interest to your local Windows drive and add those locations to the search directories in the VTune GUI.)

2.To configure search directories in the VTune CLI, you can refer to https://www.intel.com/content/www/us/en/docs/vtune-profiler/user-guide/2023-2/specifying-search-directories.html

3. In the VTune GUI Bottom-up tab display, scrolling right in the middle pane should show the module and function offset (address).
For example:

SreedeviK_Intel_0-1696846415543.png

 

4. For a description of VTune's sampling method, you can refer to first two paragraphs of https://www.intel.com/content/www/us/en/docs/vtune-profiler/user-guide/2023-2/user-mode-sampling-and-tracing-collection.html and https://www.intel.com/content/www/us/en/docs/vtune-profiler/user-guide/2023-2/sep-driver.html

and https://www.intel.com/content/www/us/en/docs/vtune-profiler/user-guide/2023-2/symbol-resolution-linux-loadable-kernel-modules.html

Hope this will help in clarifying your query. If you need any further help, please let us know.

 

Regards,

Sreedevi

 

0 Kudos
SreedeviK_Intel
Moderator
840 Views

Hi,

We have not heard back from you. Could you please give us an update? Is your issue resolved?


Regards,

Sreedevi


0 Kudos
SreedeviK_Intel
Moderator
772 Views

Hi,


We have not heard back from you. This thread will no longer be monitored by Intel. If you need further assistance, please post a new question.


Regards,

Sreedevi



0 Kudos
Reply