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
This commit is contained in:
Mitchell Horne 2022-07-06 14:30:03 -03:00
parent 9d97138e2d
commit 6f50b73ee5

View file

@ -165,6 +165,21 @@ pmu_alias_get(const char *name)
#elif defined(__aarch64__)
static struct pmu_alias pmu_armv8_alias_table[] = {
{"UNHALTED_CORE_CYCLES", "CPU_CYCLES"},
{"UNHALTED-CORE-CYCLES", "CPU_CYCLES"},
{"LLC_MISSES", "LL_CACHE_MISS_RD"},
{"LLC-MISSES", "LL_CACHE_MISS_RD"},
{"LLC_REFERENCE", "LL_CACHE_RD"},
{"LLC-REFERENCE", "LL_CACHE_RD"},
{"BRANCH_INSTRUCTION_RETIRED", "BR_RETIRED"},
{"BRANCH-INSTRUCTION-RETIRED", "BR_RETIRED"},
{"BRANCH_MISSES_RETIRED", "BR_MIS_PRED_RETIRED"},
{"BRANCH-MISSES-RETIRED", "BR_MIS_PRED_RETIRED"},
{"unhalted-cycles", "CPU_CYCLES"},
{"instructions", "INST_RETIRED",},
{"branch-mispredicts", "BR_MIS_PRED_RETIRED"},
{"branches", "BR_RETIRED"},
{"interrupts", "EXC_IRQ"},
{NULL, NULL},
};