From: "Alexei A. Frounze" Newsgroups: comp.os.msdos.djgpp Subject: Re: Reading MSR (Athlon multiplier) Date: Thu, 18 Jan 2001 17:41:46 -0500 Lines: 80 Message-ID: <947rdf$ct4h3$1@ID-57378.news.dfncis.de> 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> <9471af$7r4$1 AT nnrp1 DOT deja DOT com> <947ao2$ca654$1 AT ID-57378 DOT news DOT dfncis DOT de> <947p8h$vij$1 AT nnrp1 DOT deja DOT com> NNTP-Posting-Host: pppa51-resalerochester3-5r7104.dialinx.net (4.4.209.240) X-Trace: fu-berlin.de 979857649 13537827 4.4.209.240 (16 [57378]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Tom St Denis" wrote in message news:947p8h$vij$1 AT nnrp1 DOT deja DOT com... > In article <947ao2$ca654$1 AT ID-57378 DOT news DOT dfncis DOT de>, > "Alexei A. Frounze" wrote: > > oh man, you're not understanding the issue at all. do you? > > okay, you suuggest that I use the following code in order to compute the > > overhead involved by "push eax/edx": > > Sorry I though you were just summing the rdtsc counts then dividing out to > get an average... 1st I find difference between consequtive RDTSCs. I calculate 16 such differencies and find the average. It's not about summation, it's about subtraction. > You're code is wrong anyways, so if you want to be a meany get your code > right first! Nope. It's right, your argument is wrong! Okay, let me explain once more... Let's take a look at the source: -------8<------- mov ch, 17 ; 17 values for average of 16 periods l0: mov ax, [es:6ch] l1: cmp ax, [es:6ch] je l1 rdtsc push edx push eax dec ch jnz l0 -------8<------- you claim that those pushes and everything after rdtsc involves overhead which should be fixed by adding a certain small value to the result of RDTSC, right? hold on... okay, i get those 17 values from RDTSC: delay n1 = RDTSC delay n2 = RDTSC delay n3 = RDTSC ... delay n17 = RDTSC then I evaluate differencies of those n's: d1 = n17 - n16 d2 = n16 - n15 d3 = n15 - n14 ... d16 = n2 - n1 NOW! if you propose me to add a certain constant to each n (n1...n17) (let's say) 10, I end up with: d1 = n17 + 10 - (n16 +10) = n17 - n16 d2 = n16 + 10 - (n15 +10) = n16 - n15 d3 = n15 + 10 - (n14 +10) = n15 - n14 ... d16 = n2 + 10 - (n1 +10) = n2 - n1 which is the same stuff. NOW, DO YOU STILL DISAGREE AND CLAIM THAT MY CODE IS WRONG??? -- Alexei A. Frounze alexfru [AT] chat [DOT] ru frounze [AT] ece [DOT] rochester [DOT] edu http://alexfru.chat.ru http://members.xoom.com/alexfru/ http://welcome.to/pmode/