Re: Heads up: official removal of older AMD (pre-Zen1) support from libpmc/hwpmc

Adrian Chadd <[email protected]> Tue, 21 Apr 2026 09:23:56 -0700
Newsgroups gmane.os.freebsd.devel.hackers,gmane.os.freebsd.architechture
Message-ID <CAJ-Vmom51sRsiE+rv8thN8mFzGagRketLmu9b7hetmR=PfTR2A@mail.gmail.com>
On Tue, 21 Apr 2026 at 08:41, Mitchell Horne <[email protected]> wrote:
>
> Hello,
>
> As the title suggests, I have proposed a change [1] to officially remove
> the older AMD processor event definitions and logic from the library and
> module. This means that processors older than the Zen 1 generation
> (~2017) will not be supported by these tools.
>
> I say "officially" because the functionality has been silently disabled
> for these older processors since 2020 at least [2].
>
> Among the many known issues, bugs, and sharp-edges relating to hwpmc(4)
> and its tools, I am not aware of this complaint being raised or reported
> anywhere. (Not to say that users haven't experienced this frustrating
> silent failure.)
>

I mostly object, mostly because I'd rather we figure out why we've regressed in
this area and try to fix it to stop it happening in the future.

I have a variety of AMD hardware sprinkled around at home going back to K7
era stuff that we still boot/run on (and heck I remember debugging our
earlier AMD counter programming bugs way back when.)

Please don't take "noone has complained" as "noone is using this so we can
delete it" - I would take it as "everything is utterly broken in stupid ways and
we should fix the utterly broken stuff and figure out how to make sure it
isn't broken over time in the future."

hwpmc being broken in 1000 subtle stupid ways has been a thorn in my butt
since I jumped back into FreeBSD a couple years ago and I would love to
collaborate on fixing said broken stuff in a way that makes it not break
in the future.

(And for me that starts with "pmcannotate is broken", and "the pmc tools have
no idea how to find kernel stuff in /usr/lib/debug as it was never
migrated to it
in the first place", and both of those are huge "out of box" issues for me.)

(And then it gets down to "which counters do I use" and "why aren't defaults
consistently implemented between cpu family/arch/microarch" but that's
the next discussion after I can /run/ it on a out of box install..)



-adrian