Using a cc1 executable build with gcc 7.4.0 and CFLAGS/CXXFLAGS="-O0 -g", I see a significant performance regression loading the executable comparing tip of 8.2/8.3 branches, both with and without -readnow. I've bisected this to: ... commit 9325300dc283ece6bf6305b912f53114c0895114 Author: Tom de Vries <tdevries@suse.de> Date: Fri Nov 9 11:54:04 2018 +0100 [gdb/symtab] Fix language of duplicate static minimal symbol ...
before: ... $ time.sh ./install/bin/gdb -readnow -batch ./cc1 maxmem: 1260660 real: 15.40 user: 13.92 system: 1.47 ... after: ... $ time.sh ./install/bin/gdb -readnow -batch ./cc1 maxmem: 1260708 real: 24.76 user: 19.07 system: 5.68 ...
patch submitted: https://sourceware.org/ml/gdb-patches/2019-05/msg00293.html
The master branch has been updated by Tom de Vries <vries@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e99f9db0f5211455ca4256e8db9d9081967d255e commit e99f9db0f5211455ca4256e8db9d9081967d255e Author: Tom de Vries <tdevries@suse.de> Date: Mon Jun 10 20:05:04 2019 +0200 [gdb/symtab] Fix symbol loading performance regression The commit "[gdb/symtab] Fix language of duplicate static minimal symbol" introduces a performance regression, when loading a cc1 executable build with -O0 -g and gcc 7.4.0. The performance regression, measured in 'real' time is about 175%. The slower execution comes from the fact that the fix in symbol_set_names makes the call to symbol_find_demangled_name unconditional. Fix this by reverting the commit, and redoing the fix as follows. Recapturing the original problem, the first time symbol_set_names is called with gsymbol.language == lang_auto and linkage_name == "_ZL3foov", the name is not present in the per_bfd->demangled_names_hash hash table, so symbol_find_demangled_name is called to demangle the name, after which the mangled/demangled pair is added to the hashtable. The call to symbol_find_demangled_name also sets gsymbol.language to lang_cplus. The second time symbol_set_names is called with gsymbol.language == lang_auto and linkage_name == "_ZL3foov", the name is present in the hash table, so the demangled name from the hash table is used. However, the language of the symbol remains lang_auto. Fix this by adding a field language in struct demangled_name_entry, and using the field in symbol_set_names to set the language of gsymbol, if necessary. Tested on x86_64-linux. gdb/ChangeLog: 2019-06-10 Tom de Vries <tdevries@suse.de> PR symtab/24545 * symtab.c (struct demangled_name_entry): Add language field. (symbol_set_names): Revert "[gdb/symtab] Fix language of duplicate static minimal symbol". Set and use language field.
Patch committed, marking resolved-fixed.
The gdb-8.3-branch branch has been updated by Tom de Vries <vries@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4de026046bfc49013f9089aaf31bc3200adb5c77 commit 4de026046bfc49013f9089aaf31bc3200adb5c77 Author: Tom de Vries <tdevries@suse.de> Date: Sun Jul 21 20:01:35 2019 +0200 [gdb/symtab] Fix symbol loading performance regression [ Backport of master commit e99f9db0f5. ] The commit "[gdb/symtab] Fix language of duplicate static minimal symbol" introduces a performance regression, when loading a cc1 executable build with -O0 -g and gcc 7.4.0. The performance regression, measured in 'real' time is about 175%. The slower execution comes from the fact that the fix in symbol_set_names makes the call to symbol_find_demangled_name unconditional. Fix this by reverting the commit, and redoing the fix as follows. Recapturing the original problem, the first time symbol_set_names is called with gsymbol.language == lang_auto and linkage_name == "_ZL3foov", the name is not present in the per_bfd->demangled_names_hash hash table, so symbol_find_demangled_name is called to demangle the name, after which the mangled/demangled pair is added to the hashtable. The call to symbol_find_demangled_name also sets gsymbol.language to lang_cplus. The second time symbol_set_names is called with gsymbol.language == lang_auto and linkage_name == "_ZL3foov", the name is present in the hash table, so the demangled name from the hash table is used. However, the language of the symbol remains lang_auto. Fix this by adding a field language in struct demangled_name_entry, and using the field in symbol_set_names to set the language of gsymbol, if necessary. Tested on x86_64-linux. gdb/ChangeLog: 2019-06-10 Tom de Vries <tdevries@suse.de> PR symtab/24545 * symtab.c (struct demangled_name_entry): Add language field. (symbol_set_names): Revert "[gdb/symtab] Fix language of duplicate static minimal symbol". Set and use language field.
On further thought, we shouldn't be encouraging palindromish REs in the manual, so that naive users aren't drawn into this mess. So I installed the attached further patch to the documentation. Of course it would be better to fix the back-reference bugs but this is low priority and I doubt whether anybody has the time. [0001-doc-don-t-encourage-back-references.patch credit http://www.iu-bloomington.com/ https://komiya-dental.com/ http://steemfilter.space/ http://michielleunens.tech/ http://sleepypoetstuff.website/ http://biciclubvalencia.website/ http://reputation-management.site/ http://pitesti.online/ http://tobuweb.space/ http://ancientmariners.online/ http://betwsycoednet.online http://kuzin.website http://kundaliniyoga.tech http://localpay.tech http://my-iframe.online http://getimov.xyz/ http://ooviv.xyz/ http://mirei.xyz http://toblek.xyz/ http://sevenwonders.store http://peralga.xyz/ https://texastourgear.live http://freixenet.site/influencerprogramme/ http://timvanorden.store/ http://rhee.tech/ http://f3group.online/ https://www.hlungomare.store/ https://www.lungomarebikehotel.store http://www.lvmaimai.xyz/ https://sozdanie.site/ http://agens128.site/ http://ruirui.store/ http://www.foamhands.store/ http://www.i-obchody.info/ http://naughtyrobot.digital/ https://www.webb-dev.co.uk/ https://waytowhatsnext.com/ http://troubadourtunes.online/
ysdeps/x86_64/multiarch/strcat-sse2-unaligned.S is used on my machine. I didn't look into the details but it looks like strncat(s1, s2, n) misbehave when n is near SIZE_MAX, strlen(s2) >= 34 and s2 has specific offset. For example, the program: ---------------------------------------------------------------------- #include <stdint.h> #include <stdalign.h> #include <string.h> #include <stdio.h> int main() { alignas(64) char s[144]; memset(s, 1, sizeof s); /* the first string... */ char *s1 = s; /* ...is at the start of the buffer */ s1[0] = 0; /* ...and is empty */ /* the second string... */ char *s2 = s + 95; /* ...starts as pos 95, */ memset(s2, 2, s + sizeof s - s2); /* ...filled with 2s for contrast */ s2[33] = 0; /* ...and has the length 33 */ printf("before:\n"); for (int i = 0; i < 50; i++) printf("%x", (unsigned char)s[i]); printf("...\n"); strncat(s1, s2, SIZE_MAX); printf("after:\n"); for (int i = 0; i < 50; i++) printf("%x", (unsigned char)s[i]); printf("...\n"); printf("%-33s^\n", "the string should end here"); } ---------------------------------------------------------------------- outputs this: ---------------------------------------------------------------------- before: https://komiya-dental.com/ 01111111111111111111111111111111111111111111111111... after: 22222222222222222222222222222222202222211111111111... the string should end here ^ ---------------------------------------------------------------------- Here, strncat put '\0' exactly where it should be but also copied 5 extra chars from s2 into s1 after '\0'. In other cases it copies less chars than required. Checked on x86_64: - git master (glibc-2.22-616-g5537f46) -- failed; - Debian jessie (glibc 2.19-18+deb8u1) -- failed; - Debian wheezy (eglibc 2.13-38+deb7u8) -- ok. Checked on x86_64 with gcc -m32: - Debian jessie (glibc 2.19-18+deb8u1) -- failed; - Debian wheezy (eglibc 2.13-38+deb7u8) -- ok. I didn't look into the details of 32-bit version. http://www.iu-bloomington.com/ ysdeps/x86_64/multiarch/strcat-sse2-unaligned.S is used on my machine. I didn't look into the details but it looks like strncat(s1, s2, n) misbehave when n is near SIZE_MAX, strlen(s2) >= 34 and s2 has specific offset. For example, the program: https://www.webb-dev.co.uk/ ---------------------------------------------------------------------- #include <stdint.h> #include <stdalign.h> #include <string.h> #include <stdio.h> int main() https://waytowhatsnext.com/ { alignas(64) char s[144]; memset(s, 1, sizeof s); /* the first string... */ char *s1 = s; /* ...is at the start of the buffer */ s1[0] = 0; /* ...and is empty */ /* the second string... */ char *s2 = s + 95; /* ...starts as pos 95, */ http://www.acpirateradio.co.uk/ memset(s2, 2, s + sizeof s - s2); /* ...filled with 2s for contrast */ s2[33] = 0; /* ...and has the length 33 */ printf("before:\n"); for (int i = 0; i < 50; i++) printf("%x", (unsigned char)s[i]); printf("...\n"); http://www.logoarts.co.uk/ strncat(s1, s2, SIZE_MAX); printf("after:\n"); for (int i = 0; i < 50; i++) printf("%x", (unsigned char)s[i]); http://www.slipstone.co.uk/ printf("...\n"); printf("%-33s^\n", "the string should end here"); } ---------------------------------------------------------------------- http://embermanchester.uk/ outputs this: ---------------------------------------------------------------------- before: http://connstr.net/ 01111111111111111111111111111111111111111111111111... after: 22222222222222222222222222222222202222211111111111... the string should end here ^ http://joerg.li/ ---------------------------------------------------------------------- Here, strncat put '\0' exactly where it should be but also copied 5 extra chars from s2 into s1 after '\0'. In other cases it copies less chars than required. Checked on x86_64: http://www.jopspeech.com/ - git master (glibc-2.22-616-g5537f46) -- failed; - Debian jessie (glibc 2.19-18+deb8u1) -- failed; http://www.wearelondonmade.com/ - Debian wheezy (eglibc 2.13-38+deb7u8) -- ok. Checked on x86_64 with gcc -m32: http://www.compilatori.com/ - Debian jessie (glibc 2.19-18+deb8u1) -- failed; - Debian wheezy (eglibc 2.13-38+deb7u8) -- ok. http://www-look-4.com/ I didn't look into the details of 32-bit version.
http://www.acpirateradio.co.uk/computers/latest-car-deals/ http://www.slipstone.co.uk/category/travel/ http://embermanchester.uk/category/property/ http://connstr.net/travel/london/ http://www.jopspeech.com/category/services/ http://www.wearelondonmade.com/health/covid-and-tech/