X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=lttng-sessiond%2Ftrace-kernel.h;fp=lttng-sessiond%2Ftrace-kernel.h;h=0000000000000000000000000000000000000000;hp=1057c1e07a04eb2255b7f1624b3570ed11d61357;hb=10a8a2237343699e3923d87e24dbf2d7fe225377;hpb=734f79bf717d87817623d382c59086dc9e8ef610 diff --git a/lttng-sessiond/trace-kernel.h b/lttng-sessiond/trace-kernel.h deleted file mode 100644 index 1057c1e07..000000000 --- a/lttng-sessiond/trace-kernel.h +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (C) 2011 - David Goulet - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; only version 2 - * of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef _LTT_TRACE_KERNEL_H -#define _LTT_TRACE_KERNEL_H - -#include -#include - -#include -#include - -/* Kernel event list */ -struct ltt_kernel_event_list { - struct cds_list_head head; -}; - -/* Channel stream list */ -struct ltt_kernel_stream_list { - struct cds_list_head head; -}; - -/* Channel list */ -struct ltt_kernel_channel_list { - struct cds_list_head head; -}; - -/* Kernel event */ -struct ltt_kernel_event { - int fd; - int enabled; - /* - * TODO: need internal representation to support more than a - * single context. - */ - struct lttng_kernel_context *ctx; - struct lttng_kernel_event *event; - struct cds_list_head list; -}; - -/* Kernel channel */ -struct ltt_kernel_channel { - int fd; - int enabled; - char *pathname; - unsigned int stream_count; - unsigned int event_count; - /* - * TODO: need internal representation to support more than a - * single context. - */ - struct lttng_kernel_context *ctx; - struct lttng_channel *channel; - struct ltt_kernel_event_list events_list; - struct ltt_kernel_stream_list stream_list; - struct cds_list_head list; -}; - -/* Metadata */ -struct ltt_kernel_metadata { - int fd; - char *pathname; - struct lttng_channel *conf; -}; - -/* Channel stream */ -struct ltt_kernel_stream { - int fd; - char *pathname; - int state; - struct cds_list_head list; -}; - -/* Kernel session */ -struct ltt_kernel_session { - int fd; - int metadata_stream_fd; - int consumer_fds_sent; - int consumer_fd; - unsigned int channel_count; - unsigned int stream_count_global; - char *trace_path; - struct ltt_kernel_metadata *metadata; - struct ltt_kernel_channel_list channel_list; - /* UID/GID of the user owning the session */ - uid_t uid; - gid_t gid; -}; - -/* - * Lookup functions. NULL is returned if not found. - */ -struct ltt_kernel_event *trace_kernel_get_event_by_name( - char *name, struct ltt_kernel_channel *channel); -struct ltt_kernel_channel *trace_kernel_get_channel_by_name( - char *name, struct ltt_kernel_session *session); - -/* - * Create functions malloc() the data structure. - */ -struct ltt_kernel_session *trace_kernel_create_session(char *path); -struct ltt_kernel_channel *trace_kernel_create_channel(struct lttng_channel *chan, char *path); -struct ltt_kernel_event *trace_kernel_create_event(struct lttng_event *ev); -struct ltt_kernel_metadata *trace_kernel_create_metadata(char *path); -struct ltt_kernel_stream *trace_kernel_create_stream(void); - -/* - * Destroy functions free() the data structure and remove from linked list if - * it's applies. - */ -void trace_kernel_destroy_session(struct ltt_kernel_session *session); -void trace_kernel_destroy_metadata(struct ltt_kernel_metadata *metadata); -void trace_kernel_destroy_channel(struct ltt_kernel_channel *channel); -void trace_kernel_destroy_event(struct ltt_kernel_event *event); -void trace_kernel_destroy_stream(struct ltt_kernel_stream *stream); - -#endif /* _LTT_TRACE_KERNEL_H */