new ltt-usertrace
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 9 Mar 2006 20:28:34 +0000 (20:28 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 9 Mar 2006 20:28:34 +0000 (20:28 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@1640 04897980-b3bd-0310-b5e0-8ef037075253

ltt-usertrace/ltt/ltt-generic.h [deleted file]
ltt-usertrace/ltt/ltt-usertrace.h [new file with mode: 0644]

diff --git a/ltt-usertrace/ltt/ltt-generic.h b/ltt-usertrace/ltt/ltt-generic.h
deleted file mode 100644 (file)
index 9d52ad7..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/*****************************************************************************
- * ltt-generic.h
- *
- * LTT generic userspace tracing header
- *
- * Mathieu Desnoyers, March 2006
- */
-
-#ifndef _LTT_GENERIC_H
-#define _LTT_GENERIC_H
-
-#include <errno.h>
-#include <syscall.h>
-#include <linux/unistd.h>
-#include <asm/atomic.h>
-#include <string.h>
-#include <sys/types.h>
-#include <stdint.h>
-
-#ifndef min
-#define min(a,b) ((a)<(b)?(a):(b))
-#endif
-
-//Put in asm-i486/unistd.h
-#define __NR_ltt_trace_generic 294
-#define __NR_ltt_register_generic      295
-
-#undef NR_syscalls
-#define NR_syscalls 296
-
-//FIXME : setup for ARM
-//FIXME : setup for MIPS
-
-#ifndef _LIBC
-// Put in bits/syscall.h
-#define SYS_ltt_trace_generic  __NR_ltt_trace_generic
-#define SYS_ltt_register_generic       __NR_ltt_register_generic
-#endif
-
-#define FACNAME_LEN 32
-
-/* LTT userspace tracing is non blocking by default when buffers are full */
-#ifndef LTT_BLOCKING
-#define LTT_BLOCKING 0
-#endif //LTT_BLOCKING
-                                                                                                                        
-typedef unsigned int ltt_facility_t;
-
-struct user_facility_info {
-  char name[FACNAME_LEN];
-  unsigned int num_events;
-  size_t alignment;
-  uint32_t checksum;
-  size_t int_size;
-  size_t long_size;
-  size_t pointer_size;
-  size_t size_t_size;
-};
-
-static inline __attribute__((no_instrument_function)) 
-_syscall5(int, ltt_trace_generic, unsigned int, facility_id,
-       unsigned int, event_id, void *, data, size_t, data_size, int, blocking)
-static inline __attribute__((no_instrument_function))
-_syscall2(int, ltt_register_generic, unsigned int *, facility_id,
-       const struct user_facility_info *, info)
-
-#ifndef LTT_PACK
-/* Calculate the offset needed to align the type */
-static inline unsigned int __attribute__((no_instrument_function))
-                                                                                                               ltt_align(size_t align_drift,
-                                      size_t size_of_type)
-{
-  size_t alignment = min(sizeof(void*), size_of_type);
-
-  return ((alignment - align_drift) & (alignment-1));
-}
-#define LTT_ALIGN
-#else
-static inline unsigned int __attribute__((no_instrument_function))
-                                                                                                               ltt_align(size_t align_drift,
-                                      size_t size_of_type)
-{
-  return 0;
-}
-#define LTT_ALIGN __attribute__((packed))
-#endif //LTT_PACK
-
-#endif //_LTT_GENERIC_H
-
-
diff --git a/ltt-usertrace/ltt/ltt-usertrace.h b/ltt-usertrace/ltt/ltt-usertrace.h
new file mode 100644 (file)
index 0000000..9d52ad7
--- /dev/null
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ * ltt-generic.h
+ *
+ * LTT generic userspace tracing header
+ *
+ * Mathieu Desnoyers, March 2006
+ */
+
+#ifndef _LTT_GENERIC_H
+#define _LTT_GENERIC_H
+
+#include <errno.h>
+#include <syscall.h>
+#include <linux/unistd.h>
+#include <asm/atomic.h>
+#include <string.h>
+#include <sys/types.h>
+#include <stdint.h>
+
+#ifndef min
+#define min(a,b) ((a)<(b)?(a):(b))
+#endif
+
+//Put in asm-i486/unistd.h
+#define __NR_ltt_trace_generic 294
+#define __NR_ltt_register_generic      295
+
+#undef NR_syscalls
+#define NR_syscalls 296
+
+//FIXME : setup for ARM
+//FIXME : setup for MIPS
+
+#ifndef _LIBC
+// Put in bits/syscall.h
+#define SYS_ltt_trace_generic  __NR_ltt_trace_generic
+#define SYS_ltt_register_generic       __NR_ltt_register_generic
+#endif
+
+#define FACNAME_LEN 32
+
+/* LTT userspace tracing is non blocking by default when buffers are full */
+#ifndef LTT_BLOCKING
+#define LTT_BLOCKING 0
+#endif //LTT_BLOCKING
+                                                                                                                        
+typedef unsigned int ltt_facility_t;
+
+struct user_facility_info {
+  char name[FACNAME_LEN];
+  unsigned int num_events;
+  size_t alignment;
+  uint32_t checksum;
+  size_t int_size;
+  size_t long_size;
+  size_t pointer_size;
+  size_t size_t_size;
+};
+
+static inline __attribute__((no_instrument_function)) 
+_syscall5(int, ltt_trace_generic, unsigned int, facility_id,
+       unsigned int, event_id, void *, data, size_t, data_size, int, blocking)
+static inline __attribute__((no_instrument_function))
+_syscall2(int, ltt_register_generic, unsigned int *, facility_id,
+       const struct user_facility_info *, info)
+
+#ifndef LTT_PACK
+/* Calculate the offset needed to align the type */
+static inline unsigned int __attribute__((no_instrument_function))
+                                                                                                               ltt_align(size_t align_drift,
+                                      size_t size_of_type)
+{
+  size_t alignment = min(sizeof(void*), size_of_type);
+
+  return ((alignment - align_drift) & (alignment-1));
+}
+#define LTT_ALIGN
+#else
+static inline unsigned int __attribute__((no_instrument_function))
+                                                                                                               ltt_align(size_t align_drift,
+                                      size_t size_of_type)
+{
+  return 0;
+}
+#define LTT_ALIGN __attribute__((packed))
+#endif //LTT_PACK
+
+#endif //_LTT_GENERIC_H
+
+
This page took 0.025335 seconds and 4 git commands to generate.