[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2018-11-20 Thread Robert O'Callahan via Phabricator via lldb-commits
rocallahan created this revision. rocallahan added a reviewer: ruiu. rocallahan added a project: lld. Herald added subscribers: llvm-commits, MaskRay, JDevlieghere, arichardson, emaste. Herald added a reviewer: espindola. Rust projects tend to link in all object files from all dependent

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2018-12-30 Thread Robert O'Callahan via Phabricator via lldb-commits
rocallahan added a comment. I agree that ideally the linker would be able to do fine-grained GC of DWARF at the granularity of individual DIEs and other data items. However, implementing that would be a huge project. Currently AFAICT `lld` does very little DWARF processing. Wholesale DWARF

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2018-12-30 Thread Robert O'Callahan via Phabricator via lldb-commits
rocallahan added a comment. Here are some results for the rusoto test in https://github.com/rust-lang/rust/issues/56068#issue-382175735: | LLD | Binary size in bytes | | LLD 6.0.1 | 43,791,192 | | LLD 8.0.0 1cfcf404f6b23943405bc3c5bb5940b10b914624

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2018-12-28 Thread Robert O'Callahan via Phabricator via lldb-commits
rocallahan added a comment. Sorry for the delayed reply. I just discovered that Phabricator nofications were being buried by my mail filters. In D54747#1312161 , @ruiu wrote: > What you are doing in this patch is not too complicated and makes sense to

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2019-03-20 Thread Robert O'Callahan via Phabricator via lldb-commits
rocallahan added a comment. Herald added a project: LLVM. Ping? Repository: rLLD LLVM Linker CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54747/new/ https://reviews.llvm.org/D54747 ___ lldb-commits mailing list

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2019-03-24 Thread Robert O'Callahan via Phabricator via lldb-commits
rocallahan marked 3 inline comments as done. rocallahan added a comment. > @rocallahan I find that people are discussing a generic approach in D59553 > Thanks for the reference. It seems to me that there is no consensus there yet for any approach that would

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2019-03-24 Thread Robert O'Callahan via Phabricator via lldb-commits
rocallahan added a comment. To be clear, I think the best long-term solution is for LLD to rewrite the DWARF, but from my (admittedly limited) perspective that seems to be at best a distant prospect. Repository: rLLD LLVM Linker CHANGES SINCE LAST ACTION

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2019-03-24 Thread Robert O'Callahan via Phabricator via lldb-commits
rocallahan added a comment. Another clarification: > DWARF type information currently shared between functions in the same CU > would have to be duplicated. I guess that's not necessary. The compiler could put all debuginfo that's shared between functions into a non-COMDAT section for the

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2019-03-24 Thread Robert O'Callahan via Phabricator via lldb-commits
rocallahan added a comment. > Do you have numbers with ld.bfd and gold? I don't have numbers for that exact test with those linkers but they basically behave the same way as LLD. Repository: rLLD LLVM Linker CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54747/new/

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2019-03-25 Thread Robert O'Callahan via Phabricator via lldb-commits
rocallahan marked 2 inline comments as done. rocallahan added inline comments. Comment at: lld/ELF/MarkLive.cpp:190 +template static void setSectionLive(InputSectionBase *Sec) { + Sec->Live = true; ruiu wrote: > Since this file is MarkLive, markSection is

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2019-04-08 Thread Robert O'Callahan via Phabricator via lldb-commits
rocallahan updated this revision to Diff 194244. rocallahan added a comment. Addressed all comments AFAIK. I'll post some performance numbers in a moment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54747/new/ https://reviews.llvm.org/D54747 Files: lld/ELF/Driver.cpp

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2019-04-08 Thread Robert O'Callahan via Phabricator via lldb-commits
rocallahan added a comment. Updated results for the rusoto test in https://github.com/rust-lang/rust/issues/56068#issue-382175735. The test changed a bit because I'm using an updated Rust toolchain and `rusoto_core` 0.37.0. | Linker | Size (bytes) | Real time

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2019-04-09 Thread Robert O'Callahan via Phabricator via lldb-commits
rocallahan marked 4 inline comments as done. rocallahan added inline comments. Comment at: lld/ELF/MarkLive.cpp:190 + // case we still need to mark the file. + if (S && !IsLSDA && Sec->File) +if (isa(Sec) || isa(Sec)) ruiu wrote: > ruiu wrote: > > S is

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2019-04-09 Thread Robert O'Callahan via Phabricator via lldb-commits
rocallahan updated this revision to Diff 194255. rocallahan edited the summary of this revision. rocallahan added a comment. The results are basically unchanged with the section type checks removed, so I've just gone ahead and done that. CHANGES SINCE LAST ACTION

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2019-04-08 Thread Robert O'Callahan via Phabricator via lldb-commits
rocallahan added a comment. I am also pleased to report that for my real project , switching from `ld.bfd` to `lld` + this patch reduces the total size of our `dist` built binaries from 2.9GB to 2.0GB. I'm not sure why it's become

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2019-07-04 Thread Robert O'Callahan via Phabricator via lldb-commits
rocallahan added a comment. Sorry for not responding earlier. Phabricator insists on sending me emails about all issues in the system, and I never figured out how to get GMail to show me only emails about Phabricator issues I'm CCed on. > I know little about Rust crates but I worry some

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2019-04-09 Thread Robert O'Callahan via Phabricator via lldb-commits
rocallahan marked an inline comment as done. rocallahan added inline comments. Comment at: lld/ELF/MarkLive.cpp:190-191 + // case we still need to mark the file. + if (S && !IsLSDA && Sec->File) +if (isa(Sec) || isa(Sec)) + Sec->getFile()->HasLiveCodeOrData = true;