Find a file
Thomas Neumann 1c118c9970 speed up end_fde_sort using radix sort
When registering a dynamic unwinding frame the fde list is sorted.
Previously, we split the list into a sorted and an unsorted part,
sorted the later using heap sort, and merged both. That can be
quite slow due to the large number of (expensive) comparisons.

This patch replaces that logic with a radix sort instead. The
radix sort uses the same amount of memory as the old logic,
using the second list as auxiliary space, and it includes two
techniques to speed up sorting: First, it computes the pointer
addresses for blocks of values, reducing the decoding overhead.
And it recognizes when the data has reached a sorted state,
allowing for early termination. When running out of memory
we fall back to pure heap sort, as before.

For this test program

\#include <cstdio>
int main(int argc, char** argv) {
     return 0;
}

compiled with g++ -O -o hello -static hello.c we get with
perf stat -r 200 on a 5950X the following performance numbers:

old logic:

              0,20 msec task-clock
           930.834      cycles
         3.079.765      instructions
        0,00030478 +- 0,00000237 seconds time elapsed

new logic:

              0,10 msec task-clock
           473.269      cycles
         1.239.077      instructions
        0,00021119 +- 0,00000168 seconds time elapsed

libgcc/ChangeLog:
	* unwind-dw2-fde.c: Use radix sort instead of split+sort+merge.
2022-12-17 00:48:16 +01:00
c++tools Daily bump. 2022-11-24 00:17:47 +00:00
config Daily bump. 2022-11-15 08:32:29 +00:00
contrib contrib: make warnings unique in filter-clang-warnings.py 2022-12-16 13:07:27 +01:00
fixincludes Daily bump. 2022-11-24 00:17:47 +00:00
gcc Suppress -fstack-protector warning on hppa. 2022-12-16 21:44:40 +00:00
gnattools Daily bump. 2022-09-01 00:17:39 +00:00
gotools Daily bump. 2022-08-31 00:16:45 +00:00
include Daily bump. 2022-12-15 00:17:29 +00:00
INSTALL
intl Daily bump. 2022-11-24 00:17:47 +00:00
libada Daily bump. 2022-08-26 00:16:21 +00:00
libatomic Daily bump. 2022-11-17 00:16:52 +00:00
libbacktrace Daily bump. 2022-12-11 00:17:43 +00:00
libcc1 Daily bump. 2022-11-02 00:17:38 +00:00
libcody Daily bump. 2022-11-24 00:17:47 +00:00
libcpp Daily bump. 2022-12-08 00:17:45 +00:00
libdecnumber Daily bump. 2022-11-24 00:17:47 +00:00
libffi changelog: Fix extra space after tab. 2022-11-21 10:13:44 +01:00
libgcc speed up end_fde_sort using radix sort 2022-12-17 00:48:16 +01:00
libgfortran Daily bump. 2022-12-16 00:17:46 +00:00
libgm2 Adjust ChangeLog entries from m2 merge. 2022-12-15 13:01:07 +01:00
libgo libgo: bump major version 2022-12-12 14:18:14 -08:00
libgomp Remove libgomp/testsuite/libgomp.fortran/allocate-4.f90 [PR108056] 2022-12-16 08:56:03 +01:00
libiberty Daily bump. 2022-11-24 00:17:47 +00:00
libitm changelog: Fix extra space after tab. 2022-11-21 10:13:44 +01:00
libobjc changelog: Fix extra space after tab. 2022-11-21 10:13:44 +01:00
libphobos Daily bump. 2022-12-12 00:22:21 +00:00
libquadmath changelog: Fix extra space after tab. 2022-11-21 10:13:44 +01:00
libsanitizer Daily bump. 2022-12-14 00:18:37 +00:00
libssp Daily bump. 2022-10-13 00:17:37 +00:00
libstdc++-v3 Update baseline symbols for hppa-linux. 2022-12-16 22:23:16 +00:00
libvtv changelog: Fix extra space after tab. 2022-11-21 10:13:44 +01:00
lto-plugin Daily bump. 2022-11-24 00:17:47 +00:00
maintainer-scripts Daily bump. 2022-12-01 00:17:51 +00:00
zlib Daily bump. 2022-11-24 00:17:47 +00:00
.dir-locals.el dir-locals: Use https for bug references 2021-07-20 11:40:34 +01:00
.gitattributes
.gitignore .gitignore: do not ignore config.h 2022-07-19 17:07:04 +03:00
ABOUT-NLS
ar-lib
ChangeLog Adjust ChangeLog entries from m2 merge. 2022-12-15 13:01:07 +01:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub config.sub: change mode to 755. 2021-12-21 09:10:57 +01:00
configure Merge modula-2 front end onto gcc. 2022-12-14 17:43:08 +00:00
configure.ac Merge modula-2 front end onto gcc. 2022-12-14 17:43:08 +00:00
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
depcomp
install-sh
libtool-ldflags
libtool.m4 Generic configury support for shared libs on VxWorks 2022-10-11 07:31:07 +00:00
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
MAINTAINERS MAINTAINERS: fix spacing 2022-12-09 11:08:55 +01:00
Makefile.def Merge modula-2 front end onto gcc. 2022-12-14 17:43:08 +00:00
Makefile.in Merge modula-2 front end onto gcc. 2022-12-14 17:43:08 +00:00
Makefile.tpl Merge modula-2 front end onto gcc. 2022-12-14 17:43:08 +00:00
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
symlink-tree
test-driver
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.