Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Apr 2009 20:59:46 +1000 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        John Baldwin <jhb@freebsd.org>
Cc:        arch@freebsd.org, jkoshy@freebsd.org
Subject:   Re: Removing the perfmon(4) driver
Message-ID:  <20090423202912.W60699@delplex.bde.org>
In-Reply-To: <200904221751.23535.jhb@freebsd.org>
References:  <200904221751.23535.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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