From d86395c3cc6f958bcb2aca5063e83e2fe4194f6a Mon Sep 17 00:00:00 2001 From: compudj Date: Wed, 17 May 2006 19:09:45 +0000 Subject: [PATCH] usertrace update for powerpc git-svn-id: http://ltt.polymtl.ca/svn@1823 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt-usertrace/ltt-usertrace-fast.c | 2 +- ltt-usertrace/ltt/ltt-facility-user_generic.h | 2 +- ltt-usertrace/ltt/ltt-usertrace-fast.h | 1 - ltt-usertrace/ltt/ltt-usertrace.h | 20 ++++++++++++++++--- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/ltt-usertrace/ltt-usertrace-fast.c b/ltt-usertrace/ltt-usertrace-fast.c index 32dc7bbc..ba0a2ae9 100644 --- a/ltt-usertrace/ltt-usertrace-fast.c +++ b/ltt-usertrace/ltt-usertrace-fast.c @@ -66,7 +66,7 @@ #include #include -#include +// included with hack for powerpc in ltt-usertrace.h #include #include //for get_cycles() _syscall0(pid_t,gettid) diff --git a/ltt-usertrace/ltt/ltt-facility-user_generic.h b/ltt-usertrace/ltt/ltt-facility-user_generic.h index 72bac219..925db27e 100644 --- a/ltt-usertrace/ltt/ltt-facility-user_generic.h +++ b/ltt-usertrace/ltt/ltt-facility-user_generic.h @@ -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); } diff --git a/ltt-usertrace/ltt/ltt-usertrace-fast.h b/ltt-usertrace/ltt/ltt-usertrace-fast.h index 778e8eb0..d3fac6da 100644 --- a/ltt-usertrace/ltt/ltt-usertrace-fast.h +++ b/ltt-usertrace/ltt/ltt-usertrace-fast.h @@ -12,7 +12,6 @@ #ifdef LTT_TRACE_FAST #include -#include #include #include #include diff --git a/ltt-usertrace/ltt/ltt-usertrace.h b/ltt-usertrace/ltt/ltt-usertrace.h index 7506763e..7770f958 100644 --- a/ltt-usertrace/ltt/ltt-usertrace.h +++ b/ltt-usertrace/ltt/ltt-usertrace.h @@ -12,21 +12,35 @@ #include #include #include -#include #include #include #include +#ifdef powerpc +#define __KERNEL__ /* Ugly hack : atomic.h is broken */ +#endif +#include +#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 -- 2.34.1