From owner-svn-src-head@freebsd.org Fri Oct 4 21:39:12 2019 Return-Path: Delivered-To: svn-src-head@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 A214313A12B; Fri, 4 Oct 2019 21:39:12 +0000 (UTC) (envelope-from vangyzen@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46lNYX3mvRz3Nt7; Fri, 4 Oct 2019 21:39:12 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4748F2763; Fri, 4 Oct 2019 21:39:12 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x94LdCD1057580; Fri, 4 Oct 2019 21:39:12 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x94LdCQ2057579; Fri, 4 Oct 2019 21:39:12 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201910042139.x94LdCQ2057579@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Fri, 4 Oct 2019 21:39:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r353111 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: vangyzen X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 353111 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Oct 2019 21:39:12 -0000 Author: vangyzen Date: Fri Oct 4 21:39:11 2019 New Revision: 353111 URL: https://svnweb.freebsd.org/changeset/base/353111 Log: Add CTLFLAG_STATS to all COUNTER_U64* sysctl OIDs CTLFLAG_STATS identifies a sysctl OID as statistical or informational, as opposed to a configurable/tunable OID that changes behavior. This can be used, for example, to verfiy that the kyua tests do not modify configurable OIDs when allow_sysctl_side_effects is true. Add CTLFLAG_STATS to all COUNTER_U64* OIDs. I will add the flag to more OIDs in a few subsequent commits, to facilitate MFC. The flag should be added to many more OIDs. I plan to add it those that my test found and some nearby that looked obvious. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/sys/sys/sysctl.h Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Fri Oct 4 18:38:47 2019 (r353110) +++ head/sys/sys/sysctl.h Fri Oct 4 21:39:11 2019 (r353111) @@ -699,7 +699,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); /* Oid for a 64-bit unsigned counter(9). The pointer must be non NULL. */ #define SYSCTL_COUNTER_U64(parent, nbr, name, access, ptr, descr) \ SYSCTL_OID(parent, nbr, name, \ - CTLTYPE_U64 | CTLFLAG_MPSAFE | (access), \ + CTLTYPE_U64 | CTLFLAG_MPSAFE | CTLFLAG_STATS | (access), \ (ptr), 0, sysctl_handle_counter_u64, "QU", descr); \ CTASSERT((((access) & CTLTYPE) == 0 || \ ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_U64) && \ @@ -712,7 +712,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); CTASSERT(((access) & CTLTYPE) == 0 || \ ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_U64); \ sysctl_add_oid(ctx, parent, nbr, name, \ - CTLTYPE_U64 | CTLFLAG_MPSAFE | (access), \ + CTLTYPE_U64 | CTLFLAG_MPSAFE | CTLFLAG_STATS | (access), \ __ptr, 0, sysctl_handle_counter_u64, "QU", __DESCR(descr), \ NULL); \ }) @@ -720,7 +720,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); /* Oid for an array of counter(9)s. The pointer and length must be non zero. */ #define SYSCTL_COUNTER_U64_ARRAY(parent, nbr, name, access, ptr, len, descr) \ SYSCTL_OID(parent, nbr, name, \ - CTLTYPE_OPAQUE | CTLFLAG_MPSAFE | (access), \ + CTLTYPE_OPAQUE | CTLFLAG_MPSAFE | CTLFLAG_STATS | (access), \ (ptr), (len), sysctl_handle_counter_u64_array, "S", descr); \ CTASSERT((((access) & CTLTYPE) == 0 || \ ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_OPAQUE) && \ @@ -734,7 +734,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); CTASSERT(((access) & CTLTYPE) == 0 || \ ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_OPAQUE); \ sysctl_add_oid(ctx, parent, nbr, name, \ - CTLTYPE_OPAQUE | CTLFLAG_MPSAFE | (access), \ + CTLTYPE_OPAQUE | CTLFLAG_MPSAFE | CTLFLAG_STATS | (access), \ __ptr, len, sysctl_handle_counter_u64_array, "S", \ __DESCR(descr), NULL); \ })