Removing the perfmon(4) driver
Bruce Evans
brde at optusnet.com.au
Thu Apr 23 10:59:50 UTC 2009
On Wed, 22 Apr 2009, John Baldwin wrote:
> While looking at something else today I noticed that we have a perfmon(4)
> driver which is an old driver that provided early support for the performance
> counters on the Pentium and Pentium Pro. At this point it seems to be
> superseded by hwpmc(4). Are there any objections to removing perform(4)?
I still use it occasionally. After updating it to Y2K so as to support
AthlonXP (this also works for Athlon64), it has some advantages over
hwpmc. Mainly lack of bloat, but also:
- with (modified) high resolution kernel profiling, it can profile
individual functions precisely, e.g., to count cache misses per
function even for functions that are only called once. Statistical
profiling cannot do this and hwpmc doesn't support high resolution
kernel profiling (neither does perfmon for SMP, since the locking
needed for this is especially delicate and not done; locking for
all types of kernel profiling for SMP is mostly broken (either not
done or can cause deadlock), but this is fixed in my version).
- in userland, its standard support utilitities (I use only wollman's
unmaintained since 1999 /usr/src/share/examples/perfmon) have a
raw interface that doesn't prevent access to undocumented counters.
Some useful k8 counters work on all my AthlonXP k7 CPUs though they
are only documented for k8.
Bruce
More information about the freebsd-arch
mailing list