Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Sep 2022 17:26:17 GMT
From:      Mitchell Horne <mhorne@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 075a04d7d77b - stable/13 - libpmc: add armv8 pmu-event aliases
Message-ID:  <202209131726.28DHQHrJ036924@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by mhorne:

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(+)

diff --git a/lib/libpmc/libpmc_pmu_util.c b/lib/libpmc/libpmc_pmu_util.c
index 33b369547a0a..6bfc1547af63 100644
--- a/lib/libpmc/libpmc_pmu_util.c
+++ b/lib/libpmc/libpmc_pmu_util.c
@@ -158,6 +158,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},
 };
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202209131726.28DHQHrJ036924>