glibc:dj/malloc-tcache

Last commit made on 2017-05-11
Get this branch:
git clone -b dj/malloc-tcache https://git.launchpad.net/glibc

Branch merges

Branch information

Name:
dj/malloc-tcache
Repository:
lp:glibc

Recent commits

827734f... by DJ Delorie

Tweak Makefile, asserts, comments.

* Un-Wundef-ify -DUSE_TCACHE
* More asserts in tcache get/put functions
* Clarify redundancy in tcache structure

4da80db... by DJ Delorie

Updates to tcache

* remove legacy environment variables
* remove tcache mallopt() options
* tweak size2tidx/tidx2size macros to be more accurate and consistent
* add comments
* tcache_max -> tcache_bins
* tunables made SXID_IGNORE
* dedup fastbin removal code snippets
* document tunables
* document probes
* DeCamelCaseify

6d62056... by DJ Delorie

Whitespace and common code tweaks

Fix whitespace around operators.

Define MAYBE_INIT_TCACHE to empty when disabled; remove wrapper

Add helper functions for tcache_get() and tcache_put() to collect
common code in one spot.

dad11d1... by DJ Delorie

Merge branch 'master' into dj/malloc-tcache

b24d6d1... by Joseph Myers <email address hidden>

Regenerate MIPS catan, catanh long double ulps.

This patch regenerates MIPS catan and catanh ulps for long double with
fixed expected results for the tests of those functions. ulps for
other types (which may see variation depending on whether glibc is
built for a processor with fused multiply-add support) are
deliberately not reduced. ulps are not regenerated for powerpc-nofpu
as such regeneration does not result in any changes for long double.

 * sysdeps/mips/mips64/libm-test-ulps: Update catan and catanh ulps
 for long double with corrected test expectations.

60f9423... by Adhemerval Zanella <email address hidden>

Consolidate Linux send implementation

This patch consolidates the send Linux syscall implementation on
sysdeps/unix/sysv/linux/send{to}.c. The changes are:

  1. Remove send from auto-generation syscalls.list on the architecture
     that uses __NR_send.
  2. Define __NR_send for architectures that supports it. It was done instead
     of defining in default kernel-features.h because current Linux practice
     for new ports are to implement only __NR_sendto [1] and it will
     require adding new kernel-features for ports that do not require it
     (aarch64 for instance).
  3. Remove __ASSUME_SENDTO_FOR_SEND_SYSCALL and decide to use
     __NR_sendto for send generation based on __ASSUME_SENDTO_SYSCALL.

Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32,
aarch64-linux-gnu, arm-linux-gnueabihf, and powerpc64le-linux-gnu.

 * sysdeps/unix/sysv/linux/sysdep.h (HAVE_INTERNAL_SEND_SYMBOL):
 Define.
 * sysdeps/unix/sysv/linux/aarch64/sysdep.h
 (HAVE_INTERNAL_SEND_SYMBOL): Undefine.
 * sysdeps/unix/sysv/linux/nios2/sysdep.h
 (HAVE_INTERNAL_SEND_SYMBOL): Likewise.
 * sysdeps/unix/sysv/linux/tile/sysdep.h
 (HAVE_INTERNAL_SEND_SYMBOL): Likewise.
 * sysdeps/unix/sysv/linux/alpha/kernel-features.h
 (__ASSUME_RECV_SYSCALL): Define.
 * sysdeps/unix/sysv/linux/arm/kernel-features.h
 (__ASSUME_RECV_SYSCALL): Likewise.
 * sysdeps/unix/sysv/linux/hppa/kernel-features.h
 (__ASSUME_RECV_SYSCALL): Likewise.
 * sysdeps/unix/sysv/linux/ia64/kernel-features.h
 (__ASSUME_RECV_SYSCALL): Likewise.
 * sysdeps/unix/sysv/linux/mips/kernel-features.h
 (__ASSUME_RECV_SYSCALL): Likewise.
 * sysdeps/unix/sysv/linux/i386/kernel-features.h
 (__ASSUME_SENDTO_FOR_SEND_SYSCALL): Remove define.
 * sysdeps/unix/sysv/linux/m68k/kernel-features.h
 (__ASSUME_SENDTO_FOR_SEND_SYSCALL): Likewise.
 * sysdeps/unix/sysv/linux/s390/kernel-features.h
 (__ASSUME_SENDTO_FOR_SEND_SYSCALL): Likewise.
 * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove send from
 auto-generation list.
 * sysdeps/unix/sysv/linux/arm/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/hppa/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewike.
 * sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/send.c: Simplify includes.
 (__ASSUME_SENDTO_FOR_SEND_SYSCALL): Replace by
 __ASSUME_SENDTO_SYSCALL.
 * sysdeps/unix/sysv/linux/x86_64/send.c: Remove file.
 * sysdeps/unix/sysv/linux/mips/mips64/send.c: Likewise.
 * sysdeps/unix/sysv/linux/generic/send.c: Likewise.

