diff options
author | Greg Clayton <gclayton@apple.com> | 2011-11-18 04:43:59 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2011-11-18 04:43:59 +0000 |
commit | 7ba18027e95b4acbf629395e9da5a6212a7005f5 (patch) | |
tree | a6ee05f1dfc382c8515d4882e29c3225761dd426 /lldb/source/Core/ModuleList.cpp | |
parent | 2acedbd41714c0de691496239006af6351b061a9 (diff) | |
download | bcm5719-llvm-7ba18027e95b4acbf629395e9da5a6212a7005f5.tar.gz bcm5719-llvm-7ba18027e95b4acbf629395e9da5a6212a7005f5.zip |
Looking at our memory usage with Instruments when debugging a large application
we say that the vectors of DWARFDebugInfoEntry objects were the highest on the
the list.
With these changes we cut our memory usage by 40%!!! I did this by reducing
the size of the DWARFDebugInfoEntry from a previous:
uint32_t offset
uint32_t parent_idx
uint32_t sibling_idx
Abbrev * abbrev_ptr
which was 20 bytes, but rounded up to 24 bytes due to alignment. Now we have:
uint32_t offset
uint32_t parent_idx
uint32_t sibling_idx
uint32_t abbr_idx:15, // 32767 possible abbreviation codes
has_children:1, // 0 = no children, 1 = has children
tag:16; // DW_TAG_XXX value
This gets us down to 16 bytes per DIE. I tested some VERY large DWARF files
(900MB) and found there were only ~700 unique abbreviations, so 32767 should
be enough for any sane compiler. If it isn't there are built in assertions
that will fire off and tell us.
llvm-svn: 144975
Diffstat (limited to 'lldb/source/Core/ModuleList.cpp')
0 files changed, 0 insertions, 0 deletions