From 5acf7263d52992ce4144e0a3b3644985b9e792b4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 25 May 2012 13:35:08 -0700 Subject: Add systemtap static probe points in generic and x86_64 pthread code. --- nptl/pthread_mutex_timedlock.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'nptl/pthread_mutex_timedlock.c') diff --git a/nptl/pthread_mutex_timedlock.c b/nptl/pthread_mutex_timedlock.c index b7f34d4fd2..52fa74c0dc 100644 --- a/nptl/pthread_mutex_timedlock.c +++ b/nptl/pthread_mutex_timedlock.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2007, 2008 Free Software Foundation, Inc. +/* Copyright (C) 2002-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -23,6 +23,8 @@ #include #include +#include + int pthread_mutex_timedlock (mutex, abstime) @@ -33,6 +35,8 @@ pthread_mutex_timedlock (mutex, abstime) pid_t id = THREAD_GETMEM (THREAD_SELF, tid); int result = 0; + LIBC_PROBE (mutex_timedlock_entry, 2, mutex, abstime); + /* We must not check ABSTIME here. If the thread does not block abstime must not be checked for a valid value. */ @@ -171,6 +175,8 @@ pthread_mutex_timedlock (mutex, abstime) ++mutex->__data.__count; + LIBC_PROBE (mutex_timedlock_acquired, 1, mutex); + return 0; } } @@ -241,6 +247,8 @@ pthread_mutex_timedlock (mutex, abstime) ++mutex->__data.__count; + LIBC_PROBE (mutex_timedlock_acquired, 1, mutex); + return 0; } } @@ -376,6 +384,8 @@ pthread_mutex_timedlock (mutex, abstime) ++mutex->__data.__count; + LIBC_PROBE (mutex_timedlock_acquired, 1, mutex); + return 0; } } @@ -476,6 +486,8 @@ pthread_mutex_timedlock (mutex, abstime) /* Record the ownership. */ mutex->__data.__owner = id; ++mutex->__data.__nusers; + + LIBC_PROBE (mutex_timedlock_acquired, 1, mutex); } out: -- cgit v1.2.1