usertrace update for powerpc
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 17 May 2006 19:09:45 +0000 (19:09 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 17 May 2006 19:09:45 +0000 (19:09 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@1823 04897980-b3bd-0310-b5e0-8ef037075253

ltt-usertrace/ltt-usertrace-fast.c
ltt-usertrace/ltt/ltt-facility-user_generic.h
ltt-usertrace/ltt/ltt-usertrace-fast.h
ltt-usertrace/ltt/ltt-usertrace.h

index 32dc7bbc011581afd471aa5a3149cddb8724bdba..ba0a2ae9450cbd7e195f283137a645db4f403d44 100644 (file)
@@ -66,7 +66,7 @@
 #include <sys/time.h>
 #include <errno.h>
 
-#include <asm/atomic.h>
+// included with hack for powerpc in ltt-usertrace.h #include <asm/atomic.h>
 #include <asm/timex.h> //for get_cycles()
 
 _syscall0(pid_t,gettid)
index 72bac219c0bb4da9bf8eef2593866ea377948587..925db27e5698df6462f444551eb569dbd421009c 100644 (file)
@@ -483,7 +483,7 @@ static inline int trace_user_generic_slow_printf_param_buffer(
 #else
 {
        int ret = 0;
-       reserve_size = ltt_align(reserve_size, sizeof(void *));
+       reserve_size += ltt_align(reserve_size, sizeof(void *));
        {
                ret = ltt_trace_generic(ltt_facility_user_generic_F583779E, event_user_generic_slow_printf, buffer, reserve_size, LTT_BLOCKING);
        }
index 778e8eb0a6d9e93c71e2865f79287d79774d2b8a..d3fac6dad587a34ca736afeda5a3db78b78a2113 100644 (file)
@@ -12,7 +12,6 @@
 #ifdef LTT_TRACE_FAST
 
 #include <errno.h>
-#include <asm/atomic.h>
 #include <pthread.h>
 #include <stdint.h>
 #include <syscall.h>
index 7506763e258eae8315db5af18b6c5a3a538a5217..7770f9580cd93a1a61c382b5b86074a131edcc32 100644 (file)
 #include <errno.h>
 #include <syscall.h>
 #include <linux/unistd.h>
-#include <asm/atomic.h>
 #include <string.h>
 #include <sys/types.h>
 #include <stdint.h>
+#ifdef powerpc
+#define __KERNEL__     /* Ugly hack : atomic.h is broken */
+#endif
+#include <asm/atomic.h>
+#include "ltt/ltt-usertrace-ppc.h"
+#ifdef powerpc
+#undef __KERNEL__      /* Ugly hack : atomic.h is broken */
+#endif
 
 #ifndef min
 #define min(a,b) ((a)<(b)?(a):(b))
 #endif
 
-//Put in asm-i486/unistd.h
+#ifdef i386
 #define __NR_ltt_trace_generic 311
 #define __NR_ltt_register_generic      312
-
 #undef NR_syscalls
 #define NR_syscalls 313
+#endif
+
+#ifdef powerpc
+#define __NR_ltt_trace_generic 283
+#define __NR_ltt_register_generic      284
+#undef NR_syscalls
+#define NR_syscalls 285
+#endif
 
 //FIXME : setup for ARM
 //FIXME : setup for MIPS
This page took 0.025775 seconds and 4 git commands to generate.