From nobody Thu Jun 2 19:17:33 2022 X-Original-To: dev-commits-src-main@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 90E3A1B4A99E; Thu, 2 Jun 2022 19:17:33 +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 4LDbPT38khz3s6t; Thu, 2 Jun 2022 19:17:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654197453; 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=FxH+An37N80ljU7zHnG3mFZXobVeKS+FW/SxOsGy82Y=; b=O5j70/MySDFEMBuQDZ7EgOUvtr8/1lvNcuYQutuFxGuZC44raMGucYLNh4vbStbHDdr62E YIREcSPfIZUog768Xrk86NLZKWDITWZXUybSSLS26nSw119nnEDoErppJfHf5WT+WPUiWd pwATmaYvuI/KAaCmJVNxYASivWh5TAh1qUcA+N/3Zjt2hd3VgOr5p0tvi7b86aH2y2u9DA uuPYF2Xes3t4ONxE+LXXgZF5RJLEwcGVh5A6QmryXVVL1tc4b5ySm8u5PmLn7pdKqEAZ3M YtiRTS7ukSFLi2Q3ESMCxdeHQXgNtKRZG/FJE+m1bBof0QUpv8qpwtMvjkyfDA== 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 4BF581A993; Thu, 2 Jun 2022 19:17:33 +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 252JHX8g067694; Thu, 2 Jun 2022 19:17:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 252JHXgq067693; Thu, 2 Jun 2022 19:17:33 GMT (envelope-from git) Date: Thu, 2 Jun 2022 19:17:33 GMT Message-Id: <202206021917.252JHXgq067693@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: e144cd92bb15 - main - libpmc: Prefer fixed counters in Intel event aliases. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: e144cd92bb150b5636f97af3c1c89da49edf8ac8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654197453; 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=FxH+An37N80ljU7zHnG3mFZXobVeKS+FW/SxOsGy82Y=; b=q38Xp5ovrwwrtcHeRXcE22pE7tfm/cVLwJQDk4nyf44e1YZcP/SHlmS1vYHtN4bZwlQ84W 2gaOwKvVp2M0HTUP6kCzbm/tDFxne0ihV7yvHEZzNgbzuZ4199jGtb/d2TITYVK6ugaKKp W6gf9jW6F52xpziN0NpEIhpKZYXARYOoKfpc6ej2odGSM9SQdGYBO04SA8xTGUjztLJSm2 WoIfQEorrKT9wCqSTi1tVxN7JcdcrcGvrI+gKeoSIM5f8iqFvESvb5NXBGDxnw9tZk+E/Y BC5a9K2JZeWLQ+ZKKC9gFJm57uA1WOAFJ8G/ABf4lS4O6lIfJZ7dglsvnrAZkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1654197453; a=rsa-sha256; cv=none; b=kVTOVeBZnWtzKgznrhU4OBjFwUs0BFzApBFcvltYaTWj9o6VOEfSksUCrSLwV/fnHUVCaL NuKtiWhGJuU60D309oORvF0GyQ3TjUAdKDM68ZFsAND7dSigRPrqugQ9UGpUpVINAsy2EC iYPMrVR4Bv0YF3ZCDcae6EqA63HHY05d3bob0PBk9z3sSp67+bIJWOMDwpGDE8slEU1+0h E7BLtlwS944uDybdO0SLJ5rI5iDwzU8t6Vr0JlorIkrRHxIBTboFEB3dOS5uP8xNnRkcH3 hMdVxKzF6i+iZalRZ7qnPbw4FvvG00Y0f/TVK4xWqxGsjLIpNIShUPIZRKUpqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=e144cd92bb150b5636f97af3c1c89da49edf8ac8 commit e144cd92bb150b5636f97af3c1c89da49edf8ac8 Author: Alexander Motin AuthorDate: 2022-06-02 19:09:38 +0000 Commit: Alexander Motin CommitDate: 2022-06-02 19:17:13 +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 --- 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 a7c090ceb4d3..7af6d813ada6 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"},