/*
- * Generated by dtrace(1M).
+ * This file contains the definition of the various probes supported by
+ * libmemcached. Currently it only support DTRACE, but just create an
+ * implementation of the following macros to create your own sort of
+ * probing :)
*/
+#ifndef LIBMEMCACHED_PROBES_H
+#define LIBMEMCACHED_PROBES_H
-#ifndef _LIBMEMCACHED_PROBES_H
-#define _LIBMEMCACHED_PROBES_H
-
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#ifdef _DTRACE_VERSION
-
-#define LIBMEMCACHED_MEMCACHED_ADD_END() \
- __dtrace_libmemcached___memcached_add_end()
-#define LIBMEMCACHED_MEMCACHED_ADD_END_ENABLED() \
- __dtraceenabled_libmemcached___memcached_add_end()
-#define LIBMEMCACHED_MEMCACHED_ADD_START() \
- __dtrace_libmemcached___memcached_add_start()
-#define LIBMEMCACHED_MEMCACHED_ADD_START_ENABLED() \
- __dtraceenabled_libmemcached___memcached_add_start()
-#define LIBMEMCACHED_MEMCACHED_CONNECT_END() \
- __dtrace_libmemcached___memcached_connect_end()
-#define LIBMEMCACHED_MEMCACHED_CONNECT_END_ENABLED() \
- __dtraceenabled_libmemcached___memcached_connect_end()
-#define LIBMEMCACHED_MEMCACHED_CONNECT_START() \
- __dtrace_libmemcached___memcached_connect_start()
-#define LIBMEMCACHED_MEMCACHED_CONNECT_START_ENABLED() \
- __dtraceenabled_libmemcached___memcached_connect_start()
-#define LIBMEMCACHED_MEMCACHED_DECREMENT_END() \
- __dtrace_libmemcached___memcached_decrement_end()
-#define LIBMEMCACHED_MEMCACHED_DECREMENT_END_ENABLED() \
- __dtraceenabled_libmemcached___memcached_decrement_end()
-#define LIBMEMCACHED_MEMCACHED_DECREMENT_START() \
- __dtrace_libmemcached___memcached_decrement_start()
-#define LIBMEMCACHED_MEMCACHED_DECREMENT_START_ENABLED() \
- __dtraceenabled_libmemcached___memcached_decrement_start()
-#define LIBMEMCACHED_MEMCACHED_DELETE_END() \
- __dtrace_libmemcached___memcached_delete_end()
-#define LIBMEMCACHED_MEMCACHED_DELETE_END_ENABLED() \
- __dtraceenabled_libmemcached___memcached_delete_end()
-#define LIBMEMCACHED_MEMCACHED_DELETE_START() \
- __dtrace_libmemcached___memcached_delete_start()
-#define LIBMEMCACHED_MEMCACHED_DELETE_START_ENABLED() \
- __dtraceenabled_libmemcached___memcached_delete_start()
-#define LIBMEMCACHED_MEMCACHED_FLUSH_END() \
- __dtrace_libmemcached___memcached_flush_end()
-#define LIBMEMCACHED_MEMCACHED_FLUSH_END_ENABLED() \
- __dtraceenabled_libmemcached___memcached_flush_end()
-#define LIBMEMCACHED_MEMCACHED_FLUSH_START() \
- __dtrace_libmemcached___memcached_flush_start()
-#define LIBMEMCACHED_MEMCACHED_FLUSH_START_ENABLED() \
- __dtraceenabled_libmemcached___memcached_flush_start()
-#define LIBMEMCACHED_MEMCACHED_GET_END() \
- __dtrace_libmemcached___memcached_get_end()
-#define LIBMEMCACHED_MEMCACHED_GET_END_ENABLED() \
- __dtraceenabled_libmemcached___memcached_get_end()
-#define LIBMEMCACHED_MEMCACHED_GET_START() \
- __dtrace_libmemcached___memcached_get_start()
-#define LIBMEMCACHED_MEMCACHED_GET_START_ENABLED() \
- __dtraceenabled_libmemcached___memcached_get_start()
-#define LIBMEMCACHED_MEMCACHED_INCREMENT_END() \
- __dtrace_libmemcached___memcached_increment_end()
-#define LIBMEMCACHED_MEMCACHED_INCREMENT_END_ENABLED() \
- __dtraceenabled_libmemcached___memcached_increment_end()
-#define LIBMEMCACHED_MEMCACHED_INCREMENT_START() \
- __dtrace_libmemcached___memcached_increment_start()
-#define LIBMEMCACHED_MEMCACHED_INCREMENT_START_ENABLED() \
- __dtraceenabled_libmemcached___memcached_increment_start()
-#define LIBMEMCACHED_MEMCACHED_MGET_END() \
- __dtrace_libmemcached___memcached_mget_end()
-#define LIBMEMCACHED_MEMCACHED_MGET_END_ENABLED() \
- __dtraceenabled_libmemcached___memcached_mget_end()
-#define LIBMEMCACHED_MEMCACHED_MGET_START() \
- __dtrace_libmemcached___memcached_mget_start()
-#define LIBMEMCACHED_MEMCACHED_MGET_START_ENABLED() \
- __dtraceenabled_libmemcached___memcached_mget_start()
-#define LIBMEMCACHED_MEMCACHED_REPLACE_END() \
- __dtrace_libmemcached___memcached_replace_end()
-#define LIBMEMCACHED_MEMCACHED_REPLACE_END_ENABLED() \
- __dtraceenabled_libmemcached___memcached_replace_end()
-#define LIBMEMCACHED_MEMCACHED_REPLACE_START() \
- __dtrace_libmemcached___memcached_replace_start()
-#define LIBMEMCACHED_MEMCACHED_REPLACE_START_ENABLED() \
- __dtraceenabled_libmemcached___memcached_replace_start()
-#define LIBMEMCACHED_MEMCACHED_SERVER_ADD_END() \
- __dtrace_libmemcached___memcached_server_add_end()
-#define LIBMEMCACHED_MEMCACHED_SERVER_ADD_END_ENABLED() \
- __dtraceenabled_libmemcached___memcached_server_add_end()
-#define LIBMEMCACHED_MEMCACHED_SERVER_ADD_START() \
- __dtrace_libmemcached___memcached_server_add_start()
-#define LIBMEMCACHED_MEMCACHED_SERVER_ADD_START_ENABLED() \
- __dtraceenabled_libmemcached___memcached_server_add_start()
-#define LIBMEMCACHED_MEMCACHED_SET_END() \
- __dtrace_libmemcached___memcached_set_end()
-#define LIBMEMCACHED_MEMCACHED_SET_END_ENABLED() \
- __dtraceenabled_libmemcached___memcached_set_end()
-#define LIBMEMCACHED_MEMCACHED_SET_START() \
- __dtrace_libmemcached___memcached_set_start()
-#define LIBMEMCACHED_MEMCACHED_SET_START_ENABLED() \
- __dtraceenabled_libmemcached___memcached_set_start()
-
-
-extern void __dtrace_libmemcached___memcached_add_end(void);
-extern int __dtraceenabled_libmemcached___memcached_add_end(void);
-extern void __dtrace_libmemcached___memcached_add_start(void);
-extern int __dtraceenabled_libmemcached___memcached_add_start(void);
-extern void __dtrace_libmemcached___memcached_connect_end(void);
-extern int __dtraceenabled_libmemcached___memcached_connect_end(void);
-extern void __dtrace_libmemcached___memcached_connect_start(void);
-extern int __dtraceenabled_libmemcached___memcached_connect_start(void);
-extern void __dtrace_libmemcached___memcached_decrement_end(void);
-extern int __dtraceenabled_libmemcached___memcached_decrement_end(void);
-extern void __dtrace_libmemcached___memcached_decrement_start(void);
-extern int __dtraceenabled_libmemcached___memcached_decrement_start(void);
-extern void __dtrace_libmemcached___memcached_delete_end(void);
-extern int __dtraceenabled_libmemcached___memcached_delete_end(void);
-extern void __dtrace_libmemcached___memcached_delete_start(void);
-extern int __dtraceenabled_libmemcached___memcached_delete_start(void);
-extern void __dtrace_libmemcached___memcached_flush_end(void);
-extern int __dtraceenabled_libmemcached___memcached_flush_end(void);
-extern void __dtrace_libmemcached___memcached_flush_start(void);
-extern int __dtraceenabled_libmemcached___memcached_flush_start(void);
-extern void __dtrace_libmemcached___memcached_get_end(void);
-extern int __dtraceenabled_libmemcached___memcached_get_end(void);
-extern void __dtrace_libmemcached___memcached_get_start(void);
-extern int __dtraceenabled_libmemcached___memcached_get_start(void);
-extern void __dtrace_libmemcached___memcached_increment_end(void);
-extern int __dtraceenabled_libmemcached___memcached_increment_end(void);
-extern void __dtrace_libmemcached___memcached_increment_start(void);
-extern int __dtraceenabled_libmemcached___memcached_increment_start(void);
-extern void __dtrace_libmemcached___memcached_mget_end(void);
-extern int __dtraceenabled_libmemcached___memcached_mget_end(void);
-extern void __dtrace_libmemcached___memcached_mget_start(void);
-extern int __dtraceenabled_libmemcached___memcached_mget_start(void);
-extern void __dtrace_libmemcached___memcached_replace_end(void);
-extern int __dtraceenabled_libmemcached___memcached_replace_end(void);
-extern void __dtrace_libmemcached___memcached_replace_start(void);
-extern int __dtraceenabled_libmemcached___memcached_replace_start(void);
-extern void __dtrace_libmemcached___memcached_server_add_end(void);
-extern int __dtraceenabled_libmemcached___memcached_server_add_end(void);
-extern void __dtrace_libmemcached___memcached_server_add_start(void);
-extern int __dtraceenabled_libmemcached___memcached_server_add_start(void);
-extern void __dtrace_libmemcached___memcached_set_end(void);
-extern int __dtraceenabled_libmemcached___memcached_set_end(void);
-extern void __dtrace_libmemcached___memcached_set_start(void);
-extern int __dtraceenabled_libmemcached___memcached_set_start(void);
+#ifdef HAVE_DTRACE
+/*
+ * Create the DTrace probes on the system using it (to support both Solaris
+ * and MacOS X
+ */
+#include "dtrace_probes.h"
#else
+/*
+ * Provide dummy macros so that we don't need to clutter the code with
+ * ifdefs when we want to use the probes.
+ */
#define LIBMEMCACHED_MEMCACHED_ADD_END()
#define LIBMEMCACHED_MEMCACHED_ADD_END_ENABLED() (0)
#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _LIBMEMCACHED_PROBES_H */
+#endif /* LIBMEMCACHED_PROBES_H */