From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 8 15:34:29 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD0A01065690 for ; Mon, 8 Mar 2010 15:34:29 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 8C12E8FC16 for ; Mon, 8 Mar 2010 15:34:29 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 3DF1E46B51; Mon, 8 Mar 2010 10:34:29 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 28D598A025; Mon, 8 Mar 2010 10:34:28 -0500 (EST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 8 Mar 2010 09:47:57 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <4B916BD0.7030501@delphij.net> <20100306083916.GI21344@acme.spoerlein.net> In-Reply-To: <20100306083916.GI21344@acme.spoerlein.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201003080947.58027.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 08 Mar 2010 10:34:28 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.5 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Alexander Best , Ulrich =?iso-8859-1?q?Sp=F6rlein?= , Xin LI Subject: Re: tiny lib/libkvm/kvm_proc.c correction X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 15:34:29 -0000 On Saturday 06 March 2010 3:39:17 am Ulrich Sp=F6rlein wrote: > On Fri, 05.03.2010 at 12:38:40 -0800, Xin LI wrote: > > On 2010/03/05 11:59, Alexander Best wrote: > > > Xin LI schrieb am 2010-03-05: > > > On 2010/03/05 11:26, Alexander Best wrote: > > >>>> hi there. does this look right? > > >=20 > > > Not to me, the value is not to be used this way and the comments > > > above the code explained the same thing. > > >=20 > > > I think we should use cputick2usec but it's not available to userland > > > (one have to copy cpu_tick_frequency and friends). > > >=20 > > >> damn you're right. i completely overlooked that comment. would it be= =20 worth > > >> making cputick2usec available to userland? is kvm_proc.c the only=20 candidate in > > >> need of converting cpu ticks to usecs? > >=20 > > I'm not sure how to do that unfortunately, is there a way to expose a > > kernel variable to userland which also works on a crash dump? >=20 > ticks *is* available to libkvm, not sure what happens on crashdumps, > though. The following patchset has not been tested: >=20 >=20 https://www.spoerlein.net/gitweb/?p=3Dfreebsd.work/.git;a=3Dcommitdiff;h=3D= d500a051eb75dd234166bb11485c0a953aefce1d I'm fine with this patch so long as you are reading 'ticks' from the crash= =20 dump. =2D-=20 John Baldwin