Martin Richtarsky via llvm-dev
2017-Nov-27 15:00 UTC
[llvm-dev] [LLD] Slow callstacks in gdb
Hi, for programs linked with lld it's substantially slower to get callstacks in gdb, in comparison to gold-linked programs. Two measurements: lld gold 15 sec 3 sec 6 sec 2 sec This is a debug build, rather large binaries (lots of templates). I have seen even worse performance for debug+UBSan builds. I think code size (and therefore DWARF size) has an impact. Is there some information missing that gdb needs, and only gold generates? gdb version is 8. I tested lld 5.0 and an earlier 4.0 trunk version. Note that these binaries do not use gdb indexing. Has anyone seen something similar? Best regards, Martin -- http://www.productive-cpp.com/
I do not know what is going on with your binary, but I'd first inspect section sizes. Can you run `readelf --sections` against the two executable to see if there's significant difference in section size? On Mon, Nov 27, 2017 at 7:00 AM, Martin Richtarsky <s at martinien.de> wrote:> Hi, > > for programs linked with lld it's substantially slower to get callstacks > in gdb, in comparison to gold-linked programs. Two measurements: > > lld gold > 15 sec 3 sec > 6 sec 2 sec > > This is a debug build, rather large binaries (lots of templates). I have > seen even worse performance for debug+UBSan builds. I think code size (and > therefore DWARF size) has an impact. Is there some information missing > that gdb needs, and only gold generates? > > gdb version is 8. I tested lld 5.0 and an earlier 4.0 trunk version. > > Note that these binaries do not use gdb indexing. > > Has anyone seen something similar? > > Best regards, > Martin > -- > http://www.productive-cpp.com/ > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171127/dd0c090a/attachment.html>
Rafael Avila de Espindola via llvm-dev
2017-Nov-27 16:28 UTC
[llvm-dev] [LLD] Slow callstacks in gdb
Martin Richtarsky via llvm-dev <llvm-dev at lists.llvm.org> writes:> Hi, > > for programs linked with lld it's substantially slower to get callstacks > in gdb, in comparison to gold-linked programs. Two measurements: > > lld gold > 15 sec 3 sec > 6 sec 2 secAre both using --gdb-index? Can you try lld trunk if so? Is any of the programs you tested open source? Cheers, Rafael
Rafael Avila de Espindola via llvm-dev
2017-Nov-27 17:50 UTC
[llvm-dev] [LLD] Slow callstacks in gdb
Is the program being built by gcc or clang? Cheers, Rafael Rafael Avila de Espindola <rafael.espindola at gmail.com> writes:> Martin Richtarsky via llvm-dev <llvm-dev at lists.llvm.org> writes: > >> Hi, >> >> for programs linked with lld it's substantially slower to get callstacks >> in gdb, in comparison to gold-linked programs. Two measurements: >> >> lld gold >> 15 sec 3 sec >> 6 sec 2 sec > > Are both using --gdb-index? Can you try lld trunk if so? > > Is any of the programs you tested open source? > > Cheers, > Rafael