119e252baSAlexander Leidinger /*- 2*4d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause 37f2d13d6SPedro F. Giffuni * 419e252baSAlexander Leidinger * Copyright (c) 2008-2012 Alexander Leidinger <netchild@FreeBSD.org> 519e252baSAlexander Leidinger * All rights reserved. 619e252baSAlexander Leidinger * 719e252baSAlexander Leidinger * Redistribution and use in source and binary forms, with or without 819e252baSAlexander Leidinger * modification, are permitted provided that the following conditions 919e252baSAlexander Leidinger * are met: 1019e252baSAlexander Leidinger * 1. Redistributions of source code must retain the above copyright 1119e252baSAlexander Leidinger * notice, this list of conditions and the following disclaimer 1219e252baSAlexander Leidinger * in this position and unchanged. 1319e252baSAlexander Leidinger * 2. Redistributions in binary form must reproduce the above copyright 1419e252baSAlexander Leidinger * notice, this list of conditions and the following disclaimer in the 1519e252baSAlexander Leidinger * documentation and/or other materials provided with the distribution. 1619e252baSAlexander Leidinger * 1719e252baSAlexander Leidinger * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 1819e252baSAlexander Leidinger * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1919e252baSAlexander Leidinger * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2019e252baSAlexander Leidinger * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 2119e252baSAlexander Leidinger * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2219e252baSAlexander Leidinger * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2319e252baSAlexander Leidinger * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2419e252baSAlexander Leidinger * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2519e252baSAlexander Leidinger * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2619e252baSAlexander Leidinger * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2719e252baSAlexander Leidinger * 2819e252baSAlexander Leidinger * $FreeBSD$ 2919e252baSAlexander Leidinger */ 3019e252baSAlexander Leidinger 3119e252baSAlexander Leidinger #ifndef _LINUX_DTRACE_H_ 3219e252baSAlexander Leidinger #define _LINUX_DTRACE_H_ 3319e252baSAlexander Leidinger 3419e252baSAlexander Leidinger /** 3519e252baSAlexander Leidinger * DTrace support macros for the linuxulator. 3619e252baSAlexander Leidinger * 3719e252baSAlexander Leidinger * Some wrapper macros to make it more easy to handle the linuxulator 3819e252baSAlexander Leidinger * providers and to allow to make the name depend upon the bitsize. 3919e252baSAlexander Leidinger * 4019e252baSAlexander Leidinger * Basically this is the same as the normal SDT macros in sys/sdt.h. The 4119e252baSAlexander Leidinger * difference is that the provider name is automatically inserted, and 4219e252baSAlexander Leidinger * we do not use a different name for the probe-description. 4319e252baSAlexander Leidinger */ 4419e252baSAlexander Leidinger 4519e252baSAlexander Leidinger #define LIN_SDT_PROVIDER_DEFINE(x) SDT_PROVIDER_DEFINE(x) 4619e252baSAlexander Leidinger #define LIN_SDT_PROVIDER_DECLARE(x) SDT_PROVIDER_DECLARE(x) 4719e252baSAlexander Leidinger 4819e252baSAlexander Leidinger #define _LIN_SDT_PROBE_DECLARE(a, b, c, d) SDT_PROBE_DECLARE(a, b, c, d) 4919e252baSAlexander Leidinger #define LIN_SDT_PROBE_DECLARE(a, b, c) _LIN_SDT_PROBE_DECLARE( \ 5019e252baSAlexander Leidinger LINUX_DTRACE, a, b, c) 5119e252baSAlexander Leidinger 5219e252baSAlexander Leidinger #define _LIN_SDT_PROBE_DEFINE0(a, b, c, d) SDT_PROBE_DEFINE(a, \ 53d9fae5abSAndriy Gapon b, c, d) 5419e252baSAlexander Leidinger #define LIN_SDT_PROBE_DEFINE0(a, b, c) _LIN_SDT_PROBE_DEFINE0(\ 5519e252baSAlexander Leidinger LINUX_DTRACE, a, b, c) 5619e252baSAlexander Leidinger #define _LIN_SDT_PROBE_DEFINE1(a, b, c, d, e) SDT_PROBE_DEFINE1(a, \ 57d9fae5abSAndriy Gapon b, c, d, e) 5819e252baSAlexander Leidinger #define LIN_SDT_PROBE_DEFINE1(a, b, c, d) _LIN_SDT_PROBE_DEFINE1(\ 5919e252baSAlexander Leidinger LINUX_DTRACE, a, b, c, d) 6019e252baSAlexander Leidinger #define _LIN_SDT_PROBE_DEFINE2(a, b, c, d, e, f) SDT_PROBE_DEFINE2(a, \ 61d9fae5abSAndriy Gapon b, c, d, e, f) 6219e252baSAlexander Leidinger #define LIN_SDT_PROBE_DEFINE2(a, b, c, d, e) _LIN_SDT_PROBE_DEFINE2(\ 6319e252baSAlexander Leidinger LINUX_DTRACE, a, b, c, d, e) 6419e252baSAlexander Leidinger #define _LIN_SDT_PROBE_DEFINE3(a, b, c, d, e, f, g) SDT_PROBE_DEFINE3(a, \ 65d9fae5abSAndriy Gapon b, c, d, e, f, g) 6619e252baSAlexander Leidinger #define LIN_SDT_PROBE_DEFINE3(a, b, c, d, e, f) _LIN_SDT_PROBE_DEFINE3(\ 6719e252baSAlexander Leidinger LINUX_DTRACE, a, b, c, d, e, f) 6819e252baSAlexander Leidinger #define _LIN_SDT_PROBE_DEFINE4(a, b, c, d, e, f, g, h) SDT_PROBE_DEFINE4(a, \ 69d9fae5abSAndriy Gapon b, c, d, e, f, g, h) 7019e252baSAlexander Leidinger #define LIN_SDT_PROBE_DEFINE4(a, b, c, d, e, f, g) _LIN_SDT_PROBE_DEFINE4(\ 7119e252baSAlexander Leidinger LINUX_DTRACE, a, b, c, d, e, f, g) 7219e252baSAlexander Leidinger #define _LIN_SDT_PROBE_DEFINE5(a, b, c, d, e, f, g, h, i) \ 73d9fae5abSAndriy Gapon SDT_PROBE_DEFINE5(a, b, c, d, e, f, g, h, i) 7419e252baSAlexander Leidinger #define LIN_SDT_PROBE_DEFINE5(a, b, c, d, e, f, g, h) _LIN_SDT_PROBE_DEFINE5(\ 7519e252baSAlexander Leidinger LINUX_DTRACE, a, b, c, d, e, f, g, h) 7619e252baSAlexander Leidinger 7736160958SMark Johnston #define LIN_SDT_PROBE0(a, b, c) SDT_PROBE0(LINUX_DTRACE, a, b, \ 7836160958SMark Johnston c) 7919e252baSAlexander Leidinger #define LIN_SDT_PROBE1(a, b, c, d) SDT_PROBE1(LINUX_DTRACE, a, b, \ 8019e252baSAlexander Leidinger c, d) 8119e252baSAlexander Leidinger #define LIN_SDT_PROBE2(a, b, c, d, e) SDT_PROBE2(LINUX_DTRACE, a, b, \ 8219e252baSAlexander Leidinger c, d, e) 8319e252baSAlexander Leidinger #define LIN_SDT_PROBE3(a, b, c, d, e, f) SDT_PROBE3(LINUX_DTRACE, a, b, \ 8419e252baSAlexander Leidinger c, d, e, f) 8519e252baSAlexander Leidinger #define LIN_SDT_PROBE4(a, b, c, d, e, f, g) SDT_PROBE4(LINUX_DTRACE, a, b, \ 8619e252baSAlexander Leidinger c, d, e, f, g) 872f2f522bSAndriy Gapon #define _LIN_SDT_PROBE5(a, b, c, d, e, f, g, h, i) SDT_PROBE5(a, b, c, d, \ 8819e252baSAlexander Leidinger e, f, g, h, i) 8919e252baSAlexander Leidinger #define LIN_SDT_PROBE5(a, b, c, d, e, f, g, h) _LIN_SDT_PROBE5(LINUX_DTRACE, \ 9019e252baSAlexander Leidinger a, b, c, d, e, f, g, h) 9119e252baSAlexander Leidinger 9219e252baSAlexander Leidinger #endif /* _LINUX_DTRACE_H_ */ 93