From nobody Wed Jul 06 17:32:48 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 96B711D123DA; Wed, 6 Jul 2022 17:32:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LdRSw394kz3Kxl; Wed, 6 Jul 2022 17:32:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657128768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nFlIBNSIPh/8G5bG64s63igUHbrhisxzYeRGZ570uLk=; b=RuioNdVTGmpdfGWnb34zkLIEiW6NBi8IZR2qMk2IDNBwywnvgI497ivpfpLq1hWqDrhzbE DPvat3K6DwouIlEWanY87Bq1C+JHLV7qfwPaUanZ+e/gmPhTnUA0WE1q/Tmv77KKJQNbCq frJJimDHEzy3Jz3lEDwE6oaHHnWa2W4cPyfOVy/PTqAWorwdSJ9wGzIIMNVvdu+YJMD1OW CScMFgBP1I399Q3LJsk8VyjhP2c/tlusUt/ZT2trHk48WcL1Wk7HUtn4qP6/iujAJjDqHZ 9RJNkLfQpLoC5XKKzncI9c1E1PvWui4u1ZXTW0tZ5h2kGB5Xk1y01bcR735CCQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4D99E1EF7D; Wed, 6 Jul 2022 17:32:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 266HWmkm024207; Wed, 6 Jul 2022 17:32:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 266HWm2X024206; Wed, 6 Jul 2022 17:32:48 GMT (envelope-from git) Date: Wed, 6 Jul 2022 17:32:48 GMT Message-Id: <202207061732.266HWm2X024206@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 6f50b73ee5c1 - main - libpmc: add armv8 pmu-event aliases List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6f50b73ee5c11253a35bb2787f2bef627079999d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657128768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nFlIBNSIPh/8G5bG64s63igUHbrhisxzYeRGZ570uLk=; b=kp3+RwjGwFbM4Jyi2pxmlZ8JyJ718/tuJHbIO+MXXg/biKaimnjc6vnD+UQWTc/82v7hhY bJjnMfHjCwcgAzQcYMDe3sF6McaimmG7z5kqDUafta+DzDUEbU/0U4ep12PEIZbHRf/XJd AG0leCGHeIA1OEJysVfO4w6rf6LAiOWKv5PA6Gpy/MGgcLBq9wqIb28qfnU+3Oshf04dNB yF/yO1/fcQBUGzrfb426b+tt/Lue1dvijlyC2L8cIB2PrzauWqg/mP7dYvmW7c98o/PxrM 6vTeDPj8jgSvbxPy35bBBrj5epLGPcpFIvvkhRSQWYHCr9KnW59tCzHJWS9xsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657128768; a=rsa-sha256; cv=none; b=lL9SqZGY/XpvdQD36JKhwjfH4IO+2IW13OSBk0Li9es5rTV3JEda9/6IGi/HjVnrASys6U nfIgrJCH4h1h9g8ZSohQKW6AE9tWqJ8OW4Z+4/ht3bkKyI5Iohb7BGCzfeoKMmwsEG40Fn sk6yirITjcVygdXB0C2lgRQQmm2+xga6dA5O6Jm8M0uh0QovEgZ+VJIJRGzBSzGRhJmG2+ Nw2ME5lpsD8t5f076c0YteoeOaT9esqD/+IBCEM8sgJC4uQfWRg/HSlY2q28NcxobA5pZn tL5cmw8TPHOMC72okcuQitqRcoAHifeiehkHN6kIQcxXmUIJwsmcUodZm8Y7yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=6f50b73ee5c11253a35bb2787f2bef627079999d commit 6f50b73ee5c11253a35bb2787f2bef627079999d Author: Mitchell Horne AuthorDate: 2022-07-06 17:30:03 +0000 Commit: Mitchell Horne 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(+) diff --git a/lib/libpmc/libpmc_pmu_util.c b/lib/libpmc/libpmc_pmu_util.c index 7af6d813ada6..1ae0c573d157 100644 --- a/lib/libpmc/libpmc_pmu_util.c +++ b/lib/libpmc/libpmc_pmu_util.c @@ -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}, };