X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=include%2Flttng%2Fchannel.h;h=732074c3ae99d8c137483cd792e62e4dbafd2da4;hp=6ab0c7b62a5a0a5bd4ad867b91ce0996f42ef27b;hb=8d5841ea483139d3ab2f2b4dd39263dad63832b1;hpb=1239a312e7e0e4c33948fdaf04e7637cb93c8b10 diff --git a/include/lttng/channel.h b/include/lttng/channel.h index 6ab0c7b62..732074c3a 100644 --- a/include/lttng/channel.h +++ b/include/lttng/channel.h @@ -20,6 +20,7 @@ #include #include +#include #ifdef __cplusplus extern "C" { @@ -32,8 +33,8 @@ extern "C" { */ #define LTTNG_CHANNEL_ATTR_PADDING1 LTTNG_SYMBOL_NAME_LEN + 12 struct lttng_channel_attr { - int overwrite; /* 1: overwrite, 0: discard */ - uint64_t subbuf_size; /* bytes */ + int overwrite; /* -1: session default, 1: overwrite, 0: discard */ + uint64_t subbuf_size; /* bytes, power of 2 */ uint64_t num_subbuf; /* power of 2 */ unsigned int switch_timer_interval; /* usec */ unsigned int read_timer_interval; /* usec */ @@ -43,6 +44,12 @@ struct lttng_channel_attr { uint64_t tracefile_count; /* number of tracefiles */ /* LTTng 2.3 padding limit */ unsigned int live_timer_interval; /* usec */ + /* LTTng 2.7 padding limit */ + uint32_t align_to_64; + union { + uint64_t padding; + void *ptr; + } extended; char padding[LTTNG_CHANNEL_ATTR_PADDING1]; }; @@ -101,6 +108,22 @@ extern int lttng_disable_channel(struct lttng_handle *handle, extern void lttng_channel_set_default_attr(struct lttng_domain *domain, struct lttng_channel_attr *attr); +/* + * Get the discarded event count of a specific LTTng channel. + * + * Returns 0 on success, or a negative LTTng error code on error. + */ +extern int lttng_channel_get_discarded_event_count(struct lttng_channel *chan, + uint64_t *discarded_events); + +/* + * Get the lost packet count of a specific LTTng channel. + * + * Returns 0 on success, or a negative LTTng error code on error. + */ +extern int lttng_channel_get_lost_packet_count(struct lttng_channel *chan, + uint64_t *lost_packets); + #ifdef __cplusplus } #endif