From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 5 20:38:55 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 DAEF31065670 for ; Fri, 5 Mar 2010 20:38:55 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [IPv6:2001:470:a803::1]) by mx1.freebsd.org (Postfix) with ESMTP id 8193E8FC16 for ; Fri, 5 Mar 2010 20:38:55 +0000 (UTC) Received: from mail.geekcn.org (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 41E7EA665B8; Sat, 6 Mar 2010 04:38:54 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by mail.geekcn.org (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with LMTP id N0Xivd7eJA6w; Sat, 6 Mar 2010 04:38:47 +0800 (CST) Received: from delta.delphij.net (drawbridge.ixsystems.com [206.40.55.65]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id C6CE5A66585; Sat, 6 Mar 2010 04:38:46 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=QjK9uL4lqQNfywtqc4KRnRV2e+qUa0GlmfDUxUw9/LmJh4EXe646tCqQAi0pOu+hD aChGfU4QKsxl3F/A9lvLQ== Message-ID: <4B916BD0.7030501@delphij.net> Date: Fri, 05 Mar 2010 12:38:40 -0800 From: Xin LI Organization: The Geek China Organization User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.8) Gecko/20100304 Thunderbird/3.0.3 ThunderBrowse/3.2.8.1 MIME-Version: 1.0 To: Alexander Best References: In-Reply-To: X-Enigmail-Version: 1.0.1 OpenPGP: id=3FCA37C1; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org, d@delphij.net Subject: Re: tiny lib/libkvm/kvm_proc.c correction X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 20:38:55 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 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? > > Not to me, the value is not to be used this way and the comments > above > the code explained the same thing. > > I think we should use cputick2usec but it's not available to userland > (one have to copy cpu_tick_frequency and friends). > >> damn you're right. i completely overlooked that comment. would it be worth >> making cputick2usec available to userland? is kvm_proc.c the only candidate in >> need of converting cpu ticks to usecs? 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? Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iQEcBAEBAgAGBQJLkWvQAAoJEATO+BI/yjfB1zYH/jNcRww4bePZqVl7zM9zUsyA a6LZ9JivHSgxmMfcLSrqJMBdLdTFgSPFkP7bADKMDoSE/qY6zDMFbid+GVqn1XGk 8jTJiiTXmMkb24+43oQPvVgw3XPoSJJdrJIOlHPr3rzIkHFE0M0ivMETA95WBEQJ uPHQcCSLSRAgdLju+PzfOTq4UiCZ4SXdLfbw+xrLB4IVKzjgtKQL1XYXL5Lgpc94 +OVV30471gZyjJM79aiVYzNs6ZMKTrxxHbUJujgFM3irfJrxVf52XNTa0vmBI6aW yL58dQo+q1/KnzLOpK+T7+c33ZUKakSzkMCxN/IJdUteOHqquZSS0EEEcAkDGKI= =IN3b -----END PGP SIGNATURE-----