From owner-freebsd-hackers Thu Jul 15 17:58: 8 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from whizzo.transsys.com (whizzo.TransSys.COM [144.202.42.10]) by hub.freebsd.org (Postfix) with ESMTP id 9163F14D13 for ; Thu, 15 Jul 1999 17:58:05 -0700 (PDT) (envelope-from louie@whizzo.transsys.com) Received: from whizzo.transsys.com (localhost.transsys.com [127.0.0.1]) by whizzo.transsys.com (8.9.3/8.9.1) with ESMTP id UAA70943; Thu, 15 Jul 1999 20:55:16 -0400 (EDT) (envelope-from louie@whizzo.transsys.com) Message-Id: <199907160055.UAA70943@whizzo.transsys.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Jennifer Clark Cc: freebsd-hackers@FreeBSD.ORG From: "Louis A. Mamakos" Subject: Re: Advice on deriving accurate time values from the kernel? References: <378E10C4.9AD7979E@vulture.dmem.strath.ac.uk> In-reply-to: Your message of "Thu, 15 Jul 1999 17:48:04 BST." <378E10C4.9AD7979E@vulture.dmem.strath.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 15 Jul 1999 20:55:16 -0400 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I've done some work on measuring things like interrupt response times and the interval between two interesting events or steps in processing. A cheap way to do this is to use the TSC register in the CPU, though you then need to calibrate the frequency that the CPU really runs at. If you're willing to spend some money, you can get hardware to plug into a PCI slot that can return timestamps in 100ns units, as well as generating interrupt at some time in the future, etc. See http://www.bancomm.com/cbc637PCI.htm for one example of such hardware. I have a device driver for FreeBSD for this board which even allows user processes to get precise timing by mmap()'ing the device registers into user space for easy access. The driver will be contributed to the FreeBSD project "soon." I was pretty close to doing so just prior to the newbus conversion and now need to update the driver for a more recent -current. louie To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message