Remove sdt.h
It's mostly a noop on ZoL and it conflicts with platforms that support dtrace. Remove this header to resolve the conflict. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Jorgen Lundman <lundman@lundman.net> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #9497
This commit is contained in:
parent
b4238327b4
commit
68a1b1589a
|
@ -191,6 +191,9 @@ extern void spl_cleanup(void);
|
||||||
#define P2SAMEHIGHBIT_TYPED(x, y, type) \
|
#define P2SAMEHIGHBIT_TYPED(x, y, type) \
|
||||||
(((type)(x) ^ (type)(y)) < ((type)(x) & (type)(y)))
|
(((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)
|
#if defined(_KERNEL) && !defined(_KMEMUSER) && !defined(offsetof)
|
||||||
|
|
||||||
/* avoid any possibility of clashing with <stddef.h> version */
|
/* avoid any possibility of clashing with <stddef.h> version */
|
||||||
|
|
|
@ -60,7 +60,6 @@ COMMON_H = \
|
||||||
$(top_srcdir)/include/sys/rrwlock.h \
|
$(top_srcdir)/include/sys/rrwlock.h \
|
||||||
$(top_srcdir)/include/sys/sa.h \
|
$(top_srcdir)/include/sys/sa.h \
|
||||||
$(top_srcdir)/include/sys/sa_impl.h \
|
$(top_srcdir)/include/sys/sa_impl.h \
|
||||||
$(top_srcdir)/include/sys/sdt.h \
|
|
||||||
$(top_srcdir)/include/sys/sha2.h \
|
$(top_srcdir)/include/sys/sha2.h \
|
||||||
$(top_srcdir)/include/sys/skein.h \
|
$(top_srcdir)/include/sys/skein.h \
|
||||||
$(top_srcdir)/include/sys/spa_boot.h \
|
$(top_srcdir)/include/sys/spa_boot.h \
|
||||||
|
|
|
@ -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 */
|
|
|
@ -52,7 +52,6 @@
|
||||||
#include <sys/uio_impl.h>
|
#include <sys/uio_impl.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/zone.h>
|
#include <sys/zone.h>
|
||||||
#include <sys/sdt.h>
|
|
||||||
#include <sys/kstat.h>
|
#include <sys/kstat.h>
|
||||||
#include <sys/zfs_debug.h>
|
#include <sys/zfs_debug.h>
|
||||||
#include <sys/sysevent.h>
|
#include <sys/sysevent.h>
|
||||||
|
@ -66,6 +65,7 @@
|
||||||
#include <linux/dcache_compat.h>
|
#include <linux/dcache_compat.h>
|
||||||
#include <linux/utsname_compat.h>
|
#include <linux/utsname_compat.h>
|
||||||
#include <linux/mod_compat.h>
|
#include <linux/mod_compat.h>
|
||||||
|
#include <sys/sysmacros.h>
|
||||||
|
|
||||||
#else /* _KERNEL */
|
#else /* _KERNEL */
|
||||||
|
|
||||||
|
@ -108,7 +108,6 @@
|
||||||
#include <sys/list.h>
|
#include <sys/list.h>
|
||||||
#include <sys/uio.h>
|
#include <sys/uio.h>
|
||||||
#include <sys/zfs_debug.h>
|
#include <sys/zfs_debug.h>
|
||||||
#include <sys/sdt.h>
|
|
||||||
#include <sys/kstat.h>
|
#include <sys/kstat.h>
|
||||||
#include <sys/u8_textprep.h>
|
#include <sys/u8_textprep.h>
|
||||||
#include <sys/sysevent.h>
|
#include <sys/sysevent.h>
|
||||||
|
@ -116,6 +115,7 @@
|
||||||
#include <sys/sunddi.h>
|
#include <sys/sunddi.h>
|
||||||
#include <sys/debug.h>
|
#include <sys/debug.h>
|
||||||
#include <sys/utsname.h>
|
#include <sys/utsname.h>
|
||||||
|
#include <sys/trace_defs.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Stack
|
* Stack
|
||||||
|
@ -173,33 +173,27 @@ extern int aok;
|
||||||
#ifdef DTRACE_PROBE
|
#ifdef DTRACE_PROBE
|
||||||
#undef DTRACE_PROBE
|
#undef DTRACE_PROBE
|
||||||
#endif /* DTRACE_PROBE */
|
#endif /* DTRACE_PROBE */
|
||||||
#define DTRACE_PROBE(a) \
|
#define DTRACE_PROBE(a)
|
||||||
ZFS_PROBE0(#a)
|
|
||||||
|
|
||||||
#ifdef DTRACE_PROBE1
|
#ifdef DTRACE_PROBE1
|
||||||
#undef DTRACE_PROBE1
|
#undef DTRACE_PROBE1
|
||||||
#endif /* DTRACE_PROBE1 */
|
#endif /* DTRACE_PROBE1 */
|
||||||
#define DTRACE_PROBE1(a, b, c) \
|
#define DTRACE_PROBE1(a, b, c)
|
||||||
ZFS_PROBE1(#a, (unsigned long)c)
|
|
||||||
|
|
||||||
#ifdef DTRACE_PROBE2
|
#ifdef DTRACE_PROBE2
|
||||||
#undef DTRACE_PROBE2
|
#undef DTRACE_PROBE2
|
||||||
#endif /* DTRACE_PROBE2 */
|
#endif /* DTRACE_PROBE2 */
|
||||||
#define DTRACE_PROBE2(a, b, c, d, e) \
|
#define DTRACE_PROBE2(a, b, c, d, e)
|
||||||
ZFS_PROBE2(#a, (unsigned long)c, (unsigned long)e)
|
|
||||||
|
|
||||||
#ifdef DTRACE_PROBE3
|
#ifdef DTRACE_PROBE3
|
||||||
#undef DTRACE_PROBE3
|
#undef DTRACE_PROBE3
|
||||||
#endif /* DTRACE_PROBE3 */
|
#endif /* DTRACE_PROBE3 */
|
||||||
#define DTRACE_PROBE3(a, b, c, d, e, f, g) \
|
#define DTRACE_PROBE3(a, b, c, d, e, f, g)
|
||||||
ZFS_PROBE3(#a, (unsigned long)c, (unsigned long)e, (unsigned long)g)
|
|
||||||
|
|
||||||
#ifdef DTRACE_PROBE4
|
#ifdef DTRACE_PROBE4
|
||||||
#undef DTRACE_PROBE4
|
#undef DTRACE_PROBE4
|
||||||
#endif /* DTRACE_PROBE4 */
|
#endif /* DTRACE_PROBE4 */
|
||||||
#define DTRACE_PROBE4(a, b, c, d, e, f, g, h, i) \
|
#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)
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Tunables.
|
* Tunables.
|
||||||
|
|
|
@ -57,6 +57,7 @@ extern int zfs_dbgmsg_enable;
|
||||||
#define ZFS_DEBUG_TRIM (1 << 11)
|
#define ZFS_DEBUG_TRIM (1 << 11)
|
||||||
#define ZFS_DEBUG_LOG_SPACEMAP (1 << 12)
|
#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 __zfs_dbgmsg(char *buf);
|
||||||
extern void __dprintf(boolean_t dprint, const char *file, const char *func,
|
extern void __dprintf(boolean_t dprint, const char *file, const char *func,
|
||||||
int line, const char *fmt, ...);
|
int line, const char *fmt, ...);
|
||||||
|
|
|
@ -1 +1,24 @@
|
||||||
/* Here to keep the libspl build happy */
|
/* Here to keep the libspl build happy */
|
||||||
|
|
||||||
|
#ifndef _LIBSPL_ZFS_TRACE_H
|
||||||
|
#define _LIBSPL__ZFS_TRACE_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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).
|
||||||
|
*/
|
||||||
|
#undef SET_ERROR
|
||||||
|
#define SET_ERROR(err) \
|
||||||
|
(__set_error(__FILE__, __func__, __LINE__, err), err)
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -36,7 +36,6 @@
|
||||||
#include <sys/kmem.h>
|
#include <sys/kmem.h>
|
||||||
#include <sys/cmn_err.h>
|
#include <sys/cmn_err.h>
|
||||||
#include <sys/errno.h>
|
#include <sys/errno.h>
|
||||||
#include <sys/sdt.h>
|
|
||||||
#include <sys/fs/zfs.h>
|
#include <sys/fs/zfs.h>
|
||||||
#include <sys/mode.h>
|
#include <sys/mode.h>
|
||||||
#include <sys/policy.h>
|
#include <sys/policy.h>
|
||||||
|
|
|
@ -183,7 +183,6 @@
|
||||||
#include <sys/zone.h>
|
#include <sys/zone.h>
|
||||||
#include <sys/nvpair.h>
|
#include <sys/nvpair.h>
|
||||||
#include <sys/pathname.h>
|
#include <sys/pathname.h>
|
||||||
#include <sys/sdt.h>
|
|
||||||
#include <sys/fs/zfs.h>
|
#include <sys/fs/zfs.h>
|
||||||
#include <sys/zfs_ctldir.h>
|
#include <sys/zfs_ctldir.h>
|
||||||
#include <sys/zfs_dir.h>
|
#include <sys/zfs_dir.h>
|
||||||
|
|
Loading…
Reference in New Issue