LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   how to measure execution time in kernel space? (https://www.linuxquestions.org/questions/linux-kernel-70/how-to-measure-execution-time-in-kernel-space-590090/)

didio 10-07-2007 01:09 PM

how to measure execution time in kernel space?
 
i have registered a handler, in a kernel module, to deal with some incomming ethernet packages of a specific type .. is it possible to measure the execution of that handler in cpu clock ticks or any other microsecond precise clocking scheme?

hiren_bhatt 10-08-2007 10:01 PM

Use clock defined in time.h as clock_t clock(void) to get clock time. To get time in seconds divide it by CLOCKS_PER_SEC.

If you want more details, such as user time,system time etc. Use times() defined in times.h


All times are GMT -5. The time now is 06:28 AM.