[PATCH] D27170: Abstract almost all DwarfDebug out of the classes in DIE.cpp.

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 30 11:49:01 PST 2016


> On Nov 30, 2016, at 11:43 AM, David Blaikie <dblaikie at gmail.com> wrote:
> 
> 
> 
> On Wed, Nov 30, 2016 at 11:38 AM Adrian Prantl via Phabricator <reviews at reviews.llvm.org <mailto:reviews at reviews.llvm.org>> wrote:
> aprantl added inline comments.
> 
> 
> ================
> Comment at: lib/CodeGen/AsmPrinter/DwarfUnit.cpp:303
>    Die.addValue(DIEValueAllocator, Attribute,
> -               EntryCU == DieCU ? dwarf::DW_FORM_ref4 : dwarf::DW_FORM_ref_addr,
> +               EntryCU == CU ? dwarf::DW_FORM_ref4 : dwarf::DW_FORM_ref_addr,
>                 Entry);
> ----------------
> dblaikie wrote:
> > Hey Adrian - did you happen to run size numbers on whether this is important? What would happen if we just always used ref_addr when we enabled cross-unit referencing? (wondering if the complexity is worth the benefit - 4 bytes per unit reference isn't nothing, for sure - just wondering how much it is in the end)
> I just did some numbers on a couple of projects by doing
> ```
> 
> dwarfdump -F WebKit.framework.dSYM | grep FORM_ref4 |wc -l
> 
>                WebKit     clang   medium-sized ObjC project
> ===========================================================
> FORM_ref_addr 7231489  15483428
> FORM_ref4      189099    555085    189189
> -----------------------------------------------------------
> Savings         ~700K       ~2M     ~700K
> 
> What's that as a % of the total bytes? (total bytes of the dSYM I guess)
>  

The clang dSYM is 571M, so it is about 0.4%. But we are archiving a lot of .dSYMs :-)

-- adrian

> 
> ```
> 
> It's not much in the grand scheme of things, but also not entirely negligible.  Since .dSYM bundles are made to be stored indefinitely I think we should keep every optimization that makes them smaller.
> 
> Fair enough - figured it was worth asking - might be worth putting a note in the code about roughly the % this is worth/why we do it.
> 
> - Dave
>  
> 
> 
> https://reviews.llvm.org/D27170 <https://reviews.llvm.org/D27170>
> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161130/102f9ce4/attachment.html>


More information about the llvm-commits mailing list