X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=include%2Flttng%2Fchannel.h;h=4e61a611b4c4b2f19f83dd8950165a766d711325;hp=e770f6835a491f35c3dbdea7b4705ad65afefbdc;hb=b6151646d77a70cd8054543c07924c840646950b;hpb=674871507faa4b2f4468d0b67fa35e77e4a2744a diff --git a/include/lttng/channel.h b/include/lttng/channel.h index e770f6835..4e61a611b 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 */ @@ -67,6 +68,14 @@ struct lttng_channel { char padding[LTTNG_CHANNEL_PADDING1]; }; +/* + */ +extern struct lttng_channel *lttng_channel_create(struct lttng_domain *domain); + +/* + */ +extern void lttng_channel_destroy(struct lttng_channel *channel); + /* * List the channel(s) of a session. * @@ -107,6 +116,34 @@ 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); + +extern int lttng_channel_get_monitor_timer_interval(struct lttng_channel *chan, + uint64_t *monitor_timer_interval); + +extern int lttng_channel_set_monitor_timer_interval(struct lttng_channel *chan, + uint64_t monitor_timer_interval); + +extern int lttng_channel_get_blocking_timeout(struct lttng_channel *chan, + int64_t *blocking_timeout); + +extern int lttng_channel_set_blocking_timeout(struct lttng_channel *chan, + int64_t blocking_timeout); + #ifdef __cplusplus } #endif