aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/sdt.h
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2009-11-28 16:47:42 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2009-11-28 16:47:42 +0000
commite7ad2d3410d6a26ac66cfbbecda7f115a3223b08 (patch)
tree9b487fbfeee5c3fe43d7a2d286d5eae0cf83ded1 /sys/sys/sdt.h
parent0ab939d261c486b882cff1b6527d5db19d79aea0 (diff)
downloadsrc-e7ad2d3410d6a26ac66cfbbecda7f115a3223b08.tar.gz
src-e7ad2d3410d6a26ac66cfbbecda7f115a3223b08.zip
Add SDT_PROBE[1-5] in the same way we have SDT_PROBE_DEFINE[1-5] to
avoid having to add all the unused trailing arguments as zeros. MFC after: 6 days
Notes
Notes: svn path=/head/; revision=199883
Diffstat (limited to 'sys/sys/sdt.h')
-rw-r--r--sys/sys/sdt.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/sys/sys/sdt.h b/sys/sys/sdt.h
index 8d212c8a96fc..eeae665c1413 100644
--- a/sys/sys/sdt.h
+++ b/sys/sys/sdt.h
@@ -59,6 +59,12 @@
#define SDT_PROBE_DEFINE4(prov, mod, func, name, arg0, arg1, arg2, arg3)
#define SDT_PROBE_DEFINE5(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4)
+#define SDT_PROBE1(prov, mod, func, name, arg0)
+#define SDT_PROBE2(prov, mod, func, name, arg0, arg1)
+#define SDT_PROBE3(prov, mod, func, name, arg0, arg1, arg2)
+#define SDT_PROBE4(prov, mod, func, name, arg0, arg1, arg2, arg3)
+#define SDT_PROBE5(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4)
+
#else
/*
@@ -192,6 +198,17 @@ struct sdt_provider {
SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3); \
SDT_PROBE_ARGTYPE(prov, mod, func, name, 4, arg4)
+#define SDT_PROBE1(prov, mod, func, name, arg0) \
+ SDT_PROBE(prov, mod, func, name, arg0, 0, 0, 0, 0)
+#define SDT_PROBE2(prov, mod, func, name, arg0, arg1) \
+ SDT_PROBE(prov, mod, func, name, arg0, arg1, 0, 0, 0)
+#define SDT_PROBE3(prov, mod, func, name, arg0, arg1, arg2) \
+ SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, 0, 0)
+#define SDT_PROBE4(prov, mod, func, name, arg0, arg1, arg2, arg3) \
+ SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, 0)
+#define SDT_PROBE5(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) \
+ SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4)
+
typedef int (*sdt_argtype_listall_func_t)(struct sdt_argtype *, void *);
typedef int (*sdt_probe_listall_func_t)(struct sdt_probe *, void *);
typedef int (*sdt_provider_listall_func_t)(struct sdt_provider *, void *);