#include <urcu/list.h>
#include <urcu/hlist.h>
#include <stdint.h>
+#include <lttng/ust-config.h>
#include <lttng/ust-abi.h>
#include <lttng/ust-tracer.h>
#include <lttng/ust-endian.h>
#include <float.h>
+#include <errno.h>
+#include <urcu/ref.h>
+#include <pthread.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
#define LTTNG_UST_UUID_LEN 16
double d;
};
+struct lttng_perf_counter_field;
+
#define LTTNG_UST_CTX_FIELD_PADDING 40
struct lttng_ctx_field {
struct lttng_event_field event_field;
void (*get_value)(struct lttng_ctx_field *field,
union lttng_ctx_value *value);
union {
+ struct lttng_perf_counter_field *perf_counter;
char padding[LTTNG_UST_CTX_FIELD_PADDING];
} u;
void (*destroy)(struct lttng_ctx_field *field);
unsigned char *uuid,
uint32_t chan_id);
void (*channel_destroy)(struct lttng_channel *chan);
- void *_deprecated1;
+ union {
+ void *_deprecated1;
+ unsigned long has_strcpy:1; /* ABI has strcpy */
+ } u;
void *_deprecated2;
int (*event_reserve)(struct lttng_ust_lib_ring_buffer_ctx *ctx,
uint32_t event_id);
int (*is_finalized)(struct channel *chan);
int (*is_disabled)(struct channel *chan);
int (*flush_buffer)(struct channel *chan, struct lttng_ust_shm_handle *handle);
+ void (*event_strcpy)(struct lttng_ust_lib_ring_buffer_ctx *ctx,
+ const char *src, size_t len);
};
/*
void lttng_context_vtid_reset(void);
void lttng_context_vpid_reset(void);
+#ifdef LTTNG_UST_HAVE_PERF_EVENT
+int lttng_add_perf_counter_to_ctx(uint32_t type,
+ uint64_t config,
+ const char *name,
+ struct lttng_ctx **ctx);
+int lttng_perf_counter_init(void);
+void lttng_perf_counter_exit(void);
+#else /* #ifdef LTTNG_UST_HAVE_PERF_EVENT */
+static inline
+int lttng_add_perf_counter_to_ctx(uint32_t type,
+ uint64_t config,
+ const char *name,
+ struct lttng_ctx **ctx)
+{
+ return -ENOSYS;
+}
+static inline
+int lttng_perf_counter_init(void)
+{
+ return 0;
+}
+static inline
+void lttng_perf_counter_exit(void)
+{
+}
+#endif /* #else #ifdef LTTNG_UST_HAVE_PERF_EVENT */
+
extern const struct lttng_ust_client_lib_ring_buffer_client_cb *lttng_client_callbacks_metadata;
extern const struct lttng_ust_client_lib_ring_buffer_client_cb *lttng_client_callbacks_discard;
extern const struct lttng_ust_client_lib_ring_buffer_client_cb *lttng_client_callbacks_overwrite;
void lttng_handle_pending_statedump(void *owner);
struct cds_list_head *_lttng_get_sessions(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _LTTNG_UST_EVENTS_H */