Re: How to measure time accurately.

2005-03-30 Thread Jan Engelhardt
> For ppc this only gives 32-bit values, which overflow every 129 seconds on my > G5. Depending on how long you're trying to time, this could be a problem. Just take an extra measure to "record" overflows (2^32-1 => 0) and you're set. Jan Engelhardt -- No TOFU for me, please. - To

Re: How to measure time accurately.

2005-03-30 Thread Jan Engelhardt
For ppc this only gives 32-bit values, which overflow every 129 seconds on my G5. Depending on how long you're trying to time, this could be a problem. Just take an extra measure to record overflows (2^32-1 = 0) and you're set. Jan Engelhardt -- No TOFU for me, please. - To unsubscribe

Re: How to measure time accurately.

2005-03-29 Thread Chris Friesen
Peter Chubb wrote: "Chris" == Chris Friesen <[EMAIL PROTECTED]> writes: Chris> Most cpus have some way of getting at a counter or decrementer Chris> of various frequencies. Usually it requires low-level hardware Chris> knowledge and often it needs assembly code. As a device driver is inside the

Re: How to measure time accurately.

2005-03-29 Thread Peter Chubb
>>>>> "Chris" == Chris Friesen <[EMAIL PROTECTED]> writes: Chris> 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 tim

Re: How to measure time accurately.

2005-03-29 Thread Jan Engelhardt
>In some cases you can simply count jiffies - depending on how accurate you >need to time things I'd say that often something like this is adequate : These "some cases" exclude this one: If interrupts are disabled, a jiffy might be missed. Take care. If you are on UP and want to measure within

Re: How to measure time accurately.

2005-03-29 Thread Jesper Juhl
On Mon, 28 Mar 2005, Chris Friesen wrote: > Date: Mon, 28 Mar 2005 23:07:14 -0600 > From: Chris Friesen <[EMAIL PROTECTED]> > To: krishna <[EMAIL PROTECTED]> > Cc: Linux Kernel > Subject: Re: How to measure time accurately. > > krishna wrote: > > H

Re: How to measure time accurately.

2005-03-29 Thread Jesper Juhl
On Mon, 28 Mar 2005, Chris Friesen wrote: Date: Mon, 28 Mar 2005 23:07:14 -0600 From: Chris Friesen [EMAIL PROTECTED] To: krishna [EMAIL PROTECTED] Cc: Linux Kernel linux-kernel@vger.kernel.org Subject: Re: How to measure time accurately. krishna wrote: Hi All, Can any one tell me

Re: How to measure time accurately.

2005-03-29 Thread Jan Engelhardt
In some cases you can simply count jiffies - depending on how accurate you need to time things I'd say that often something like this is adequate : These some cases exclude this one: If interrupts are disabled, a jiffy might be missed. Take care. If you are on UP and want to measure within - a

Re: How to measure time accurately.

2005-03-29 Thread Peter Chubb
Chris == Chris Friesen [EMAIL PROTECTED] writes: Chris 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. Chris Most cpus have some way of getting

Re: How to measure time accurately.

2005-03-29 Thread Chris Friesen
Peter Chubb wrote: Chris == Chris Friesen [EMAIL PROTECTED] writes: Chris Most cpus have some way of getting at a counter or decrementer Chris of various frequencies. Usually it requires low-level hardware Chris knowledge and often it needs assembly code. As a device driver is inside the linux

Re: How to measure time accurately.

2005-03-28 Thread Chris Friesen
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

Re: How to measure time accurately.

2005-03-28 Thread Lee Revell
On Mon, 2005-03-28 at 08:58 +0530, 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. rdtsc() - To unsubscribe from this list

Re: How to measure time accurately.

2005-03-28 Thread Lee Revell
On Mon, 2005-03-28 at 08:58 +0530, 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. rdtsc() - To unsubscribe from this list: send the line

Re: How to measure time accurately.

2005-03-28 Thread Chris Friesen
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

How to measure time accurately.

2005-03-27 Thread krishna
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. Regards, Krishna Chaitanya - To unsubscribe from this list: send the line "unsubscribe linux-kernel" i

How to measure time accurately.

2005-03-27 Thread krishna
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. Regards, Krishna Chaitanya - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body