Counting Clock Cycles on Pentium Under Linux 
Author Message
 Counting Clock Cycles on Pentium Under Linux

How should a person go about counting the number of clock
cycles that a section of code consumes on a Pentium under
Linux?  I have tried to use RDTSC (Read Time-Stamp Counter)
but it would seem that the time-stamp is not saved with
each process.  So, the count is skewed as a result of the
time spent in other processes.  I have tried to use RDPMC
(Read Performance-Monitoring Counters) but have not had
much success yet.  This is an MMX enhanced processor so
RDPMC is available.

  Related to this, if the time-stamp is not saved with each
process then is RDTSC valid on a multi-processor system
where it is possible that a process could be moved
to a different processor?


Mon, 09 Jul 2001 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Pentium MMX Cycle counts

2. Pentium Cycle counts: where?

3. Number of clock cycles for instructions on pentium

4. clock cycle counts

5. Count clock cycles

6. counting clock cycles

7. clock cycle counts

8. Cycle-exact Pentium timing routine for MSVC 4.2

9. Counting cycles of a chamber

10. Cycles in Lazy evaluation (was: Reference counting GC)

11. Counting cycles

12. imul cycle count


Powered by phpBB® Forum Software