Fix headers include and rename kernctl.h header
authorDavid Goulet <david.goulet@polymtl.ca>
Thu, 25 Aug 2011 18:12:04 +0000 (14:12 -0400)
committerDavid Goulet <david.goulet@polymtl.ca>
Thu, 25 Aug 2011 19:04:49 +0000 (15:04 -0400)
Move kernctl.h to lttng-kernel-ctl.h into the include directory.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
25 files changed:
include/lttng-kernel-ctl.h [new file with mode: 0644]
include/lttng-share.h
include/lttng/lttng-kconsumerd.h
include/lttng/lttng.h
libkernelctl/Makefile.am
libkernelctl/kernelctl.c
libkernelctl/kernelctl.h [deleted file]
liblttng-sessiond-comm/lttng-sessiond-comm.c
liblttngctl/lttngctl.c
liblttngkconsumerd/Makefile.am
liblttngkconsumerd/lttngkconsumerd.c
ltt-kconsumerd/Makefile.am
ltt-kconsumerd/ltt-kconsumerd.c
ltt-sessiond/Makefile.am
ltt-sessiond/context.c
ltt-sessiond/context.h
ltt-sessiond/kernel-ctl.c
ltt-sessiond/main.c
ltt-sessiond/session.c
ltt-sessiond/trace.c
ltt-sessiond/trace.h
ltt-sessiond/traceable-app.c
ltt-sessiond/traceable-app.h
ltt-sessiond/utils.c
lttng/Makefile.am

diff --git a/include/lttng-kernel-ctl.h b/include/lttng-kernel-ctl.h
new file mode 100644 (file)
index 0000000..b51273f
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * 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 */
index b3495e1967f787b72c80de629ff5fb95a56c237a..4172c0a2f6b33ae6810395f4b1ea833066f12e3f 100644 (file)
 #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 */
index e09bdc3bda26c7f7a8f09da34503e2dd71e99d13..2aa337fa66b9e1d61f250642c355b7099d05ea35 100644 (file)
@@ -21,6 +21,7 @@
 
 #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
index 0811d594d188a36d45a5afe2cb0ff3ccdc2642a1..3e5b055625b332772b502160a248b96ea7c01ccb 100644 (file)
 #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"
index 97a2c97110582900b8cda88d37518415f04a7bf2..cabdeedd931d52b4ecf22d77a2cde710e0645f05 100644 (file)
@@ -2,4 +2,4 @@ AM_CPPFLAGS = -I$(top_srcdir)/include
 
 noinst_LTLIBRARIES = libkernelctl.la
 
-libkernelctl_la_SOURCES = kernelctl.c kernelctl.h kernel-ioctl.h
+libkernelctl_la_SOURCES = kernelctl.c kernel-ioctl.h
index afb0e012b7f09f9c8c0516a8f1bdfa4a4c89838a..7936b27421bf07386aad5e845290a6ecdf78ab2e 100644 (file)
@@ -19,8 +19,9 @@
 
 #include <sys/ioctl.h>
 
+#include <lttng-kernel-ctl.h>
+
 #include "kernel-ioctl.h"
