Community
cancel
Showing results for 
Search instead for 
Did you mean: 
kallol
Beginner
89 Views

vtune to profile linux kernel code

Hello,
I am new to vtune and have been successful to use the tool
to generate call graph and sampling data for our applications running on x86. I have been using vtune 3.0.

Is there a way to profile the linux kernel code? I am interested to profile for kernel code, especially the functions in kernel when our application runs.

Thanks,
Kallol
0 Kudos
3 Replies
kallol
Beginner
89 Views

I think "sampling" collects data for operating systems code also. There may be an option to display the performance data sorted in the order of the most used functions in the kernel....
David_A_Intel1
Employee
89 Views

Hi kallol:
Yes, sampling data for the kernel can be viewed along with your application sampling data. The requirement, however, is that you have rebuilt your kernel with debug information (i.e., '-g' option on the gcc compiler). Once you have done this and collect data with this debug kernel, you can view statistics for the kernel modules and functions. Note: "debug" does not mean you have to disable optimization, only that debug symbols are generated for the kernel modules.
89 Views

Also, just to make sure we're all on the same page here: we can't use callgraph on the linux kernel because the callgraph technology re-instruments the code you want to profile. The, during analysis, vtune launches that re-instrumented version of the code to collect data.
On Linux, you can't have two kernels running at once, of course, so that means sampling is the appropriate profiling technology to use when you're looking for kernel data.
cheers
jdg
Reply