From owner-freebsd-current@FreeBSD.ORG Thu Jul 9 22:26:15 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 76A5A106564A for ; Thu, 9 Jul 2009 22:26:15 +0000 (UTC) (envelope-from brampton@gmail.com) Received: from mail-ew0-f210.google.com (mail-ew0-f210.google.com [209.85.219.210]) by mx1.freebsd.org (Postfix) with ESMTP id 0659D8FC15 for ; Thu, 9 Jul 2009 22:26:14 +0000 (UTC) (envelope-from brampton@gmail.com) Received: by ewy6 with SMTP id 6so183891ewy.43 for ; Thu, 09 Jul 2009 15:26:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type:content-transfer-encoding; bh=xRZWxhQoYZvAPI1Dg78ONlW3u7EDBCgADF81AeytqxE=; b=av49q0Z2c8igf+/LQJTRNUolwC6c8xv8g+fDSOecYZhX1qu5MXbPq3wAjI8aFVudIk 2gpuTLNAx5bglnix1jJjK9oyUr8CBBBNBJVIdqqinq7jFOnDREW9QymRPqlrqGSsTr7G awn+FAZ29fHY69fH/9ZHfwL9Gd5hA+cV8fn5o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=rqOzuXRAEGEDlrfp9mU+xy148URuEkqdo0ZBG06W9VYnUilclUlnnW/u1POx1HecUQ GXXdDgknIgvNcUwWXn6P6gTY6XbukvpeuuerMIEq8tpzO8fS0Q0ipJ9yPYQ7BT/ckclN gSFA7A46p2bWhR8j7fp1nuY+tsEHC8hUj6w20= MIME-Version: 1.0 Sender: brampton@gmail.com Received: by 10.216.21.205 with SMTP id r55mr344402wer.175.1247176932350; Thu, 09 Jul 2009 15:02:12 -0700 (PDT) In-Reply-To: <4A562960.3010801@freebsd.org> References: <4A562960.3010801@freebsd.org> Date: Thu, 9 Jul 2009 23:02:12 +0100 X-Google-Sender-Auth: f1bb0587e6dd5660 Message-ID: From: Andrew Brampton To: freebsd-current@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: Thu, 09 Jul 2009 22:26:15 -0000 2009/7/9 Andriy Gapon : > > > There are at least the following two alternatives: > > 1. Keep things as they are and warn users not to change CPU clock frequency when > they use DTrace and the CPU doesn't have invariant TSC. I think that this should > cause only minor inconveniences to a portion of DTrace users. > > 2. Use raw TSC value as a DTrace timestamp and document this difference from the > original DTrace. Advantage: timestamp value is always monotonic. Disadvantage: > manual conversion is needed to get "real" time (using the same formula). > Please note that in this case timestamps would be in non-linear time dimension if > TSC frequency changes, so to get meaningful timestamps (when needed/important) one > would still have to make sure that TSC frequency stay constant. > According to wikipedia newer Intel processors have a constant rate TSC whos freq does not change. If this features is available on most processors today, then I am happy to stick with option 1. Another problem with this is that on a multicore machine each core may have different TSC values. Has anyone thought how to address this issue? Could we calculate the offset of each core from core0, and then ensure the offset is applied to the tsc value when it is needed? thanks Andrew