Mail Archives: djgpp/2001/01/18/11:06:38
In article <946rg8$c61d6$1 AT ID-57378 DOT news DOT dfncis DOT de>,
"Alexei A. Frounze" <dummy_addressee AT hotmail DOT com> wrote:
> it does not really matter. you know why? because the only thing we want is
> having that value from RDTSC after a certain period of time. it doesn't
> matter what CPU does meanwhile (messes with kernel code or user task or with
> the stack you meantion). and even if you talk about the overhead, this
> overhead simply shifts everything in time (e.g. adds the same constant value
> to the value from RDTSC). and when we compute the difference this "overhead"
> disappears. do you care about value of (say) (5-2) more than about value of
> (7-4)???
> btw, if there was something like that overhead, it would have less
> contribution to the measured frequency rather than contribution of timer
> accuracy and BIOS code which increments the counter at 40h:6ch.
well on my Athlon it takes about 10~15 cycles (I think) todo the following
rdtsc
mov [start],eax
mov [start+4],edx
call myfunc
rdtsc
myfunc:
ret
So there is obviously some overhead in the code. By subtracting out the 10
cycles you get zero based RDTSC counts.
Tom
Sent via Deja.com
http://www.deja.com/
- Raw text -