- /*
- * packet_avail_size returns the available size in the current
- * packet. Note that the size returned is only a hint, since it
- * may change due to concurrent writes.
- */
- size_t (*packet_avail_size)(struct channel *chan);
- wait_queue_head_t *(*get_writer_buf_wait_queue)(struct channel *chan, int cpu);
- wait_queue_head_t *(*get_hp_wait_queue)(struct channel *chan);
- int (*is_finalized)(struct channel *chan);
- int (*is_disabled)(struct channel *chan);
- int (*timestamp_begin) (const struct lib_ring_buffer_config *config,
- struct lib_ring_buffer *bufb,
- uint64_t *timestamp_begin);
- int (*timestamp_end) (const struct lib_ring_buffer_config *config,
- struct lib_ring_buffer *bufb,
- uint64_t *timestamp_end);
- int (*events_discarded) (const struct lib_ring_buffer_config *config,
- struct lib_ring_buffer *bufb,
- uint64_t *events_discarded);
- int (*content_size) (const struct lib_ring_buffer_config *config,
- struct lib_ring_buffer *bufb,
- uint64_t *content_size);
- int (*packet_size) (const struct lib_ring_buffer_config *config,
- struct lib_ring_buffer *bufb,
- uint64_t *packet_size);
- int (*stream_id) (const struct lib_ring_buffer_config *config,
- struct lib_ring_buffer *bufb,
- uint64_t *stream_id);
- int (*current_timestamp) (const struct lib_ring_buffer_config *config,
- struct lib_ring_buffer *bufb,
- uint64_t *ts);
- int (*sequence_number) (const struct lib_ring_buffer_config *config,
- struct lib_ring_buffer *bufb,
- uint64_t *seq);
- int (*instance_id) (const struct lib_ring_buffer_config *config,
- struct lib_ring_buffer *bufb,
- uint64_t *id);
-};
-
-struct lttng_counter_ops {
- struct lib_counter *(*counter_create)(size_t nr_dimensions,
- const size_t *max_nr_elem, /* for each dimension */
- int64_t global_sum_step);
- void (*counter_destroy)(struct lib_counter *counter);
- int (*counter_add)(struct lib_counter *counter, const size_t *dimension_indexes,
- int64_t v);
- /*
- * counter_read reads a specific cpu's counter if @cpu >= 0, or
- * the global aggregation counter if @cpu == -1.
- */
- int (*counter_read)(struct lib_counter *counter, const size_t *dimension_indexes, int cpu,
- int64_t *value, bool *overflow, bool *underflow);
- /*
- * counter_aggregate returns the total sum of all per-cpu counters and
- * the global aggregation counter.
- */
- int (*counter_aggregate)(struct lib_counter *counter, const size_t *dimension_indexes,
- int64_t *value, bool *overflow, bool *underflow);
- int (*counter_clear)(struct lib_counter *counter, const size_t *dimension_indexes);
-};
-
-struct lttng_transport {
- char *name;
- struct module *owner;
- struct list_head node;
- struct lttng_channel_ops ops;