mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-28 04:03:35 +08:00
i386 port of the pthread SystemTap probes
This commit is contained in:
parent
5acf7263d5
commit
1755728208
@ -1,3 +1,16 @@
|
||||
2012-05-25 Rayson Ho <rho@redhat.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
|
||||
probes for i386.
|
||||
* sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
|
||||
* sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
|
||||
* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
|
||||
* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
|
||||
* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
|
||||
* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
|
||||
* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
|
||||
* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
|
||||
|
||||
2012-05-25 Rayson Ho <rho@redhat.com>
|
||||
Roland McGrath <roland@hack.frob.com>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2002-2004,2006,2007,2009,2010 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.
|
||||
|
||||
@ -21,6 +21,8 @@
|
||||
#include <kernel-features.h>
|
||||
#include <lowlevellock.h>
|
||||
|
||||
#include <stap-probe.h>
|
||||
|
||||
.text
|
||||
|
||||
#ifdef __ASSUME_PRIVATE_FUTEX
|
||||
@ -90,7 +92,8 @@ __lll_lock_wait_private:
|
||||
cmpl %edx, %eax /* NB: %edx == 2 */
|
||||
jne 2f
|
||||
|
||||
1: movl $SYS_futex, %eax
|
||||
1: LIBC_PROBE (lll_lock_wait_private, 1, %ebx)
|
||||
movl $SYS_futex, %eax
|
||||
ENTER_KERNEL
|
||||
|
||||
2: movl %edx, %eax
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2002,2003,2004,2006,2007,2009 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,7 @@
|
||||
#include <kernel-features.h>
|
||||
#include <pthread-pi-defines.h>
|
||||
#include <pthread-errnos.h>
|
||||
#include <stap-probe.h>
|
||||
|
||||
.text
|
||||
|
||||
@ -48,6 +49,8 @@ __pthread_cond_broadcast:
|
||||
|
||||
movl 20(%esp), %ebx
|
||||
|
||||
LIBC_PROBE (cond_broadcast, 1, %edx)
|
||||
|
||||
/* Get internal lock. */
|
||||
movl $1, %edx
|
||||
xorl %eax, %eax
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2002-2005,2007,2009,2010 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,7 +23,7 @@
|
||||
#include <kernel-features.h>
|
||||
#include <pthread-pi-defines.h>
|
||||
#include <pthread-errnos.h>
|
||||
|
||||
#include <stap-probe.h>
|
||||
|
||||
.text
|
||||
|
||||
@ -44,6 +44,8 @@ __pthread_cond_signal:
|
||||
|
||||
movl 12(%esp), %edi
|
||||
|
||||
LIBC_PROBE (cond_signal, 1, %edi)
|
||||
|
||||
/* Get internal lock. */
|
||||
movl $1, %edx
|
||||
xorl %eax, %eax
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2002-2004,2006-2007,2009,2010 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,7 +23,7 @@
|
||||
#include <pthread-errnos.h>
|
||||
#include <pthread-pi-defines.h>
|
||||
#include <kernel-features.h>
|
||||
|
||||
#include <stap-probe.h>
|
||||
|
||||
.text
|
||||
|
||||
@ -60,6 +60,8 @@ __pthread_cond_timedwait:
|
||||
movl 20(%esp), %ebx
|
||||
movl 28(%esp), %ebp
|
||||
|
||||
LIBC_PROBE (cond_timedwait, 3, %ebx, 24(%esp), %ebp)
|
||||
|
||||
cmpl $1000000000, 4(%ebp)
|
||||
movl $EINVAL, %eax
|
||||
jae 18f
|
||||
|
@ -1,5 +1,4 @@
|
||||
/* Copyright (C) 2002-2004,2006-2007,2009,2010,2012
|
||||
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.
|
||||
|
||||
@ -25,6 +24,7 @@
|
||||
#include <pthread-errnos.h>
|
||||
#include <pthread-pi-defines.h>
|
||||
#include <kernel-features.h>
|
||||
#include <stap-probe.h>
|
||||
|
||||
|
||||
.text
|
||||
@ -61,6 +61,8 @@ __pthread_cond_wait:
|
||||
xorl %esi, %esi
|
||||
movl 20(%esp), %ebx
|
||||
|
||||
LIBC_PROBE (cond_wait, 2, 24(%esp), %ebx)
|
||||
|
||||
/* Get internal lock. */
|
||||
movl $1, %edx
|
||||
xorl %eax, %eax
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2002, 2003, 2007 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.
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
#include <pthread-errnos.h>
|
||||
#include <kernel-features.h>
|
||||
|
||||
#include <stap-probe.h>
|
||||
|
||||
.text
|
||||
|
||||
@ -40,6 +41,8 @@ __pthread_rwlock_rdlock:
|
||||
xorl %esi, %esi
|
||||
movl 12(%esp), %ebx
|
||||
|
||||
LIBC_PROBE (rdlock_entry, 1, %ebx)
|
||||
|
||||
/* Get the lock. */
|
||||
movl $1, %edx
|
||||
xorl %eax, %eax
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2002, 2003, 2007 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.
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
#include <pthread-errnos.h>
|
||||
#include <kernel-features.h>
|
||||
|
||||
#include <stap-probe.h>
|
||||
|
||||
.text
|
||||
|
||||
@ -40,6 +41,8 @@ __pthread_rwlock_wrlock:
|
||||
xorl %esi, %esi
|
||||
movl 12(%esp), %ebx
|
||||
|
||||
LIBC_PROBE (wrlock_entry, 1, %ebx)
|
||||
|
||||
/* Get the lock. */
|
||||
movl $1, %edx
|
||||
xorl %eax, %eax
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2002-2004, 2006-2008, 2009 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.
|
||||
|
||||
@ -19,6 +19,8 @@
|
||||
#ifndef _LOWLEVELLOCK_H
|
||||
#define _LOWLEVELLOCK_H 1
|
||||
|
||||
#include <stap-probe.h>
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
# include <time.h>
|
||||
# include <sys/param.h>
|
||||
@ -225,6 +227,7 @@ LLL_STUB_UNWIND_INFO_END
|
||||
do { \
|
||||
int __ignore; \
|
||||
register __typeof (nr) _nr asm ("edx") = (nr); \
|
||||
LIBC_PROBE (lll_futex_wake, 3, futex, nr, private); \
|
||||
__asm __volatile (LLL_EBX_LOAD \
|
||||
LLL_ENTER_KERNEL \
|
||||
LLL_EBX_LOAD \
|
||||
|
Loading…
Reference in New Issue
Block a user