06cf371... by Adhemerval Zanella <email address hidden>

Consolidate Linux sendto implementation

This patch consolidates the sendto Linux syscall implementation on
sysdeps/unix/sysv/linux/sendto.c. The changes are:

   1. Define __ASSUME_SENDTO_SYSCALL by default.
   2. Undef it for architectures that do not support __NR_sendto.

Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32,
aarch64-linux-gnu, arm-linux-gnueabihf, and powerpc64le-linux-gnu.

 * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove sendto from
 auto-generation list.
 * sysdeps/unix/sysv/linux/arm/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/generic/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/hppa/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/kernel-features.h
 (__ASSUME_SENDTO_SYSCALL): Define by default.
 * sysdeps/unix/sysv/linux/i386/kernel-features.h
 (__ASSUME_SENDTO_SYSCALL): Undef it is kernel does not support
 __NR_sendto.
 * sysdeps/unix/sysv/linux/m68k/kernel-features.h
 (__ASSUME_SENDTO_SYSCALL): Likewise.
 * sysdeps/unix/sysv/linux/s390/kernel-features.h
 (__ASSUME_SENDTO_SYSCALL): Likewise.
 * sysdeps/unix/sysv/linux/microblaze/kernel-features.h
 (__ASSUME_SENDTO_SYSCALL): Remove definition.
 * sysdeps/unix/sysv/linux/powerpc/kernel-features.h
 (__ASSUME_SENDTO_SYSCALL): Likewise.
 * sysdeps/unix/sysv/linux/sh/kernel-features.h:
 (__ASSUME_SENDTO_SYSCALL): Likewise.
 * sysdeps/unix/sysv/linux/sendto.c: Simplify includes.

df799d9... by Adhemerval Zanella

Consolidate Linux recv implementation

This patch consolidates the recv Linux syscall implementation on
sysdeps/unix/sysv/linux/recv.c. The changes are:

  1. Remove recv from auto-generation syscalls.list on the architecture
     that uses __NR_recv.
  2. Define __NR_recv for architectures that supports it. It was done
     instead of defining in default kernel-features.h because current Linux
     practice for new ports is to implement only __NR_recvfrom [1] and it will
     require adding new kernel-features for ports that do not require it
     (aarch64 for instance).
  3. Remove __ASSUME_RECVFROM_FOR_RECV_SYSCALL and decide to use
     __NR_recvfrom for recv generation based on __ASSUME_RECVFROM_SYSCALL.

Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32,
aarch64-linux-gnu, arm-linux-gnueabihf, and powerpc64le-linux-gnu.

 * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove recv from
 auto-generation list.
 * sysdeps/unix/sysv/linux/arm/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/hppa/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/alpha/kernel-features.h
 (__ASSUME_RECV_SYSCALL): New define.
 * sysdeps/unix/sysv/linux/arm/kernel-features.h
 (__ASSUME_RECV_SYSCALL): Likewise.
 * sysdeps/unix/sysv/linux/hppa/kernel-features.h
 (__ASSUME_RECV_SYSCALL): Likewise.
 * sysdeps/unix/sysv/linux/ia64/kernel-features.h
 (__ASSUME_RECV_SYSCALL): Likewise.
 * sysdeps/unix/sysv/linux/mips/kernel-features.h
 (__ASSUME_RECV_SYSCALL): Likewise.
 * sysdeps/unix/sysv/linux/i386/kernel-features.h
 (__ASSUME_RECVFROM_FOR_RECV_SYSCALL): Remove define.
 * sysdeps/unix/sysv/linux/m68k/kernel-features.h
 (__ASSUME_RECVFROM_FOR_RECV_SYSCALL): Remove define.
 * sysdeps/unix/sysv/linux/s390/kernel-features.h
 (__ASSUME_RECVFROM_FOR_RECV_SYSCALL): Remove define.
 * sysdeps/unix/sysv/linux/generic/recv.c: Remove file.
 * sysdeps/unix/sysv/linux/mips/mips64/recv.c: Likewise.
 * sysdeps/unix/sysv/linux/x86_64/recv.c: Likewise.
 * sysdeps/unix/sysv/linux/recv.c: Simplify includes.
 (__libc_recv): Use __ASSUME_RECVFROM_SYSCALL instead of
 __ASSUME_RECVFROM_FOR_RECV_SYSCALL to issue recvfrom syscall.

