From owner-freebsd-current Sun Jan 5 14:52:36 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5A4F837B401 for ; Sun, 5 Jan 2003 14:52:35 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 871B143ED8 for ; Sun, 5 Jan 2003 14:52:34 -0800 (PST) (envelope-from phk@freebsd.org) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.6/8.12.6) with ESMTP id h05MqSAS012187 for ; Sun, 5 Jan 2003 23:52:28 +0100 (CET) (envelope-from phk@freebsd.org) To: current@freebsd.org Subject: Kernel Code Coverage snapshot available. From: Poul-Henning Kamp Date: Sun, 05 Jan 2003 23:52:28 +0100 Message-ID: <12186.1041807148@critter.freebsd.dk> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 phk@FreeBSD.ORG | 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 majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message