[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commits] r18703 - in /fsf/trunk/libc: ./ elf/ include/ malloc/ math/ nptl/ nptl/sysdeps/unix/sysv/linux/i386/ nptl/sysdeps/unix/sysv/...



Author: eglibc
Date: Sat May 26 00:01:38 2012
New Revision: 18703

Log:
Import glibc-mainline for 2012-05-26

Added:
    fsf/trunk/libc/include/stap-probe.h
    fsf/trunk/libc/nptl/DESIGN-systemtap-probes.txt
    fsf/trunk/libc/stdio-common/bug25.c
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/NEWS
    fsf/trunk/libc/config.h.in
    fsf/trunk/libc/configure
    fsf/trunk/libc/configure.in
    fsf/trunk/libc/elf/Makefile
    fsf/trunk/libc/elf/rtld-Rules
    fsf/trunk/libc/extra-lib.mk
    fsf/trunk/libc/malloc/malloc.c
    fsf/trunk/libc/math/libm-test.inc
    fsf/trunk/libc/nptl/ChangeLog
    fsf/trunk/libc/nptl/pthread_cond_broadcast.c
    fsf/trunk/libc/nptl/pthread_cond_destroy.c
    fsf/trunk/libc/nptl/pthread_cond_init.c
    fsf/trunk/libc/nptl/pthread_cond_signal.c
    fsf/trunk/libc/nptl/pthread_cond_wait.c
    fsf/trunk/libc/nptl/pthread_create.c
    fsf/trunk/libc/nptl/pthread_join.c
    fsf/trunk/libc/nptl/pthread_mutex_destroy.c
    fsf/trunk/libc/nptl/pthread_mutex_init.c
    fsf/trunk/libc/nptl/pthread_mutex_lock.c
    fsf/trunk/libc/nptl/pthread_mutex_timedlock.c
    fsf/trunk/libc/nptl/pthread_mutex_unlock.c
    fsf/trunk/libc/nptl/pthread_rwlock_destroy.c
    fsf/trunk/libc/nptl/pthread_rwlock_rdlock.c
    fsf/trunk/libc/nptl/pthread_rwlock_unlock.c
    fsf/trunk/libc/nptl/pthread_rwlock_wrlock.c
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S
    fsf/trunk/libc/stdio-common/Makefile
    fsf/trunk/libc/sysdeps/i386/__longjmp.S
    fsf/trunk/libc/sysdeps/i386/bsd-_setjmp.S
    fsf/trunk/libc/sysdeps/i386/bsd-setjmp.S
    fsf/trunk/libc/sysdeps/i386/setjmp.S
    fsf/trunk/libc/sysdeps/ieee754/flt-32/e_acosf.c
    fsf/trunk/libc/sysdeps/powerpc/powerpc32/dl-irel.h
    fsf/trunk/libc/sysdeps/powerpc/powerpc32/dl-machine.h
    fsf/trunk/libc/sysdeps/powerpc/powerpc64/dl-irel.h
    fsf/trunk/libc/sysdeps/powerpc/powerpc64/dl-machine.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/configure
    fsf/trunk/libc/sysdeps/unix/sysv/linux/configure.in
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/chown.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/fchown.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/fchownat.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/getegid.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/geteuid.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/getgid.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/getgroups.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/getresgid.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/getresuid.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/getrlimit.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/getuid.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/lchown.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/msgctl.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/semctl.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/setegid.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/seteuid.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/setfsgid.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/setfsuid.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/setgid.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/setgroups.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/setregid.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/setresgid.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/setresuid.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/setreuid.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/setrlimit.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/setuid.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/shmctl.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/local-setxid.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/opendir.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/opensock.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/chown.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/lchown.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/setegid.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/seteuid.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/sh/chown.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/semctl.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
    fsf/trunk/libc/sysdeps/x86_64/__longjmp.S
    fsf/trunk/libc/sysdeps/x86_64/setjmp.S

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sat May 26 00:01:38 2012
@@ -1,3 +1,230 @@
+2012-05-25  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/kernel-features.h
+	(__ASSUME_NEW_GETRLIMIT_SYSCALL): Remove all definitions.
+	* sysdeps/unix/sysv/linux/i386/getrlimit.c: Do not include
+	kernel-features.h.
+	[!__ASSUME_NEW_GETRLIMIT_SYSCALL]: Remove conditional code.
+	[__ASSUME_NEW_GETRLIMIT_SYSCALL]: Make code unconditional.
+	* sysdeps/unix/sysv/linux/i386/setrlimit.c Do not include
+	kernel-features.h.
+	[!__ASSUME_NEW_GETRLIMIT_SYSCALL]: Remove conditional code.
+	[__ASSUME_NEW_GETRLIMIT_SYSCALL]: Make code unconditional.
+
+2012-05-25  H.J. Lu  <hongjiu.lu@xxxxxxxxx>
+
+	* configure.in: Define the default includes to being none.
+	* configure: Regenerated.
+
+2012-05-25  Roland McGrath  <roland@xxxxxxxxxxxxx>
+
+	* sysdeps/x86_64/__longjmp.S: Add a static probe here.
+	* sysdeps/x86_64/setjmp.S: Likewise.
+	* sysdeps/i386/bsd-setjmp.S: Likewise.
+	* sysdeps/i386/bsd-_setjmp.S: Likewise.
+	* sysdeps/i386/setjmp.S: Likewise.
+	* sysdeps/i386/__longjmp.S: Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S: Likewise.
+	* sysdeps/unix/sysv/linux/i386/____longjmp_chk.S: Likewise.
+
+	* include/stap-probe.h: New file.
+	* configure.in: Handle --enable-systemtap.
+	* configure: Regenerated.
+	* config.h.in (USE_STAP_PROBE): New #undef.
+	* extra-lib.mk (CPPFLAGS-$(lib)): Add -DIN_LIB=$(lib).
+	* elf/Makefile (CPPFLAGS-.os): Add -DIN_LIB=rtld.
+	* elf/rtld-Rules (rtld-CPPFLAGS): Likewise.
+
+2012-05-25  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	[BZ #13717]
+	* sysdeps/unix/sysv/linux/configure.in (arch_minimum_kernel): Set
+	to 2.4.0 where earlier.
+	* sysdeps/unix/sysv/linux/configure: Regenerated.
+	* sysdeps/unix/sysv/linux/i386/chown.c: Do not include
+	<kernel-features.h>.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/i386/fchown.c: Do not include
+	<kernel-features.h>.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/i386/fchownat.c (fchownat)
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	(fchownat) [!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/i386/getegid.c: Do not include
+	<kernel-features.h>.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/i386/geteuid.c: Do not include
+	<kernel-features.h>.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/i386/getgid.c: Do not include
+	<kernel-features.h>.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/i386/getgroups.c: Do not include
+	<kernel-features.h>.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/i386/getresgid.c: Do not include
+	<kernel-features.h>.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/i386/getresuid.c: Do not include
+	<kernel-features.h>.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/i386/getuid.c: Do not include
+	<kernel-features.h>.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/i386/lchown.c: Do not include
+	<kernel-features.h>.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/i386/msgctl.c: Do not include
+	<kernel-features.h>.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/i386/semctl.c: Do not include
+	<kernel-features.h>.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/i386/setegid.c: Do not include
+	<kernel-features.h>.
+	[__NR_setresgid] (__setresgid): Do not declare.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/i386/seteuid.c: Do not include
+	<kernel-features.h>.
+	[__NR_setresuid] (__setresuid): Do not declare.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/i386/setfsgid.c: Do not include
+	<kernel-features.h>.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/i386/setfsuid.c: Do not include
+	<kernel-features.h>.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/i386/setgid.c: Do not include
+	<kernel-features.h>.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/i386/setgroups.c: Do not include
+	<kernel-features.h>.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/i386/setregid.c: Do not include
+	<kernel-features.h>.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/i386/setresgid.c: Do not include
+	<kernel-features.h>.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/i386/setresuid.c: Do not include
+	<kernel-features.h>.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/i386/setreuid.c: Do not include
+	<kernel-features.h>.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/i386/setuid.c: Do not include
+	<kernel-features.h>.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/i386/shmctl.c: Do not include
+	<kernel-features.h>.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/kernel-features.h
+	(__ASSUME_SETRESUID_SYSCALL): Remove.
+	(__ASSUME_SETRESGID_SYSCALL): Likewise.
+	(__ASSUME_32BITUIDS): Likewise.
+	(__ASSUME_LDT_WORKS): Likewise.
+	(__ASSUME_O_DIRECTORY): Likewise.
+	(__ASSUME_NEW_GETRLIMIT_SYSCALL): Define conditional on
+	architecture but not kernel version.
+	(__ASSUME_TRUNCATE64_SYSCALL): Likewise.
+	(__ASSUME_MMAP2_SYSCALL): Likewise.
+	(__ASSUME_STAT64_SYSCALL): Likewise.
+	(__ASSUME_IPC64): Likewise.
+	* sysdeps/unix/sysv/linux/local-setxid.h: Do not include
+	<kernel-features.h>.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/opendir.c: Do not include
+	<kernel-features.h>.
+	[__ASSUME_O_DIRECTORY]: Make code unconditional.
+	* sysdeps/unix/sysv/linux/opensock.c [__LINUX_KERNEL_VERSION <
+	132096]: Remove conditional code.
+	[__LINUX_KERNEL_VERSION >= 132096]: Make code unconditional.
+	* sysdeps/unix/sysv/linux/s390/s390-32/chown.c: Do not include
+	<kernel-features.h>.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/s390/s390-32/lchown.c: Do not include
+	<kernel-features.h>.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/setegid.c: Do not include
+	<kernel-features.h>.
+	[__NR_setresgid || __ASSUME_SETRESGID_SYSCALL]: Make code
+	unconditional.
+	(__setresgid): Do not declare.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/seteuid.c: Do not include
+	<kernel-features.h>.
+	[__NR_setresuid || __ASSUME_SETRESUID_SYSCALL]: Make code
+	unconditional.
+	(__setresuid): Do not declare.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/sh/chown.c: Do not include
+	<kernel-features.h>.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/sparc/sparc32/semctl.c: Do not include
+	<kernel-features.h>.
+	[__ASSUME_32BITUIDS]: Make code unconditional.
+	[!__ASSUME_32BITUIDS]: Remove conditional code.
+
+2012-05-25  Richard Henderson  <rth@xxxxxxxxxxx>
+
+	* sysdeps/powerpc/powerpc32/dl-irel.h (elf_ifunc_invoke): Pass
+	dl_hwcap to ifunc resolver.
+	* sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela): Use
+	elf_ifunc_invoke.
+	* sysdeps/powerpc/powerpc64/dl-irel.h (elf_ifunc_invoke): Pass
+	dl_hwcap to ifunc resolver.
+	* sysdeps/powerpc/powerpc64/dl-machine.h (resolve_ifunc): Likewise.
+
+2012-05-24  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	[BZ #14153]
+	* sysdeps/ieee754/flt-32/e_acosf.c (__ieee754_acosf): Return pi/2
+	for |x| <= 2**-26, not 2**-57.
+	* math/libm-test.inc (acos_test): Do not allow spurious underflow
+	exception.
+
+2012-05-24  Jeff Law  <law@xxxxxxxxxx>
+
+	* stdio-common/Makefile (tests): Add bug25.
+	* stdio-common/bug25.c: New test.
+
+2012-05-24  H.J. Lu  <hongjiu.lu@xxxxxxxxx>
+
+	[BZ #13576]
+	* malloc/malloc.c (sYSMALLOc): Free the old top chunk with a
+	multiple of MALLOC_ALIGNMENT in size.
+	(_int_free): Check chunk size is a multiple of MALLOC_ALIGNMENT.
+
 2012-05-24  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	* conform/data/stdio.h-data (BUFSIZ): Use macro-int-constant.

Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Sat May 26 00:01:38 2012
@@ -14,21 +14,21 @@
   3335, 3440, 3748, 3768, 3866, 3868, 3906, 3976, 3992, 4026, 4108, 4596,
   4822, 5077, 5461, 5805, 5993, 6471, 6486, 6578, 6649, 6730, 6770, 6794,
   6884, 6890, 6894, 6895, 6907, 6911, 6959, 7064, 9739, 9902, 10110, 10135,
-  10140, 10153, 10210, 10254, 10346, 10375 10545, 10716, 10846, 11174,
+  10140, 10153, 10210, 10254, 10346, 10375, 10545, 10716, 10846, 11174,
   11322, 11365, 11451, 11494, 11521, 11677, 11837, 11959, 12047, 12097,
-  12193, 12297, 12298, 12301, 12340, 12354, 13058, 13361, 13525, 13526,
-  13527, 13528, 13529, 13530, 13531, 13532, 13533, 13547, 13551, 13552,
-  13553, 13555, 13556, 13559, 13563, 13566, 13583, 13592, 13594, 13613,
-  13618, 13637, 13656, 13658, 13673, 13691, 13695, 13704, 13705, 13706,
-  13726, 13738, 13739, 13750, 13758, 13760, 13761, 13775, 13786, 13787,
-  13792, 13806, 13824, 13840, 13841, 13844, 13846, 13851, 13852, 13854,
-  13871, 13872, 13873, 13879, 13883, 13884, 13885, 13886, 13892, 13895,
-  13908, 13910, 13911, 13912, 13913, 13914, 13915, 13916, 13917, 13918,
-  13919, 13920, 13921, 13922, 13923, 13924, 13926, 13927, 13928, 13938,
-  13941, 13942, 13954, 13955, 13956, 13963, 13967, 13968, 13970, 13973,
-  13979, 13983, 13986, 14012, 14027, 14033, 14034, 14036, 14040, 14043,
-  14044, 14049, 14053, 14055, 14059, 14064, 14080, 14083, 14103, 14104,
-  14109, 14122, 14123
+  12193, 12297, 12298, 12301, 12340, 12354, 12495, 13058, 13361, 13525,
+  13526, 13527, 13528, 13529, 13530, 13531, 13532, 13533, 13547, 13551,
+  13552, 13553, 13555, 13556, 13559, 13563, 13566, 13576, 13583, 13592,
+  13594, 13613, 13618, 13637, 13656, 13658, 13673, 13691, 13695, 13704,
+  13705, 13706, 13726, 13738, 13739, 13750, 13758, 13760, 13761, 13775,
+  13786, 13787, 13792, 13806, 13824, 13840, 13841, 13844, 13846, 13851,
+  13852, 13854, 13871, 13872, 13873, 13879, 13883, 13884, 13885, 13886,
+  13892, 13895, 13908, 13910, 13911, 13912, 13913, 13914, 13915, 13916,
+  13917, 13918, 13919, 13920, 13921, 13922, 13923, 13924, 13926, 13927,
+  13928, 13938, 13941, 13942, 13954, 13955, 13956, 13963, 13967, 13968,
+  13970, 13973, 13979, 13983, 13986, 14012, 14027, 14033, 14034, 14036,
+  14040, 14043, 14044, 14049, 14053, 14055, 14059, 14064, 14080, 14083,
+  14103, 14104, 14109, 14122, 14123, 14153
 
 * ISO C11 support:
 
@@ -67,7 +67,7 @@
   after the TI-RPC library becomes fully sufficient for the needs of
   existing applications.
 
-* Compatibility code for Linux kernel versions before 2.2 has been removed.
+* Compatibility code for Linux kernel versions before 2.4 has been removed.
   Note that glibc is not expected to work with any Linux kernel version
   before 2.6.
 
@@ -76,6 +76,12 @@
   defines the HWCAP_* bits associated with the AT_HWCAP key.
 
 * New locales: mag_IN
+
+* New configure option --enable-systemtap builds SystemTap static probes
+  into libc for setjmp and longjmp and into libpthread for various operations.
+  So far the setjmp/longjmp probes and some of the libpthread probes are
+  provided only for i*86 and x86_64.
+  Implemented by Roland McGrath and Rayson Ho.
 
 Version 2.15
 

Modified: fsf/trunk/libc/config.h.in
==============================================================================
--- fsf/trunk/libc/config.h.in (original)
+++ fsf/trunk/libc/config.h.in Sat May 26 00:01:38 2012
@@ -181,6 +181,10 @@
 /* Define if obsolete RPC code should be made available for user-level code
    to link against.  */
 #undef LINK_OBSOLETE_RPC
+
+/* Define if Systemtap <sys/sdt.h> probes should be defined.  */
+#undef USE_STAP_PROBE
+
 /*
  */
 

Modified: fsf/trunk/libc/configure
==============================================================================
--- fsf/trunk/libc/configure (original)
+++ fsf/trunk/libc/configure Sat May 26 00:01:38 2012
@@ -567,42 +567,7 @@
 
 ac_unique_file="include/features.h"
 enable_option_checking=no
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-#  include <stdlib.h>
-# endif
-#endif
-#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-#  include <memory.h>
-# endif
-# include <string.h>
-#endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif"
-
+ac_includes_default='/* none */'
 ac_subst_vars='LTLIBOBJS
 LIBOBJS
 RELEASE
@@ -635,8 +600,6 @@
 libc_extra_cflags
 CPPUNDEFS
 sizeof_long_double
-EGREP
-GREP
 have_selinux
 have_libcap
 have_libaudit
@@ -784,6 +747,7 @@
 enable_multi_arch
 enable_nss_crypt
 enable_obsolete_rpc
+enable_systemtap
 with_cpu
 '
       ac_precious_vars='build_alias
@@ -1441,6 +1405,7 @@
   --enable-nss-crypt      enable libcrypt to use nss
   --enable-obsolete-rpc   build and install the obsolete RPC code for
                           link-time usage
+  --enable-systemtap      enable systemtap static probe points [default=no]
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -1928,37 +1893,6 @@
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_compute_int
-
-# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists and can be compiled using the include files in
-# INCLUDES, setting the cache variable VAR accordingly.
-ac_fn_c_check_header_compile ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$3=yes"
-else
-  eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_compile
 cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
@@ -2344,6 +2278,9 @@
 
 
 
+# Glibc should not depend on any header files
+
+
 
 
 subdirs="$subdirs "
@@ -3753,6 +3690,7 @@
 fi
 
 
+
 # Check whether --enable-obsolete-rpc was given.
 if test "${enable_obsolete_rpc+set}" = set; then :
   enableval=$enable_obsolete_rpc; link_obsolete_rpc=$enableval
@@ -3765,6 +3703,51 @@
 if test "$link_obsolete_rpc" = yes; then
   $as_echo "#define LINK_OBSOLETE_RPC 1" >>confdefs.h
 
+fi
+
+# Check whether --enable-systemtap was given.
+if test "${enable_systemtap+set}" = set; then :
+  enableval=$enable_systemtap; systemtap=$enableval
+else
+  systemtap=no
+fi
+
+if test "x$systemtap" != xno; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for systemtap static probe support" >&5
+$as_echo_n "checking for systemtap static probe support... " >&6; }
+if ${libc_cv_sdt+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+    old_CFLAGS="$CFLAGS"
+  CFLAGS="-std=gnu99 $CFLAGS"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/sdt.h>
+void foo (int i, void *p)
+{
+  asm ("" STAP_PROBE_ASM (foo, bar, STAP_PROBE_ASM_TEMPLATE (2)) ""
+       :: STAP_PROBE_ASM_OPERANDS (2, i, p));
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  libc_cv_sdt=yes
+else
+  libc_cv_sdt=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CFLAGS="$old_CFLAGS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_sdt" >&5
+$as_echo "$libc_cv_sdt" >&6; }
+  if test $libc_cv_sdt = yes; then
+    $as_echo "#define USE_STAP_PROBE 1" >>confdefs.h
+
+  elif test "x$systemtap" != xauto; then
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "systemtap support needs sys/sdt.h with asm support
+See \`config.log' for more details" "$LINENO" 5; }
+  fi
 fi
 
 # The way shlib-versions is used to generate soversions.mk uses a
@@ -7342,265 +7325,6 @@
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if ${ac_cv_path_GREP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -z "$GREP"; then
-  ac_path_GREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in grep ggrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-# Check for GNU ac_path_GREP and select it if it is found.
-  # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'GREP' >> "conftest.nl"
-    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_GREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_GREP="$ac_path_GREP"
-      ac_path_GREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_GREP_found && break 3
-    done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_GREP"; then
-    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-  fi
-else
-  ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if ${ac_cv_path_EGREP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-   then ac_cv_path_EGREP="$GREP -E"
-   else
-     if test -z "$EGREP"; then
-  ac_path_EGREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in egrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
-  # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'EGREP' >> "conftest.nl"
-    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_EGREP="$ac_path_EGREP"
-      ac_path_EGREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_EGREP_found && break 3
-    done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_EGREP"; then
-    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-  fi
-else
-  ac_cv_path_EGREP=$EGREP
-fi
-
-   fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_stdc=yes
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then :
-  :
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-		   (('a' <= (c) && (c) <= 'i') \
-		     || ('j' <= (c) && (c) <= 'r') \
-		     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-	|| toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-		  inttypes.h stdint.h unistd.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
 # The cast to long int works around a bug in the HP C Compiler
 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.

Modified: fsf/trunk/libc/configure.in
==============================================================================
--- fsf/trunk/libc/configure.in (original)
+++ fsf/trunk/libc/configure.in Sat May 26 00:01:38 2012
@@ -4,6 +4,11 @@
 AC_CONFIG_SRCDIR([include/features.h])
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_AUX_DIR([scripts])
+
+# Glibc should not depend on any header files
+AC_DEFUN([_AC_INCLUDES_DEFAULT_REQUIREMENTS],
+  [m4_divert_text([DEFAULTS],
+    [ac_includes_default='/* none */'])])
 
 dnl This is here so we can set $subdirs directly based on configure fragments.
 AC_CONFIG_SUBDIRS()
@@ -252,6 +257,7 @@
 fi
 AC_SUBST(libc_cv_nss_crypt)
 
+
 AC_ARG_ENABLE([obsolete-rpc],
               AC_HELP_STRING([--enable-obsolete-rpc],
                              [build and install the obsolete RPC code for link-time usage]),
@@ -261,6 +267,29 @@
 
 if test "$link_obsolete_rpc" = yes; then
   AC_DEFINE(LINK_OBSOLETE_RPC)
+fi
+
+AC_ARG_ENABLE([systemtap],
+              [AS_HELP_STRING([--enable-systemtap],
+	       [enable systemtap static probe points @<:@default=no@:>@])],
+              [systemtap=$enableval],
+	      [systemtap=no])
+if test "x$systemtap" != xno; then
+  AC_CACHE_CHECK([for systemtap static probe support], libc_cv_sdt, [dnl
+  old_CFLAGS="$CFLAGS"
+  CFLAGS="-std=gnu99 $CFLAGS"
+  AC_COMPILE_IFELSE([#include <sys/sdt.h>
+void foo (int i, void *p)
+{
+  asm ("" STAP_PROBE_ASM (foo, bar, STAP_PROBE_ASM_TEMPLATE (2)) ""
+       :: STAP_PROBE_ASM_OPERANDS (2, i, p));
+}], [libc_cv_sdt=yes], [libc_cv_sdt=no])
+  CFLAGS="$old_CFLAGS"])
+  if test $libc_cv_sdt = yes; then
+    AC_DEFINE([USE_STAP_PROBE])
+  elif test "x$systemtap" != xauto; then
+    AC_MSG_FAILURE([systemtap support needs sys/sdt.h with asm support])
+  fi
 fi
 
 # The way shlib-versions is used to generate soversions.mk uses a

Modified: fsf/trunk/libc/elf/Makefile
==============================================================================
--- fsf/trunk/libc/elf/Makefile (original)
+++ fsf/trunk/libc/elf/Makefile Sat May 26 00:01:38 2012
@@ -422,7 +422,8 @@
 CFLAGS-cache.c = $(SYSCONF-FLAGS)
 CFLAGS-rtld.c = $(SYSCONF-FLAGS)
 
-CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),-DNOT_IN_libc=1 -DIS_IN_rtld=1)
+CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
+		     -DNOT_IN_libc=1 -DIS_IN_rtld=1 -DIN_LIB=rtld)
 
 test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(strip $(modules-names))))
 generated += $(addsuffix .so,$(strip $(modules-names)))

Modified: fsf/trunk/libc/elf/rtld-Rules
==============================================================================
--- fsf/trunk/libc/elf/rtld-Rules (original)
+++ fsf/trunk/libc/elf/rtld-Rules Sat May 26 00:01:38 2012
@@ -1,7 +1,6 @@
 # Subroutine makefile for compiling libc modules linked into dynamic linker.
 
-# Copyright (C) 2002,2003,2005,2006,2008,2010,2011
-#   Free Software Foundation, Inc.
+# Copyright (C) 2002-2012 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
 # The GNU C Library is free software; you can redistribute it and/or
@@ -130,6 +129,6 @@
 endif
 
 # This here is the whole point of all the shenanigans.
-rtld-CPPFLAGS := -DNOT_IN_libc=1 -DIS_IN_rtld=1
+rtld-CPPFLAGS := -DNOT_IN_libc=1 -DIS_IN_rtld=1 -DIN_LIB=rtld
 
 endif

Modified: fsf/trunk/libc/extra-lib.mk
==============================================================================
--- fsf/trunk/libc/extra-lib.mk (original)
+++ fsf/trunk/libc/extra-lib.mk Sat May 26 00:01:38 2012
@@ -101,4 +101,4 @@
 include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
 endif
 
-CPPFLAGS-$(lib) := -DNOT_IN_libc=1 -DIS_IN_$(lib)=1
+CPPFLAGS-$(lib) := -DNOT_IN_libc=1 -DIS_IN_$(lib)=1 -DIN_LIB=$(lib)

Added: fsf/trunk/libc/include/stap-probe.h
==============================================================================
--- fsf/trunk/libc/include/stap-probe.h (added)
+++ fsf/trunk/libc/include/stap-probe.h Sat May 26 00:01:38 2012
@@ -1,0 +1,80 @@
+/* Macros for defining Systemtap <sys/sdt.h> static probe points.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _STAP_PROBE_H
+#define _STAP_PROBE_H 1
+
+#ifdef USE_STAP_PROBE
+
+# include <sys/sdt.h>
+
+/* Our code uses one macro LIBC_PROBE (name, n, arg1, ..., argn).
+
+   Without USE_STAP_PROBE, that does nothing but evaluates all
+   its arguments (to prevent bit rot, unlike e.g. assert).
+
+   Systemtap's header defines the macros STAP_PROBE (provider, name) and
+   STAP_PROBEn (provider, name, arg1, ..., argn).  For "provider" we paste
+   in the IN_LIB name (libc, libpthread, etc.) automagically.  */
+
+# ifndef NOT_IN_libc
+#  define IN_LIB	libc
+# elif !defined IN_LIB
+/* This is intentionally defined with extra unquoted commas in it so
+   that macro substitution will bomb out when it is used.  We don't
+   just use #error here, so that this header can be included by
+   other headers that use LIBC_PROBE inside their own macros.  We
+   only want such headers to fail to compile if those macros are
+   actually used in a context where IN_LIB has not been defined.  */
+#  define IN_LIB	,,,missing -DIN_LIB=... -- not extra-lib.mk?,,,
+# endif
+
+# define LIBC_PROBE(name, n, ...)	\
+  LIBC_PROBE_1 (IN_LIB, name, n, ## __VA_ARGS__)
+
+# define LIBC_PROBE_1(lib, name, n, ...) \
+  STAP_PROBE##n (lib, name, ## __VA_ARGS__)
+
+# define STAP_PROBE0		STAP_PROBE
+
+# define LIBC_PROBE_ASM(name, template) \
+  STAP_PROBE_ASM (IN_LIB, name, template)
+
+# define LIBC_PROBE_ASM_OPERANDS STAP_PROBE_ASM_OPERANDS
+
+#else  /* Not USE_STAP_PROBE.  */
+
+# ifndef __ASSEMBLER__
+/* Evaluate all the arguments and verify that N matches their number.  */
+#  define LIBC_PROBE(name, n, ...)					      \
+  do {									      \
+    _Bool __libc_probe_args[] = { 0, ## __VA_ARGS__ };			      \
+    _Bool __libc_probe_verify_n[(sizeof __libc_probe_args / sizeof (_Bool))   \
+                                == n + 1 ? 1 : -1];			      \
+    (void) __libc_probe_verify_n;					      \
+  } while (0)
+# else
+#  define LIBC_PROBE(name, n, ...)		/* Nothing.  */
+# endif
+
+# define LIBC_PROBE_ASM(name, template)		/* Nothing.  */
+# define LIBC_PROBE_ASM_OPERANDS(n, ...)	/* Nothing.  */
+
+#endif	/* USE_STAP_PROBE.  */
+
+#endif	/* stap-probe.h */

Modified: fsf/trunk/libc/malloc/malloc.c
==============================================================================
--- fsf/trunk/libc/malloc/malloc.c (original)
+++ fsf/trunk/libc/malloc/malloc.c Sat May 26 00:01:38 2012
@@ -2396,11 +2396,12 @@
       top(av) = chunk_at_offset(heap, sizeof(*heap));
       set_head(top(av), (heap->size - sizeof(*heap)) | PREV_INUSE);
 
-      /* Setup fencepost and free the old top chunk. */
+      /* Setup fencepost and free the old top chunk with a multiple of
+	 MALLOC_ALIGNMENT in size. */
       /* The fencepost takes at least MINSIZE bytes, because it might
 	 become the top chunk again later.  Note that a footer is set
 	 up, too, although the chunk is marked in use. */
-      old_size -= MINSIZE;
+      old_size = (old_size - MINSIZE) & ~MALLOC_ALIGN_MASK;
       set_head(chunk_at_offset(old_top, old_size + 2*SIZE_SZ), 0|PREV_INUSE);
       if (old_size >= MINSIZE) {
 	set_head(chunk_at_offset(old_top, old_size), (2*SIZE_SZ)|PREV_INUSE);
@@ -3809,8 +3810,9 @@
       malloc_printerr (check_action, errstr, chunk2mem(p));
       return;
     }
-  /* We know that each chunk is at least MINSIZE bytes in size.  */
-  if (__builtin_expect (size < MINSIZE, 0))
+  /* We know that each chunk is at least MINSIZE bytes in size or a
+     multiple of MALLOC_ALIGNMENT.  */
+  if (__builtin_expect (size < MINSIZE || !aligned_OK (size), 0))
     {
       errstr = "free(): invalid size";
       goto errout;

Modified: fsf/trunk/libc/math/libm-test.inc
==============================================================================
--- fsf/trunk/libc/math/libm-test.inc (original)
+++ fsf/trunk/libc/math/libm-test.inc Sat May 26 00:01:38 2012
@@ -804,8 +804,7 @@
   TEST_f_f (acos, 0.5, M_PI_6l*2.0);
   TEST_f_f (acos, -0.5, M_PI_6l*4.0);
   TEST_f_f (acos, 0.75L, 0.722734247813415611178377352641333362L);
-  /* Bug 14153: spurious exception may occur.  */
-  TEST_f_f (acos, 2e-17L, 1.57079632679489659923132169163975144L, UNDERFLOW_EXCEPTION_OK_FLOAT);
+  TEST_f_f (acos, 2e-17L, 1.57079632679489659923132169163975144L);
   TEST_f_f (acos, 0.0625L, 1.50825556499840522843072005474337068L);
   TEST_f_f (acos, 0x0.ffffffp0L, 3.4526698471620358760324948263873649728491e-4L);
   TEST_f_f (acos, -0x0.ffffffp0L, 3.1412473866050770348750401337968641476999L);

Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Sat May 26 00:01:38 2012
@@ -1,3 +1,49 @@
+2012-05-25  Rayson Ho  <rho@xxxxxxxxxx>
+
+	* 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@xxxxxxxxxx>
+	    Roland McGrath  <roland@xxxxxxxxxxxxx>
+
+	* DESIGN-systemtap-probes.txt: New file.
+	* pthread_cond_broadcast.c: SystemTap probes.
+	* pthread_cond_init.c: Likewise.
+	* pthread_cond_signal.c: Likewise.
+	* pthread_cond_wait.c: Likewise.
+	* pthread_cond_destroy.c: Likewise.
+	* pthread_create.c: Likewise.
+	* pthread_join.c: Likewise.
+	* pthread_mutex_destroy.c: Likewise.
+	* pthread_mutex_init.c: Likewise.
+	* pthread_mutex_lock.c: Likewise.
+	* pthread_mutex_timedlock.c: Likewise.
+	* pthread_mutex_unlock.c: Likewise.
+	* pthread_rwlock_destroy.c: Likewise.
+	* pthread_rwlock_rdlock.c: Likewise.
+	* pthread_rwlock_unlock.c: Likewise.
+	* pthread_rwlock_wrlock.c: Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
+
+2012-05-24  Roland McGrath  <roland@xxxxxxxxxxxxx>
+
+	* pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
+
 2012-05-17  Andreas Jaeger  <aj@xxxxxxx>
 
 	* sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h

Added: fsf/trunk/libc/nptl/DESIGN-systemtap-probes.txt
==============================================================================
--- fsf/trunk/libc/nptl/DESIGN-systemtap-probes.txt (added)
+++ fsf/trunk/libc/nptl/DESIGN-systemtap-probes.txt Sat May 26 00:01:38 2012
@@ -1,0 +1,89 @@
+Systemtap is a dynamic tracing/instrumenting tool available on Linux. Probes
+that are not fired at run time have close to zero overhead.
+
+The following probes are available for NPTL:
+
+Thread creation & Join Probes
+=============================
+pthread_create - probe for pthread_create
+               arg1 = pointer (pthread_t*) to thread
+               arg2 = pointer (pthread_attr_t*) to attr
+               arg3 = pointer (void *) to start_routine
+               arg4 = arguments to start_routine
+pthread_start - probe for actual thread creation
+              arg1 = struct pthread (members include thread ID, process ID)
+              arg2 = address of start_routine
+              arg3 = pointer to the list of arguments
+pthread_join - probe for pthread_join
+             arg1 = thread ID
+pthread_join_ret - probe for pthread_join return
+                 arg1 = thread ID
+                 arg2 = return value
+
+Lock-related Probes
+===================
+mutex_init    - probe for pthread_mutex_init
+              arg1 = address of mutex lock
+mutex_acquired - probe for succ. return of pthread_mutex_lock
+               arg1 = address of mutex lock
+mutex_timedlock_acquired - probe for succ. return of pthread_mutex_timedlock
+                         arg1 = address of mutex lock
+mutex_entry   - probe for entry to the pthread_mutex_lock function
+              arg1 = address of mutex lock
+mutex_timedlock_entry - probe for entry to the pthread_mutex_timedlock function
+                      arg1 = address of mutex lock, arg2 = address of timespec
+mutex_release - probe for pthread_mutex_unlock after the successful release of a
+                mutex lock
+              arg1 = address of mutex lock
+mutex_destroy - probe for pthread_mutex_destroy
+              arg1 = address of mutex lock
+
+wrlock_entry - probe for entry to the pthread_rwlock_wrlock function
+             arg1 = address of rw lock
+rdlock_entry - probe for entry to the pthread_rwlock_rdlock function
+             arg1 = address of rw lock
+
+rwlock_destroy - probe for pthread_rwlock_destroy
+               arg1 = address of rw lock
+wrlock_acquire_write - probe for pthread_rwlock_wrlock (after getting the lock)
+                     arg1 = address of rw lock
+rdlock_acquire_read - probe for pthread_rwlock_rdlock after successfully getting
+                      the lock
+                    arg1 = address of rw lock
+rwlock_unlock - probe for pthread_rwlock_unlock
+              arg1 = address of rw lock
+
+lll_lock_wait - probe in low-level (assembly language) locking code, only fired
+                when futex/FUTEX_WAIT is called (i.e. when trying to acquire a
+                contented lock)
+              arg1 = pointer to futex
+              arg2 = flags passed to the futex system call
+lll_lock_wait_private - probe in low-level (assembly language) locking code,
+                        only fired when futex/FUTEX_WAIT is called (i.e. when
+                        trying to acquire a contented lock)
+                      arg1 = pointer to futex
+
+lll_futex_wake - probe in low-level (assembly language) locking code, only fired
+                 when futex (FUTEX_WAKE) is called
+               arg1 = pointer to futex
+               arg2 = number of processes to wake
+               arg3 = additional flags
+
+Condition variable Probes
+=========================
+cond_init - probe for pthread_cond_init
+          arg1 = condition
+          arg2 = attr
+cond_destroy - probe for pthread_cond_destroy
+             arg1 = cond
+cond_wait - probe for pthread_cond_wait
+          arg1 = condition
+          arg2 = mutex lock
+cond_timedwait - probe for pthread_cond_timedwait
+               arg1 = condition
+               arg2 = mutex lock
+               arg3 = timespec
+cond_signal - probe for pthread_cond_signal
+            arg1 = condition
+cond_broadcast - probe for pthread_cond_broadcast
+               arg1 = condition

Modified: fsf/trunk/libc/nptl/pthread_cond_broadcast.c
==============================================================================
--- fsf/trunk/libc/nptl/pthread_cond_broadcast.c (original)
+++ fsf/trunk/libc/nptl/pthread_cond_broadcast.c Sat May 26 00:01:38 2012
@@ -22,6 +22,7 @@
 #include <lowlevellock.h>
 #include <pthread.h>
 #include <pthreadP.h>
+#include <stap-probe.h>
 
 #include <shlib-compat.h>
 #include <kernel-features.h>
@@ -31,6 +32,8 @@
 __pthread_cond_broadcast (cond)
      pthread_cond_t *cond;
 {
+  LIBC_PROBE (cond_broadcast, 1, cond);
+
   int pshared = (cond->__data.__mutex == (void *) ~0l)
 		? LLL_SHARED : LLL_PRIVATE;
   /* Make sure we are alone.  */

Modified: fsf/trunk/libc/nptl/pthread_cond_destroy.c
==============================================================================
--- fsf/trunk/libc/nptl/pthread_cond_destroy.c (original)
+++ fsf/trunk/libc/nptl/pthread_cond_destroy.c Sat May 26 00:01:38 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 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@xxxxxxxxxx>, 2002.
 
@@ -19,6 +19,7 @@
 #include <errno.h>
 #include <shlib-compat.h>
 #include "pthreadP.h"
+#include <stap-probe.h>
 
 
 int
@@ -27,6 +28,8 @@
 {
   int pshared = (cond->__data.__mutex == (void *) ~0l)
 		? LLL_SHARED : LLL_PRIVATE;
+
+  LIBC_PROBE (cond_destroy, 1, cond);
 
   /* Make sure we are alone.  */
   lll_lock (cond->__data.__lock, pshared);
@@ -50,13 +53,13 @@
   if (nwaiters >= (1 << COND_NWAITERS_SHIFT))
     {
       /* Wake everybody on the associated mutex in case there are
-         threads that have been requeued to it.
-         Without this, pthread_cond_destroy could block potentially
-         for a long time or forever, as it would depend on other
-         thread's using the mutex.
-         When all threads waiting on the mutex are woken up, pthread_cond_wait
-         only waits for threads to acquire and release the internal
-         condvar lock.  */
+	 threads that have been requeued to it.
+	 Without this, pthread_cond_destroy could block potentially
+	 for a long time or forever, as it would depend on other
+	 thread's using the mutex.
+	 When all threads waiting on the mutex are woken up, pthread_cond_wait
+	 only waits for threads to acquire and release the internal
+	 condvar lock.  */
       if (cond->__data.__mutex != NULL
 	  && cond->__data.__mutex != (void *) ~0l)
 	{

Modified: fsf/trunk/libc/nptl/pthread_cond_init.c
==============================================================================
--- fsf/trunk/libc/nptl/pthread_cond_init.c (original)
+++ fsf/trunk/libc/nptl/pthread_cond_init.c Sat May 26 00:01:38 2012
@@ -1,5 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2005, 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@xxxxxxxxxx>, 2002.
 
@@ -19,6 +18,7 @@
 
 #include <shlib-compat.h>
 #include "pthreadP.h"
+#include <stap-probe.h>
 
 
 int
@@ -41,6 +41,8 @@
 			  ? NULL : (void *) ~0l);
   cond->__data.__broadcast_seq = 0;
 
+  LIBC_PROBE (cond_init, 2, cond, cond_attr);
+
   return 0;
 }
 versioned_symbol (libpthread, __pthread_cond_init,

Modified: fsf/trunk/libc/nptl/pthread_cond_signal.c
==============================================================================
--- fsf/trunk/libc/nptl/pthread_cond_signal.c (original)
+++ fsf/trunk/libc/nptl/pthread_cond_signal.c Sat May 26 00:01:38 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Martin Schwidefsky <schwidefsky@xxxxxxxxxx>, 2003.
 
@@ -25,6 +25,7 @@
 
 #include <shlib-compat.h>
 #include <kernel-features.h>
+#include <stap-probe.h>
 
 
 int
@@ -33,6 +34,8 @@
 {
   int pshared = (cond->__data.__mutex == (void *) ~0l)
 		? LLL_SHARED : LLL_PRIVATE;
+
+  LIBC_PROBE (cond_signal, 1, cond);
 
   /* Make sure we are alone.  */
   lll_lock (cond->__data.__lock, pshared);

Modified: fsf/trunk/libc/nptl/pthread_cond_wait.c
==============================================================================
--- fsf/trunk/libc/nptl/pthread_cond_wait.c (original)
+++ fsf/trunk/libc/nptl/pthread_cond_wait.c Sat May 26 00:01:38 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003,2004,2006,2007,2011 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Martin Schwidefsky <schwidefsky@xxxxxxxxxx>, 2003.
 
@@ -24,6 +24,7 @@
 #include <pthreadP.h>
 
 #include <shlib-compat.h>
+#include <stap-probe.h>
 
 
 struct _condvar_cleanup_buffer
@@ -43,7 +44,7 @@
     (struct _condvar_cleanup_buffer *) arg;
   unsigned int destroying;
   int pshared = (cbuffer->cond->__data.__mutex == (void *) ~0l)
-  		? LLL_SHARED : LLL_PRIVATE;
+		? LLL_SHARED : LLL_PRIVATE;
 
   /* We are going to modify shared data.  */
   lll_lock (cbuffer->cond->__data.__lock, pshared);
@@ -98,7 +99,9 @@
   struct _condvar_cleanup_buffer cbuffer;
   int err;
   int pshared = (cond->__data.__mutex == (void *) ~0l)
-  		? LLL_SHARED : LLL_PRIVATE;
+		? LLL_SHARED : LLL_PRIVATE;
+
+  LIBC_PROBE (cond_wait, 2, cond, mutex);
 
   /* Make sure we are alone.  */
   lll_lock (cond->__data.__lock, pshared);

Modified: fsf/trunk/libc/nptl/pthread_create.c
==============================================================================
--- fsf/trunk/libc/nptl/pthread_create.c (original)
+++ fsf/trunk/libc/nptl/pthread_create.c Sat May 26 00:01:38 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2007,2008,2009,2010,2011 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@xxxxxxxxxx>, 2002.
 
@@ -30,6 +30,8 @@
 #include <kernel-features.h>
 
 #include <shlib-compat.h>
+
+#include <stap-probe.h>
 
 
 /* Local function to start thread and handle cleanup.  */
@@ -299,6 +301,8 @@
 	  CANCEL_RESET (oldtype);
 	}
 
+      LIBC_PROBE (pthread_start, 3, (pthread_t) pd, pd->start_routine, pd->arg);
+
       /* Run the code the user provided.  */
 #ifdef CALL_THREAD_FCT
       THREAD_SETMEM (pd, result, CALL_THREAD_FCT (pd));
@@ -556,6 +560,8 @@
   /* Pass the descriptor to the caller.  */
   *newthread = (pthread_t) pd;
 
+  LIBC_PROBE (pthread_create, 4, newthread, attr, start_routine, arg);
+
   /* Start the thread.  */
   return create_thread (pd, iattr, STACK_VARIABLES_ARGS);
 }

Modified: fsf/trunk/libc/nptl/pthread_join.c
==============================================================================
--- fsf/trunk/libc/nptl/pthread_join.c (original)
+++ fsf/trunk/libc/nptl/pthread_join.c Sat May 26 00:01:38 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2005, 2006 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@xxxxxxxxxx>, 2002.
 
@@ -21,6 +21,8 @@
 
 #include <atomic.h>
 #include "pthreadP.h"
+
+#include <stap-probe.h>
 
 
 static void
@@ -53,6 +55,8 @@
 
   struct pthread *self = THREAD_SELF;
   int result = 0;
+
+  LIBC_PROBE (pthread_join, 1, threadid);
 
   /* During the wait we change to asynchronous cancellation.  If we
      are canceled the thread we are waiting for must be marked as
@@ -109,5 +113,7 @@
       __free_tcb (pd);
     }
 
+  LIBC_PROBE (pthread_join_ret, 3, threadid, result, pd->result);
+
   return result;
 }

Modified: fsf/trunk/libc/nptl/pthread_mutex_destroy.c
==============================================================================
--- fsf/trunk/libc/nptl/pthread_mutex_destroy.c (original)
+++ fsf/trunk/libc/nptl/pthread_mutex_destroy.c Sat May 26 00:01:38 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2005, 2006 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@xxxxxxxxxx>, 2002.
 
@@ -19,11 +19,15 @@
 #include <errno.h>
 #include "pthreadP.h"
 
+#include <stap-probe.h>
+
 
 int
 __pthread_mutex_destroy (mutex)
      pthread_mutex_t *mutex;
 {
+  LIBC_PROBE (mutex_destroy, 1, mutex);
+
   if ((mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP) == 0
       && mutex->__data.__nusers != 0)
     return EBUSY;

Modified: fsf/trunk/libc/nptl/pthread_mutex_init.c
==============================================================================
--- fsf/trunk/libc/nptl/pthread_mutex_init.c (original)
+++ fsf/trunk/libc/nptl/pthread_mutex_init.c Sat May 26 00:01:38 2012
@@ -1,5 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 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@xxxxxxxxxx>, 2002.
 
@@ -22,6 +21,8 @@
 #include <string.h>
 #include <kernel-features.h>
 #include "pthreadP.h"
+
+#include <stap-probe.h>
 
 static const struct pthread_mutexattr default_attr =
   {
@@ -134,6 +135,8 @@
   // mutex->__spins = 0;	already done by memset
   // mutex->__next = NULL;	already done by memset
 
+  LIBC_PROBE (mutex_init, 1, mutex);
+
   return 0;
 }
 strong_alias (__pthread_mutex_init, pthread_mutex_init)

Modified: fsf/trunk/libc/nptl/pthread_mutex_lock.c
==============================================================================
--- fsf/trunk/libc/nptl/pthread_mutex_lock.c (original)
+++ fsf/trunk/libc/nptl/pthread_mutex_lock.c Sat May 26 00:01:38 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2007, 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@xxxxxxxxxx>, 2002.
 
@@ -23,6 +23,7 @@
 #include <not-cancel.h>
 #include "pthreadP.h"
 #include <lowlevellock.h>
+#include <stap-probe.h>
 
 
 #ifndef LLL_MUTEX_LOCK
@@ -47,6 +48,9 @@
   assert (sizeof (mutex->__size) >= sizeof (mutex->__data));
 
   unsigned int type = PTHREAD_MUTEX_TYPE (mutex);
+
+  LIBC_PROBE (mutex_entry, 1, mutex);
+
   if (__builtin_expect (type & ~PTHREAD_MUTEX_KIND_MASK_NP, 0))
     return __pthread_mutex_lock_full (mutex);
 
@@ -126,6 +130,8 @@
   ++mutex->__data.__nusers;
 #endif
 
+  LIBC_PROBE (mutex_acquired, 1, mutex);
+
   return 0;
 }
 
@@ -466,6 +472,8 @@
   ++mutex->__data.__nusers;
 #endif
 
+  LIBC_PROBE (mutex_acquired, 1, mutex);
+
   return 0;
 }
 #ifndef __pthread_mutex_lock

Modified: fsf/trunk/libc/nptl/pthread_mutex_timedlock.c
==============================================================================
--- fsf/trunk/libc/nptl/pthread_mutex_timedlock.c (original)
+++ fsf/trunk/libc/nptl/pthread_mutex_timedlock.c Sat May 26 00:01:38 2012
@@ -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@xxxxxxxxxx>, 2002.
 
@@ -22,6 +22,8 @@
 #include "pthreadP.h"
 #include <lowlevellock.h>
 #include <not-cancel.h>
+
+#include <stap-probe.h>
 
 
 int
@@ -32,6 +34,8 @@
   int oldval;
   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 @@
 
 		  ++mutex->__data.__count;
 
+		  LIBC_PROBE (mutex_timedlock_acquired, 1, mutex);
+
 		  return 0;
 		}
 	    }
@@ -240,6 +246,8 @@
 		  return EAGAIN;
 
 		++mutex->__data.__count;
+
+		LIBC_PROBE (mutex_timedlock_acquired, 1, mutex);
 
 		return 0;
 	      }
@@ -376,6 +384,8 @@
 
 		++mutex->__data.__count;
 
+		LIBC_PROBE (mutex_timedlock_acquired, 1, mutex);
+
 		return 0;
 	      }
 	  }
@@ -476,6 +486,8 @@
       /* Record the ownership.  */
       mutex->__data.__owner = id;
       ++mutex->__data.__nusers;
+
+      LIBC_PROBE (mutex_timedlock_acquired, 1, mutex);
     }
 
  out:

Modified: fsf/trunk/libc/nptl/pthread_mutex_unlock.c
==============================================================================
--- fsf/trunk/libc/nptl/pthread_mutex_unlock.c (original)
+++ fsf/trunk/libc/nptl/pthread_mutex_unlock.c Sat May 26 00:01:38 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2005-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@xxxxxxxxxx>, 2002.
 
@@ -21,6 +21,7 @@
 #include <stdlib.h>
 #include "pthreadP.h"
 #include <lowlevellock.h>
+#include <stap-probe.h>
 
 static int
 internal_function
@@ -49,6 +50,9 @@
 
       /* Unlock.  */
       lll_unlock (mutex->__data.__lock, PTHREAD_MUTEX_PSHARED (mutex));
+
+      LIBC_PROBE (mutex_release, 1, mutex);
+
       return 0;
     }
   else if (__builtin_expect (type == PTHREAD_MUTEX_RECURSIVE_NP, 1))
@@ -271,6 +275,9 @@
 			PTHREAD_MUTEX_PSHARED (mutex));
 
       int oldprio = newval >> PTHREAD_MUTEX_PRIO_CEILING_SHIFT;
+
+      LIBC_PROBE (mutex_release, 1, mutex);
+
       return __pthread_tpp_change_priority (oldprio, -1);
 
     default:
@@ -278,6 +285,7 @@
       return EINVAL;
     }
 
+  LIBC_PROBE (mutex_release, 1, mutex);
   return 0;
 }
 

Modified: fsf/trunk/libc/nptl/pthread_rwlock_destroy.c
==============================================================================
--- fsf/trunk/libc/nptl/pthread_rwlock_destroy.c (original)
+++ fsf/trunk/libc/nptl/pthread_rwlock_destroy.c Sat May 26 00:01:38 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 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@xxxxxxxxxx>, 2002.
 
@@ -17,12 +17,15 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include "pthreadP.h"
+#include <stap-probe.h>
 
 
 int
 __pthread_rwlock_destroy (rwlock)
      pthread_rwlock_t *rwlock;
 {
+  LIBC_PROBE (rwlock_destroy, 1, rwlock);
+
   /* Nothing to be done.  For now.  */
   return 0;
 }

Modified: fsf/trunk/libc/nptl/pthread_rwlock_rdlock.c
==============================================================================
--- fsf/trunk/libc/nptl/pthread_rwlock_rdlock.c (original)
+++ fsf/trunk/libc/nptl/pthread_rwlock_rdlock.c Sat May 26 00:01:38 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003,2004,2007,2011 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Martin Schwidefsky <schwidefsky@xxxxxxxxxx>, 2003.
 
@@ -21,6 +21,7 @@
 #include <lowlevellock.h>
 #include <pthread.h>
 #include <pthreadP.h>
+#include <stap-probe.h>
 
 
 /* Acquire read lock for RWLOCK.  */
@@ -29,6 +30,8 @@
      pthread_rwlock_t *rwlock;
 {
   int result = 0;
+
+  LIBC_PROBE (rdlock_entry, 1, rwlock);
 
   /* Make sure we are alone.  */
   lll_lock (rwlock->__data.__lock, rwlock->__data.__shared);
@@ -48,6 +51,8 @@
 	      --rwlock->__data.__nr_readers;
 	      result = EAGAIN;
 	    }
+	  else
+	    LIBC_PROBE (rdlock_acquire_read, 1, rwlock);
 
 	  break;
 	}

Modified: fsf/trunk/libc/nptl/pthread_rwlock_unlock.c
==============================================================================
--- fsf/trunk/libc/nptl/pthread_rwlock_unlock.c (original)
+++ fsf/trunk/libc/nptl/pthread_rwlock_unlock.c Sat May 26 00:01:38 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Martin Schwidefsky <schwidefsky@xxxxxxxxxx>, 2003.
 
@@ -21,11 +21,14 @@
 #include <lowlevellock.h>
 #include <pthread.h>
 #include <pthreadP.h>
+#include <stap-probe.h>
 
 /* Unlock RWLOCK.  */
 int
 __pthread_rwlock_unlock (pthread_rwlock_t *rwlock)
 {
+  LIBC_PROBE (rwlock_unlock, 1, rwlock);
+
   lll_lock (rwlock->__data.__lock, rwlock->__data.__shared);
   if (rwlock->__data.__writer)
     rwlock->__data.__writer = 0;

Modified: fsf/trunk/libc/nptl/pthread_rwlock_wrlock.c
==============================================================================
--- fsf/trunk/libc/nptl/pthread_rwlock_wrlock.c (original)
+++ fsf/trunk/libc/nptl/pthread_rwlock_wrlock.c Sat May 26 00:01:38 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003,2007,2011 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Martin Schwidefsky <schwidefsky@xxxxxxxxxx>, 2003.
 
@@ -21,6 +21,7 @@
 #include <lowlevellock.h>
 #include <pthread.h>
 #include <pthreadP.h>
+#include <stap-probe.h>
 
 
 /* Acquire write lock for RWLOCK.  */
@@ -29,6 +30,8 @@
      pthread_rwlock_t *rwlock;
 {
   int result = 0;
+
+  LIBC_PROBE (wrlock_entry, 1, rwlock);
 
   /* Make sure we are alone.  */
   lll_lock (rwlock->__data.__lock, rwlock->__data.__shared);
@@ -40,6 +43,8 @@
 	{
 	  /* Mark self as writer.  */
 	  rwlock->__data.__writer = THREAD_GETMEM (THREAD_SELF, tid);
+
+	  LIBC_PROBE (wrlock_acquire_write, 1, rwlock);
 	  break;
 	}
 

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S Sat May 26 00:01:38 2012
@@ -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@xxxxxxxxxx>, 2002.
 
@@ -20,6 +20,8 @@
 #include <pthread-errnos.h>
 #include <kernel-features.h>
 #include <lowlevellock.h>
+
+#include <stap-probe.h>
 
 	.text
 
@@ -90,7 +92,8 @@
 	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

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S Sat May 26 00:01:38 2012
@@ -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@xxxxxxxxxx>, 2002.
 
@@ -23,6 +23,7 @@
 #include <kernel-features.h>
 #include <pthread-pi-defines.h>
 #include <pthread-errnos.h>
+#include <stap-probe.h>
 
 	.text
 
@@ -47,6 +48,8 @@
 	cfi_remember_state
 
 	movl	20(%esp), %ebx
+
+	LIBC_PROBE (cond_broadcast, 1, %edx)
 
 	/* Get internal lock.  */
 	movl	$1, %edx

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S Sat May 26 00:01:38 2012
@@ -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@xxxxxxxxxx>, 2002.
 
@@ -23,7 +23,7 @@
 #include <kernel-features.h>
 #include <pthread-pi-defines.h>
 #include <pthread-errnos.h>
-
+#include <stap-probe.h>
 
 	.text
 
@@ -43,6 +43,8 @@
 	cfi_remember_state
 
 	movl	12(%esp), %edi
+
+	LIBC_PROBE (cond_signal, 1, %edi)
 
 	/* Get internal lock.  */
 	movl	$1, %edx

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S Sat May 26 00:01:38 2012
@@ -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@xxxxxxxxxx>, 2002.
 
@@ -23,7 +23,7 @@
 #include <pthread-errnos.h>
 #include <pthread-pi-defines.h>
 #include <kernel-features.h>
-
+#include <stap-probe.h>
 
 	.text
 
@@ -59,6 +59,8 @@
 
 	movl	20(%esp), %ebx
 	movl	28(%esp), %ebp
+
+	LIBC_PROBE (cond_timedwait, 3, %ebx, 24(%esp), %ebp)
 
 	cmpl	$1000000000, 4(%ebp)
 	movl	$EINVAL, %eax

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S Sat May 26 00:01:38 2012
@@ -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@xxxxxxxxxx>, 2002.
 
@@ -25,6 +24,7 @@
 #include <pthread-errnos.h>
 #include <pthread-pi-defines.h>
 #include <kernel-features.h>
+#include <stap-probe.h>
 
 
 	.text
@@ -60,6 +60,8 @@
 
 	xorl	%esi, %esi
 	movl	20(%esp), %ebx
+
+	LIBC_PROBE (cond_wait, 2, 24(%esp), %ebx)
 
 	/* Get internal lock.  */
 	movl	$1, %edx

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S Sat May 26 00:01:38 2012
@@ -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@xxxxxxxxxx>, 2002.
 
@@ -22,6 +22,7 @@
 #include <pthread-errnos.h>
 #include <kernel-features.h>
 
+#include <stap-probe.h>
 
 	.text
 
@@ -39,6 +40,8 @@
 
 	xorl	%esi, %esi
 	movl	12(%esp), %ebx
+
+	LIBC_PROBE (rdlock_entry, 1, %ebx)
 
 	/* Get the lock.  */
 	movl	$1, %edx

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S Sat May 26 00:01:38 2012
@@ -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@xxxxxxxxxx>, 2002.
 
@@ -22,6 +22,7 @@
 #include <pthread-errnos.h>
 #include <kernel-features.h>
 
+#include <stap-probe.h>
 
 	.text
 
@@ -39,6 +40,8 @@
 
 	xorl	%esi, %esi
 	movl	12(%esp), %ebx
+
+	LIBC_PROBE (wrlock_entry, 1, %ebx)
 
 	/* Get the lock.  */
 	movl	$1, %edx

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h Sat May 26 00:01:38 2012
@@ -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@xxxxxxxxxx>, 2002.
 
@@ -18,6 +18,8 @@
 
 #ifndef _LOWLEVELLOCK_H
 #define _LOWLEVELLOCK_H	1
+
+#include <stap-probe.h>
 
 #ifndef __ASSEMBLER__
 # include <time.h>
@@ -225,6 +227,7 @@
   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					      \

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S Sat May 26 00:01:38 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2007, 2009, 2010, 2011 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@xxxxxxxxxx>, 2002.
 
@@ -20,6 +20,8 @@
 #include <pthread-errnos.h>
 #include <kernel-features.h>
 #include <lowlevellock.h>
+
+#include <stap-probe.h>
 
 	.text
 
@@ -86,7 +88,8 @@
 	cmpl	%edx, %eax	/* NB:	 %edx == 2 */
 	jne	2f
 
-1:	movl	$SYS_futex, %eax
+1:	LIBC_PROBE (lll_lock_wait_private, 1, %rdi)
+	movl	$SYS_futex, %eax
 	syscall
 
 2:	movl	%edx, %eax
@@ -125,7 +128,8 @@
 	cmpl	%edx, %eax	/* NB:	 %edx == 2 */
 	jne	2f
 
-1:	movl	$SYS_futex, %eax
+1:	LIBC_PROBE (lll_lock_wait, 2, %rdi, %rsi)
+	movl	$SYS_futex, %eax
 	syscall
 
 2:	movl	%edx, %eax

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h Sat May 26 00:01:38 2012
@@ -1,5 +1,4 @@
-/* Copyright (C) 2002-2004, 2006-2008, 2009, 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@xxxxxxxxxx>, 2002.
 
@@ -19,6 +18,8 @@
 
 #ifndef _LOWLEVELLOCK_H
 #define _LOWLEVELLOCK_H	1
+
+#include <stap-probe.h>
 
 #ifndef __ASSEMBLER__
 # include <time.h>
@@ -227,6 +228,7 @@
   do {									      \
     int __ignore;							      \
     register __typeof (nr) _nr __asm ("edx") = (nr);			      \
+    LIBC_PROBE (lll_futex_wake, 3, futex, nr, private);                       \
     __asm __volatile ("syscall"						      \
 		      : "=a" (__ignore)					      \
 		      : "0" (SYS_futex), "D" (futex),			      \
@@ -286,7 +288,7 @@
 			      "je 0f\n\t"				      \
 			      "lock; cmpxchgl %4, %2\n\t"		      \
 			      "jnz 1f\n\t"				      \
-		  	      "jmp 24f\n"				      \
+			      "jmp 24f\n"				      \
 			      "0:\tcmpxchgl %4, %2\n\t"			      \
 			      "jnz 1f\n\t"
 #endif

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S Sat May 26 00:01:38 2012
@@ -1,5 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2005, 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@xxxxxxxxxx>, 2002.
 
@@ -24,7 +23,7 @@
 #include <kernel-features.h>
 #include <pthread-pi-defines.h>
 #include <pthread-errnos.h>
-
+#include <stap-probe.h>
 
 	.text
 
@@ -33,6 +32,8 @@
 	.type	__pthread_cond_broadcast, @function
 	.align	16
 __pthread_cond_broadcast:
+
+	LIBC_PROBE (cond_broadcast, 1, %rdi)
 
 	/* Get internal lock.  */
 	movl	$1, %esi

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S Sat May 26 00:01:38 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2005, 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@xxxxxxxxxx>, 2002.
 
@@ -23,6 +23,7 @@
 #include <pthread-pi-defines.h>
 #include <kernel-features.h>
 #include <pthread-errnos.h>
+#include <stap-probe.h>
 
 
 	.text
@@ -32,6 +33,8 @@
 	.type	__pthread_cond_signal, @function
 	.align	16
 __pthread_cond_signal:
+
+	LIBC_PROBE (cond_signal, 1, %rdi)
 
 	/* Get internal lock.  */
 	movq	%rdi, %r8

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S Sat May 26 00:01:38 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2005,2007,2009,2010,2011 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@xxxxxxxxxx>, 2002.
 
@@ -22,6 +22,7 @@
 #include <lowlevelcond.h>
 #include <pthread-pi-defines.h>
 #include <pthread-errnos.h>
+#include <stap-probe.h>
 
 #include <kernel-features.h>
 
@@ -66,6 +67,8 @@
 	subq	$FRAME_SIZE, %rsp
 	cfi_adjust_cfa_offset(FRAME_SIZE)
 	cfi_remember_state
+
+	LIBC_PROBE (cond_timedwait, 3, %rdi, %rsi, %rdx)
 
 	cmpq	$1000000000, 8(%rdx)
 	movl	$EINVAL, %eax

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S Sat May 26 00:01:38 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2007, 2009, 2011 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@xxxxxxxxxx>, 2002.
 
@@ -23,6 +23,7 @@
 #include <tcb-offsets.h>
 #include <pthread-pi-defines.h>
 #include <pthread-errnos.h>
+#include <stap-probe.h>
 
 #include <kernel-features.h>
 
@@ -54,20 +55,22 @@
 	   rsp + 32
 		    +--------------------------+
 	   rsp + 24 | old wake_seq value       |
-	            +--------------------------+
+		    +--------------------------+
 	   rsp + 16 | mutex pointer            |
-	            +--------------------------+
+		    +--------------------------+
 	   rsp +  8 | condvar pointer          |
-	            +--------------------------+
+		    +--------------------------+
 	   rsp +  4 | old broadcast_seq value  |
-	            +--------------------------+
+		    +--------------------------+
 	   rsp +  0 | old cancellation mode    |
-	            +--------------------------+
+		    +--------------------------+
 	*/
 
+	LIBC_PROBE (cond_wait, 2, %rdi, %rsi)
+
 	LP_OP(cmp) $-1, dep_mutex(%rdi)
 
-		/* Prepare structure passed to cancellation handler.  */
+	/* Prepare structure passed to cancellation handler.  */
 	movq	%rdi, 8(%rsp)
 	movq	%rsi, 16(%rsp)
 
@@ -406,15 +409,15 @@
 	   rsp + 32
 		    +--------------------------+
 	   rsp + 24 | unused                   |
-	            +--------------------------+
+		    +--------------------------+
 	   rsp + 16 | mutex pointer            |
-	            +--------------------------+
+		    +--------------------------+
 	   rsp +  8 | condvar pointer          |
-	            +--------------------------+
+		    +--------------------------+
 	   rsp +  4 | old broadcast_seq value  |
-	            +--------------------------+
+		    +--------------------------+
 	   rsp +  0 | old cancellation mode    |
-	            +--------------------------+
+		    +--------------------------+
 	*/
 
 	movq	%rax, 24(%rsp)

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S Sat May 26 00:01:38 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2005, 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@xxxxxxxxxx>, 2002.
 
@@ -21,7 +21,7 @@
 #include <lowlevelrwlock.h>
 #include <pthread-errnos.h>
 #include <kernel-features.h>
-
+#include <stap-probe.h>
 
 	.text
 
@@ -30,6 +30,9 @@
 	.align	16
 __pthread_rwlock_rdlock:
 	cfi_startproc
+
+	LIBC_PROBE (rdlock_entry, 1, %rdi)
+
 	xorq	%r10, %r10
 
 	/* Get the lock.  */

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S Sat May 26 00:01:38 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2005, 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@xxxxxxxxxx>, 2002.
 
@@ -21,7 +21,7 @@
 #include <lowlevelrwlock.h>
 #include <pthread-errnos.h>
 #include <kernel-features.h>
-
+#include <stap-probe.h>
 
 	.text
 
@@ -30,6 +30,9 @@
 	.align	16
 __pthread_rwlock_wrlock:
 	cfi_startproc
+
+	LIBC_PROBE (wrlock_entry, 1, %rdi)
+
 	xorq	%r10, %r10
 
 	/* Get the lock.  */

Modified: fsf/trunk/libc/stdio-common/Makefile
==============================================================================
--- fsf/trunk/libc/stdio-common/Makefile (original)
+++ fsf/trunk/libc/stdio-common/Makefile Sat May 26 00:01:38 2012
@@ -56,7 +56,8 @@
 	 tst-fwrite bug16 bug17 tst-swscanf tst-sprintf2 bug18 bug18a \
 	 bug19 bug19a tst-popen2 scanf13 scanf14 scanf15 bug20 bug21 bug22 \
 	 scanf16 scanf17 tst-setvbuf1 tst-grouping bug23 bug24 \
-	 bug-vfprintf-nargs tst-long-dbl-fphex tst-fphex-wide tst-sprintf3
+	 bug-vfprintf-nargs tst-long-dbl-fphex tst-fphex-wide tst-sprintf3 \
+	 bug25
 
 test-srcs = tst-unbputc tst-printf
 

Added: fsf/trunk/libc/stdio-common/bug25.c
==============================================================================
--- fsf/trunk/libc/stdio-common/bug25.c (added)
+++ fsf/trunk/libc/stdio-common/bug25.c Sat May 26 00:01:38 2012
@@ -1,0 +1,70 @@
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+
+static const char expected[] = "\
+\n\
+a\n\
+abbcd55\
+\n\
+a\n\
+abbcd55\
+\n\
+a\n\
+abbcd55\
+\n\
+a\n\
+abbcd55\
+\n\
+a\n\
+abbcd55\
+\n\
+a\n\
+abbcd55\
+\n\
+a\n\
+abbcd55\
+\n\
+a\n\
+abbcd55\
+\n\
+a\n\
+abbcd55\
+\n\
+a\n\
+abbcd55\
+\n\
+a\n\
+abbcd55\
+\n\
+a\n\
+abbcd55\
+\n\
+a\n\
+abbcd55%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
+
+static int
+do_test (void)
+{
+  char *buf = malloc (strlen (expected) + 1);
+  snprintf (buf, strlen (expected) + 1,
+	    "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
+	    "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
+	    "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
+	    "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
+	    "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
+	    "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
+	    "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
+	    "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
+	    "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
+	    "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
+	    "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
+	    "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
+	    "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
+	    "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n",
+	    "a", "b", "c", "d", 5);
+  return strcmp (buf, expected) != 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"

Modified: fsf/trunk/libc/sysdeps/i386/__longjmp.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/__longjmp.S (original)
+++ fsf/trunk/libc/sysdeps/i386/__longjmp.S Sat May 26 00:01:38 2012
@@ -1,6 +1,5 @@
 /* longjmp for i386.
-   Copyright (C) 1995-1998,2000,2002,2005,2006,2009
-   Free Software Foundation, Inc.
+   Copyright (C) 1995-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -20,6 +19,7 @@
 #include <sysdep.h>
 #include <jmpbuf-offsets.h>
 #include <asm-syntax.h>
+#include <stap-probe.h>
 
 	.text
 ENTRY (__longjmp)
@@ -32,6 +32,7 @@
 	movl (JB_SP*4)(%eax), %ecx
 	PTR_DEMANGLE (%edx)
 	PTR_DEMANGLE (%ecx)
+	LIBC_PROBE (longjmp, 3, 4@%eax, -4@8(%esp), 4@%edx)
 	cfi_def_cfa(%eax, 0)
 	cfi_register(%eip, %edx)
 	cfi_register(%esp, %ecx)
@@ -49,6 +50,7 @@
 	cfi_restore(%edi)
 	cfi_restore(%ebp)
 
+	LIBC_PROBE (longjmp_target, 3, 4@%eax, -4@8(%esp), 4@%edx)
 	movl 8(%esp), %eax	/* Second argument is return value.  */
 	movl %ecx, %esp
 #else
@@ -56,12 +58,14 @@
 	movl 8(%esp), %eax	/* Second argument is return value.  */
 	/* Save the return address now.  */
 	movl (JB_PC*4)(%ecx), %edx
+	LIBC_PROBE (longjmp, 3, 4@%ecx, -4@%eax, 4@%edx)
      	/* Restore registers.  */
 	movl (JB_BX*4)(%ecx), %ebx
 	movl (JB_SI*4)(%ecx), %esi
 	movl (JB_DI*4)(%ecx), %edi
 	movl (JB_BP*4)(%ecx), %ebp
 	movl (JB_SP*4)(%ecx), %esp
+	LIBC_PROBE (longjmp_target, 3, 4@%ecx, -4@%ecx, 4@%edx)
 #endif
 	/* Jump to saved PC.  */
      	jmp *%edx

Modified: fsf/trunk/libc/sysdeps/i386/bsd-_setjmp.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/bsd-_setjmp.S (original)
+++ fsf/trunk/libc/sysdeps/i386/bsd-_setjmp.S Sat May 26 00:01:38 2012
@@ -1,5 +1,5 @@
 /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'.  i386 version.
-   Copyright (C) 1994-1997,2000-2002,2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1994-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -24,6 +24,7 @@
 #include <jmpbuf-offsets.h>
 #include "bp-sym.h"
 #include "bp-asm.h"
+#include <stap-probe.h>
 
 #define PARMS	LINKAGE		/* no space for saved regs */
 #define JMPBUF	PARMS
@@ -46,6 +47,7 @@
 #endif
      	movl %ecx, (JB_SP*4)(%edx)
 	movl PCOFF(%esp), %ecx	/* Save PC we are returning to now.  */
+	LIBC_PROBE (setjmp, 3, 4@%edx, -4@$0, 4@%ecx)
 #ifdef PTR_MANGLE
 	PTR_MANGLE (%ecx)
 #endif

Modified: fsf/trunk/libc/sysdeps/i386/bsd-setjmp.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/bsd-setjmp.S (original)
+++ fsf/trunk/libc/sysdeps/i386/bsd-setjmp.S Sat May 26 00:01:38 2012
@@ -1,5 +1,5 @@
 /* BSD `setjmp' entry point to `sigsetjmp (..., 1)'.  i386 version.
-   Copyright (C) 1994-1997,2000,2001,2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1994-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -24,6 +24,7 @@
 #include <jmpbuf-offsets.h>
 #include "bp-sym.h"
 #include "bp-asm.h"
+#include <stap-probe.h>
 
 #define PARMS  LINKAGE		/* no space for saved regs */
 #define JMPBUF PARMS
@@ -48,6 +49,7 @@
 #endif
      	movl %ecx, (JB_SP*4)(%eax)
 	movl PCOFF(%esp), %ecx	/* Save PC we are returning to now.  */
+	LIBC_PROBE (setjmp, 3, 4@%eax, -4@$1, 4@%ecx)
 #ifdef PTR_MANGLE
 	PTR_MANGLE (%ecx)
 #endif

Modified: fsf/trunk/libc/sysdeps/i386/setjmp.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/setjmp.S (original)
+++ fsf/trunk/libc/sysdeps/i386/setjmp.S Sat May 26 00:01:38 2012
@@ -1,6 +1,5 @@
 /* setjmp for i386.
-   Copyright (C) 1995,1996,1997,2000,2001,2005,2006
-	Free Software Foundation, Inc.
+   Copyright (C) 1995-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -22,6 +21,7 @@
 #include <asm-syntax.h>
 #include "bp-sym.h"
 #include "bp-asm.h"
+#include <stap-probe.h>
 
 #define PARMS	LINKAGE		/* no space for saved regs */
 #define JMPBUF	PARMS
@@ -43,6 +43,7 @@
 #endif
      	movl %ecx, (JB_SP*4)(%eax)
 	movl PCOFF(%esp), %ecx	/* Save PC we are returning to now.  */
+	LIBC_PROBE (setjmp, 3, 4@%eax, -4@SIGMSK(%esp), 4@%ecx)
 #ifdef PTR_MANGLE
 	PTR_MANGLE (%ecx)
 #endif

Modified: fsf/trunk/libc/sysdeps/ieee754/flt-32/e_acosf.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/flt-32/e_acosf.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/flt-32/e_acosf.c Sat May 26 00:01:38 2012
@@ -46,7 +46,7 @@
 	    return (x-x)/(x-x);		/* acos(|x|>1) is NaN */
 	}
 	if(ix<0x3f000000) {	/* |x| < 0.5 */
-	    if(ix<=0x23000000) return pio2_hi+pio2_lo;/*if|x|<2**-57*/
+	    if(ix<=0x32800000) return pio2_hi+pio2_lo;/*if|x|<=2**-26*/
 	    z = x*x;
 	    p = z*(pS0+z*(pS1+z*(pS2+z*(pS3+z*(pS4+z*pS5)))));
 	    q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4)));