[1] include/asm-generic/unistd.h (__ARCH_WANT_SYSCALL_DEPRECATED)

1f8161a... by Adhemerval Zanella <email address hidden>

Consolidate Linux recvfrom implementation

This patch consolidates the recvfrom Linux syscall implementation on
sysdeps/unix/sysv/linux/recvfrom.c. The changes are:

  1. Define __ASSUME_RECVFROM_SYSCALL by default
  2. Undef it for architectures that do not support __NR_recvfrom.

Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32,
aarch64-linux-gnu, arm-linux-gnueabihf, and powerpc64le-linux-gnu.

 * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove recvfrom from
 auto-generation list.
 * sysdeps/unix/sysv/linux/arm/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/generic/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/hppa/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/i386/kernel-features.h
 * sysdeps/unix/sysv/linux/kernel-features.h
 (__ASSUME_RECVFROM_SYSCALL): Define by default.
 (__ASSUME_RECVFROM_SYSCALL): Undef it if kernel does not support
 __NR_recvfrom.
 * sysdeps/unix/sysv/linux/m68k/kernel-features.h
 (__ASSUME_RECVFROM_SYSCALL): Likewise.
 * sysdeps/unix/sysv/linux/s390/kernel-features.h
 (__ASSUME_RECVFROM_SYSCALL): Likewise.
 * sysdeps/unix/sysv/linux/microblaze/kernel-features.h
 (__ASSUME_RECVFROM_SYSCALL): Remove definition.
 * sysdeps/unix/sysv/linux/powerpc/kernel-features.h
 (__ASSUME_RECVFROM_SYSCALL): Likewise.
 * sysdeps/unix/sysv/linux/sh/kernel-features.h
 (__ASSUME_RECVFROM_SYSCALL): Likewise.
 * sysdeps/unix/sysv/linux/sparc/kernel-features.h
 (__ASSUME_RECVFROM_SYSCALL): Likewise.
 * sysdeps/unix/sysv/linux/recvfrom.c: Simplify includes.

3e9ff42... by Adhemerval Zanella

Consolidate Linux connect implementation

This patch consolidates the connect Linux syscall implementation on
sysdeps/unix/sysv/linux/accept.c. The changes are:

  1. Remove connect from auto-generation syscalls.list on the architecture
     that uses __NR_connect.
  2. Define __NR_connect as default (__ASSUME_CONNECT_SYSCALL) and undef for
     architectures that do not support it.

Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32,
aarch64-linux-gnu, arm-linux-gnueabihf, and powerpc64le-linux-gnu.

 * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove connect from
 auto-generation list.
 * sysdeps/unix/sysv/linux/arm/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/generic/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/hppa/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise.
 * sysdeps/unix/sysv/linux/connect.c: Simplify include list.
 * sysdeps/unix/sysv/linux/kernel-features.h
 (__ASSUME_CONNECT_SYSCALL): Define.
 * sysdeps/unix/sysv/linux/i386/kernel-features.h
 (__ASSUME_CONNECT_SYSCALL): Undef if kernel does not support it.
 * sysdeps/unix/sysv/linux/m68k/kernel-features.h
 (__ASSUME_CONNECT_SYSCALL): Likewise.
 * sysdeps/unix/sysv/linux/s390/kernel-features.h
 (__ASSUME_CONNECT_SYSCALL): Likewise.
 * sysdeps/unix/sysv/linux/sparc/kernel-features.h
 (__ASSUME_CONNECT_SYSCALL): Likewise.