mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Add elision tunables
This patch adds several new tunables to control the behavior of elision on supported platforms[1]. Since elision now depends on tunables, we should always *compile* with elision enabled, and leave the code disabled, but available for runtime selection. This gives us *much* better compile-time testing of the existing code to avoid bit-rot[2]. Tested on ppc, ppc64, ppc64le, s390x and x86_64. [1] This part of the patch was initially proposed by Paul Murphy but was "staled" because the framework have changed since the patch was originally proposed: https://patchwork.sourceware.org/patch/10342/ [2] This part of the patch was inititally proposed as a RFC by Carlos O'Donnell. Make sense to me integrate this on the patch: https://sourceware.org/ml/libc-alpha/2017-05/msg00335.html * elf/dl-tunables.list: Add elision parameters. * manual/tunables.texi: Add entries about elision tunable. * sysdeps/unix/sysv/linux/powerpc/elision-conf.c: Add callback functions to dynamically enable/disable elision. Add multiple callbacks functions to set elision parameters. Deleted __libc_enable_secure check. * sysdeps/unix/sysv/linux/s390/elision-conf.c: Likewise. * sysdeps/unix/sysv/linux/x86/elision-conf.c: Likewise. * configure: Regenerated. * configure.ac: Option enable_lock_elision was deleted. * config.h.in: ENABLE_LOCK_ELISION flag was deleted. * config.make.in: Remove references to enable_lock_elision. * manual/install.texi: Elision configure option was removed. * INSTALL: Regenerated to remove enable_lock_elision. * nptl/Makefile: Disable elision so it can verify error case for destroying a mutex. * sysdeps/powerpc/nptl/elide.h: Cleanup ENABLE_LOCK_ELISION check. Deleted macros for the case when ENABLE_LOCK_ELISION was not defined. * sysdeps/s390/configure: Regenerated. * sysdeps/s390/configure.ac: Remove references to enable_lock_elision.. * nptl/tst-mutex8.c: Deleted all #ifndef ENABLE_LOCK_ELISION from the test. * sysdeps/powerpc/powerpc32/sysdep.h: Deleted all ENABLE_LOCK_ELISION checks. * sysdeps/powerpc/powerpc64/sysdep.h: Likewise. * sysdeps/powerpc/sysdep.h: Likewise. * sysdeps/s390/nptl/bits/pthreadtypes-arch.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/force-elision.h: Likewise. * sysdeps/unix/sysv/linux/s390/elision-conf.h: Likewise. * sysdeps/unix/sysv/linux/s390/force-elision.h: Likewise. * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/s390/Makefile: Remove references to enable-lock-elision. Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
This commit is contained in:
committed by
Tulio Magno Quites Machado Filho
parent
a5a2a76bb7
commit
07ed18d26a
17
configure
vendored
17
configure
vendored
@ -679,7 +679,6 @@ enable_werror
|
||||
all_warnings
|
||||
force_install
|
||||
bindnow
|
||||
enable_lock_elision
|
||||
hardcoded_path_in_tests
|
||||
enable_timezone_tools
|
||||
use_default_link
|
||||
@ -768,7 +767,6 @@ enable_profile
|
||||
enable_timezone_tools
|
||||
enable_hardcoded_path_in_tests
|
||||
enable_stackguard_randomization
|
||||
enable_lock_elision
|
||||
enable_hidden_plt
|
||||
enable_bind_now
|
||||
enable_stack_protector
|
||||
@ -1428,8 +1426,6 @@ Optional Features:
|
||||
--enable-stackguard-randomization
|
||||
initialize __stack_chk_guard canary with a random
|
||||
number at program start
|
||||
--enable-lock-elision=yes/no
|
||||
Enable lock elision for pthread mutexes by default
|
||||
--disable-hidden-plt do not hide internal function calls to avoid PLT
|
||||
--enable-bind-now disable lazy relocations in DSOs
|
||||
--enable-stack-protector=[yes|no|all|strong]
|
||||
@ -3395,19 +3391,6 @@ if test "$enable_stackguard_randomize" = yes; then
|
||||
|
||||
fi
|
||||
|
||||
# Check whether --enable-lock-elision was given.
|
||||
if test "${enable_lock_elision+set}" = set; then :
|
||||
enableval=$enable_lock_elision; enable_lock_elision=$enableval
|
||||
else
|
||||
enable_lock_elision=no
|
||||
fi
|
||||
|
||||
|
||||
if test "$enable_lock_elision" = yes ; then
|
||||
$as_echo "#define ENABLE_LOCK_ELISION 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
# Check whether --enable-hidden-plt was given.
|
||||
if test "${enable_hidden_plt+set}" = set; then :
|
||||
enableval=$enable_hidden_plt; hidden=$enableval
|
||||
|
Reference in New Issue
Block a user