summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/os/linux/spl/sys/sysmacros.h3
-rw-r--r--include/sys/Makefile.am1
-rw-r--r--include/sys/sdt.h58
-rw-r--r--include/sys/zfs_context.h20
-rw-r--r--include/sys/zfs_debug.h1
5 files changed, 11 insertions, 72 deletions
diff --git a/include/os/linux/spl/sys/sysmacros.h b/include/os/linux/spl/sys/sysmacros.h
index 0753864d1..c0bf4f531 100644
--- a/include/os/linux/spl/sys/sysmacros.h
+++ b/include/os/linux/spl/sys/sysmacros.h
@@ -191,6 +191,9 @@ extern void spl_cleanup(void);
#define P2SAMEHIGHBIT_TYPED(x, y, type) \
(((type)(x) ^ (type)(y)) < ((type)(x) & (type)(y)))
+#define SET_ERROR(err) \
+ (__set_error(__FILE__, __func__, __LINE__, err), err)
+
#if defined(_KERNEL) && !defined(_KMEMUSER) && !defined(offsetof)
/* avoid any possibility of clashing with <stddef.h> version */
diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am
index 5785bfd55..9aad98f24 100644
--- a/include/sys/Makefile.am
+++ b/include/sys/Makefile.am
@@ -60,7 +60,6 @@ COMMON_H = \
$(top_srcdir)/include/sys/rrwlock.h \
$(top_srcdir)/include/sys/sa.h \
$(top_srcdir)/include/sys/sa_impl.h \
- $(top_srcdir)/include/sys/sdt.h \
$(top_srcdir)/include/sys/sha2.h \
$(top_srcdir)/include/sys/skein.h \
$(top_srcdir)/include/sys/spa_boot.h \
diff --git a/include/sys/sdt.h b/include/sys/sdt.h
deleted file mode 100644
index 9704072cb..000000000
--- a/include/sys/sdt.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _SYS_SDT_H
-#define _SYS_SDT_H
-
-#ifndef _KERNEL
-
-#define ZFS_PROBE(a) ((void) 0)
-#define ZFS_PROBE1(a, c) ((void) 0)
-#define ZFS_PROBE2(a, c, e) ((void) 0)
-#define ZFS_PROBE3(a, c, e, g) ((void) 0)
-#define ZFS_PROBE4(a, c, e, g, i) ((void) 0)
-
-#endif /* _KERNEL */
-
-/*
- * The set-error SDT probe is extra static, in that we declare its fake
- * function literally, rather than with the DTRACE_PROBE1() macro. This is
- * necessary so that SET_ERROR() can evaluate to a value, which wouldn't
- * be possible if it required multiple statements (to declare the function
- * and then call it).
- *
- * SET_ERROR() uses the comma operator so that it can be used without much
- * additional code. For example, "return (EINVAL);" becomes
- * "return (SET_ERROR(EINVAL));". Note that the argument will be evaluated
- * twice, so it should not have side effects (e.g. something like:
- * "return (SET_ERROR(log_error(EINVAL, info)));" would log the error twice).
- */
-extern void __set_error(const char *file, const char *func, int line, int err);
-#undef SET_ERROR
-#define SET_ERROR(err) \
- (__set_error(__FILE__, __func__, __LINE__, err), err)
-
-#endif /* _SYS_SDT_H */
diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h
index 455c4275d..a493c30dd 100644
--- a/include/sys/zfs_context.h
+++ b/include/sys/zfs_context.h
@@ -52,7 +52,6 @@
#include <sys/uio_impl.h>
#include <sys/time.h>
#include <sys/zone.h>
-#include <sys/sdt.h>
#include <sys/kstat.h>
#include <sys/zfs_debug.h>
#include <sys/sysevent.h>
@@ -66,6 +65,7 @@
#include <linux/dcache_compat.h>
#include <linux/utsname_compat.h>
#include <linux/mod_compat.h>
+#include <sys/sysmacros.h>
#else /* _KERNEL */
@@ -108,7 +108,6 @@
#include <sys/list.h>
#include <sys/uio.h>
#include <sys/zfs_debug.h>
-#include <sys/sdt.h>
#include <sys/kstat.h>
#include <sys/u8_textprep.h>
#include <sys/sysevent.h>
@@ -116,6 +115,7 @@
#include <sys/sunddi.h>
#include <sys/debug.h>
#include <sys/utsname.h>
+#include <sys/trace_defs.h>
/*
* Stack
@@ -173,33 +173,27 @@ extern int aok;
#ifdef DTRACE_PROBE
#undef DTRACE_PROBE
#endif /* DTRACE_PROBE */
-#define DTRACE_PROBE(a) \
- ZFS_PROBE0(#a)
+#define DTRACE_PROBE(a)
#ifdef DTRACE_PROBE1
#undef DTRACE_PROBE1
#endif /* DTRACE_PROBE1 */
-#define DTRACE_PROBE1(a, b, c) \
- ZFS_PROBE1(#a, (unsigned long)c)
+#define DTRACE_PROBE1(a, b, c)
#ifdef DTRACE_PROBE2
#undef DTRACE_PROBE2
#endif /* DTRACE_PROBE2 */
-#define DTRACE_PROBE2(a, b, c, d, e) \
- ZFS_PROBE2(#a, (unsigned long)c, (unsigned long)e)
+#define DTRACE_PROBE2(a, b, c, d, e)
#ifdef DTRACE_PROBE3
#undef DTRACE_PROBE3
#endif /* DTRACE_PROBE3 */
-#define DTRACE_PROBE3(a, b, c, d, e, f, g) \
- ZFS_PROBE3(#a, (unsigned long)c, (unsigned long)e, (unsigned long)g)
+#define DTRACE_PROBE3(a, b, c, d, e, f, g)
#ifdef DTRACE_PROBE4
#undef DTRACE_PROBE4
#endif /* DTRACE_PROBE4 */
-#define DTRACE_PROBE4(a, b, c, d, e, f, g, h, i) \
- ZFS_PROBE4(#a, (unsigned long)c, (unsigned long)e, (unsigned long)g, \
- (unsigned long)i)
+#define DTRACE_PROBE4(a, b, c, d, e, f, g, h, i)
/*
* Tunables.
diff --git a/include/sys/zfs_debug.h b/include/sys/zfs_debug.h
index 78d5efc8a..89587876f 100644
--- a/include/sys/zfs_debug.h
+++ b/include/sys/zfs_debug.h
@@ -57,6 +57,7 @@ extern int zfs_dbgmsg_enable;
#define ZFS_DEBUG_TRIM (1 << 11)
#define ZFS_DEBUG_LOG_SPACEMAP (1 << 12)
+extern void __set_error(const char *file, const char *func, int line, int err);
extern void __zfs_dbgmsg(char *buf);
extern void __dprintf(boolean_t dprint, const char *file, const char *func,
int line, const char *fmt, ...);