Re: How to measure time accurately.

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

 



krishna wrote:
Hi All,

Can any one tell me how to measure time accurately for a block of C code in device drivers.
For example, If I want to measure the time duration of firmware download.

Most cpus have some way of getting at a counter or decrementer of various frequencies. Usually it requires low-level hardware knowledge and often it needs assembly code.


On ppc you'd use the mftbu/mftbl instructions, as suggested by Lee on x86 you'd use the rdtsc instruction.

Chris
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux