X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=include%2Flttng%2Flttng.h;h=4ffffd84ff237bedddbf1bbc27c325c32136b521;hb=1bc8fb0d56c2f9486e2bbdf278b6e0f22ac84510;hp=3e7fb63169e83b780ad247a3fda616bbade91050;hpb=7c612c2e69f7b4ebf77fd369126befb71e561a8f;p=lttng-tools.git diff --git a/include/lttng/lttng.h b/include/lttng/lttng.h index 3e7fb6316..4ffffd84f 100644 --- a/include/lttng/lttng.h +++ b/include/lttng/lttng.h @@ -326,12 +326,13 @@ struct lttng_calibrate { * * The structures should be initialized to zero before use. */ -#define LTTNG_SESSION_PADDING1 16 +#define LTTNG_SESSION_PADDING1 12 struct lttng_session { char name[NAME_MAX]; /* The path where traces are written */ char path[PATH_MAX]; uint32_t enabled; /* enabled/started: 1, disabled/stopped: 0 */ + uint32_t snapshot_mode; char padding[LTTNG_SESSION_PADDING1]; }; @@ -390,6 +391,21 @@ extern void lttng_destroy_handle(struct lttng_handle *handle); */ extern int lttng_create_session(const char *name, const char *url); +/* + * Create a tracing session that will exclusively be used for snapshot meaning + * the session will be in no output mode and every channel enabled for that + * session will be set in overwrite mode and in mmap output since splice is not + * supported. + * + * If an url is given, it will be used to create a default snapshot output + * using it as a destination. If NULL, no output will be defined and an + * add-output call will be needed. + * + * Name can't be NULL. + */ +extern int lttng_create_session_snapshot(const char *name, + const char *snapshot_url); + /* * Destroy a tracing session. *