X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust-libc-wrapper%2Flttng-ust-pthread.c;h=c6b8ae09955119ef6ac9ad4eeacc6ca7cbaff4e0;hb=171fcc6fd03e3f5787b3d0ee8aedc8cb9bcc6f17;hp=97e3eb88a4ba37328b9fd1c63b25c9cd3f56d28e;hpb=6d4658aa879ddabdd79fc6c637ee039413ad215b;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 97e3eb88..c6b8ae09 100644 --- a/liblttng-ust-libc-wrapper/lttng-ust-pthread.c +++ b/liblttng-ust-libc-wrapper/lttng-ust-pthread.c @@ -18,10 +18,12 @@ #define _GNU_SOURCE #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 +48,11 @@ int pthread_mutex_lock(pthread_mutex_t *mutex) } thread_in_trace = 1; - tracepoint(lttng_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(lttng_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 +78,8 @@ int pthread_mutex_trylock(pthread_mutex_t *mutex) thread_in_trace = 1; retval = mutex_trylock(mutex); - tracepoint(lttng_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 +105,8 @@ int pthread_mutex_unlock(pthread_mutex_t *mutex) thread_in_trace = 1; retval = mutex_unlock(mutex); - tracepoint(lttng_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; }