PERFMON isn't operational on amd64

Bruce Evans brde at optusnet.com.au
Tue Jul 27 19:06:53 UTC 2010


On Tue, 27 Jul 2010, John Baldwin wrote:

> On Tuesday, July 27, 2010 8:43:00 am pluknet wrote:
>> Hi.
>>
>> What is a status of "options PERFMON" on amd64?
>> ...
>> Looking at cvs I see amd64/include/perfmon.h was never here.
>
> PERFMON in general is obsoleted by hwpmc(4) which is far more useful and
> featureful.  It should probably just be axed.

Nothing should just be axed.

hwpmc(4) is far too featureful for me, yet perfmon(4) still does things
for me that hwpmc cannot do:
- from userland, without using the library, try undocumented unnamed
   counters.  There are a few useful ones for k7.  E.g.:
     0xc8 (k8-fr-retired-near-returns) and
     0xc9 (k8-fr-retired-near-returns-mispredicted)
   are k8-only according to hwpmc and amd docs, but also work on my k7
   (after a 4-line fix for perfmon on kx).
- in the kernel count, events at the level of individual functions, non-
   statistically using high resolution kernel profiling.  This may result
   in more time spent counting than doing useful work, but provides
   high resolution.

Bruce


More information about the freebsd-amd64 mailing list