Phoronix Forums  

Go Back   Phoronix Forums > Phoronix > General Discussion

General Discussion Anything off-topic.

Reply
 
Thread Tools Display Modes
  #1  
Old 10-10-2007, 08:12 AM
DrLecter DrLecter is offline
Junior Member
 
Join Date: Jun 2007
Posts: 6
Question cpuid+rdtsc

How can I learn about the number of cycles a processor instruction takes to execute?
Nor AMD not Intel gives that kind of information and RDTSC is not a precise any more.
Any hint will be welcome?
Reply With Quote
  #2  
Old 10-10-2007, 09:22 AM
mlau mlau is offline
Senior Member
 
Join Date: Sep 2006
Location: Austria
Posts: 157
Default

Quote:
Originally Posted by DrLecter View Post
How can I learn about the number of cycles a processor instruction takes to execute?
Nor AMD not Intel gives that kind of information and RDTSC is not a precise any more.
Any hint will be welcome?
Well, take readings of the TSC before and after the
instruction you want to measure. Make sure you disable
all IRQs and run this under a single-task OS like DOS.
Since DOS does not know of SMP and SpeedStep, the
TSC should be very reliable, and noone will reschedule
your app.

Last edited by mlau; 10-10-2007 at 09:24 AM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 10:16 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2009 by Phoronix Media.