Kernel module profiling
I have a kernel module on which I want to carry out profiling. The output expected from profiling is:
- Time spent in each function during initialization, de-initialization, interrupt routine, Tx path and Rx path.
- MIPS (Million Instructions Per Second) for the kernel module.
- Code size of the different files which are part of kernel module.
Is there any profiling tool available in linux to get this information or a standard mechanism to obtain it?
Many thanks in advance.
Originally Posted by prashantbanal81
Iam also looking in search of profiling tools to find out where my cpu is eaten up in my kernel module.
Please share any info that you have regarding profiling linux kernel module.
There is kernel-level profiling available. See <linux/profile.h>.
Thanks for the reply. How can I use it. Do I need to recompile the kernel to enable this support.
That is quite likely. You need to look at the kernel build docs (look in The Linux Kernel Archives and The Linux Documentation Project) to determine how to enable profiling in the kernel itself. For your own kernel modules, you would need to instrument your code with the appropriate profiling statements. Sorry, but I haven't got this far myself as yet wrt. kernel-level development. Call me a kernel-noob if you will. :-)
Originally Posted by narender