From nobody Tue May 31 00:05:23 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 0C18B1B40810; Tue, 31 May 2022 00:05:24 +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 4LBswz54b2z4sMt; Tue, 31 May 2022 00:05:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653955523; 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=n6OJGn+NNWbcOsXZWKW+78L8tDbW9fUezwlGhhXofWM=; b=iOEtdRdnDUAA0M1U1ztEC8XOED87SG/etToqCkJVe2x2SWo0XYUzMsNchGDmquBvlsAZ67 FegKerDP3QeE+4Mj1sglGUXpvNFkTl8iD5jQHmxOPfTC2eOxTorQjSVYVsYfABrP1aBeqW IzZv3V9OGoKdqCZUJ46aUN+2QgazEiIWcHM1zvg47SeYtnYyBvv8/ChFJJzAi0/54VBk3/ G+vUs+SXmM9puexJwGIvz1W87l89R6nolqP2F2oh+iFsWM2XDA8vJJvtAfqLC0g4+0EniJ ZiIv35EG1k4ilOFtX085FxosvJtM3eczL4n7nkD3U2Q6qYVyvYi3o/Q2dDBKzg== 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 52D3421297; Tue, 31 May 2022 00:05:23 +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 24V05Nxw034113; Tue, 31 May 2022 00:05:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24V05N4O034112; Tue, 31 May 2022 00:05:23 GMT (envelope-from git) Date: Tue, 31 May 2022 00:05:23 GMT Message-Id: <202205310005.24V05N4O034112@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: 73b7b181e691 - main - libpmc: Disable hardcoding of Intel fixed counters. 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: 73b7b181e691ebbe8a0e411fd60f5003b51dc75d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653955523; 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=n6OJGn+NNWbcOsXZWKW+78L8tDbW9fUezwlGhhXofWM=; b=kqyhAh67z/egaFDLDQlNutD5aCp6UFMR1vShqlKZj3tatDdGnuz/hFMYNUyhGWd8DoPWSx VCKJym36VlbZriJ+BJo6UsoOR05g0I+XiWzldhOeOpb64f8fnO/9U6VRZ8IDh8FyNHM5p2 KDgsbsJ6V2T8hxsLkCIGDDjO0S7QFCRpEKX5qxCODpBXprqEtttQv+MY+ol6waojP9Bu0z GeSaGMsggCXMhArcJuibxjvAyiVLcxontdQZkjFNAFuMUvQ+EiodwNJweJzBwUFeLPJaEk C0IAMeEaaXSRUOtnlP6B2WLvYTWCNEkc8bPl/jhVqfK7KuAhMtmHXduVP7WQjw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653955523; a=rsa-sha256; cv=none; b=WQokiLj8LddxkeDAxmDl0U7NcxZpnAm/inacQk9it8x9Y+hbjw6gUF4ow4ryNV1mkmqE4I s6AiZ65+fkod0X6vuSiCkOePWzpdCavwqYsofGXHmHMfh1//zH0S3KnVnVLTNqgjU0D0JS HdnwnYJeM2GSUdcUKkCNDU63JgmO1h2Na4CdYhc2qw5CSsrP6zLpzI44YmZSBLM4boXwkB riGjHs07vDLMELn8YJ29EdZXpHNbvXveoQI0yT/IRc08Us9DFHyw25nsxrgA6O8dD1A+U8 Xqo5e+j+HKdQIrJig8tpIkJRzvI3ZrHpQD89qvBcHzglzLTJhHw8T9kaUZi5TA== 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=73b7b181e691ebbe8a0e411fd60f5003b51dc75d commit 73b7b181e691ebbe8a0e411fd60f5003b51dc75d Author: Alexander Motin AuthorDate: 2022-05-30 23:58:40 +0000 Commit: Alexander Motin CommitDate: 2022-05-31 00:05:15 +0000 libpmc: Disable hardcoding of Intel fixed counters. Intel json's now have pretty reasonable fixed counters representation via event=0 and umask. Hardcoded values create more confusion than fix. MFC after: 1 month --- lib/libpmc/libpmc_pmu_util.c | 3 +-- lib/libpmc/pmu-events/jevents.c | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/libpmc/libpmc_pmu_util.c b/lib/libpmc/libpmc_pmu_util.c index 0f9fc0391589..765196ecc8ac 100644 --- a/lib/libpmc/libpmc_pmu_util.c +++ b/lib/libpmc/libpmc_pmu_util.c @@ -528,8 +528,7 @@ pmc_pmu_intel_pmcallocate(const char *event_name, struct pmc_op_pmcallocate *pm, strcasestr(event_name, "uncore") != NULL) { pm->pm_class = PMC_CLASS_UCP; pm->pm_caps |= PMC_CAP_QUALIFIER; - } else if ((ped->ped_umask == -1) || - (ped->ped_event == 0x0 && ped->ped_umask == 0x3)) { + } else if (ped->ped_event == 0x0) { pm->pm_class = PMC_CLASS_IAF; } else { pm->pm_class = PMC_CLASS_IAP; diff --git a/lib/libpmc/pmu-events/jevents.c b/lib/libpmc/pmu-events/jevents.c index 5a296031451e..ff7d3b226932 100644 --- a/lib/libpmc/pmu-events/jevents.c +++ b/lib/libpmc/pmu-events/jevents.c @@ -480,12 +480,14 @@ static struct fixed { const char *name; const char *event; } fixed[] = { +#if 0 { "inst_retired.any", "event=0xc0,period=2000003" }, { "inst_retired.any_p", "event=0xc0,period=2000003" }, { "cpu_clk_unhalted.ref", "event=0x0,umask=0x03,period=2000003" }, { "cpu_clk_unhalted.thread", "event=0x3c,period=2000003" }, { "cpu_clk_unhalted.core", "event=0x3c,period=2000003" }, { "cpu_clk_unhalted.thread_any", "event=0x3c,any=1,period=2000003" }, +#endif { NULL, NULL}, };