Re: howto calculate time spent in ISR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2005-02-21 at 10:32 -0800, Om wrote:
> On Mon, Feb 21, 2005 at 04:16:38PM +0530, Mandeep Sandhu hit keys to express the following:
> > Hi all,
> > 
> > Can someone suggest a reliable way of calculating the amount of time
> > spent inside an ISR?
> > 
> > one way i figured was to store the jiffies value on entering and exiting
> > the ISR and subtract these to get the time spent inside a drivers ISR.
> Will that work?

Not sure here. I think only the line on which the interrupt occurred is
masked....i'm not too sure whether the timer interrupt is masked as
well. your thoughts........?

rdtsc() would be processor specific. is there any other way by which I
one can figure out the time spent?

Thanks anyways,
-mandeep

> jiffies are updated only when a timer interrupt (0) occurs. If you have called
> sti() there will not be any timer interrupt and consequently no jiffies
> increment. May be a better way is to use rdtsc() (for reading time stamp counter
> ) in the beginning and at the end and find out the milli/micro seconds spent.
> HTH,
> Om.
> 

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux