# HWPMC is Broken :(



## MaxDev (Nov 25, 2012)

Hello,

Here we go :

pmc: Unknown Intel CPU.
module_register_init: MOD_LOAD (hwpmc, 0xffffffff806153fd, 0xffffffff80c050e0) error 78

I have a Dual Intel Xeon E5-2650, and hwpmc, refuses to attach.

Anybody knows any solution ?

FreeBSD 8.3 by here.


----------



## cpm@ (Nov 25, 2012)

What steps will reproduce the problem? On what CPU?

This wiki page describes briefly the process of adding support for a new class of PMC to FreeBSD's hwpmc(4)/libpmc(3):
http://wiki.freebsd.org/PmcTools/PmcHardwareHowTo.


----------



## MaxDev (Nov 25, 2012)

I got lost :|


----------



## cpm@ (Nov 25, 2012)

Show your output:
[CMD=]# sysctl -a | grep hw.machine[/CMD]


----------



## MaxDev (Nov 25, 2012)

hw.machine: amd64
hw.machine_arch: amd64


----------



## MaxDev (Nov 25, 2012)

hw.model: Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz


----------



## cpm@ (Nov 26, 2012)

> Log:
> MFC r237196:
> 
> Disable hwpmc(4) support for Intel Xeon Sandy Bridge (Model 0x2D).
> ...



http://lists.freebsd.org/pipermail/svn-src-stable-9/2012-June/002205.html.


----------



## MaxDev (Nov 26, 2012)

And what to do now ?


----------



## cpm@ (Nov 26, 2012)

> pmc: Unknown Intel CPU.
> module_register_init: MOD_LOAD (hwpmc, 0xffffffff806153fd, 0xffffffff80c050e0) error 78



This problem happens with modern CPUs, in your case, hwpmc(4) doesn't support your Sandy Bridge-E CPU.


----------



## MaxDev (Nov 26, 2012)

I can see this clearly, but how i'll profile the kernel now ?


----------



## cpm@ (Nov 26, 2012)

MaxDev said:
			
		

> I can see this clearly, but how i'll profile the kernel now ?



I really suggest taking a look at the various related thread on the freebsd-current mailing list.


----------

