Find the answer to your Linux question:
Results 1 to 2 of 2
Hi all: I have a function in kernel module and I want to see how many times it is called and runs per second. I add a counter in the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2011
    Posts
    8

    How to calculate how many times a function runs ?????


    Hi all:
    I have a function in kernel module and I want to see how many times it is called and runs per second. I add a counter in the function so once it runs, counter+=1; is there any timer or something which can check this counter every second???Thanks very much.
    Last edited by neyshule; 09-25-2011 at 07:01 AM. Reason: not precise

  2. #2
    Linux Newbie nplusplus's Avatar
    Join Date
    Apr 2010
    Location
    Charlotte, NC, USA
    Posts
    106
    You could spit out a log entry every time it runs and include the count and the time in the log.

    Otherwise, the second timer you request is there, though I cannot remember the name. Boy, what a useless reply...

    N

Posting Permissions

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