Modified: fsf/trunk/libc/sysdeps/powerpc/powerpc32/dl-irel.h
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc32/dl-irel.h (original)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc32/dl-irel.h Sat May 26 00:01:38 2012
@@ -1,6 +1,6 @@
 /* Machine-dependent ELF indirect relocation inline functions.
    PowerPC version.
-   Copyright (C) 2009 Free Software Foundation, Inc.
+   Copyright (C) 2009-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -29,7 +29,7 @@
 __attribute ((always_inline))
 elf_ifunc_invoke (Elf32_Addr addr)
 {
-  return ((Elf32_Addr (*) (void)) (addr)) ();
+  return ((Elf32_Addr (*) (unsigned long int)) (addr)) (GLRO(dl_hwcap));
 }
 
 static inline void

Modified: fsf/trunk/libc/sysdeps/powerpc/powerpc32/dl-machine.h
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc32/dl-machine.h (original)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc32/dl-machine.h Sat May 26 00:01:38 2012
@@ -1,5 +1,5 @@
 /* Machine-dependent ELF dynamic relocation inline functions.  PowerPC version.
-   Copyright (C) 1995-2003, 2005, 2006, 2011 Free Software Foundation, Inc.
+   Copyright (C) 1995-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -23,6 +23,7 @@
 
 #include <assert.h>
 #include <dl-tls.h>
+#include <dl-irel.h>
 
 /* Translate a processor specific dynamic tag to the index
    in l_info array.  */
