From owner-freebsd-current@FreeBSD.ORG Fri Jul 10 05:50:52 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 873F0106564A for ; Fri, 10 Jul 2009 05:50:52 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 027F88FC19 for ; Fri, 10 Jul 2009 05:50:50 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id IAA25514; Fri, 10 Jul 2009 08:50:49 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1] helo=edge.pp.kiev.ua) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1MP90T-000KjK-8I; Fri, 10 Jul 2009 08:50:49 +0300 Message-ID: <4A56D6B7.8050100@freebsd.org> Date: Fri, 10 Jul 2009 08:50:47 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.21 (X11/20090406) MIME-Version: 1.0 To: Tim Kientzle References: <4A562960.3010801@freebsd.org> <4A563A57.8090907@freebsd.org> <4A56AD55.2010201@freebsd.org> In-Reply-To: <4A56AD55.2010201@freebsd.org> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: =?ISO-8859-1?Q?Marius_N=FCnnerich?= , freebsd-current@freebsd.org Subject: Re: dtrace users opinion solicited (timestamps) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2009 05:50:52 -0000 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