projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support c++ tracepoint instrumentation
[lttng-ust.git]
/
include
/
ust
/
marker.h
diff --git
a/include/ust/marker.h
b/include/ust/marker.h
index 41ae10ab4a07301ed63fc998f8d592dffe2d61e0..8cfdcbdb54057ee16813a432ac83e69ab6df12ef 100644
(file)
--- a/
include/ust/marker.h
+++ b/
include/ust/marker.h
@@
-26,12
+26,17
@@
*/
#include <stdarg.h>
*/
#include <stdarg.h>
+#include <stdint.h>
+#include <stddef.h>
#include <bits/wordsize.h>
#include <urcu/list.h>
#include <bits/wordsize.h>
#include <urcu/list.h>
-#include <ust/core.h>
-#include <ust/kcompat/kcompat.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
struct ust_marker;
struct ust_marker;
+struct ust_marker_probe_array;
/**
* ust_marker_probe_func - Type of a marker probe function
/**
* ust_marker_probe_func - Type of a marker probe function
@@
-64,11
+69,11
@@
struct ust_marker {
char state; /* State. */
char ptype; /* probe type : 0 : single, 1 : multi */
/* Probe wrapper */
char state; /* State. */
char ptype; /* probe type : 0 : single, 1 : multi */
/* Probe wrapper */
- u
16 channel_id;
/* Numeric channel identifier, dynamic */
- u
16 event_id;
/* Numeric event identifier, dynamic */
+ u
int16_t channel_id;
/* Numeric channel identifier, dynamic */
+ u
int16_t event_id;
/* Numeric event identifier, dynamic */
void (*call)(const struct ust_marker *mdata, void *call_private, ...);
struct ust_marker_probe_closure single;
void (*call)(const struct ust_marker *mdata, void *call_private, ...);
struct ust_marker_probe_closure single;
- struct ust_marker_probe_
closure
*multi;
+ struct ust_marker_probe_
array
*multi;
const char *tp_name; /* Optional tracepoint name */
void *tp_cb; /* Optional tracepoint callback */
};
const char *tp_name; /* Optional tracepoint name */
void *tp_cb; /* Optional tracepoint callback */
};
@@
-109,7
+114,7
@@
struct ust_marker {
do { \
_DEFINE_UST_MARKER(channel, name, NULL, NULL, format); \
__ust_marker_check_format(format, ## args); \
do { \
_DEFINE_UST_MARKER(channel, name, NULL, NULL, format); \
__ust_marker_check_format(format, ## args); \
- if (
unlikely(__ust_marker_def_##name.state))
\
+ if (
__builtin_expect(!!(__ust_marker_def_##name.state), 0))
\
(__ust_marker_def_##name.call) \
(&__ust_marker_def_##name, call_private,\
## args); \
(__ust_marker_def_##name.call) \
(&__ust_marker_def_##name, call_private,\
## args); \
@@
-138,7
+143,8
@@
void __trace_mark_is_deprecated()
/* To be used for string format validity checking with gcc */
static inline
/* To be used for string format validity checking with gcc */
static inline
-void __printf(1, 2) ___ust_marker_check_format(const char *fmt, ...)
+void __attribute__((format(printf, 1, 2)))
+ ___ust_marker_check_format(const char *fmt, ...)
{
}
{
}
@@
-216,4
+222,8
@@
void __MARKER_LIB_IS_DEPRECATED()
*/
#define MARK_NOARGS UST_MARKER_NOARGS
*/
#define MARK_NOARGS UST_MARKER_NOARGS
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _UST_MARKER_H */
#endif /* _UST_MARKER_H */
This page took
0.024527 seconds
and
4
git commands to generate.