From nobody Mon Jul 04 18:09:28 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 0AD801C3F5E0; Mon, 4 Jul 2022 18:09:30 +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 4LcDN90QPnz4kHx; Mon, 4 Jul 2022 18:09:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656958169; 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=GvDpJoYlGb6xjW784QHhJCJb7AA0qRSD6OeLHQeLWhA=; b=O3emBp/RF7YIOr7m7SJ2DjtkugTnXnBuFrIyp+F7jGPdfXPiMMJchWzD93SdXk4d4xC4yR DTdRAG0UvCtmRGYK4fMG6SQfMc27LZSCV9vWmsY1vCVhrrm2e81uFysKCN0hBm37D2cSlL KVIMUBPx922HneEoqCa+ivhD8X7q4fozjIe6IX23/TsWxLzMUHyEpMbY6ok70AUGu2THMN tHPAtn77x2j8uAdOJ1U4QaCkqQtGealf2WNQbUGeRcPrt662q+S2lIBe2ul92mmZasFqq3 fxF3wIftfSFp94YgOd6U1MM54BSpST+OgjbaT2Amqo4IW9lbaQzqVAZuo5CHmg== 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 CB0A815E3E; Mon, 4 Jul 2022 18:09:28 +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 264I9SYh064529; Mon, 4 Jul 2022 18:09:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 264I9Soi064528; Mon, 4 Jul 2022 18:09:28 GMT (envelope-from git) Date: Mon, 4 Jul 2022 18:09:28 GMT Message-Id: <202207041809.264I9Soi064528@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: c4cafc24df30 - stable/13 - libpmc: Prefer fixed counters in Intel 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: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c4cafc24df302ccc127b167ef1652e2a16a74c38 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656958169; 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=GvDpJoYlGb6xjW784QHhJCJb7AA0qRSD6OeLHQeLWhA=; b=ELkqU77hxEXMWgdbFybzndZyDkecl0qz8n5leee3qANgPaqGM1Y0xnOiNNLNLbkEAm0sl1 bPvVuJOEKbbKaFDED+YDrtfhl49dxkx5o1qQVATLmVqlcT20QmQT640BWNqZlpmSWYkSmo N2vIfTC/xsQLwj9vefTy3A/EpRRhlGIh0BuA3EwnPXrZDpbAOuj7YNJZJo+/mUqsn51BUH TKkbrJ4aZRORRq5l71XGGI3Y688p+VIQ7Gn8lGJLjslyd9PzFgy1l43w7DwtrcS0b3YIhf VDe7LxwA14b1IN651twsBlGSF6QK3JghEjQxfVS9SZv/XpTrwy54todKIV7ZWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1656958169; a=rsa-sha256; cv=none; b=c7QZ/FUfX0F8kdH6UyKRB/wXHswQygH0Z0UUKRmrsWwuUulaCSpfTB2wux+/wBKakgax1J U79ZLNH2bTt7bVJ9WNubH8fHJVI1YqwDJ3w0Ak3ynPk61DQoZfBxE6lKja4514rAAhdjfX lniFgxMB7ftcv+JgBepBBnT70ZYNeoIDLDwGAvg6uN6ltgZo2dl0G+KOZpGAkBZQ9Ncetx ZWMnwQeBPZvb9EFetwkWlRi3hXjIbiv3Px5N+scR1Cz9txhpsEwp/vlVUP/xSL/pdJvIJH nFoVcTF6gTNRM0FBLmTM0CcUWQ1BPOIXtRldVADiqY2jU0brCrWJqwRz1hqgRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=c4cafc24df302ccc127b167ef1652e2a16a74c38 commit c4cafc24df302ccc127b167ef1652e2a16a74c38 Author: Alexander Motin AuthorDate: 2022-06-02 19:09:38 +0000 Commit: Alexander Motin CommitDate: 2022-07-04 17:48:10 +0000 libpmc: Prefer fixed counters in Intel event aliases. It is recommended by Intel to use fixed counters when possible to leave programmable ones for different events. This fixes `pmc stat`, which tries to count 6 events same time, while many Intel CPUs have only 4 programmable counters. MFC after: 1 month (cherry picked from commit e144cd92bb150b5636f97af3c1c89da49edf8ac8) --- lib/libpmc/libpmc_pmu_util.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libpmc/libpmc_pmu_util.c b/lib/libpmc/libpmc_pmu_util.c index 6830a2457364..33b369547a0a 100644 --- a/lib/libpmc/libpmc_pmu_util.c +++ b/lib/libpmc/libpmc_pmu_util.c @@ -60,8 +60,8 @@ typedef enum { } pmu_mfr_t; static struct pmu_alias pmu_intel_alias_table[] = { - {"UNHALTED_CORE_CYCLES", "CPU_CLK_UNHALTED.THREAD_P_ANY"}, - {"UNHALTED-CORE-CYCLES", "CPU_CLK_UNHALTED.THREAD_P_ANY"}, + {"UNHALTED_CORE_CYCLES", "cpu_clk_unhalted.thread"}, + {"UNHALTED-CORE-CYCLES", "cpu_clk_unhalted.thread"}, {"LLC_MISSES", "LONGEST_LAT_CACHE.MISS"}, {"LLC-MISSES", "LONGEST_LAT_CACHE.MISS"}, {"LLC_REFERENCE", "LONGEST_LAT_CACHE.REFERENCE"}, @@ -74,8 +74,8 @@ static struct pmu_alias pmu_intel_alias_table[] = { {"BRANCH-INSTRUCTION-RETIRED", "BR_INST_RETIRED.ALL_BRANCHES"}, {"BRANCH_MISSES_RETIRED", "BR_MISP_RETIRED.ALL_BRANCHES"}, {"BRANCH-MISSES-RETIRED", "BR_MISP_RETIRED.ALL_BRANCHES"}, - {"unhalted-cycles", "CPU_CLK_UNHALTED.THREAD_P_ANY"}, - {"instructions", "inst_retired.any_p"}, + {"unhalted-cycles", "cpu_clk_unhalted.thread"}, + {"instructions", "inst_retired.any"}, {"branch-mispredicts", "br_misp_retired.all_branches"}, {"branches", "br_inst_retired.all_branches"}, {"interrupts", "hw_interrupts.received"},