From 5ecaa1ab7687bb419275eec5a03066de645c4fae Mon Sep 17 00:00:00 2001 From: compudj Date: Fri, 7 Jul 2006 22:41:10 +0000 Subject: [PATCH] update syscalls git-svn-id: http://ltt.polymtl.ca/svn@1997 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt-usertrace/Makefile | 2 +- ltt-usertrace/ltt-usertrace-fast.c | 5 +++-- ltt-usertrace/ltt/ltt-usertrace.h | 6 +++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ltt-usertrace/Makefile b/ltt-usertrace/Makefile index 9b0b40e9..de07916e 100644 --- a/ltt-usertrace/Makefile +++ b/ltt-usertrace/Makefile @@ -4,7 +4,7 @@ INCLUDE_DIR=/usr/include LIB_DIR?=/usr/lib RANLIB=ranlib -LTT_CFLAGS=-I. -O2 -L. +LTT_CFLAGS=-I. -O2 -L. -fPIC # note : x86_64 needs -fPIC ? FIXME #For testing lib ltt-usertrace-fast diff --git a/ltt-usertrace/ltt-usertrace-fast.c b/ltt-usertrace/ltt-usertrace-fast.c index 2d22ce9b..17da6cd8 100644 --- a/ltt-usertrace/ltt-usertrace-fast.c +++ b/ltt-usertrace/ltt-usertrace-fast.c @@ -65,14 +65,15 @@ #include #include #include -#include +#include +#include // included with hack for powerpc in ltt-usertrace.h #include #include //for get_cycles() #include -_syscall0(pid_t,gettid); +#define gettid() syscall(__NR_gettid) #ifdef LTT_SHOW_DEBUG #define dbg_printf(...) printf(__VA_ARGS__) diff --git a/ltt-usertrace/ltt/ltt-usertrace.h b/ltt-usertrace/ltt/ltt-usertrace.h index e88b6450..4fed3b76 100644 --- a/ltt-usertrace/ltt/ltt-usertrace.h +++ b/ltt-usertrace/ltt/ltt-usertrace.h @@ -101,13 +101,17 @@ struct user_facility_info { size_t pointer_size; size_t size_t_size; }; - +#if 0 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) +#endif //0 + +#define ltt_register_generic(...) syscall(__NR_ltt_register_generic, __VA_ARGS__) +#define ltt_trace_generic(...) syscall(__NR_ltt_trace_generic, __VA_ARGS__) #ifndef LTT_PACK /* Calculate the offset needed to align the type */ -- 2.34.1