delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/09/23/16:15:29

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: RDTSC ?
Date: 3 Dec 2001 12:54:07 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 17
Message-ID: <9ufslf$lfo$1@nets3.rz.RWTH-Aachen.DE>
References: <u0lpbq1krber57 AT corp DOT supernews DOT com>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 1007384047 22008 137.226.32.75 (3 Dec 2001 12:54:07 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 3 Dec 2001 12:54:07 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Damien Knight <spook AT kmfms DOT com> wrote:
> As I've been told, RDTSC is a feature of pentium (and up) processers that
> tracks the number of processer cycles completed since the system last
> powered up, making it useful for calculating system uptime 

IIRC, uptime is probably the one thing RDTSC is least useful for.  The
counters overflow much too early for that.  Note that these counters
run with CPU clock speed, i.e. more than a billion ticks per second.

The RDTSC stuff is really meant for code optimization tests.  You can
not just count ticks, but several types of CPU-internal events
relevant for program performance, like cache misses or pipeline
stalls.

-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


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