From owner-dev-commits-src-all@freebsd.org Thu Jul 29 15:25:17 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4BE5967587D; Thu, 29 Jul 2021 15:25:17 +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 4GbDqd1Mcbz4t4s; Thu, 29 Jul 2021 15:25:17 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 0706C142BF; Thu, 29 Jul 2021 15:25:17 +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 16TFPGuT009648; Thu, 29 Jul 2021 15:25:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 16TFPG5j009647; Thu, 29 Jul 2021 15:25:16 GMT (envelope-from git) Date: Thu, 29 Jul 2021 15:25:16 GMT Message-Id: <202107291525.16TFPG5j009647@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: c0960dc8c677 - stable/13 - libpmc: remove unused PMC_MDEP_INIT_INTEL_V2 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/stable/13 X-Git-Reftype: branch X-Git-Commit: c0960dc8c67727ce9c4fdde77aefada350d91ad0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2021 15:25:17 -0000 The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=c0960dc8c67727ce9c4fdde77aefada350d91ad0 commit c0960dc8c67727ce9c4fdde77aefada350d91ad0 Author: Mitchell Horne AuthorDate: 2021-05-13 18:56:39 +0000 Commit: Mitchell Horne CommitDate: 2021-07-29 15:01:09 +0000 libpmc: remove unused PMC_MDEP_INIT_INTEL_V2 All uses of this macro were removed in e92a1350b50e. Remove cpu_has_iaf_counters as well. Reviewed by: ray, emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30195 (cherry picked from commit 4d8d74a4f52efd078bd6298e0adbdd476ed70de9) --- lib/libpmc/libpmc.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/lib/libpmc/libpmc.c b/lib/libpmc/libpmc.c index 512f3957962a..e66ec5822226 100644 --- a/lib/libpmc/libpmc.c +++ b/lib/libpmc/libpmc.c @@ -1367,10 +1367,6 @@ pmc_init(void) uint32_t abi_version; struct module_stat pmc_modstat; struct pmc_op_getcpuinfo op_cpu_info; -#if defined(__amd64__) || defined(__i386__) - int cpu_has_iaf_counters; - unsigned int t; -#endif if (pmc_syscall != -1) /* already inited */ return (0); @@ -1446,15 +1442,6 @@ pmc_init(void) #if defined(__amd64__) || defined(__i386__) if (cpu_info.pm_cputype != PMC_CPU_GENERIC) pmc_class_table[n++] = &tsc_class_table_descr; - - /* - * Check if this CPU has fixed function counters. - */ - cpu_has_iaf_counters = 0; - for (t = 0; t < cpu_info.pm_nclass; t++) - if (cpu_info.pm_classes[t].pm_class == PMC_CLASS_IAF && - cpu_info.pm_classes[t].pm_num > 0) - cpu_has_iaf_counters = 1; #endif #define PMC_MDEP_INIT(C) do { \ @@ -1464,15 +1451,6 @@ pmc_init(void) PMC_TABLE_SIZE(C##_pmc_classes); \ } while (0) -#define PMC_MDEP_INIT_INTEL_V2(C) do { \ - PMC_MDEP_INIT(C); \ - pmc_class_table[n++] = &iaf_class_table_descr; \ - if (!cpu_has_iaf_counters) \ - pmc_mdep_event_aliases = \ - C##_aliases_without_iaf; \ - pmc_class_table[n] = &C##_class_table_descr; \ - } while (0) - /* Configure the event name parser. */ switch (cpu_info.pm_cputype) { #if defined(__amd64__) || defined(__i386__)