LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 10-07-2007, 02:09 PM   #1
didio
LQ Newbie
 
Registered: Oct 2007
Posts: 1

Rep: Reputation: 0
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?
 
Old 10-08-2007, 11:01 PM   #2
hiren_bhatt
Member
 
Registered: Oct 2005
Distribution: FC3,Debian
Posts: 127

Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How To Measure Disk Space carlosinfl Linux - General 6 08-17-2007 03:30 PM
LXer: Measure Time in Linux with Time Base LXer Syndicated Linux News 0 04-11-2007 07:46 AM
Measure the accept queueing time! appforce Linux - Networking 0 01-26-2006 02:37 PM
accurately measure time rasselin Programming 1 09-05-2003 06:18 PM
how to accurately measure processing time rasselin Programming 3 09-01-2003 12:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 07:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration