Skip site navigation (1)Skip section navigation (2)
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
Message-ID:  <19971116205014.XN38067@uriah.heep.sax.de>
In-Reply-To: <Pine.BSF.3.96.971110131427.25875C-100000@darkstar.home>; from Charles Mott on Nov 10, 1997 13:30:38 -0700
References:  <Pine.BSF.3.96.971110131427.25875C-100000@darkstar.home>

next in thread | previous in thread | raw e-mail | index | archive | help
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. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19971116205014.XN38067>