[Dwarf-Discuss] address pool + offset representation

Robinson, Paul paul.robinson@sony.com
Thu Jul 27 18:54:24 GMT 2017


												|
> I don't really know just how much LLDB cares about fixed-size forms/DIEs,
> but rumor has it it's important to some degree, so I continue to have a
> slight preference towards fixed size representations (or at least having
> the option to do so, even if there are variable length forms too - as
> with addrx).

Greg Clayton has told me it's a performance win for loading .debug_info.
They can index fixed-size DIEs without actually parsing them.  When I
proposed the fixed-size strx/addrx forms to the committee, I did some
data collection on the effect of strx and addrx.  Converting to strx 
meant fixed size DIEs went from 90-ish to 55-ish percent of all DIEs,
so fixed-size strxN forms were definitely worthwhile.  The equivalent
analysis for addrx showed a difference of more like 4%, which was
enough to persuade the committee that would be worthwhile also.  If 
we go with the low_pc-as-range idea then adding fixed-size versions of 
rnglistx in DWARF 6 would not be a problem.

The advantage of what the ranges idea is it can all be done using
exiting DWARF 5 features.

> at that point I wouldn't mind a form that was two ULEBs (addrx + offset).

Might as well just allow DW_AT_low_pc to use a location expression?
  DW_OP_addrx <n> DW_OP_constx <offset> DW_OP_plus
This would be way more acceptable than a new special-purpose form.
Still bigger than a new form, of course, but as I noted above only 4%
of DIEs become variable size so that penalty doesn't seem excessive.
3 bytes plus 3 LEBs, so only 3 bytes + 1 LEB more than the new form,
and still cheaper than the ranges idea.
--paulr




More information about the Dwarf-discuss mailing list