--- /dev/null
+
+/* LTTng user-space "fast" tracing code
+ *
+ * Copyright 2006 Mathieu Desnoyers
+ *
+ */
+
+
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <signal.h>
+#include <syscall.h>
+#include <features.h>
+#include <pthread.h>
+#include <malloc.h>
+#include <string.h>
+
+#include "ltt_usertrace.h"
+
+/* TLS for the trace buffer
+ * http://www.dis.com/gnu/gcc/C--98-Thread-Local-Edits.html
+ *
+ * Add after paragraph 4
+ *
+ * The storage for an object of thread storage duration shall be statically
+ * initialized before the first statement of the thread startup function. An
+ * object of thread storage duration shall not require dynamic
+ * initialization.
+ */
+
+__thread struct lttng_trace_info lttng_trace_info =
+{
+ .init = 0,
+ .filter = 0,
+ .nesting = ATOMIC_INIT(0),
+ .channel.facilities =
+ { ATOMIC_INIT(0),
+ ATOMIC_INIT(0),
+ ATOMIC_INIT(0),
+ ATOMIC_INIT(0)
+ },
+ .channel.cpu =
+ { ATOMIC_INIT(0),
+ ATOMIC_INIT(0),
+ ATOMIC_INIT(0),
+ ATOMIC_INIT(0)
+ },
+};
+
+
+static void ltt_cleanup_thread(void *arg)
+{
+ /* Flush the data in the lttng_trace_info */
+
+}
+
+
+void ltt_thread_init(void)
+{
+ _pthread_cleanup_push(<tng_trace_info.cleanup,
+ ltt_cleanup_thread, NULL);
+}
+
+
+void __attribute__((constructor)) __ltt_usertrace_fast_init(void)
+{
+ int err;
+
+ printf("LTTng usertrace-fast init\n");
+
+
+
+}
+
--- /dev/null
+
+/* LTTng user-space "fast" tracing header
+ *
+ * Copyright 2006 Mathieu Desnoyers
+ *
+ */
+
+#ifndef _LTT_USERTRACE_FAST_H
+#define _LTT_USERTRACE_FAST_H
+
+#include <errno.h>
+#include <asm/atomic.h>
+
+#ifndef LTT_BUF_SIZE_CPU
+#define LTT_BUF_SIZE_CPU 1048576
+#endif //LTT_BUF_SIZE_CPU
+
+#ifndef LTT_BUF_SIZE_FACILITIES
+#define LTT_BUF_SIZE_FACILITIES 4096
+#endif //LTT_BUF_SIZE_FACILITIES
+
+struct ltt_buf {
+ atomic_t offset;
+ atomic_t reserve_count;
+ atomic_t commit_count;
+
+ atomic_t events_lost;
+};
+
+struct lttng_trace_info {
+ struct _pthread_cleanup_buffer cleanup;
+ int filter;
+ atomic_t nesting;
+ struct {
+ struct ltt_buf facilities;
+ char facilities_buf[LTT_BUF_SIZE_FACILITIES] __attribute__ ((aligned (8)));
+ struct ltt_buf cpu;
+ char cpu_buf[LTT_BUF_SIZE_CPU] __attribute__ ((aligned (8)));
+ } channel;
+};
+
+extern __thread struct lttng_trace_info lttng_trace_info;
+
+void ltt_thread_init(void);
+
+#endif //_LTT_USERTRACE_FAST_H
+++ /dev/null
-
-/* LTTng user-space tracing code
- *
- * Copyright 2006 Mathieu Desnoyers
- *
- */
-
-
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <signal.h>
-#include <syscall.h>
-#include <features.h>
-#include <pthread.h>
-#include <malloc.h>
-#include <string.h>
-
-#include "lttng_usertrace.h"
-
-/* TLS for the trace buffer
- * http://www.dis.com/gnu/gcc/C--98-Thread-Local-Edits.html
- *
- * Add after paragraph 4
- *
- * The storage for an object of thread storage duration shall be statically
- * initialized before the first statement of the thread startup function. An
- * object of thread storage duration shall not require dynamic
- * initialization.
- */
-
-__thread struct lttng_trace_info lttng_trace_info =
-{
- .init = 0,
- .filter = 0,
- .nesting = ATOMIC_INIT(0),
- .channel.facilities =
- { ATOMIC_INIT(0),
- ATOMIC_INIT(0),
- ATOMIC_INIT(0),
- ATOMIC_INIT(0)
- },
- .channel.cpu =
- { ATOMIC_INIT(0),
- ATOMIC_INIT(0),
- ATOMIC_INIT(0),
- ATOMIC_INIT(0)
- },
-};
-
-
-static void ltt_cleanup_thread(void *arg)
-{
- /* Flush the data in the lttng_trace_info */
-
-}
-
-
-void ltt_thread_init(void)
-{
- _pthread_cleanup_push(<tng_trace_info.cleanup,
- ltt_cleanup_thread, NULL);
-}
-
-
-void __attribute__((constructor)) __lttng_user_init(void)
-{
- int err;
-
- printf("LTTng usertrace-fast init\n");
-
-
-
-}
-
+++ /dev/null
-
-/* LTTng user-space tracing header
- *
- * Copyright 2006 Mathieu Desnoyers
- *
- */
-
-#ifndef _LTTNG_USERTRACE_H
-#define _LTTNG_USERTRACE_H
-
-#include <errno.h>
-#include <asm/atomic.h>
-
-#ifndef LTT_BUF_SIZE_CPU
-#define LTT_BUF_SIZE_CPU 1048576
-#endif //LTT_BUF_SIZE_CPU
-
-#ifndef LTT_BUF_SIZE_FACILITIES
-#define LTT_BUF_SIZE_FACILITIES 4096
-#endif //LTT_BUF_SIZE_FACILITIES
-
-struct ltt_buf {
- atomic_t offset;
- atomic_t reserve_count;
- atomic_t commit_count;
-
- atomic_t events_lost;
-};
-
-struct lttng_trace_info {
- struct _pthread_cleanup_buffer cleanup;
- int filter;
- atomic_t nesting;
- struct {
- struct ltt_buf facilities;
- char facilities_buf[LTT_BUF_SIZE_FACILITIES] __attribute__ ((aligned (8)));
- struct ltt_buf cpu;
- char cpu_buf[LTT_BUF_SIZE_CPU] __attribute__ ((aligned (8)));
- } channel;
-};
-
-extern __thread struct lttng_trace_info lttng_trace_info;
-
-void ltt_thread_init(void);
-
-#endif //_LTTNG_USERTRACE_H