This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug dynamic-link/21528] Duplicated minimal strtoul implementations in ld.so
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 08 Jun 2017 19:48:25 +0000
- Subject: [Bug dynamic-link/21528] Duplicated minimal strtoul implementations in ld.so
- Auto-submitted: auto-generated
- References: <bug-21528-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=21528
--- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, hjl/tunables/master has been created
at e935e64770ad0e9dce54a4d9672d2ee8c469058a (commit)
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e935e64770ad0e9dce54a4d9672d2ee8c469058a
commit e935e64770ad0e9dce54a4d9672d2ee8c469058a
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue May 23 20:22:13 2017 -0700
Add TUNABLES to control IFUNC selection and cache sizes
The current IFUNC selection is based on microbenchmarks in glibc. It
should give the best performance for most workloads. But other choices
may have better performance for a particular workload or on the hardware
which wasn't available at the selection was made. The environment
variable, GLIBC_IFUNC=-xxx,yyy,-zzz...., can be used to enable CPU/ARCH
feature yyy, disable CPU/ARCH feature yyy and zzz, where the feature
name is case-sensitive and has to match the ones in cpu-features.h. It
can be used by glibc developers to override the IFUNC selection to tune
for a new processor or improve performance for a particular workload.
It isn't intended for normal end users.
NOTE: the IFUNC selection may change over time. Please check all
multiarch implementations when experimenting.
2017-06-07 H.J. Lu <hongjiu.lu@intel.com>
Erich Elsen <eriche@google.com>
* elf/dl-tunables.list (tune): Add ifunc, non_temporal_threshold,
data_cache_size and shared_cache_size.
* sysdeps/unix/sysv/linux/x86/dl-sysdep.c: New file.
* sysdeps/x86/cpu-tunables.c: Likewise.
* sysdeps/x86/cacheinfo.c
(init_cacheinfo): Check and get data cache size, shared cache
size and non temporal threshold from cpu_features.
* sysdeps/x86/cpu-features.c (TUNABLE_NAMESPACE): New.
(TUNABLE_CALLBACK (set_ifunc)): Likewise.
Include <elf/dl-tunables.h> for TUNABLES is on.
Include <string.h> and <unistd.h> if TUNABLES is off.
(__environ): New.
(_dl_x86_set_ifunc): Likewise.
(init_cpu_features): Use TUNABLE_GET if TUNABLES is on.
Otherwise, search the environment strings to set ifunc,
data cache size, shared cache size and non temporal threshold.
* sysdeps/x86/cpu-features.h (cpu_features): Add data_cache_size,
shared_cache_size and non_temporal_threshold.
(DEFAULT_MEMCMP): New.
(DEFAULT_STRLEN): Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9f8e103a6c79db021f934c6b3b69dd5f423b2c0a
commit 9f8e103a6c79db021f934c6b3b69dd5f423b2c0a
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Jun 5 12:42:58 2017 -0700
ld.so: Consolidate 2 strtouls into _dl_strtoul
There are 2 minimal strtoul implementations in ld.so:
1. __strtoul_internal in elf/dl-minimal.c.
2. tunables_strtoul in elf/dl-tunables.c.
This patch adds _dl_strtoul to replace them. Tested builds with and
without --enable-tunables.
[BZ #21528]
* elf/dl-minimal.c (__strtoul_internal): Removed.
(strtoul): Likewise.
* elf/dl-misc.c (_dl_strtoul): New function.
* elf/dl-tunables.c (tunables_strtoul): Removed.
(tunable_initialize): Replace tunables_strtoul with _dl_strtoul.
* elf/rtld.c (process_envvars): Likewise.
* sysdeps/unix/sysv/linux/dl-librecon.h (_dl_osversion_init):
Likewise.
* sysdeps/generic/ldsodefs.h (_dl_strtoul): New prototype.
-----------------------------------------------------------------------
--
You are receiving this mail because:
You are on the CC list for the bug.