Attempting to run a basic system-wide sampling mode profiling fails: # pmcstat -S unhalted-cycles -O /tmp/sample.out pmcstat: ERROR: Cannot allocate system-mode pmc with specification "unhalted-cycles": Invalid argument # uname -a FreeBSD generic 13.0-RC3 FreeBSD 13.0-RC3 #0 n244697-16c1f81f11a: Fri Mar 12 09:29:50 UTC 2021 root@generic:/usr/obj/root/freebsd/arm64.aarch64/sys/GENERIC arm64
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=6f50b73ee5c11253a35bb2787f2bef627079999d commit 6f50b73ee5c11253a35bb2787f2bef627079999d Author: Mitchell Horne <mhorne@FreeBSD.org> AuthorDate: 2022-07-06 17:30:03 +0000 Commit: Mitchell Horne <mhorne@FreeBSD.org> CommitDate: 2022-07-06 17:32:21 +0000 libpmc: add armv8 pmu-event aliases These are all "standard microarchitectural events", which in theory are supported by every ARMv8 processor. In practice, it depends on the pmu-event definitions being complete and accurate, which they are not for every processor. Still, these aliases should be functional on the majority of systems. PR: 254532 Reported by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D35550 lib/libpmc/libpmc_pmu_util.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=075a04d7d77b528e4b31e7b1205ad434f5c01623 commit 075a04d7d77b528e4b31e7b1205ad434f5c01623 Author: Mitchell Horne <mhorne@FreeBSD.org> AuthorDate: 2022-07-06 17:30:03 +0000 Commit: Mitchell Horne <mhorne@FreeBSD.org> CommitDate: 2022-09-13 16:25:35 +0000 libpmc: add armv8 pmu-event aliases These are all "standard microarchitectural events", which in theory are supported by every ARMv8 processor. In practice, it depends on the pmu-event definitions being complete and accurate, which they are not for every processor. Still, these aliases should be functional on the majority of systems. PR: 254532 Reported by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D35550 (cherry picked from commit 6f50b73ee5c11253a35bb2787f2bef627079999d) lib/libpmc/libpmc_pmu_util.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)