Fix duplicate target.
[awesomized/libmemcached] / libmemcached / libmemcached_probes.h
1 /* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
2 *
3 * Libmemcached library
4 *
5 * Copyright (C) 2011 Data Differential, http://datadifferential.com/
6 * Copyright (C) 2006-2009 Brian Aker All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions are
10 * met:
11 *
12 * * Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 *
15 * * Redistributions in binary form must reproduce the above
16 * copyright notice, this list of conditions and the following disclaimer
17 * in the documentation and/or other materials provided with the
18 * distribution.
19 *
20 * * The names of its contributors may not be used to endorse or
21 * promote products derived from this software without specific prior
22 * written permission.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 *
36 */
37
38 #pragma once
39
40
41 /*
42 * This file contains the definition of the various probes supported by
43 * libmemcached. Currently it only support DTRACE, but just create an
44 * implementation of the following macros to create your own sort of
45 * probing :)
46 */
47
48 #ifdef HAVE_DTRACE
49 /*
50 * Create the DTrace probes on the system using it (to support both Solaris
51 * and MacOS X
52 */
53 #include "libmemcached/dtrace_probes.h"
54
55 #else
56 /*
57 * Provide dummy macros so that we don't need to clutter the code with
58 * ifdefs when we want to use the probes.
59 */
60
61 #define LIBMEMCACHED_MEMCACHED_ADD_END()
62 #define LIBMEMCACHED_MEMCACHED_ADD_END_ENABLED() (0)
63 #define LIBMEMCACHED_MEMCACHED_ADD_START()
64 #define LIBMEMCACHED_MEMCACHED_ADD_START_ENABLED() (0)
65 #define LIBMEMCACHED_MEMCACHED_CONNECT_END()
66 #define LIBMEMCACHED_MEMCACHED_CONNECT_END_ENABLED() (0)
67 #define LIBMEMCACHED_MEMCACHED_CONNECT_START()
68 #define LIBMEMCACHED_MEMCACHED_CONNECT_START_ENABLED() (0)
69 #define LIBMEMCACHED_MEMCACHED_DECREMENT_END()
70 #define LIBMEMCACHED_MEMCACHED_DECREMENT_END_ENABLED() (0)
71 #define LIBMEMCACHED_MEMCACHED_DECREMENT_START()
72 #define LIBMEMCACHED_MEMCACHED_DECREMENT_START_ENABLED() (0)
73 #define LIBMEMCACHED_MEMCACHED_DECREMENT_WITH_INITIAL_END()
74 #define LIBMEMCACHED_MEMCACHED_DECREMENT_WITH_INITIAL_END_ENABLED() (0)
75 #define LIBMEMCACHED_MEMCACHED_DECREMENT_WITH_INITIAL_START()
76 #define LIBMEMCACHED_MEMCACHED_DECREMENT_WITH_INITIAL_START_ENABLED() (0)
77 #define LIBMEMCACHED_MEMCACHED_DELETE_END()
78 #define LIBMEMCACHED_MEMCACHED_DELETE_END_ENABLED() (0)
79 #define LIBMEMCACHED_MEMCACHED_DELETE_START()
80 #define LIBMEMCACHED_MEMCACHED_DELETE_START_ENABLED() (0)
81 #define LIBMEMCACHED_MEMCACHED_FLUSH_END()
82 #define LIBMEMCACHED_MEMCACHED_FLUSH_END_ENABLED() (0)
83 #define LIBMEMCACHED_MEMCACHED_FLUSH_START()
84 #define LIBMEMCACHED_MEMCACHED_FLUSH_START_ENABLED() (0)
85 #define LIBMEMCACHED_MEMCACHED_GET_END()
86 #define LIBMEMCACHED_MEMCACHED_GET_END_ENABLED() (0)
87 #define LIBMEMCACHED_MEMCACHED_GET_START()
88 #define LIBMEMCACHED_MEMCACHED_GET_START_ENABLED() (0)
89 #define LIBMEMCACHED_MEMCACHED_TOUCH_END()
90 #define LIBMEMCACHED_MEMCACHED_TOUCH_END_ENABLED() (0)
91 #define LIBMEMCACHED_MEMCACHED_TOUCH_START()
92 #define LIBMEMCACHED_MEMCACHED_TOUCH_START_ENABLED() (0)
93 #define LIBMEMCACHED_MEMCACHED_INCREMENT_END()
94 #define LIBMEMCACHED_MEMCACHED_INCREMENT_END_ENABLED() (0)
95 #define LIBMEMCACHED_MEMCACHED_INCREMENT_START()
96 #define LIBMEMCACHED_MEMCACHED_INCREMENT_START_ENABLED() (0)
97 #define LIBMEMCACHED_MEMCACHED_INCREMENT_WITH_INITIAL_END()
98 #define LIBMEMCACHED_MEMCACHED_INCREMENT_WITH_INITIAL_END_ENABLED() (0)
99 #define LIBMEMCACHED_MEMCACHED_INCREMENT_WITH_INITIAL_START()
100 #define LIBMEMCACHED_MEMCACHED_INCREMENT_WITH_INITIAL_START_ENABLED() (0)
101 #define LIBMEMCACHED_MEMCACHED_MGET_END()
102 #define LIBMEMCACHED_MEMCACHED_MGET_END_ENABLED() (0)
103 #define LIBMEMCACHED_MEMCACHED_MGET_START()
104 #define LIBMEMCACHED_MEMCACHED_MGET_START_ENABLED() (0)
105 #define LIBMEMCACHED_MEMCACHED_REPLACE_END()
106 #define LIBMEMCACHED_MEMCACHED_REPLACE_END_ENABLED() (0)
107 #define LIBMEMCACHED_MEMCACHED_REPLACE_START()
108 #define LIBMEMCACHED_MEMCACHED_REPLACE_START_ENABLED() (0)
109 #define LIBMEMCACHED_MEMCACHED_SERVER_ADD_END()
110 #define LIBMEMCACHED_MEMCACHED_SERVER_ADD_END_ENABLED() (0)
111 #define LIBMEMCACHED_MEMCACHED_SERVER_ADD_START()
112 #define LIBMEMCACHED_MEMCACHED_SERVER_ADD_START_ENABLED() (0)
113 #define LIBMEMCACHED_MEMCACHED_SET_END()
114 #define LIBMEMCACHED_MEMCACHED_SET_END_ENABLED() (0)
115 #define LIBMEMCACHED_MEMCACHED_SET_START()
116 #define LIBMEMCACHED_MEMCACHED_SET_START_ENABLED() (0)
117
118 #endif