[llvm] r339122 - [DebugInfo] Reduce debug_str_offsets section size

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 28 09:46:05 PDT 2018


On Tue, Aug 28, 2018 at 6:07 AM Pavel Labath <pavel at labath.sk> wrote:

> On 28/08/18 02:08, David Blaikie wrote:
> > Any idea if there's work to add str_index support to the name tables?
> >
> > I guess the idea is that it's more efficient to have one fewer
> > indirections for strings, and worth the cost in duplicate
> > relocations/bytes/etc? *shrug*
>
> Interesting question. I am not aware of anyone looking at this. I
> suppose that would trade a bit of performance for a bit of size (but
> only for the intermediate .o file and only when using split-dwarf),
> though I can't estimate how big would those "bits" be.
>

Hmm - why only when using split-dwarf? I'd have thought the opposite - when
not using split-dwarf the strings will be indexed but debug_names won't use
that index, instead using its own. So in that case you'd get duplicate
indexes, basically. When using split-dwarf it'd be probably unhelpful -
just trading one index for another/adding that extra layer of indirection.
(because the only reason the strings are in the index is for the
debug_names in the split-DWARF situation).


> >     +; Produced with "clang -S -emit-llvm -gdwarf-5" from source "int
> >     X;", copied
> >     +; three times and modified by hand.
> >
> >
> > Could you describe in the comment what modifications were necessary?
>
> The modifications consisted of tweaking the variable names (DW_AT_name)
> and the compilation directory (DW_AT_comp_dir) to trigger the inserting
> of strings in different order.
>
> I'll update the comment to reflect that.
>
> pl
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180828/901fd6bd/attachment.html>


More information about the llvm-commits mailing list