X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=ltt-sessiond%2Ftrace.h;h=8da147230e22a928ec89b7b33f37c9a84d02cc8c;hb=cab7ad6aa0493b9a78b16756674f80556a33c0e5;hp=488fd757d3dfabf4d06a894ad2375876f6857cf6;hpb=540126381ff8f3b1e2b3357329fe105fc0bb5e4c;p=lttng-tools.git diff --git a/ltt-sessiond/trace.h b/ltt-sessiond/trace.h index 488fd757d..8da147230 100644 --- a/ltt-sessiond/trace.h +++ b/ltt-sessiond/trace.h @@ -21,14 +21,10 @@ #include #include -#include "lttng-kernel.h" -/* Default kernel channel attributes */ -#define DEFAULT_KERNEL_OVERWRITE 0 -#define DEFAULT_KERNEL_SUBBUF_SIZE 4096 /* bytes */ -#define DEFAULT_KERNEL_SUBBUF_NUM 8 /* Must always be a power of 2 */ -#define DEFAULT_KERNEL_SWITCH_TIMER 0 /* usec */ -#define DEFAULT_KERNEL_READ_TIMER 200 /* usec */ +#include + +#include "lttng-kernel.h" /* Kernel event list */ struct ltt_kernel_event_list { @@ -48,6 +44,7 @@ struct ltt_kernel_channel_list { /* Kernel event */ struct ltt_kernel_event { int fd; + int enabled; struct lttng_kernel_event *event; struct cds_list_head list; }; @@ -57,7 +54,7 @@ struct ltt_kernel_channel { int fd; char *pathname; unsigned int stream_count; - struct lttng_kernel_channel *channel; + struct lttng_channel *channel; struct ltt_kernel_event_list events_list; struct ltt_kernel_stream_list stream_list; struct cds_list_head list; @@ -67,7 +64,7 @@ struct ltt_kernel_channel { struct ltt_kernel_metadata { int fd; char *pathname; - struct lttng_kernel_channel *conf; + struct lttng_channel *conf; }; /* Channel stream */ @@ -82,6 +79,7 @@ struct ltt_kernel_stream { struct ltt_kernel_session { int fd; int metadata_stream_fd; + int kconsumer_fds_sent; unsigned int channel_count; unsigned int stream_count_global; struct ltt_kernel_metadata *metadata; @@ -104,23 +102,22 @@ struct ltt_ust_marker { }; /* - * Function prototype + * Create functions malloc() the data structure. */ - -/* Kernel session */ struct ltt_kernel_session *trace_create_kernel_session(void); - -/* Kernel channel */ -struct ltt_kernel_channel *trace_create_kernel_channel(void); - -/* Kernel event */ -struct ltt_kernel_event *trace_create_kernel_event(char *name, - enum lttng_kernel_instrumentation type); - -/* Kernel metadata */ +struct ltt_kernel_channel *trace_create_kernel_channel(struct lttng_channel *chan); +struct ltt_kernel_event *trace_create_kernel_event(struct lttng_event *ev); struct ltt_kernel_metadata *trace_create_kernel_metadata(void); - -/* Kernel stream */ struct ltt_kernel_stream *trace_create_kernel_stream(void); +/* + * Destroy functions free() the data structure and remove from linked list if + * it's applies. + */ +void trace_destroy_kernel_session(struct ltt_kernel_session *session); +void trace_destroy_kernel_metadata(struct ltt_kernel_metadata *metadata); +void trace_destroy_kernel_channel(struct ltt_kernel_channel *channel); +void trace_destroy_kernel_event(struct ltt_kernel_event *event); +void trace_destroy_kernel_stream(struct ltt_kernel_stream *stream); + #endif /* _LTT_TRACE_H */