LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 01: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, 10: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



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 02:30 PM
LXer: Measure Time in Linux with Time Base LXer Syndicated Linux News 0 04-11-2007 06:46 AM
Measure the accept queueing time! appforce Linux - Networking 0 01-26-2006 01:37 PM
accurately measure time rasselin Programming 1 09-05-2003 05:18 PM
how to accurately measure processing time rasselin Programming 3 09-01-2003 11:45 AM

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

All times are GMT -5. The time now is 10:38 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
Open Source Consulting | Domain Registration