X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=include%2Flttng%2Fchannel.h;h=732074c3ae99d8c137483cd792e62e4dbafd2da4;hb=8d5841ea483139d3ab2f2b4dd39263dad63832b1;hp=e770f6835a491f35c3dbdea7b4705ad65afefbdc;hpb=674871507faa4b2f4468d0b67fa35e77e4a2744a;p=lttng-tools.git diff --git a/include/lttng/channel.h b/include/lttng/channel.h index e770f6835..732074c3a 100644 --- a/include/lttng/channel.h +++ b/include/lttng/channel.h @@ -20,6 +20,7 @@ #include #include +#include #ifdef __cplusplus extern "C" { @@ -32,7 +33,7 @@ extern "C" { */ #define LTTNG_CHANNEL_ATTR_PADDING1 LTTNG_SYMBOL_NAME_LEN + 12 struct lttng_channel_attr { - int overwrite; /* 1: overwrite, 0: discard */ + 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 */ @@ -107,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