Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Feb 2004 22:32:30 +0100
From:      Poul-Henning Kamp <phk@phk.freebsd.dk>
To:        hackers@freebsd.org
Subject:   Neat little, not so simple project...
Message-ID:  <16511.1076880750@critter.freebsd.dk>

next in thread | raw e-mail | index | archive | help

We can compile our kernel with "--test-coverage --profile-arcs" to
do basic-block profiling (see kernbb(8) and gcov(1)/gcc(1) docs.)

Modify the code GCC inserts, so that it records if giant was held
in one bit, and if not held in another, ie:

	if (giant)
		*counter_loc |= 1;
	else
		*counter_loc |= 2;

Run your kernel for a few days.

Use kernbb(8) to retrieve output.

Produce graphics/statistics showing which code is Giant, which is
giant free and which is mixed mode.

Consider for instance the "xterm unreadable" font approach, and
render the source files into pngs (a 800x660 png holds ten by ten
standard pages without margins between) where you color the characters
and lines by the result:

	black - not executed.
	red - executed with giant always
	yellow - executed with mixed giant holding
	green - never executed with giant.

Brownie points:  Get slashdotted when they discover you did it.

-- 
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.



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