Move kernctl.h to lttng-kernel-ctl.h into the include directory.
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
--- /dev/null
+/*
+ * Copyright (C) 2011 - Julien Desfossez <julien.desfossez@polymtl.ca>
+ * Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * 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_LIBKERNELCTL_H
+#define _LTT_LIBKERNELCTL_H
+
+#include <lttng/lttng.h>
+#include <lttng-kernel.h>
+
+int kernctl_create_session(int fd);
+int kernctl_open_metadata(int fd, struct lttng_channel_attr *chops);
+int kernctl_create_channel(int fd, struct lttng_channel_attr *chops);
+int kernctl_create_stream(int fd);
+int kernctl_create_event(int fd, struct lttng_kernel_event *ev);
+int kernctl_add_context(int fd, struct lttng_kernel_context *ctx);
+
+int kernctl_enable(int fd);
+int kernctl_disable(int fd);
+int kernctl_start_session(int fd);
+int kernctl_stop_session(int fd);
+
+int kernctl_tracepoint_list(int fd);
+int kernctl_tracer_version(int fd, struct lttng_kernel_tracer_version *v);
+int kernctl_wait_quiescent(int fd);
+int kernctl_calibrate(int fd, struct lttng_kernel_calibrate *calibrate);
+
+
+/* Buffer operations */
+
+/* For mmap mode, readable without "get" operation */
+int kernctl_get_mmap_len(int fd, unsigned long *len);
+int kernctl_get_max_subbuf_size(int fd, unsigned long *len);
+
+/*
+ * For mmap mode, operate on the current packet (between get/put or
+ * get_next/put_next).
+ */
+int kernctl_get_mmap_read_offset(int fd, unsigned long *len);
+int kernctl_get_subbuf_size(int fd, unsigned long *len);
+int kernctl_get_padded_subbuf_size(int fd, unsigned long *len);
+
+int kernctl_get_next_subbuf(int fd);
+int kernctl_put_next_subbuf(int fd);
+
+/* snapshot */
+int kernctl_snapshot(int fd);
+int kernctl_snapshot_get_consumed(int fd, unsigned long *pos);
+int kernctl_snapshot_get_produced(int fd, unsigned long *pos);
+int kernctl_get_subbuf(int fd, unsigned long *pos);
+int kernctl_put_subbuf(int fd);
+
+int kernctl_buffer_flush(int fd);
+
+#endif /* _LTT_LIBKERNELCTL_H */
#ifndef _LTTNG_SHARE_H
#define _LTTNG_SHARE_H
-#include <asm/types.h>
-#include <stdint.h>
-
-typedef uint32_t u32;
-typedef uint64_t u64;
-
-typedef __s64 s64;
-
/* Default channel attributes */
#define DEFAULT_CHANNEL_NAME "channel0"
#define DEFAULT_CHANNEL_OVERWRITE 0 /* usec */
#include <limits.h>
#include <lttng/lttng.h>
+#include <urcu/list.h>
/*
* When the receiving thread dies, we need to have a way to make the polling
#ifndef _LTTNG_H
#define _LTTNG_H
-#include <asm/types.h>
-#include <sys/types.h>
-#include <stdint.h>
#include <limits.h>
+#include <stdint.h>
+#include <sys/types.h>
/* Default unix group name for tracing. */
#define LTTNG_DEFAULT_TRACING_GROUP "tracing"
noinst_LTLIBRARIES = libkernelctl.la
-libkernelctl_la_SOURCES = kernelctl.c kernelctl.h kernel-ioctl.h
+libkernelctl_la_SOURCES = kernelctl.c kernel-ioctl.h
#include <sys/ioctl.h>
+#include <lttng-kernel-ctl.h>
+
#include "kernel-ioctl.h"
-#include "kernelctl.h"
int kernctl_create_session(int fd)
{
+++ /dev/null
-/*
- * Copyright (C) 2011 - Julien Desfossez <julien.desfossez@polymtl.ca>
- * Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
- * 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_LIBKERNELCTL_H
-#define _LTT_LIBKERNELCTL_H
-
-#include <lttng/lttng.h>
-
-#include "lttng-kernel.h"
-
-int kernctl_create_session(int fd);
-int kernctl_open_metadata(int fd, struct lttng_channel_attr *chops);
-int kernctl_create_channel(int fd, struct lttng_channel_attr *chops);
-int kernctl_create_stream(int fd);
-int kernctl_create_event(int fd, struct lttng_kernel_event *ev);
-int kernctl_add_context(int fd, struct lttng_kernel_context *ctx);
-
-int kernctl_enable(int fd);
-int kernctl_disable(int fd);
-int kernctl_start_session(int fd);
-int kernctl_stop_session(int fd);
-
-int kernctl_tracepoint_list(int fd);
-int kernctl_tracer_version(int fd, struct lttng_kernel_tracer_version *v);
-int kernctl_wait_quiescent(int fd);
-int kernctl_calibrate(int fd, struct lttng_kernel_calibrate *calibrate);
-
-
-/* Buffer operations */
-
-/* For mmap mode, readable without "get" operation */
-int kernctl_get_mmap_len(int fd, unsigned long *len);
-int kernctl_get_max_subbuf_size(int fd, unsigned long *len);
-
-/*
- * For mmap mode, operate on the current packet (between get/put or
- * get_next/put_next).
- */
-int kernctl_get_mmap_read_offset(int fd, unsigned long *len);
-int kernctl_get_subbuf_size(int fd, unsigned long *len);
-int kernctl_get_padded_subbuf_size(int fd, unsigned long *len);
-
-int kernctl_get_next_subbuf(int fd);
-int kernctl_put_next_subbuf(int fd);
-
-/* snapshot */
-int kernctl_snapshot(int fd);
-int kernctl_snapshot_get_consumed(int fd, unsigned long *pos);
-int kernctl_snapshot_get_produced(int fd, unsigned long *pos);
-int kernctl_get_subbuf(int fd, unsigned long *pos);
-int kernctl_put_subbuf(int fd);
-
-int kernctl_buffer_flush(int fd);
-
-#endif /* _LTT_LIBKERNELCTL_H */
*/
#define _GNU_SOURCE
+#include <assert.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/un.h>
#include <unistd.h>
-#include <assert.h>
#include <lttng-sessiond-comm.h>
*/
#define _GNU_SOURCE
-#include <errno.h>
#include <grp.h>
+#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <lttng/lttng.h>
-
#include <lttng-sessiond-comm.h>
-#include "lttngerr.h"
-#include "lttng-share.h"
+#include <lttng-share.h>
+#include <lttng/lttng.h>
+#include <lttngerr.h>
/* Socket to session daemon for communication */
static int sessiond_socket;
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/libkernelctl
+AM_CPPFLAGS = -I$(top_srcdir)/include
lib_LTLIBRARIES = liblttngkconsumerd.la
*/
#define _GNU_SOURCE
+#include <assert.h>
#include <fcntl.h>
#include <poll.h>
#include <pthread.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
-#include <urcu/list.h>
-#include <assert.h>
+#include <lttng-kernel-ctl.h>
+#include <lttng-sessiond-comm.h>
#include <lttng/lttng-kconsumerd.h>
-
-#include "kernelctl.h"
-#include "lttngerr.h"
-#include "lttng-sessiond-comm.h"
+#include <lttngerr.h>
static struct lttng_kconsumerd_global_data {
/*
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/libkernelctl
+AM_CPPFLAGS = -I$(top_srcdir)/include
bin_PROGRAMS = ltt-kconsumerd
#include <sys/mman.h>
#include <assert.h>
+#include <ltt-kconsumerd.h>
+#include <lttng-kernel-ctl.h>
+#include <lttng-sessiond-comm.h>
#include <lttng/lttng-kconsumerd.h>
-
-#include "lttngerr.h"
-#include "kernelctl.h"
-#include "ltt-kconsumerd.h"
-#include "lttng-sessiond-comm.h"
+#include <lttngerr.h>
/* the two threads (receive fd and poll) */
static pthread_t threads[2];
AM_CPPFLAGS = -I$(top_srcdir)/include \
- -I$(top_srcdir)/libkernelctl -I$(top_srcdir)/libustctl \
- -DINSTALL_BIN_PATH=\"$(bindir)\"
+ -DINSTALL_BIN_PATH=\""$(bindir)"\"
AM_CFLAGS = -fno-strict-aliasing
/*
* Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
*
- * 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 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.
+ * 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.
+ * 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.
*/
#define _GNU_SOURCE
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+
+#include <lttng-sessiond-comm.h>
#include <urcu/list.h>
#include "lttngerr.h"
#include "context.h"
+#include "kernel-ctl.h"
/*
* Add kernel context to an event of a specific channel.
/*
* Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
*
- * 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 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.
+ * 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.
+ * 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_CONTEXT_H
#define _LTT_CONTEXT_H
-#include <limits.h>
-#include <urcu/list.h>
+#include <lttng-kernel.h>
-#include <lttng/lttng.h>
-#include <lttng-sessiond-comm.h>
-
-#include "lttng-kernel.h"
-#include "kernel-ctl.h"
#include "trace.h"
int add_kernel_context(struct ltt_kernel_session *ksession,
#include <string.h>
#include <unistd.h>
-#include "lttngerr.h"
-#include "kernelctl.h"
+#include <lttng-kernel-ctl.h>
+#include <lttngerr.h>
+
#include "kernel-ctl.h"
/*
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/ipc.h>
#include <sys/mount.h>
-#include <sys/shm.h>
+#include <sys/resource.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/resource.h>
#include <unistd.h>
-#include <urcu/list.h> /* URCU list library (-lurcu) */
-#include <lttng/lttng.h>
-#include <lttng/lttng-kconsumerd.h>
+#include <ltt-kconsumerd.h>
#include <lttng-sessiond-comm.h>
+#include <lttng/lttng-kconsumerd.h>
+#include <lttngerr.h>
#include "context.h"
-#include "ltt-sessiond.h"
-#include "lttngerr.h"
#include "kernel-ctl.h"
-#include "ust-ctl.h"
-#include "session.h"
+#include "ltt-sessiond.h"
#include "traceable-app.h"
-#include "ltt-kconsumerd.h"
+#include "ust-ctl.h"
#include "utils.h"
/* Const values */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <time.h>
#include <urcu/list.h>
-#include "lttngerr.h"
+#include <lttngerr.h>
+
#include "session.h"
/*
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <urcu/list.h>
-#include "lttngerr.h"
+#include <lttngerr.h>
+
#include "trace.h"
/*
#include <urcu/list.h>
#include <lttng/lttng.h>
-
-#include "lttng-kernel.h"
+#include <lttng-kernel.h>
/* Kernel event list */
struct ltt_kernel_event_list {
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
-#include <urcu/list.h>
-#include "lttngerr.h"
+#include <lttngerr.h>
+
#include "traceable-app.h"
/* Number of element for the list below. */
#ifndef _TRACEABLE_APP_H
#define _TRACEABLE_APP_H
+#include <urcu/list.h>
+
/* Traceable application list */
struct ltt_traceable_app_list {
struct cds_list_head head;
/*
* Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
- * Copyright (C) 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
-AM_CPPFLAGS = -I$(top_srcdir)/include -DINSTALL_BIN_PATH=\""$(bindir)"\"
+AM_CPPFLAGS = -I$(top_srcdir)/include \
+ -DINSTALL_BIN_PATH=\""$(bindir)"\"
bin_PROGRAMS = lttng