Index: generic/nsfDTrace.h =================================================================== diff -u -rcbcfec72376d549a806859c873195cc0ebc9c9ea -ree6699cdfbf3ad89cccfa9d52dd23767d13f9d73 --- generic/nsfDTrace.h (.../nsfDTrace.h) (revision cbcfec72376d549a806859c873195cc0ebc9c9ea) +++ generic/nsfDTrace.h (.../nsfDTrace.h) (revision ee6699cdfbf3ad89cccfa9d52dd23767d13f9d73) @@ -1,37 +1,5 @@ /* - * nsfDTrace.h -- - * * Generated by dtrace(1M). - * - * Copyright (c) 2011-2014 Gustaf Neumann - * - * Vienna University of Economics and Business - * Institute of Information Systems and New Media - * A-1020, Welthandelsplatz 1 - * Vienna, Austria - * - * This work is licensed under the MIT License http://www.opensource.org/licenses/MIT - * - * Copyright: - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * */ #ifndef _NSFDTRACE_H @@ -47,59 +15,97 @@ #define NSF_TYPEDEFS "___dtrace_typedefs$nsf$v2$54636c5f4f626a" +#if !defined(DTRACE_PROBES_DISABLED) || !DTRACE_PROBES_DISABLED + #define NSF_CONFIGURE_PROBE(arg0, arg1) \ do { \ __asm__ volatile(".reference " NSF_TYPEDEFS); \ __dtrace_probe$nsf$configure__probe$v1$63686172202a$63686172202a(arg0, arg1); \ __asm__ volatile(".reference " NSF_STABILITY); \ } while (0) #define NSF_CONFIGURE_PROBE_ENABLED() \ - __dtrace_isenabled$nsf$configure__probe$v1() + ({ int _r = __dtrace_isenabled$nsf$configure__probe$v1(); \ + __asm__ volatile(""); \ + _r; }) #define NSF_METHOD_ENTRY(arg0, arg1, arg2, arg3, arg4) \ do { \ __asm__ volatile(".reference " NSF_TYPEDEFS); \ __dtrace_probe$nsf$method__entry$v1$63686172202a$63686172202a$63686172202a$696e74$54636c5f4f626a202a2a(arg0, arg1, arg2, arg3, arg4); \ __asm__ volatile(".reference " NSF_STABILITY); \ } while (0) #define NSF_METHOD_ENTRY_ENABLED() \ - __dtrace_isenabled$nsf$method__entry$v1() + ({ int _r = __dtrace_isenabled$nsf$method__entry$v1(); \ + __asm__ volatile(""); \ + _r; }) #define NSF_METHOD_RETURN(arg0, arg1, arg2, arg3) \ do { \ __asm__ volatile(".reference " NSF_TYPEDEFS); \ __dtrace_probe$nsf$method__return$v1$63686172202a$63686172202a$63686172202a$696e74(arg0, arg1, arg2, arg3); \ __asm__ volatile(".reference " NSF_STABILITY); \ } while (0) #define NSF_METHOD_RETURN_ENABLED() \ - __dtrace_isenabled$nsf$method__return$v1() + ({ int _r = __dtrace_isenabled$nsf$method__return$v1(); \ + __asm__ volatile(""); \ + _r; }) #define NSF_OBJECT_ALLOC(arg0, arg1) \ do { \ __asm__ volatile(".reference " NSF_TYPEDEFS); \ __dtrace_probe$nsf$object__alloc$v1$63686172202a$63686172202a(arg0, arg1); \ __asm__ volatile(".reference " NSF_STABILITY); \ } while (0) #define NSF_OBJECT_ALLOC_ENABLED() \ - __dtrace_isenabled$nsf$object__alloc$v1() + ({ int _r = __dtrace_isenabled$nsf$object__alloc$v1(); \ + __asm__ volatile(""); \ + _r; }) #define NSF_OBJECT_FREE(arg0, arg1) \ do { \ __asm__ volatile(".reference " NSF_TYPEDEFS); \ __dtrace_probe$nsf$object__free$v1$63686172202a$63686172202a(arg0, arg1); \ __asm__ volatile(".reference " NSF_STABILITY); \ } while (0) #define NSF_OBJECT_FREE_ENABLED() \ - __dtrace_isenabled$nsf$object__free$v1() + ({ int _r = __dtrace_isenabled$nsf$object__free$v1(); \ + __asm__ volatile(""); \ + _r; }) -extern void __dtrace_probe$nsf$configure__probe$v1$63686172202a$63686172202a(char *, char *); +extern void __dtrace_probe$nsf$configure__probe$v1$63686172202a$63686172202a(const char *, const char *); extern int __dtrace_isenabled$nsf$configure__probe$v1(void); -extern void __dtrace_probe$nsf$method__entry$v1$63686172202a$63686172202a$63686172202a$696e74$54636c5f4f626a202a2a(char *, char *, char *, int, Tcl_Obj **); +extern void __dtrace_probe$nsf$method__entry$v1$63686172202a$63686172202a$63686172202a$696e74$54636c5f4f626a202a2a(const char *, const char *, const char *, int, Tcl_Obj **); extern int __dtrace_isenabled$nsf$method__entry$v1(void); -extern void __dtrace_probe$nsf$method__return$v1$63686172202a$63686172202a$63686172202a$696e74(char *, char *, char *, int); +extern void __dtrace_probe$nsf$method__return$v1$63686172202a$63686172202a$63686172202a$696e74(const char *, const char *, const char *, int); extern int __dtrace_isenabled$nsf$method__return$v1(void); -extern void __dtrace_probe$nsf$object__alloc$v1$63686172202a$63686172202a(char *, char *); +extern void __dtrace_probe$nsf$object__alloc$v1$63686172202a$63686172202a(const char *, const char *); extern int __dtrace_isenabled$nsf$object__alloc$v1(void); -extern void __dtrace_probe$nsf$object__free$v1$63686172202a$63686172202a(char *, char *); +extern void __dtrace_probe$nsf$object__free$v1$63686172202a$63686172202a(const char *, const char *); extern int __dtrace_isenabled$nsf$object__free$v1(void); +#else + +#define NSF_CONFIGURE_PROBE(arg0, arg1) \ +do { \ + } while (0) +#define NSF_CONFIGURE_PROBE_ENABLED() (0) +#define NSF_METHOD_ENTRY(arg0, arg1, arg2, arg3, arg4) \ +do { \ + } while (0) +#define NSF_METHOD_ENTRY_ENABLED() (0) +#define NSF_METHOD_RETURN(arg0, arg1, arg2, arg3) \ +do { \ + } while (0) +#define NSF_METHOD_RETURN_ENABLED() (0) +#define NSF_OBJECT_ALLOC(arg0, arg1) \ +do { \ + } while (0) +#define NSF_OBJECT_ALLOC_ENABLED() (0) +#define NSF_OBJECT_FREE(arg0, arg1) \ +do { \ + } while (0) +#define NSF_OBJECT_FREE_ENABLED() (0) + +#endif /* !defined(DTRACE_PROBES_DISABLED) || !DTRACE_PROBES_DISABLED */ + + #ifdef __cplusplus } #endif