- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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
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
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jing,
Have you tried out the solutions provided?
Thanks
Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry for the late reply. I just tried, and it is working now. Thank you so much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Jing for the confirmation. We wouldn't be monitoring this thread anymore. Please raise a new thread in case of further issues.
![](/skins/images/D3C0B914909A6564BBB97F4AD1ED1973/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page