Re: Two observations using GDB 13 snapshot

Tom Tromey
2022-12-27T17:19:52Z

Eli> All I'm interested in is to help you and others understand what could
Eli> be the reason for slow reading of debug info at startup, so that it
Eli> could be sped up at some point.

Ok. I re-read the thread and I see that at the beginning you didn't
mention -readnow. So, assuming that the -readnow stuff was a
distraction...

The new indexer should not be significantly slower even when
single-threaded. On my machine, if I "maint set worker-threads 0" and
then use a -O2 build of gdb, it's about as fast as the system /bin/gdb
(which uses the old code).

Old:

(gdb) file ./gdb
[...]
Command execution time: 2.408843 (cpu), 2.130013 (wall)

New:

(gdb) file ./gdb
[...]
Command execution time: 2.858222 (cpu), 2.865426 (wall)

This is only slightly worse.

Now there is a known bug in some linkers when -g3 is used, which causes
a pretty severe slowdown in gdb. See:

https://sourceware.org/bugzilla/show_bug.cgi?id=27754

I would have thought that this could not affect your build. However I
don't know for certain.

Tom