about summary refs log tree commit diff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* libc-internal.h: add ALIGN helper macrosMike Frysinger2013-06-241-0/+20
| | | | | | | Rather than open coding the masks, add helper macros to do the magic. This makes code easier to read. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Fix loop construction to functions callsAdhemerval Zanella2013-06-201-0/+10
| | | | | | Check wheter the compiler has the option -fno-tree-loop-distribute-patterns to inhibit loop transformation to library calls and uses it on memset and memmove default implementation to avoid recursive calls.
* Set/restore rounding mode only when neededSiddhesh Poyarekar2013-06-121-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The most common use case of math functions is with default rounding mode, i.e. rounding to nearest. Setting and restoring rounding mode is an unnecessary overhead for this, so I've added support for a context, which does the set/restore only if the FP status needs a change. The code is written such that only x86 uses these. Other architectures should be unaffected by it, but would definitely benefit if the set/restore has as much overhead relative to the rest of the code, as the x86 bits do. Here's a summary of the performance improvement due to these improvements; I've only mentioned functions that use the set/restore and have benchmark inputs for x86_64: Before: cos(): ITERS:4.69335e+08: TOTAL:28884.6Mcy, MAX:4080.28cy, MIN:57.562cy, 16248.6 calls/Mcy exp(): ITERS:4.47604e+08: TOTAL:28796.2Mcy, MAX:207.721cy, MIN:62.385cy, 15543.9 calls/Mcy pow(): ITERS:1.63485e+08: TOTAL:28879.9Mcy, MAX:362.255cy, MIN:172.469cy, 5660.86 calls/Mcy sin(): ITERS:3.89578e+08: TOTAL:28900Mcy, MAX:704.859cy, MIN:47.583cy, 13480.2 calls/Mcy tan(): ITERS:7.0971e+07: TOTAL:28902.2Mcy, MAX:1357.79cy, MIN:388.58cy, 2455.55 calls/Mcy After: cos(): ITERS:6.0014e+08: TOTAL:28875.9Mcy, MAX:364.283cy, MIN:45.716cy, 20783.4 calls/Mcy exp(): ITERS:5.48578e+08: TOTAL:28764.9Mcy, MAX:191.617cy, MIN:51.011cy, 19071.1 calls/Mcy pow(): ITERS:1.70013e+08: TOTAL:28873.6Mcy, MAX:689.522cy, MIN:163.989cy, 5888.18 calls/Mcy sin(): ITERS:4.64079e+08: TOTAL:28891.5Mcy, MAX:6959.3cy, MIN:36.189cy, 16062.8 calls/Mcy tan(): ITERS:7.2354e+07: TOTAL:28898.9Mcy, MAX:1295.57cy, MIN:380.698cy, 2503.7 calls/Mcy So the improvements are: cos: 27.9089% exp: 22.6919% pow: 4.01564% sin: 19.1585% tan: 1.96086% The downside of the change is that it will have an adverse performance impact on non-default rounding modes, but I think the tradeoff is justified.
* Fix indentation and add copyright header to time.hSiddhesh Poyarekar2013-06-111-4/+21
|
* Fix symbol definitions for __clock_* functionsSiddhesh Poyarekar2013-06-111-0/+1
| | | | | | __clock_gettime and other __clock_* functions could result in an extra PLT reference within libc.so if it actually gets used. None of the code currently uses them, which is why this probably went unnoticed.
* Avoid use of "register" as optimization hint.Joseph Myers2013-06-071-4/+4
|
* Fix leading whitespaces.Ondrej Bilka2013-06-061-1/+1
|
* Add #include <stdint.h> for uint[32|64]_t usage (except installed headers).Ryan S. Arnold2013-05-162-1/+2
|
* New <math.h> macro named issignaling to check for a signaling NaN (sNaN).Thomas Schwinge2013-04-021-0/+3
| | | | It is based on draft TS 18661 and currently enabled as a GNU extension.
* Avoid unconditional __call_tls_dtors calls in static linking.Roland McGrath2013-03-281-2/+6
|
* sys/cdefs.h: export __attribute_alloc_size__Mike Frysinger2013-02-182-5/+3
| | | | | | | | Since we want to use this in installed headers, move it to the installed sys/cdefs.h. This requires a slight tweaking of the name (add trailing underscores). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* unify xmalloc prototypes & friendsMike Frysinger2013-02-181-0/+33
| | | | | | | | These prototypes are duplicated in many places. Add a dedicated header for holding prototypes for program-specific functions to avoid that. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* C++11 thread_local destructors supportSiddhesh Poyarekar2013-02-182-0/+8
| | | | | | | | | | | This feature is specifically for the C++ compiler to offload calling thread_local object destructors on thread program exit, to glibc. This is to overcome the possible complication of destructors of thread_local objects getting called after the DSO in which they're defined is unloaded by the dynamic linker. The DSO is marked as 'unloadable' if it has a constructed thread_local object and marked as 'unloadable' again when all the constructed thread_local objects defined in it are destroyed.
* Remove __ptrvalue, __bounded and __unbounded.Joseph Myers2013-02-131-1/+1
|
* Remove redunant "warning: " prefix from stub warnings.Roland McGrath2013-02-121-2/+1
|
* Remove lots of inline keywords.Roland McGrath2013-02-071-1/+1
|
* Don't use GLIBC_PRIVATE errno outside of librariesAndreas Schwab2013-02-042-12/+14
|
* Improve link_map.l_addr comment.Jan Kratochvil2013-02-021-1/+2
|
* Fix cacos real-part inaccuracy for result real part near 0 (bug 15023).Joseph Myers2013-01-171-1/+11
|
* Hide reference to mktemp in libpthreadAndreas Schwab2013-01-161-0/+1
|
* Remove __GLIBC_HAVE_LONG_LONG.Joseph Myers2013-01-111-8/+0
|
* Remove __USE_ANSI.Joseph Myers2013-01-101-3/+0
|
* Update copyright notices with scripts/update-copyrights.Joseph Myers2013-01-0217-18/+17
|
* Update version.h and include/features.h for 2.17 release. glibc-2.17David S. Miller2012-12-241-1/+1
|
* [BZ #14898]Andreas Schwab2012-12-071-1/+1
| | | | | * include/link.h (FORCED_DYNAMIC_TLS_OFFSET) [NO_TLS_OFFSET == 0]: Change to -1.
* * sunrpc/rpc/svc.h (__svc_accept_failed): Move declaration...Siddhesh Poyarekar2012-11-301-0/+2
| | | | * include/rpc/svc.h: ... here.
* Cast to __intptr_t before casting pointer to int64H.J. Lu2012-11-261-0/+16
|
* Check supported DF_1_XXX bitsH.J. Lu2012-11-211-0/+6
|
* Add recvmmsg and sendmmsg to the generic glibc API.Thomas Schwinge2012-11-201-0/+4
|
* [BZ #157] Remove include/stub-tag.h for good.Thomas Schwinge2012-11-041-4/+0
|
* Make fma use of Dekker and Knuth algorithms use round-to-nearest (bug 14796).Joseph Myers2012-11-031-0/+1
|
* Compile x86 rtld with -mno-sse -mno-mmxH.J. Lu2012-11-021-0/+4
|
* conformtest: Add test data for fenv.h.Joseph Myers2012-11-021-0/+2
|
* Test _ISOMAC in include/sys/syslog.h.Joseph Myers2012-11-021-0/+2
|
* BZ#14743: Move clock_* symbols from librt to libc.Roland McGrath2012-10-241-1/+5
|
* Avoid PLT references from __get_clockfreq on powerpcAndreas Schwab2012-10-121-0/+1
|
* Framework to test IFUNC implementations on targetH.J. Lu2012-10-111-0/+56
|
* Name space hygeine for madvise.Roland McGrath2012-10-041-2/+3
|
* Make strtod respect the rounding mode (bug 14518).Joseph Myers2012-09-121-0/+65
|
* add attribute_hidden to __have_{sock_cloexec,pipe2,dup3Mike Frysinger2012-08-182-4/+4
| | | | | | | These internal knobs are not exposed as part of the public ABI, so mark them hidden to avoid generating relocations against them. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* split assume pipe2/dup3/sock_cloexec knobsMike Frysinger2012-08-181-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can't assume sock_cloexec and pipe2 are bound together as the former defines are found in glibc only while the latter are a combo of kernel headers and glibc. So if we do a runtime detection of SOCK_CLOEXEC, but pipe2() is a stub inside of glibc, we hit a problem. For example: main() { getgrnam("portage"); if (!popen("ls", "r")) perror("popen()"); } getgrnam() will detect that the kernel supports SOCK_CLOEXEC and then set both __have_sock_cloexec and __have_pipe2 to true. But if glibc was built against older kernel headers where __NR_pipe2 does not exist, glibc will have a ENOSYS stub for it. So popen() will always fail as glibc assumes pipe2() works. While this isn't too much of an issue for some arches as they added the functionality to the kernel at the same time, not all arches are that lucky. Since the code already has dedicated names for each feature, delete the defines wiring these three features together and make each one a proper dedicated knob. We've been carrying this in Gentoo since glibc-2.9. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Split sys/param.h out into common file and sysdeps bits/param.h file.Roland McGrath2012-08-171-0/+1
|
* Declare __getdirentries in internal dirent.h.Roland McGrath2012-08-151-0/+4
|
* Add explicit acquire/release semantics to atomic_exchange_and_add.Maxim Kuvyrkov2012-08-131-2/+16
|
* Get rid of ASM_TYPE_DIRECTIVE{,_PREFIX}.Marek Polacek2012-08-021-33/+20
|
* Clean up stub accept4 definition.Roland McGrath2012-07-311-2/+2
|
* Fix lots of bitrot for stub configurations.Roland McGrath2012-07-301-1/+1
|
* Rename __secure_getenv to secure_getenvFlorian Weimer2012-07-251-1/+2
|
* Get rid of ASM_GLOBAL_DIRECTIVE.Marek Polacek2012-07-101-15/+11
|
* Release 2.16 glibc-2.16.0Carlos O'Donell2012-06-301-1/+1
| | | | Update version.h and include/features.h for 2.16 release.