Subject: Re: ktr from freebsd
To: Bill Studenmund <wrstuden@netbsd.org>
From: enami tsugutomo <enami@but-b.or.jp>
List: tech-kern
Date: 04/28/2004 08:00:16
> 2) In uvmhist, half of the string lengths are of the format strings. gcc=20
> will turn strlen("Foo") into a constant (3 in this case) at compile time.=
> =20
> So by storing lengths, our compiler is removing half the calls to=20
> strlen().
Though it is easily fixable, that is not true with current
implementation.
> The uvm history system is designed to handle logging a very busy kernel=20
> subsystem to disk very efficiently.
What do you mean? I don't think there is such feature (log to disk),
except vmstat > file (and this is not always useful; with the first
item below, it was useful to dump 30000 entries. it was pain dumping
those on serial console).
...BTW, things I actually needed for uvmhist in the past are:
- knob to stop logging. this is to prevent the necessary log won't be
overwritten by others.
- control how timestamp is calcurated; microtime is heavy for some
situation.
- version of UVMHIST_CALLED() which doesn't call UVMHIST_LOG().
sometimes it was neccesary to log only on certian condition
(otherwise the log buffer is filled with `xxx called!').
enami.