I have uploaded a snapshot of the kernel code coverage output from
my testbox, in case anybody want to study their favourite piece of
code:
http://phk.freebsd.dk/gcov/${sourcefile}.gcov
For instance:
http://phk.freebsd.dk/gcov/subr_witness.c.gcov
I hope to commit the necessary stuff to the tree in a few days, after
which you will all be able to do this yourself :-)
I can't say that I think GCC does a very good job of matching the
counts to the right line-numbers, but that is what we have to work
with. Lowering the optimization level or enabling debugging may
help, not sure, havn't tried.
A typical example of the output is:
static void
witness_levelall (void)
169 {
169 struct witness_list *list;
169 struct witness *w, *w1;
/*
* First clear all levels.
*/
15133 STAILQ_FOREACH(w, &w_all, w_list) {
14964 w->w_level = 0;
}
>From which we for instance can figure out that on average the w_all
list has approx 88 items on it.
Enjoy...
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED] | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message