aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/sdt.h
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2018-12-08 06:30:41 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2018-12-08 06:30:41 +0000
commit13a45e4b14ca38406e44dd6c5f258699a5f07c69 (patch)
treef10354654842258ffb88bcf769d4b6d62329e10d /sys/sys/sdt.h
parent3c76ace36bc7dccafaae24c2c4452fb5e767c0fd (diff)
downloadsrc-13a45e4b14ca38406e44dd6c5f258699a5f07c69.tar.gz
src-13a45e4b14ca38406e44dd6c5f258699a5f07c69.zip
Provide SDT_PROBES_ENABLED macro.
Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/head/; revision=341720
Diffstat (limited to 'sys/sys/sdt.h')
-rw-r--r--sys/sys/sdt.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/sys/sdt.h b/sys/sys/sdt.h
index 424a0e3a0ded..1d27b1977604 100644
--- a/sys/sys/sdt.h
+++ b/sys/sys/sdt.h
@@ -164,8 +164,10 @@ SET_DECLARE(sdt_argtypes_set, struct sdt_argtype);
#define SDT_PROBE_DECLARE(prov, mod, func, name) \
extern struct sdt_probe sdt_##prov##_##mod##_##func##_##name[1]
+#define SDT_PROBES_ENABLED() __predict_false(sdt_probes_enabled)
+
#define SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) do { \
- if (__predict_false(sdt_probes_enabled)) { \
+ if (SDT_PROBES_ENABLED()) { \
if (__predict_false(sdt_##prov##_##mod##_##func##_##name->id)) \
(*sdt_probe_func)(sdt_##prov##_##mod##_##func##_##name->id, \
(uintptr_t) arg0, (uintptr_t) arg1, (uintptr_t) arg2, \