X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust-libc-wrapper%2Flttng-ust-pthread.c;h=7836ffa02175d7599e4472403964b1b1069f4c33;hb=09434f96935202d1e6cf64a74d4da4b95d06246d;hp=e72b9b40eb357405e601a0b0b69e55c0e5bcbb53;hpb=600f634aea56e0c003759be5f5e2eb5ac450b742;p=lttng-ust.git diff --git a/liblttng-ust-libc-wrapper/lttng-ust-pthread.c b/liblttng-ust-libc-wrapper/lttng-ust-pthread.c index e72b9b40..7836ffa0 100644 --- a/liblttng-ust-libc-wrapper/lttng-ust-pthread.c +++ b/liblttng-ust-libc-wrapper/lttng-ust-pthread.c @@ -17,11 +17,18 @@ */ #define _GNU_SOURCE -#include +/* + * Do _not_ define _LGPL_SOURCE because we don't want to create a + * circular dependency loop between this malloc wrapper, liburcu and + * libc. + */ +#include +#include #include #define TRACEPOINT_DEFINE #define TRACEPOINT_CREATE_PROBES +#define TP_IP_PARAM ip #include "ust_pthread.h" static __thread int thread_in_trace; @@ -46,9 +53,11 @@ int pthread_mutex_lock(pthread_mutex_t *mutex) } thread_in_trace = 1; - tracepoint(ust_pthread, pthread_mutex_lock_req, mutex); + tracepoint(lttng_ust_pthread, pthread_mutex_lock_req, mutex, + LTTNG_UST_CALLER_IP()); retval = mutex_lock(mutex); - tracepoint(ust_pthread, pthread_mutex_lock_acq, mutex, retval); + tracepoint(lttng_ust_pthread, pthread_mutex_lock_acq, mutex, + retval, LTTNG_UST_CALLER_IP()); thread_in_trace = 0; return retval; } @@ -74,7 +83,8 @@ int pthread_mutex_trylock(pthread_mutex_t *mutex) thread_in_trace = 1; retval = mutex_trylock(mutex); - tracepoint(ust_pthread, pthread_mutex_trylock, mutex, retval); + tracepoint(lttng_ust_pthread, pthread_mutex_trylock, mutex, + retval, LTTNG_UST_CALLER_IP()); thread_in_trace = 0; return retval; } @@ -100,7 +110,8 @@ int pthread_mutex_unlock(pthread_mutex_t *mutex) thread_in_trace = 1; retval = mutex_unlock(mutex); - tracepoint(ust_pthread, pthread_mutex_unlock, mutex, retval); + tracepoint(lttng_ust_pthread, pthread_mutex_unlock, mutex, + retval, LTTNG_UST_CALLER_IP()); thread_in_trace = 0; return retval; }