@@ -308,7 +309,7 @@
       && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0)
       && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1)
       && __builtin_expect (!skip_ifunc, 1))
-    value = ((Elf32_Addr (*) (void)) value) ();
+    value = elf_ifunc_invoke (value);
 
   /* A small amount of code is duplicated here for speed.  In libc,
      more than 90% of the relocs are R_PPC_RELATIVE; in the X11 shared

Modified: fsf/trunk/libc/sysdeps/powerpc/powerpc64/dl-irel.h
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc64/dl-irel.h (original)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc64/dl-irel.h Sat May 26 00:01:38 2012
@@ -1,6 +1,6 @@
 /* Machine-dependent ELF indirect relocation inline functions.
    PowerPC64 version.
-   Copyright (C) 2009, 2011 Free Software Foundation, Inc.
+   Copyright (C) 2009-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -31,7 +31,7 @@
 __attribute ((always_inline))
 elf_ifunc_invoke (Elf64_Addr addr)
 {
-  return ((Elf64_Addr (*) (void)) (addr)) ();
+  return ((Elf64_Addr (*) (unsigned long int)) (addr)) (GLRO(dl_hwcap));
 }
 
 static inline void

Modified: fsf/trunk/libc/sysdeps/powerpc/powerpc64/dl-machine.h
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc64/dl-machine.h (original)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc64/dl-machine.h Sat May 26 00:01:38 2012
@@ -545,7 +545,7 @@
       value = (Elf64_Addr) &opd;
     }
 #endif
-  return ((Elf64_Addr (*) (void)) value) ();
+  return ((Elf64_Addr (*) (unsigned long int)) value) (GLRO(dl_hwcap));
 }
 
 /* Perform the relocation specified by RELOC and SYM (which is fully

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/configure
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/configure (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/configure Sat May 26 00:01:38 2012
@@ -284,25 +284,25 @@
 case "$machine" in
   i386*)
     libc_cv_gcc_unwind_find_fde=yes
-    arch_minimum_kernel=2.2.0
+    arch_minimum_kernel=2.4.0
     ;;
   powerpc/powerpc32)
     libc_cv_gcc_unwind_find_fde=yes
-    arch_minimum_kernel=2.2.0
+    arch_minimum_kernel=2.4.0
     ;;
   powerpc/powerpc64)
     arch_minimum_kernel=2.4.21
     ;;
   s390/s390-32)
     libc_cv_gcc_unwind_find_fde=yes
-    arch_minimum_kernel=2.2.10
+    arch_minimum_kernel=2.4.0
     ;;
   s390/s390-64)
     libc_cv_gcc_unwind_find_fde=yes
     arch_minimum_kernel=2.4.0
     ;;
   sh*)
-    arch_minimum_kernel=2.3.99
+    arch_minimum_kernel=2.4.0
     libc_cv_gcc_unwind_find_fde=yes
     ;;
   sparc/sparc64*)
@@ -311,13 +311,10 @@
     ;;
   sparc*)
     libc_cv_gcc_unwind_find_fde=yes
-    arch_minimum_kernel=2.2.0
-    ;;
-  x86_64*)
     arch_minimum_kernel=2.4.0
     ;;
   *)
-    arch_minimum_kernel=2.2.0
+    arch_minimum_kernel=2.4.0
     ;;
 esac
 if test -n "$minimum_kernel"; then

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/configure.in
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/configure.in (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/configure.in Sat May 26 00:01:38 2012
@@ -41,25 +41,25 @@
 case "$machine" in
   i386*)
     libc_cv_gcc_unwind_find_fde=yes
-    arch_minimum_kernel=2.2.0
+    arch_minimum_kernel=2.4.0
     ;;
   powerpc/powerpc32)
     libc_cv_gcc_unwind_find_fde=yes
-    arch_minimum_kernel=2.2.0
+    arch_minimum_kernel=2.4.0
     ;;
   powerpc/powerpc64)
     arch_minimum_kernel=2.4.21
     ;;
   s390/s390-32)
     libc_cv_gcc_unwind_find_fde=yes
-    arch_minimum_kernel=2.2.10
+    arch_minimum_kernel=2.4.0
     ;;
   s390/s390-64)
     libc_cv_gcc_unwind_find_fde=yes
     arch_minimum_kernel=2.4.0
     ;;
   sh*)
-    arch_minimum_kernel=2.3.99
+    arch_minimum_kernel=2.4.0
     libc_cv_gcc_unwind_find_fde=yes
     ;;
   sparc/sparc64*)
@@ -68,13 +68,10 @@
     ;;
   sparc*)
     libc_cv_gcc_unwind_find_fde=yes
-    arch_minimum_kernel=2.2.0
-    ;;
-  x86_64*)
     arch_minimum_kernel=2.4.0
     ;;
   *)
-    arch_minimum_kernel=2.2.0
+    arch_minimum_kernel=2.4.0
     ;;
 esac
 if test -n "$minimum_kernel"; then

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S Sat May 26 00:01:38 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001,2004,2005,2006,2009 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -18,6 +18,7 @@
 #include <sysdep.h>
 #include <jmpbuf-offsets.h>
 #include <asm-syntax.h>
+#include <stap-probe.h>
 
 
 	.section .rodata.str1.1,"aMS",@progbits,1
@@ -78,7 +79,9 @@
 	cfi_adjust_cfa_offset(-12)
 	movl	4(%esp), %ecx
 
-.Lok:	/* We add unwind information for the target here.  */
+.Lok:
+	LIBC_PROBE (longjmp, 3, 4@%ecx, -4@8(%esp), 4@%edx)
+	/* We add unwind information for the target here.  */
 	cfi_def_cfa(%ecx, 0)
 	cfi_register(%eip, %edx)
 	cfi_register(%esp, %edi)
