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

vtune to profile linux kernel code

kallol
Beginner
438 Views
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
438 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....
0 Kudos
David_A_Intel1
Employee
438 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.
0 Kudos
jeffrey-gallagher
438 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
0 Kudos
Reply