Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
177 Views

About vmlinux debug symbols

Jump to solution

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

Accepted Solutions
Highlighted
Moderator
154 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-inter...


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-ta...



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
Highlighted
Employee
159 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>

 

Highlighted
Moderator
155 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-inter...


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-ta...



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

Highlighted
Moderator
145 Views

Hi Jing,


Have you tried out the solutions provided?


Thanks

Arun


Highlighted
Novice
132 Views

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

0 Kudos
Highlighted
Moderator
118 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