How to calculate how many times a function runs?????
Hi all:
I have a function in a 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. |
The answer depends on what programming language it is, with which you are writing the code.
Did I perhaps miss in your question, someplace where you gave us that information? |
Quote:
|
Use timers provided by the Linux kernel. First Google hit for "linux kernel timer" gives http://makelinux.com/ldd3/chp-7-sect-4 .
|
All times are GMT -5. The time now is 12:16 AM. |