[Lldb-commits] [PATCH] D62316: DWARFContext: Make loading of sections thread-safe

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu May 23 07:31:42 PDT 2019


clayborg added a comment.

In D62316#1513894 <https://reviews.llvm.org/D62316#1513894>, @labath wrote:

> Two other options I see are:
>
> - initialize the sections immediately after creating the dwarf context. The main advantage of that would that it alings to code more with llvm (which also loads the sections up-front), and slighly faster subsequent accesses to the debug info. I don't think this should negatively impact the start up time, as the files are mmapped anyway, and so the "loading" will consist of some basic pointer arithmetic. Also, the SymbolFileDWARF object as a whole is created lazily, so the fact that it is being created means that somebody is going to access it immediately after that. And he cannot do anything with the symbol file without touching at least the debug_info section, which accounts for about 80% of all debug info.


I'd be fine with this.

> - have the manual index preload the sections it needs. it already does a bunch of preloading in order to speed up the access to everything, so this wouldn't look completely out of place there.

I like either your current solution or the load all on creation better that this,


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62316/new/

https://reviews.llvm.org/D62316





More information about the lldb-commits mailing list