From owner-freebsd-hackers Sun Nov 16 12:21:21 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id MAA12082 for hackers-outgoing; Sun, 16 Nov 1997 12:21:21 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id MAA12071 for ; Sun, 16 Nov 1997 12:21:15 -0800 (PST) (envelope-from j@uriah.heep.sax.de) Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id VAA25053 for hackers@FreeBSD.ORG; Sun, 16 Nov 1997 21:21:14 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.8.8/8.8.5) id UAA16087; Sun, 16 Nov 1997 20:50:14 +0100 (MET) Message-ID: <19971116205014.XN38067@uriah.heep.sax.de> Date: Sun, 16 Nov 1997 20:50:14 +0100 From: j@uriah.heep.sax.de (J Wunsch) To: hackers@FreeBSD.ORG Subject: Re: Reading kernel memory References: X-Mailer: Mutt 0.60_p2-3,5,8-9 Mime-Version: 1.0 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: ; from Charles Mott on Nov 10, 1997 13:30:38 -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk As Charles Mott wrote: > So if one really wants to map a kernel variable to > user space, I am guessing something more sophisticated > than the kvm routines are needed. Not sure, but perhaps it's possible to mmap() /dev/kmem? > Wandering through the kernel source code, I have also > discovered that gettimeofday() actaully invokes a > microtime() call which actually tries to determine the > time by reading a timer and using it to refine the > kernel time variable. After ktracing X11 applications, and seeing how often gettimeofday() is actually called, i've been rather impressed that this entire process is still reasonably faster nevertheless. The featuere is very useful for fine-granularity traces, be it ktrace or tcpdump (or simply the ping response time). -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)