]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
libpmc: fix the 'cycles' event alias on x86
authorMitchell Horne <mhorne@FreeBSD.org>
Thu, 30 Sep 2021 14:11:36 +0000 (11:11 -0300)
committerMitchell Horne <mhorne@FreeBSD.org>
Fri, 15 Oct 2021 15:21:35 +0000 (12:21 -0300)
commit89f1b82a859fe4b9d4a59e9089a634ec24f127dd
treeb2fdf495f942fb1e1b7ceb9a5df3df0cc3c4c1d7
parentfc7febf483a4910b024b34ab8620e6ac14590c08
libpmc: fix the 'cycles' event alias on x86

Looking for "tsc-tsc" in the pmu tables will fail every time. Instead,
make this an alias for the static TSC event defined in pmc_events.h.
This fixes 'pmcstat -s cycles' on Intel and AMD.

Reviewed by: emaste
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D32197

(cherry picked from commit 937539e0a32ce1da46223664ca1cf3b252e02ece)
lib/libpmc/libpmc.c
lib/libpmc/libpmc_pmu_util.c
sys/dev/hwpmc/pmc_events.h