summaryrefslogtreecommitdiff
path: root/nptl/pthread_mutex_timedlock.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2012-05-25 13:35:08 -0700
committerRoland McGrath <roland@hack.frob.com>2012-05-25 13:41:03 -0700
commit5acf7263d52992ce4144e0a3b3644985b9e792b4 (patch)
treec128be190c1c3fb5a1987710033c016d5b881b70 /nptl/pthread_mutex_timedlock.c
parent8422c9a560e6e3c854739c8a13ecb1c6714f930f (diff)
Add systemtap static probe points in generic and x86_64 pthread code.
Diffstat (limited to 'nptl/pthread_mutex_timedlock.c')
-rw-r--r--nptl/pthread_mutex_timedlock.c14
1 files changed, 13 insertions, 1 deletions
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 <drepper@redhat.com>, 2002.
@@ -23,6 +23,8 @@
#include <lowlevellock.h>
#include <not-cancel.h>
+#include <stap-probe.h>
+
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: