Rafael Avila de Espindola via llvm-dev
2017-Dec-02 16:33 UTC
[llvm-dev] [LLD] Slow callstacks in gdb
Martin Richtarsky <s at martinien.de> writes:> Rafael Avila de Espindola wrote : >>> Maybe gdb needs to fall back to slower line number resolution because >>> e.g. >>> low and high bounds cannot be retrieved and debug_line_address is 0? >> >> It is hard to know without a reproducible. I tried gdb on clang itself >> build with both clang and gcc and linked with gold and lld. I could not >> reproduce the slowdown, but I was using trunk lld. > > I will retry with clang trunk, when it reproduces I will build some other > large project (that has DSOs) using our compile/link options (they are not > that special, I think).If you can try lld trunk too that would be awesome. Cheers, Rafael
Martin Richtarsky via llvm-dev
2017-Dec-04 08:14 UTC
[llvm-dev] [LLD] Slow callstacks in gdb
Rafael Avila de Espindola wrote:>> I will retry with clang trunk, when it reproduces I will build some >> other >> large project (that has DSOs) using our compile/link options (they are >> not >> that special, I think). > > If you can try lld trunk too that would be awesome.I meant lld trunk :) The problem goes away when building with clang 4.0 and linking with lld (a version from trunk maybe 6 weeks before the 5.0.0 release). However the compile options are different in that case, e.g. with respect to -Ox and -gx, so it's perhaps a bit apples to oranges. When building with gcc 6.2.1 and linking with lld trunk, I get a link error: bin-lld/ld: error: lib/libse.a(file1.cpp.o): unaligned data What would be helpful to diagnose this? Best regards, Martin -- http://www.productive-cpp.com/
Rafael Avila de Espindola via llvm-dev
2017-Dec-05 00:54 UTC
[llvm-dev] [LLD] Slow callstacks in gdb
Martin Richtarsky <s at martinien.de> writes:> Rafael Avila de Espindola wrote: >>> I will retry with clang trunk, when it reproduces I will build some >>> other >>> large project (that has DSOs) using our compile/link options (they are >>> not >>> that special, I think). >> >> If you can try lld trunk too that would be awesome. > > I meant lld trunk :) > > The problem goes away when building with clang 4.0 and linking with lld (a > version from trunk maybe 6 weeks before the 5.0.0 release). However the > compile options are different in that case, e.g. with respect to -Ox and > -gx, so it's perhaps a bit apples to oranges. > > When building with gcc 6.2.1 and linking with lld trunk, I get a link error: > > bin-lld/ld: error: lib/libse.a(file1.cpp.o): unaligned dataThat means that file1.cpp.o has an invalid sh_offset. Can you post a readelf -SW of it? How is it being created? The error is from ELF.h: ELFFile<ELFT>::getSectionContentsAsArray. Cheers, Rafael