Re: measure time less than 1 jiffie?

Ingo Molnar (mingo@chiara.csoma.elte.hu)
Wed, 8 Dec 1999 18:12:48 +0100 (CET)


On Wed, 8 Dec 1999, Sushil Agrawal wrote:

> I am trying to measure the timings of some kernel routines. I examined
> the value of 'jiffies' for that. But many routines (almost all, including
> the major ones like fork, exit and exec) return before a jiffie expires,
> which is understandable. (because 1 jiffie is 10ms). Therefore i am unable
> to get the exact timings.
>
> Can someone tell me how to measure the timings, inside the kernel, which
> are less than 1 jiffie (in microseconds). I am running linux-2.2.9 kernel.

try get_cycles(), rdtscl(), rdtscll().

-- mingo

-
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/