lttng/config.h \
lttng/share.h \
lttng/ust.h \
- lttng/core.h \
lttng/ringbuffer-config.h \
lttng/align.h \
lttng/bug.h
usterr.h \
ust_snprintf.h \
ust-comm.h \
- lttng/bitfield.h
+ lttng/bitfield.h \
+ helper.h
--- /dev/null
+#ifndef _LTTNG_UST_HELPER_H
+#define _LTTNG_UST_HELPER_H
+
+/*
+ * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; version 2.1 of
+ * the License.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <stdlib.h>
+
+static inline
+void *zmalloc(size_t len)
+{
+ return calloc(len, 1);
+}
+
+#define max_t(type, x, y) \
+ ({ \
+ type __max1 = (x); \
+ type __max2 = (y); \
+ __max1 > __max2 ? __max1: __max2; \
+ })
+
+#define min_t(type, x, y) \
+ ({ \
+ type __min1 = (x); \
+ type __min2 = (y); \
+ __min1 <= __min2 ? __min1: __min2; \
+ })
+
+#endif /* _LTTNG_UST_HELPER_H */
+++ /dev/null
-#ifndef UST_CORE_H
-#define UST_CORE_H
-
-/*
- * Copyright (C) 2010 Pierre-Marc Fournier
- * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; version 2.1 of
- * the License.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <sys/types.h>
-#include <lttng/config.h>
-#include <urcu/arch.h>
-#include <urcu/compiler.h>
-
-/* Min / Max */
-
-#define min_t(type, x, y) ({ \
- type __min1 = (x); \
- type __min2 = (y); \
- __min1 < __min2 ? __min1: __min2; })
-
-#define max_t(type, x, y) ({ \
- type __max1 = (x); \
- type __max2 = (y); \
- __max1 > __max2 ? __max1: __max2; })
-
-
-/* MALLOCATION */
-
-#include <stdlib.h>
-
-static inline
-void *zmalloc(size_t len)
-{
- return calloc(1, len);
-}
-
-/* MATH */
-
-static inline unsigned int hweight32(unsigned int w)
-{
- unsigned int res = w - ((w >> 1) & 0x55555555);
- res = (res & 0x33333333) + ((res >> 2) & 0x33333333);
- res = (res + (res >> 4)) & 0x0F0F0F0F;
- res = res + (res >> 8);
- return (res + (res >> 16)) & 0x000000FF;
-}
-
-#endif /* UST_CORE_H */
#include <stdarg.h>
#include <stdio.h>
-#include <lttng/core.h>
#include <lttng/share.h>
enum ust_loglevel {
#include <stdarg.h>
#include <stdio.h>
-#include <lttng/core.h>
#include "lttng/share.h"
enum ust_loglevel {
#include <sys/time.h>
#include <stdint.h>
#include <stddef.h>
-#include <lttng/core.h>
/* TRACE CLOCK */
#include <lttng/ust-events.h>
#include <lttng/ust-tracer.h>
-#include <lttng/core.h>
+#include <helper.h>
#include <string.h>
#include <assert.h>
#include <sys/ipc.h>
#include <lttng/ust-events.h>
#include <lttng/usterr-signal-safe.h>
-#include "lttng/core.h"
#include "ltt-tracer.h"
#include "ltt-tracer-core.h"
#include "wait.h"
#include <stddef.h>
#include <urcu/arch.h>
#include "jhash.h"
+#include <helper.h>
/*
* The sessions mutex is the centralized mutex across UST tracing
#include <string.h>
#include <errno.h>
#include <urcu/list.h>
-#include <lttng/core.h>
#include <lttng/ust-events.h>
#include <assert.h>
#include <stdint.h>
#include <stddef.h>
#include <urcu/arch.h>
-#include <lttng/core.h>
#include <lttng/ust-tracer.h>
#include <urcu/list.h>
#include <lttng/usterr-signal-safe.h>
#include <stdarg.h>
#include <stdint.h>
-#include <lttng/core.h>
#include <lttng/ust-events.h>
#include "ltt-tracer-core.h"
#include "compat.h"
#include <urcu/list.h>
#include <lttng/ust-events.h>
#include <lttng/usterr-signal-safe.h>
-#include "lttng/core.h"
#include <lttng/ust-version.h>
#include "ltt-tracer.h"
#include "tracepoint-internal.h"
+#include <helper.h>
struct ltt_tracepoint_list {
struct tracepoint_iter iter;
#include <urcu/hlist.h>
#include <urcu/uatomic.h>
#include <urcu/compiler.h>
+#include <helper.h>
#include <lttng/usterr-signal-safe.h>
#include "tracepoint-internal.h"
#include <unistd.h>
-#include "lttng/core.h"
-
/* Internal helpers */
#include "backend_internal.h"
#include "frontend_internal.h"
return order;
}
+static inline
+unsigned int hweight32(unsigned int value)
+{
+ unsigned int r;
+
+ r = value;
+ r = r - ((r >> 1) & 0x55555555);
+ r = (r & 0x33333333) + ((r >> 2) & 0x33333333);
+ r += r >> 4;
+ r &= 0x0F0F0F0F;
+ r += r >> 8;
+ r += r >> 16;
+ r &= 0x000000FF;
+ return r;
+}
+
#endif /* _LINUX_RING_BUFFER_BACKEND_INTERNAL_H */
*/
#include "frontend.h"
-#include "lttng/core.h"
#include <urcu-bp.h>
#include <urcu/compiler.h>
#include <urcu/list.h>
#include <urcu/uatomic.h>
-#include "lttng/core.h"
-
#include <lttng/usterr-signal-safe.h>
#include <lttng/ringbuffer-config.h>
#include "backend_types.h"
#include <urcu/arch.h>
-#include "lttng/core.h"
-
#include <lttng/ringbuffer-config.h>
#include "vatomic.h"
#include "backend.h"
#include <fcntl.h>
#include <urcu/compiler.h>
#include <urcu/ref.h>
+#include <helper.h>
#include "smp.h"
#include <lttng/ringbuffer-config.h>
#include <signal.h>
#include <dirent.h>
#include <lttng/align.h>
+#include <helper.h>
struct shm_object_table *shm_object_table_create(size_t max_nb_obj)
{
#include <stdint.h>
#include <lttng/usterr-signal-safe.h>
-#include "lttng/core.h"
+#include <urcu/compiler.h>
#include "shm_types.h"
/*
*/
#include <unistd.h>
-#include "lttng/core.h"
#include "usterr.h"
#include <pthread.h>
#include "smp.h"
* Dual LGPL v2.1/GPL v2 license.
*/
-#include <lttng/core.h>
#include "getcpu.h"
/*