CPU Speed

M. Patrick Goda (mpg@t6-serv.lanl.gov)
Thu, 6 Nov 1997 14:36:55 -0700


Greetings,

I am trying to get a value for the CPU speed (Hz) that is accurate to
less than 0.1%. I need this value for perfmon- my profiling tool that
uses two special profiling registers in the Pentium and PPro. You can
time a loop, or sleep for a while and count CPU clicks- but the time
taken in a task switch does not guarantee a highly accurate (and
reproducible) CPU speed. I need to determine this speed at run time
(it is used to compute OPS/second). I hope this is the right venue in
which to ask this question.

Suggestions?

Patrick

-- 
---------------------------------------------------------------------
M. Patrick Goda                                      W: (505)667-5386
Los Alamos National Laboratory                       H: (505)989-4506
Theoretical Astrophysics, T-6 MS B288                mpg@nea.lanl.gov 
Los Alamos, NM 87545                         http://qso.lanl.gov/~mpg
---------------------------------------------------------------------
Snappy Quote:  "abcdefghijklmnopqrstuvwxyz"*
                                              *some assembly required
---------------------------------------------------------------------