From nobody Tue Nov 19 21:18:50 2024 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 4XtHRZ5YHwz5fS6T; Tue, 19 Nov 2024 21:18:50 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtHRZ3R50z4mKN; Tue, 19 Nov 2024 21:18:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732051130; 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=IWUPcsGGN5hrBi3EEV2cm2hEx6JEj3JPnMUHOzb2BEw=; b=V21QhWSk+ekDYaNGecDBYb6BOe3wIAeRZamMDEmxOjM1GQx2tmApsDQa7xxpAbAGEfEELL Fi8Aa8khiiS36Uv/scBh5807hdMYfYheNI1jU/PMfxzAPA0caexqvhaGvEgMKbdeo0mrBr bS8jO/8yCvp6nhwQ8D15J0EmQjjkdYBC9rnQhiJju9XJ14cvJPVh43rHjOJl6YIHaN/O0C a0boLP6l+GjQruUZrg5xZhUhq7h3LZUGSGV42HIjzhevd6wqP/bmzgBwIpzINPwob2oh8Q FZ7GUysO54ljb2XdRU/PQyCO9DaLxnY32LlH0QOxlEoWZHU63Bbu2otOj49jDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732051130; 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=IWUPcsGGN5hrBi3EEV2cm2hEx6JEj3JPnMUHOzb2BEw=; b=BAD8LNje3sXnjCdLvfUKgY3Qd9Xx8H9iwCj7vCEeTSHMka5LBeCoHkmwMd1LRkH5jA0+ms mgdrwG5VLuCE1bEQdxYbX1wBSztBvpzJV1E17f2n/YWrCofhKYd7FqrYFJk4asEIXa0LqE HkVx8aaVQLV0Q7Hem48vvb+kolqiNxdfRXopO89FOKlBtyzNXpxyht6AXSikLFdhxdA58I uVQwrTn9ZU/t5UDU+AoOZY5WC2+Q7e55gIfphORLjEffVPPUNKqdeLbY/NlGZY/Op71d3m 7CYeu42G9SsgXVY0PIXqiaJKTOk9AITVAw2/xgqeZMaaiLjX635PzId7o8CPnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732051130; a=rsa-sha256; cv=none; b=xYLhY/zyoYWUf6tNs1m6ky3+4igOdRpT1pui8mYJt5YlFsk93tHH/S06a+xNI8Qlu3Q9tK R4Ove08u6cGxnFPn9Vb67LbFt+ORP4WnWZRBYVbrQmiyjAfE/bUT6wIvPVF6ZT+4X4eESH pPRAmtdGmr8mu0PyU2XxuUdewpoJt6kQa94nVWv2XARapgiu2eWLRqsqhMdkuRoLQ0oQXw 3y3QgCUcppNskLVPNYHoOl0iojUwxy0nu+t1FwdfNmJCDG1vWdQIb24lfoDFwzqNBenkNr o6owC74V3V4ZC09+nsWPWWCNDXT2kKEHGepSKNicNmGAObEfa916hEcy3zj0+Q== 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 4XtHRZ30Q9zR8J; Tue, 19 Nov 2024 21:18:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJLIoIB093141; Tue, 19 Nov 2024 21:18:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJLIo0u093138; Tue, 19 Nov 2024 21:18:50 GMT (envelope-from git) Date: Tue, 19 Nov 2024 21:18:50 GMT Message-Id: <202411192118.4AJLIo0u093138@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: e3f6ef5ade6a - main - sdt: Stop defining probe and provider structures as arrays 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e3f6ef5ade6a1865165bae55bbabd7cd8ec5da76 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e3f6ef5ade6a1865165bae55bbabd7cd8ec5da76 commit e3f6ef5ade6a1865165bae55bbabd7cd8ec5da76 Author: Mark Johnston AuthorDate: 2024-11-19 21:06:46 +0000 Commit: Mark Johnston CommitDate: 2024-11-19 21:18:34 +0000 sdt: Stop defining probe and provider structures as arrays There was no reason I can find for defining them this way. No functional change intended. Sponsored by: Innovate UK --- sys/sys/sdt.h | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/sys/sys/sdt.h b/sys/sys/sdt.h index 0987f1cc19c3..5fa612fcf632 100644 --- a/sys/sys/sdt.h +++ b/sys/sys/sdt.h @@ -161,28 +161,26 @@ SET_DECLARE(sdt_argtypes_set, struct sdt_argtype); sdt_provider_##prov #define SDT_PROVIDER_DEFINE(_prov) \ - struct sdt_provider _SDT_PROVIDER_NAME(_prov)[1] = { \ - [0] = { .name = #_prov }, \ + struct sdt_provider _SDT_PROVIDER_NAME(_prov) = { \ + .name = #_prov, \ }; \ DATA_SET(sdt_providers_set, _SDT_PROVIDER_NAME(_prov)) #define SDT_PROVIDER_DECLARE(prov) \ - extern struct sdt_provider _SDT_PROVIDER_NAME(prov)[1] + extern struct sdt_provider _SDT_PROVIDER_NAME(prov) #define SDT_PROBE_DEFINE(_prov, _mod, _func, _name) \ - struct sdt_probe _SDT_PROBE_NAME(_prov, _mod, _func, _name)[1] = { \ - [0] = { \ - .version = sizeof(struct sdt_probe), \ - .prov = _SDT_PROVIDER_NAME(_prov), \ - .mod = #_mod, \ - .func = #_func, \ - .name = #_name, \ - }, \ + struct sdt_probe _SDT_PROBE_NAME(_prov, _mod, _func, _name) = { \ + .version = sizeof(struct sdt_probe), \ + .prov = &_SDT_PROVIDER_NAME(_prov), \ + .mod = #_mod, \ + .func = #_func, \ + .name = #_name, \ }; \ DATA_SET(sdt_probes_set, _SDT_PROBE_NAME(_prov, _mod, _func, _name)) #define SDT_PROBE_DECLARE(prov, mod, func, name) \ - extern struct sdt_probe _SDT_PROBE_NAME(prov, mod, func, name)[1] + extern struct sdt_probe _SDT_PROBE_NAME(prov, mod, func, name) #define SDT_PROBES_ENABLED() __predict_false(sdt_probes_enabled) @@ -223,13 +221,13 @@ struct sdt_tracepoint { _SDT_ASM_WORD " 0\n" \ ".popsection\n" \ : \ - : _SDT_ASM_PROBE_CONSTRAINT (_SDT_PROBE_NAME(prov, mod, \ + : _SDT_ASM_PROBE_CONSTRAINT (&_SDT_PROBE_NAME(prov, mod, \ func, name)) \ : \ : __sdt_probe##uniq); \ if (0) { \ __sdt_probe##uniq:; \ - f(_SDT_PROBE_NAME(prov, mod, func, name)->id, __VA_ARGS__); \ + f(_SDT_PROBE_NAME(prov, mod, func, name).id, __VA_ARGS__); \ } \ } while (0) #define _SDT_PROBE(prov, mod, func, name, uniq, f, ...) \ @@ -246,7 +244,7 @@ __sdt_probe##uniq:; \ .ndx = _num, \ .type = _type, \ .xtype = _xtype, \ - .probe = _SDT_PROBE_NAME(_prov, _mod, _func, _name), \ + .probe = &_SDT_PROBE_NAME(_prov, _mod, _func, _name), \ }, \ }; \ DATA_SET(sdt_argtypes_set, \