Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Nov 2000 07:32:04 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Mike Smith <msmith@FreeBSD.ORG>
Cc:        Daniel Eischen <eischen@vigrid.com>, Mark Murray <mark@grondar.za>, arch@FreeBSD.ORG
Subject:   Re: "Monotonic" counter/register call - commit candidate. 
Message-ID:  <Pine.BSF.4.21.0011190721390.604-100000@besplex.bde.org>
In-Reply-To: <200011181356.eAIDuHF04876@mass.osd.bsdi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 18 Nov 2000, Mike Smith wrote:

> > > I considered renaming the function to marks(9), as I kinda liked
> > > that name, but on reflection, it seems way too arrogant, so
> > > Mike Smith's "get_jiffiecounter" won.
> > 
> > I really hate "jiffie" and would prefer using just get_cyclecount
> > or even better get_counter. 
> 
> "get_counter" is hopelessly vague.  get_cyclecount would be OK too.  I 
> don't care.  Pick a name and stop bloody arguing about it.

How about rdcdtsc() (read cpu-dependent timestamp counter)? :-).

> > It would also be nice to know what
> > resolution the counter was, perhaps get_counter_res().  Do we
> > want an ID associated with the counter if there is more than
> > one available on the hardware?
> 
> Stop trying to make it into a timecounter.  If you want a timecounter, 
> use a timecounter.  We have perfectly good timecounters already.  This is 
> not and never will be a facility any good for computing time.  The value 
> may wrap unexpectedly, go backwards, proceed forwards erratically, etc.

I hesitate to mention that we already have an imperfectly good function
for access to certain machine-dependent counters: cputime().  It is
only implemented on i386's and only used for profiling.  It is almost
as slow as a timecounter (not all that slow).

Bruce



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0011190721390.604-100000>