Find the answer to your Linux question:
Results 1 to 5 of 5
Hi, 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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2008
    Posts
    1

    Kernel module profiling


    Hi,

    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.

    Prashant

  2. #2
    Just Joined!
    Join Date
    Jan 2009
    Posts
    7
    Quote Originally Posted by prashantbanal81 View Post
    Hi,

    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.

    Prashant
    Hi Prashanth,
    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.

    Thanks Narender
    dnarenderreddy@gmail.com

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,695
    There is kernel-level profiling available. See <linux/profile.h>.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Jan 2009
    Posts
    7
    Hi ,
    Thanks for the reply. How can I use it. Do I need to recompile the kernel to enable this support.

    Regards
    Narender

  6. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,695
    Quote Originally Posted by narender View Post
    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.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •