From nobody Fri Dec 31 21:35:16 2021 X-Original-To: dev-commits-ports-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 2E3911925F5E; Fri, 31 Dec 2021 21:35: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 4JQdj06Zw3z4ZYX; Fri, 31 Dec 2021 21:35:16 +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 BE38512C3C; Fri, 31 Dec 2021 21:35:16 +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 1BVLZGW8013956; Fri, 31 Dec 2021 21:35:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BVLZGl8013955; Fri, 31 Dec 2021 21:35:16 GMT (envelope-from git) Date: Fri, 31 Dec 2021 21:35:16 GMT Message-Id: <202112312135.1BVLZGl8013955@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: =?utf-8?Q?Stefan E=C3=9Fer?= Subject: git: 6cc600ed7040 - main - sysutils/turbostat: use CPU_* macros defined in -CURRENT List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6cc600ed7040ae0270d22f580c4778266d9bdbe4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640986516; 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=y2X4dUiIv01alFOTO2PJgHSyCmHygnVrEZq7uNg4ZW4=; b=GDBIft2wV8m3FTdXVUoWpLbkmyORiUpzY1RObReu9YGxLxHx5qFlMoDmiBrbqVeQs5hEbq H4VkipnTbRNCKU4wIxWYhb0sqquYq9TbXYWyHRdYl4eZpP4YdNw4XaZQTaUJGj7aPgj+yQ Hn6Kg/guPYfxhHfm8UrbNToM4lxzg3aUup/R/CBN7CfbXn4Sw79MWF8kIK8Dg8B90/oZ5R MVcNTj2b183EQmSTemKxGOLOLudxdl4tUsMCDgjvOIpj+KLskhuJuB9fFe4avzUvsrQyNG Z4CFa6uTIK9MGCKCMACM28zrT5Dzt6kVt5xd4XR+9E/jRIHpwnEPmphqe79vyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640986516; a=rsa-sha256; cv=none; b=YzVHshkjSdhr8jjntW9fNF7bT/l7c/1DtKECcm3BVR05kuaLlKCVm0id4jukpNiXP+qlzH 9OWn7BthuLrIoEpSLhueLtjZxB6nTumVEThZMQSN2+/nvV5feB/WVKTxdVQHmhdNFJfsvz c1yEXSJrgTqJjk+Y86La24Oj9elQqpRNTSRwFW1hl71XNYWVBUejpC8uARiyR69dB7il5P 1pR1DZDyq1MPgUIPILgNhBAyxje3TQ6IPTIA1sx5HeQimUdtT8k8JVNPnHF0BAiix2AQ6v Txw+CK2AF98RhC/HDwW4GK3jGUD3zcl2fWvnFYQ+u2nV6ECNwdJ10iejSWFwQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by se: URL: https://cgit.FreeBSD.org/ports/commit/?id=6cc600ed7040ae0270d22f580c4778266d9bdbe4 commit 6cc600ed7040ae0270d22f580c4778266d9bdbe4 Author: Stefan Eßer AuthorDate: 2021-12-31 21:32:18 +0000 Commit: Stefan Eßer CommitDate: 2021-12-31 21:34:49 +0000 sysutils/turbostat: use CPU_* macros defined in -CURRENT --- sysutils/turbostat/files/patch-turbostat.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sysutils/turbostat/files/patch-turbostat.c b/sysutils/turbostat/files/patch-turbostat.c index bfe11b2212b4..cbfdcb22ddda 100644 --- a/sysutils/turbostat/files/patch-turbostat.c +++ b/sysutils/turbostat/files/patch-turbostat.c @@ -1,6 +1,6 @@ --- turbostat.c.orig 2020-11-13 21:55:04 UTC +++ turbostat.c -@@ -41,7 +41,31 @@ +@@ -41,7 +41,34 @@ #include #include #include @@ -16,6 +16,8 @@ +#include +#include + ++#ifndef CPU_ALLOC ++#define CPUSET_2ADDR +#define cpu_set_t cpuset_t + +#define CPU_ALLOC(_ign) ({(cpuset_t*)malloc(sizeof(cpuset_t));}) @@ -25,6 +27,7 @@ +#define CPU_SET_S(cpu, _ign, set) CPU_SET(cpu, set) +#define CPU_ZERO_S(_ign, set) CPU_ZERO(set) +#define sched_setaffinity(_x, _y, set) cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, sizeof(cpuset_t), set) ++#endif /* !CPU_ALLOC */ + +#else #include @@ -99,7 +102,7 @@ /* * Each string in this array is compared in --show and --hide cmdline. -@@ -2239,6 +2288,177 @@ int parse_int_file(const char *fmt, ...) +@@ -2239,6 +2288,181 @@ int parse_int_file(const char *fmt, ...) return value; } @@ -189,7 +192,11 @@ + CPU_ZERO(packages.sets); + + for (int i = 0; i < cores.len; i++) ++#ifdef CPUSET_2ADDR + CPU_OR(packages.sets, cores.sets + i); ++#else ++ CPU_OR(packages.sets, packages.sets, cores.sets + i); ++#endif + packages.len++; + } +