delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/01/18/11:06:38

From: Tom St Denis <stdenis AT compmore DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Reading MSR (Athlon multiplier)
Date: Thu, 18 Jan 2001 15:15:37 GMT
Organization: Deja.com
Lines: 34
Message-ID: <9471af$7r4$1@nnrp1.deja.com>
References: <3a66161d DOT 226362160 AT news DOT sci DOT fi> <945a90$ckgq1$1 AT ID-57378 DOT news DOT dfncis DOT de> <945itn$3ai$1 AT nnrp1 DOT deja DOT com> <945mn8$cjroo$1 AT ID-57378 DOT news DOT dfncis DOT de> <946ofe$vlp$1 AT nnrp1 DOT deja DOT com> <946rg8$c61d6$1 AT ID-57378 DOT news DOT dfncis DOT de>
NNTP-Posting-Host: 24.156.37.224
X-Article-Creation-Date: Thu Jan 18 15:15:37 2001 GMT
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 5.01 [en]
X-Http-Proxy: 1.1 x69.deja.com:80 (Squid/1.1.22) for client 24.156.37.224
X-MyDeja-Info: XMYDJUIDtomstdenis
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019