lkml.org 
[lkml]   [1999]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: accurate timing
On Wed, 8 Sep 1999, Jose Miguel Pereira Tavares wrote:

> On Wed, 08 Sep 1999, Oliver Xymoron wrote:
> >On Tue, 7 Sep 1999, Virginie Galtier wrote:
> >
> >> Is it possible to know the time spent by a process into the processor
> >> with a better accuracy than jiffies (100 jiffies in one second)?
> >
> >Not in general. You can recompile with a faster HZ, however.
>
> Or you could take a look into the APIC of the pentium and
> pentium-pro (and after). Althoug most pentium MB don't enable the APIC
> (so probably only if you are using a p6 could you use it).

Actually, the right way to do it is with the cycle counting register,
adding code to the system call entry and exit points. And you need to add
some more smarts for things that sleep, probably in switchto. But this of
course adds overhead and requires changing the code.

This also doesn't get to the question of how to account for interrupts,
networking, etc.

--
"Love the dolphins," she advised him. "Write by W.A.S.T.E.."


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.062 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site