@@ -101,5 +104,6 @@
 	cfi_restore(%ebp)
 
 	/* Jump to saved PC.  */
+	LIBC_PROBE (longjmp_target, 3, 4@%ecx, -4@%eax, 4@%edx)
 	jmp	*%edx
 END (____longjmp_chk)

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/chown.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/chown.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/chown.c Sat May 26 00:01:38 2012
@@ -24,7 +24,6 @@
 #include <bp-checks.h>
 
 #include <linux/posix_types.h>
-#include <kernel-features.h>
 
 /*
   In Linux 2.1.x the chown functions have been changed.  A new function lchown
@@ -41,44 +40,12 @@
 extern int __real_chown (const char *__file, uid_t __owner, gid_t __group);
 
 
-#ifdef __NR_chown32
-#  if __ASSUME_32BITUIDS == 0
-/* This variable is shared with all files that need to check for 32bit
-   uids.  */
-extern int __libc_missing_32bit_uids;
-# endif
-#endif /* __NR_chown32 */
+/* Consider moving to syscalls.list.  */
 
 int
 __real_chown (const char *file, uid_t owner, gid_t group)
 {
-#if __ASSUME_32BITUIDS
   return INLINE_SYSCALL (chown32, 3, CHECK_STRING (file), owner, group);
-#else
-  /* !__ASSUME_32BITUIDS */
-# ifdef __NR_chown32
-  if (__libc_missing_32bit_uids <= 0)
-    {
-      int result;
-      int saved_errno = errno;
-
-      result = INLINE_SYSCALL (chown32, 3, CHECK_STRING (file), owner, group);
-      if (result == 0 || errno != ENOSYS)
-	return result;
-
-      __set_errno (saved_errno);
-      __libc_missing_32bit_uids = 1;
-    }
-# endif /* __NR_chown32 */
-  if (((owner + 1) > (uid_t) ((__kernel_uid_t) -1U))
-      || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U)))
-    {
-      __set_errno (EINVAL);
-      return -1;
-    }
-
-  return INLINE_SYSCALL (chown, 3, CHECK_STRING (file), owner, group);
-#endif
 }
 
 

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/fchown.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/fchown.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/fchown.c Sat May 26 00:01:38 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2003, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -22,46 +22,13 @@
 #include <sys/syscall.h>
 
 #include <linux/posix_types.h>
-#include <kernel-features.h>
 
-#ifdef __NR_fchown32
-# if __ASSUME_32BITUIDS == 0
-/* This variable is shared with all files that need to check for 32bit
-   uids.  */
-extern int __libc_missing_32bit_uids;
-# endif
-#endif /* __NR_fchown32 */

[... 2493 lines stripped ...]
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits