| 1 | /* |
| 2 | * SPDX-License-Identifier: LGPL-2.1-only |
| 3 | * |
| 4 | * Copyright (C) 2013 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
| 5 | */ |
| 6 | |
| 7 | #ifndef _UST_COMMON_RINGBUFFER_CLIENTS_CLIENTS_H |
| 8 | #define _UST_COMMON_RINGBUFFER_CLIENTS_CLIENTS_H |
| 9 | |
| 10 | #include <stdint.h> |
| 11 | #include <lttng/ust-events.h> |
| 12 | |
| 13 | #include "common/ringbuffer/ringbuffer-config.h" |
| 14 | |
| 15 | struct lttng_ust_client_lib_ring_buffer_client_cb { |
| 16 | struct lttng_ust_ring_buffer_client_cb parent; |
| 17 | |
| 18 | int (*timestamp_begin) (struct lttng_ust_ring_buffer *buf, |
| 19 | struct lttng_ust_ring_buffer_channel *chan, |
| 20 | uint64_t *timestamp_begin); |
| 21 | int (*timestamp_end) (struct lttng_ust_ring_buffer *buf, |
| 22 | struct lttng_ust_ring_buffer_channel *chan, |
| 23 | uint64_t *timestamp_end); |
| 24 | int (*events_discarded) (struct lttng_ust_ring_buffer *buf, |
| 25 | struct lttng_ust_ring_buffer_channel *chan, |
| 26 | uint64_t *events_discarded); |
| 27 | int (*content_size) (struct lttng_ust_ring_buffer *buf, |
| 28 | struct lttng_ust_ring_buffer_channel *chan, |
| 29 | uint64_t *content_size); |
| 30 | int (*packet_size) (struct lttng_ust_ring_buffer *buf, |
| 31 | struct lttng_ust_ring_buffer_channel *chan, |
| 32 | uint64_t *packet_size); |
| 33 | int (*stream_id) (struct lttng_ust_ring_buffer *buf, |
| 34 | struct lttng_ust_ring_buffer_channel *chan, |
| 35 | uint64_t *stream_id); |
| 36 | int (*current_timestamp) (struct lttng_ust_ring_buffer *buf, |
| 37 | struct lttng_ust_ring_buffer_channel *chan, |
| 38 | uint64_t *ts); |
| 39 | int (*sequence_number) (struct lttng_ust_ring_buffer *buf, |
| 40 | struct lttng_ust_ring_buffer_channel *chan, uint64_t *seq); |
| 41 | int (*instance_id) (struct lttng_ust_ring_buffer *buf, |
| 42 | struct lttng_ust_ring_buffer_channel *chan, uint64_t *id); |
| 43 | }; |
| 44 | |
| 45 | void lttng_ust_ring_buffer_clients_init(void) |
| 46 | __attribute__((visibility("hidden"))); |
| 47 | |
| 48 | void lttng_ust_ring_buffer_clients_exit(void) |
| 49 | __attribute__((visibility("hidden"))); |
| 50 | |
| 51 | void lttng_ring_buffer_client_overwrite_init(void) |
| 52 | __attribute__((visibility("hidden"))); |
| 53 | |
| 54 | void lttng_ring_buffer_client_overwrite_rt_init(void) |
| 55 | __attribute__((visibility("hidden"))); |
| 56 | |
| 57 | void lttng_ring_buffer_client_discard_init(void) |
| 58 | __attribute__((visibility("hidden"))); |
| 59 | |
| 60 | void lttng_ring_buffer_client_discard_rt_init(void) |
| 61 | __attribute__((visibility("hidden"))); |
| 62 | |
| 63 | void lttng_ring_buffer_metadata_client_init(void) |
| 64 | __attribute__((visibility("hidden"))); |
| 65 | |
| 66 | |
| 67 | void lttng_ring_buffer_client_overwrite_exit(void) |
| 68 | __attribute__((visibility("hidden"))); |
| 69 | |
| 70 | void lttng_ring_buffer_client_overwrite_rt_exit(void) |
| 71 | __attribute__((visibility("hidden"))); |
| 72 | |
| 73 | void lttng_ring_buffer_client_discard_exit(void) |
| 74 | __attribute__((visibility("hidden"))); |
| 75 | |
| 76 | void lttng_ring_buffer_client_discard_rt_exit(void) |
| 77 | __attribute__((visibility("hidden"))); |
| 78 | |
| 79 | void lttng_ring_buffer_metadata_client_exit(void) |
| 80 | __attribute__((visibility("hidden"))); |
| 81 | |
| 82 | |
| 83 | void lttng_ust_ring_buffer_client_overwrite_alloc_tls(void) |
| 84 | __attribute__((visibility("hidden"))); |
| 85 | |
| 86 | void lttng_ust_ring_buffer_client_overwrite_rt_alloc_tls(void) |
| 87 | __attribute__((visibility("hidden"))); |
| 88 | |
| 89 | void lttng_ust_ring_buffer_client_discard_alloc_tls(void) |
| 90 | __attribute__((visibility("hidden"))); |
| 91 | |
| 92 | void lttng_ust_ring_buffer_client_discard_rt_alloc_tls(void) |
| 93 | __attribute__((visibility("hidden"))); |
| 94 | |
| 95 | #endif /* _UST_COMMON_RINGBUFFER_CLIENTS_CLIENTS_H */ |