David Blaikie via llvm-dev
2021-Jul-23 18:58 UTC
[llvm-dev] [RFC][Dwarf Library] Relocations for DWO sections
On Fri, Jul 23, 2021 at 1:18 PM Alexander Yermolovich <ayermolo at fb.com> wrote:> Thanks for replying in the patch. Left my reply. > We are using it to deal with dwarf relocation overflows. >Ah, that's good to know. FWIW we've started to hit some overflows even in Split DWARF on larger binaries (and/or those making especially heavy use of expression templates - creating an exceptional amount of DWARF/long symbol names A couple of ideas to address this particular overflow (which section(s) did you manage to overflow? We're dealing with .debug_str[.dwo] overflow in particular) that I'm looking into are: Simplified template names ( https://lists.llvm.org/pipermail/llvm-dev/2021-June/150903.html ) - emit only the base name ("foo") of a template rather than all the template parameters ("foo<int>") - and then reconstruct the full name by using the DW_TAG_template_type_parameters, etc. Reconstituted Mangled names ( https://groups.google.com/g/llvm-dev/c/2jMqDjdChuQ/m/HpOpWy8pAwAJ ) - skip mangled names when they can be reconstituted from the DWARF structural representation (eg: "void f1(int) { }" -> "_Z2f1i" but we could build the latter from DWARF's representation that says f1 has one "int" parameter).> We considered DWARF64, but split dwarf seems like a more traveled path. As > for single vs split my understanding is that single plays nicer with our > build system ATM. >Ah, fair enough.> ------------------------------ > *From:* David Blaikie <dblaikie at gmail.com> > *Sent:* Friday, July 23, 2021 7:41 AM > *To:* Alexander Yermolovich <ayermolo at fb.com> > *Cc:* llvm-dev at lists.llvm.org <llvm-dev at lists.llvm.org> > *Subject:* Re: [llvm-dev] [RFC][Dwarf Library] Relocations for DWO > sections > > General premise sounds correct to me (that we shouldn't be processing > those sections, etc). I've replied to the patch - thanks for taking a look > at this! > > (out of curiosity: What are you using Split DWARF single mode for (if you > can speak to the application)?) > > On Thu, Jul 22, 2021 at 9:10 PM Alexander Yermolovich via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > Hello > > I observed when DWARF Context is created for DWO object (split dwarf > single mode), that relocations for .debug_info are processed and are stored > in a map. This adds quite a bit of memory overhead. This doesn't seem like > it is needed for DWO Context. Context created through > API DWARFContext::getDWOContext. Am I missing something? > > Illustrative patch to fix this: > https://reviews.llvm.org/D106624 > > Thank you, > Alex > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210723/21178507/attachment.html>
Alexander Yermolovich via llvm-dev
2021-Jul-26 16:58 UTC
[llvm-dev] [RFC][Dwarf Library] Relocations for DWO sections
Haven't seen overflows in Split DWARF yet, but thanks for letting me know, and the links to discussions. Is there a plan to productize either one or both? For us, in monolithic format, it was .debug_info that was growing too large and relocations failing in to, or out of it. The.debug_aranges relocations in to it, and don't quite remember from top of my head what out relocation was in to. I think it was .debug_loc Alex ________________________________ From: David Blaikie <dblaikie at gmail.com> Sent: Friday, July 23, 2021 11:58 AM To: Alexander Yermolovich <ayermolo at fb.com> Cc: llvm-dev at lists.llvm.org <llvm-dev at lists.llvm.org> Subject: Re: [llvm-dev] [RFC][Dwarf Library] Relocations for DWO sections On Fri, Jul 23, 2021 at 1:18 PM Alexander Yermolovich <ayermolo at fb.com<mailto:ayermolo at fb.com>> wrote: Thanks for replying in the patch. Left my reply. We are using it to deal with dwarf relocation overflows. Ah, that's good to know. FWIW we've started to hit some overflows even in Split DWARF on larger binaries (and/or those making especially heavy use of expression templates - creating an exceptional amount of DWARF/long symbol names A couple of ideas to address this particular overflow (which section(s) did you manage to overflow? We're dealing with .debug_str[.dwo] overflow in particular) that I'm looking into are: Simplified template names ( https://lists.llvm.org/pipermail/llvm-dev/2021-June/150903.html<https://lists.llvm.org/pipermail/llvm-dev/2021-June/150903.html> ) - emit only the base name ("foo") of a template rather than all the template parameters ("foo<int>") - and then reconstruct the full name by using the DW_TAG_template_type_parameters, etc. Reconstituted Mangled names ( https://groups.google.com/g/llvm-dev/c/2jMqDjdChuQ/m/HpOpWy8pAwAJ<https://groups.google.com/g/llvm-dev/c/2jMqDjdChuQ/m/HpOpWy8pAwAJ> ) - skip mangled names when they can be reconstituted from the DWARF structural representation (eg: "void f1(int) { }" -> "_Z2f1i" but we could build the latter from DWARF's representation that says f1 has one "int" parameter). We considered DWARF64, but split dwarf seems like a more traveled path. As for single vs split my understanding is that single plays nicer with our build system ATM. Ah, fair enough. ________________________________ From: David Blaikie <dblaikie at gmail.com<mailto:dblaikie at gmail.com>> Sent: Friday, July 23, 2021 7:41 AM To: Alexander Yermolovich <ayermolo at fb.com<mailto:ayermolo at fb.com>> Cc: llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org> <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> Subject: Re: [llvm-dev] [RFC][Dwarf Library] Relocations for DWO sections General premise sounds correct to me (that we shouldn't be processing those sections, etc). I've replied to the patch - thanks for taking a look at this! (out of curiosity: What are you using Split DWARF single mode for (if you can speak to the application)?) On Thu, Jul 22, 2021 at 9:10 PM Alexander Yermolovich via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote: Hello I observed when DWARF Context is created for DWO object (split dwarf single mode), that relocations for .debug_info are processed and are stored in a map. This adds quite a bit of memory overhead. This doesn't seem like it is needed for DWO Context. Context created through API DWARFContext::getDWOContext. Am I missing something? Illustrative patch to fix this: https://reviews.llvm.org/D106624<https://reviews.llvm.org/D106624> Thank you, Alex _______________________________________________ LLVM Developers mailing list llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210726/88dc26d4/attachment.html>