aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric van Gyzen <vangyzen@FreeBSD.org>2019-10-04 21:39:11 +0000
committerEric van Gyzen <vangyzen@FreeBSD.org>2019-10-04 21:39:11 +0000
commit886614922dba775cf104452ca1d85f1b2f398597 (patch)
tree49d55252506a247eae55561e2918b425a14053d6
parentcbd974b4b9f7a260e9241d8a6d08d40ff9ef2a26 (diff)
downloadsrc-886614922dba775cf104452ca1d85f1b2f398597.tar.gz
src-886614922dba775cf104452ca1d85f1b2f398597.zip
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
Notes
Notes: svn path=/head/; revision=353111
-rw-r--r--sys/sys/sysctl.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h
index e2facf8a1339..c01ca3605bd0 100644
--- a/sys/sys/sysctl.h
+++ b/sys/sys/sysctl.h
@@ -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); \
})