Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
5255 Discussions

About vmlinux debug symbols

jing
Novice
5,788 Views

Hi,

I am currently running vtune to collect trace for my application, and a large portion of time is spent on vmlinux. I do want to generate report with more information about functions inside [vmlinux]. I am trying to follow the enabling-linux-kernel-analysis tutorial, and I am currently having some questions:

My Background settings: Ubuntu 18.04, kernel version 5.4.0-42-generic

For debug symbols, I use this command:

sudo apt-get install linux-image-$(uname -r)-dbgsym

What I get is a file called vmlinux-5.4.0-42-generic under /usr/lib/debug/boot/. According to the tutorial, I should let vtune know that the debug symbol is there, but I was using terminal and did not find a way to easily open Dialog Box: Binary/Symbol Search, so I find this document on default search path , and put the file there(/usr/lib/debug/lib/modules/`uname -r`/vmlinux). I tried creating a folder vmlinux, change the file name, change the file name and put under the folder, none of them worked. When I run vtune, it still cannot find the vmlinux. 

My question is:

1. Is there a way to set the symbol search path in terminal? 

2. How does the debug symbols worked? I am sorry that this might be a stupid question, but I am not familiar with kernel and was wondering whether just loading the vmlinux-5.4.0-42-generic is enough for vtune to get symbols, or do I still need to recompile the kernel with debug symbol?

Thank you so much!

0 Kudos
1 Solution
ArunJ_Intel
Moderator
5,765 Views

Hi Jing,


You could use -search-dir flag with vtune to specify directories to search symbols in command line. You can find more details about this at the below link.


https://software.intel.com/content/www/us/en/develop/documentation/vtune-help/top/command-line-interface/running-command-line-analysis/configuring-analysis-options-from-the-command-line/specifying-search-directories.html


Additionally once you have installed the kernel with debug symbols have you tried rebuilding the drivers with the new kernel. The below link has steps to rebuild drivers

https://software.intel.com/content/www/us/en/develop/documentation/vtune-help/top/set-up-analysis-target/linux-targets/building-and-installing-the-sampling-drivers-for-linux-targets.html



If you are still facing the issue could you provide us with the below details to debug this further.


1)Are you trying to view the results in same machine in which you collect data or are you downloading the resultsto some other machine for viewing.

2)Could you also let us know the exact error message.


Thanks

Arun



View solution in original post

5 Replies
Denis_M_Intel
Employee
5,769 Views

Hi, 

 It should be enough to specify the search path; recompilation of the kernel is not required. You can use the -search-dir option: 

vtune -collect u-e -search-dir /usr/lib/debug/boot/ ...

It is also possible to re-finalize an existing result:

vtune -fin -search-dir /usr/lib/debug/boot/ -r <result_path>

 

ArunJ_Intel
Moderator
5,766 Views

Hi Jing,


You could use -search-dir flag with vtune to specify directories to search symbols in command line. You can find more details about this at the below link.


https://software.intel.com/content/www/us/en/develop/documentation/vtune-help/top/command-line-interface/running-command-line-analysis/configuring-analysis-options-from-the-command-line/specifying-search-directories.html


Additionally once you have installed the kernel with debug symbols have you tried rebuilding the drivers with the new kernel. The below link has steps to rebuild drivers

https://software.intel.com/content/www/us/en/develop/documentation/vtune-help/top/set-up-analysis-target/linux-targets/building-and-installing-the-sampling-drivers-for-linux-targets.html



If you are still facing the issue could you provide us with the below details to debug this further.


1)Are you trying to view the results in same machine in which you collect data or are you downloading the resultsto some other machine for viewing.

2)Could you also let us know the exact error message.


Thanks

Arun



ArunJ_Intel
Moderator
5,755 Views

Hi Jing,


Have you tried out the solutions provided?


Thanks

Arun


jing
Novice
5,742 Views

Sorry for the late reply. I just tried, and it is working now. Thank you so much!

0 Kudos
ArunJ_Intel
Moderator
5,728 Views

Thanks Jing for the confirmation. We wouldn't be monitoring this thread anymore. Please raise a new thread in case of further issues.


0 Kudos
Reply