-#include "kernelctl.h"
 
 int kernctl_create_session(int fd)
 {
diff --git a/libkernelctl/kernelctl.h b/libkernelctl/kernelctl.h
deleted file mode 100644 (file)
index 783f125..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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 */
index 9a540f0a6d0772ff2c8fadfc61a377b0582b7640..b293ac0b0e2672c2a37b2371e2b5417088323f87 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #define _GNU_SOURCE
+#include <assert.h>
 #include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -26,7 +27,6 @@
 #include <sys/types.h>
 #include <sys/un.h>
 #include <unistd.h>
-#include <assert.h>
 
 #include <lttng-sessiond-comm.h>
 
index 42f3ad2ae9950729c3c53922c759d53173d59ee5..b83d5ca92c83b516ade2f4c05336be116839b3fc 100644 (file)
  */
 
 #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;
index edd00593065a0d5a7981c371b6e1a77a21b6b29c..e8c5741b34060d01a1309e186d0275d864cc0567 100644 (file)
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/libkernelctl
+AM_CPPFLAGS = -I$(top_srcdir)/include
 
 lib_LTLIBRARIES = liblttngkconsumerd.la
 
index 5c9f613b11eddf48e4450e0cfd304b00c54d27e6..78291d56bff917d138ad1a84240744a6a477efc8 100644 (file)
@@ -18,6 +18,7 @@
  */
 
 #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 {
        /*
index 9ba16549b782309b2f58452d7060db991749bff9..068c5554401bbf764a517ecdf0300fd1866fcd29 100644 (file)
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/libkernelctl
+AM_CPPFLAGS = -I$(top_srcdir)/include
 
 bin_PROGRAMS = ltt-kconsumerd
 
index 7eab42e522d0f45bcb126e101f90d4d543a604e4..d562c1729d10bd562e46f16e59b05b43de6c8249 100644 (file)
 #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];
index daa4265c1bda6e6ec7f210ec572980a25b0f7372..80c6b81e287a3135aea47cddab3029f392b866e3 100644 (file)
@@ -1,6 +1,5 @@
 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
 
index dc771227051d4ae5cc880ab2324325542d79fb3d..7ec75ffafd8c560a455562d276b5fc5374f04264 100644 (file)
@@ -1,19 +1,18 @@
 /*
  * 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.
index 28586521b50e739d95029d2a013779ed006e2c8f..c8cd627761f13cdc3a98a06fe714cd83325decd4 100644 (file)
@@ -1,32 +1,25 @@
 /*
  * 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,
index 5c452ca924988e77694e0fc26ba3a242a8381886..6247ce6bdd69ccd78162e1f422a490de1fb12030 100644 (file)
@@ -24,8 +24,9 @@
 #include <string.h>
 #include <unistd.h>
 
-#include "lttngerr.h"
-#include "kernelctl.h"
+#include <lttng-kernel-ctl.h>
+#include <lttngerr.h>
+
 #include "kernel-ctl.h"
 
 /*
index 70c194b226cc2c90dff6f5fee045b036178f2cf3..dd9f221de58b9d53c111f2729d50c9317af00e2d 100644 (file)
 #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 */
index 1ffe1d8e7ec05a47a2c0e1d372025eca764cc61a..9ca6a69ad2ce4aa902773546653851c69751a6db 100644 (file)
 #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"
 
 /*
index 0ae80adbc465e49ba270cfc5f7268ffec0eab9a6..8b123a79df08073a0c69146b1679a468d24c8c7a 100644 (file)
@@ -21,9 +21,9 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include <urcu/list.h>
 
-#include "lttngerr.h"
+#include <lttngerr.h>
+
 #include "trace.h"
 
 /*
index ac070908ae0cc15867d72067e2bcb92a216866f1..6fd36d61c83ce5e960e2ef26b1f49f03dbd5b15d 100644 (file)
@@ -23,8 +23,7 @@
 #include <urcu/list.h>
 
 #include <lttng/lttng.h>
-
-#include "lttng-kernel.h"
+#include <lttng-kernel.h>
 
 /* Kernel event list */
 struct ltt_kernel_event_list {
index cce8a5827a1adf301a65dd518db2603a724485ba..ad4212e7dec8e5df5d49f82ef4d8834f0eb4788e 100644 (file)
@@ -21,9 +21,9 @@
 #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. */
index 4a9e114932cacb0720918504b937d7f4ff4f1868..b43d1b044f66f93dd21019b8756049c8a92b3e80 100644 (file)
@@ -19,6 +19,8 @@
 #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;
index 6b22d9693c693e59bfd389d273b9d1aee5dc2974..91972e9a80030ab6d331b7f6d207f3532acd0b88 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * 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
index 8dc68e45b7e89c97a8aaeef9436b99d9b21e51c3..1105143f37111bad33ce3b074f6ddb7ea6998b83 100644 (file)
@@ -1,4 +1,5 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include -DINSTALL_BIN_PATH=\""$(bindir)"\"
+AM_CPPFLAGS = -I$(top_srcdir)/include \
+                         -DINSTALL_BIN_PATH=\""$(bindir)"\"
 
 bin_PROGRAMS = lttng
 
This page took 0.038425 seconds and 5 git commands to generate.