Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Jul 2009 08:50:47 +0300
From:      Andriy Gapon <avg@freebsd.org>
To:        Tim Kientzle <kientzle@freebsd.org>
Cc:        =?ISO-8859-1?Q?Marius_N=FCnnerich?= <marius@nuenneri.ch>, freebsd-current@freebsd.org
Subject:   Re: dtrace users opinion solicited (timestamps)
Message-ID:  <4A56D6B7.8050100@freebsd.org>
In-Reply-To: <4A56AD55.2010201@freebsd.org>
References:  <4A562960.3010801@freebsd.org>	<b649e5e0907091102h2bbf3799r4f8b840696a9162b@mail.gmail.com> <4A563A57.8090907@freebsd.org> <4A56AD55.2010201@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
on 10/07/2009 05:54 Tim Kientzle said the following:
> 
> Instead of just storing tsc_freq at each frequency change,
> you really need:
>   * Last timestamp just before frequency change (t0)
>   * new frequency (f)
>   * TSC value at frequency change (c0)
> 
> Then
>    t = t0 + (rdtsc() - c0) / f
> 
> Of course, I haven't looked at the code to tell
> what your range limitations are.

Yes, tracking the TSC frequency changes should allow us to have correct DTrace
timecounting. But I am not sure if we really need this (or can have this).
Because otherwise I can not see why we have a distinct/specialized DTrace
TSC-based timecounting when we already have general purpose TSC timecounting
that already works correctly (if I am not mistaken).

-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A56D6B7.8050100>